Commit Graph
20 Commits
Author SHA1 Message Date
Herculino Trotta 517bce1800 docs(env): document PROCRASTINATE_WORKER_CONCURRENCY for task concurrency 2026-11-20 13:11:44 -03:00
Herculino Trotta 0f4f36fe85 chore(env): default example env to 1 worker with 4 threads 2026-11-20 12:57:35 -03:00
Herculino Trotta 9ba91383cd feat(docker): add WEB_THREADS to run gunicorn workers with threads 2026-11-20 12:55:34 -03:00
Herculino Trotta 4754f7e022 feat(api): serve a native MCP server at /mcp
Off unless MCP_ENABLED=true. Runs inside the web app (stateless Streamable
HTTP, JSON responses), so no extra container or supervisord program.

- Tools run the REST views in-process as the caller, so permissions,
  sharing, validation and transaction rules stay the API's.
- 11 curated tools with compact output, plus search_api/call_api to reach
  every other API endpoint from the OpenAPI schema.
- OAuth protected-resource metadata (RFC 9728) and a WWW-Authenticate hint
  on 401s, so MCP clients find the existing OAuth server and DCR.
- GET /api/transactions/summary/: totals per currency and type, optionally
  grouped by category, tag, entity, account or month.

API changes found while testing it:

- Writes no longer need Django model permissions, which nothing granted;
  access now matches the web UI (signed-in user, scoped querysets, owner-only
  edits of shared objects). API tokens and OAuth apps can now write for
  regular users.
- Account group owner is read-only; it could be set to another user.
- Reject negative installment, recurring, DCA and exchange-rate amounts, a
  zero recurrence interval, and performance on non-investment accounts.
- Accounts can be archived; group_id/exchange_currency_id are optional;
  category accepts null; currency prefix/suffix keep their spaces.
- Transactions filter by tags and entities.
- OpenAPI: separate request schemas (COMPONENT_SPLIT_REQUEST) and real
  descriptions for the viewsets and DCA chart actions.
2026-11-15 16:29:06 -03:00
Herculino Trotta 5b98779070 test(auth): add positive controls for local login and tighten basic auth check
- Add flag-off login page and admin password tests so the refusal tests can't pass for unrelated reasons
- Expect exactly 401 from refused basic auth
- Gate OIDC_DISABLE_LOCAL_LOGIN on an explicit OIDC_CONFIGURED flag
- Realign the README OIDC table, use "email" consistently, and warn about lockout with OIDC_ALLOW_SIGNUP=false
2026-11-02 16:41:52 -03:00
fariskazmi 161fc19721 feat(auth): add OIDC_DISABLE_LOCAL_LOGIN to turn off password logins
When the flag is on and an OIDC provider is configured, every e-mail and
password check is refused: the login page, the admin and the API's basic
auth. OIDC logins, API tokens, OAuth apps and permission checks keep working.
The login page hides the password form.
2026-11-02 09:08:30 -06:00
Herculino Trotta 89c7a6bd4f docs(auth): explain OIDC email trust modes 2026-10-10 17:01:56 -03:00
4273c541c5 Add API tokens and OAuth2 client support for external integrations
- Personal API tokens (model, user-settings UI, admin, management command,
  DRF auth class) for non-interactive API access from automations like n8n.
  Raw token shown once; only a SHA-256 hash is stored; last_used_at writes
  are throttled.
- OAuth2 authorization server via django-oauth-toolkit with authorization
  server metadata and optional, off-by-default Dynamic Client Registration
  (RFC 7591), so remote OAuth/MCP clients can authenticate and self-register.
- Tests for token auth, DCR gating and the management commands, plus
  .env.example and README documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 19:15:31 +04:00
Herculino Trotta e137666e99 docs: add missing oidc variables to example env 2025-06-16 22:27:42 -03:00
google-labs-jules[bot] 5d5d172b3b feat: Initial OIDC integration with django-allauth
I've added django-allauth and configured it for OIDC authentication.
This included changes to settings, URLs, and login templates to support OIDC.
I verified that the User model and UserSettings creation are compatible.
I also added documentation for OIDC environment variables to README.md.
2025-05-31 02:31:01 +00:00
Herculino Trotta 046e02d506 feat(app): add environment variables to automatically create superuser on startup 2025-03-31 02:11:13 -03:00
Herculino Trotta 62bfaaa62a feat: add TZ env var 2025-02-07 11:29:28 -03:00
Herculino Trotta 320217f64a Remove procrastinate name from .env 2025-01-30 14:47:13 -03:00
Herculino Trotta 190be3e813 docker: set single container as new default 2025-01-29 00:11:39 -03:00
Herculino Trotta eec2ced481 refactor(settings): drop SQL_ENGINE env variable as only postgres is supported 2025-01-26 11:19:38 -03:00
Herculino Trotta e3d3a7cf91 feat: add new envs 2025-01-23 14:30:59 -03:00
Herculino Trotta 696614ae50 docker: cleanup examples 2024-10-18 19:46:23 -03:00
Herculino Trotta b3b6bec44d refactor: cleanup .env.example 2024-10-14 11:04:50 -03:00
Herculino Trotta 49db2089e8 build: replace celery with procrastinate 2024-10-11 14:11:40 -03:00
Herculino Trotta 50b0c6ce01 initial commit 2024-09-26 11:00:40 -03:00