Commit Graph

22 Commits

Author SHA1 Message Date
beubax d54c4159ba fix: avoid audit shutdown deadlock 2026-06-15 14:15:25 +05:30
beubax 9c50afc585 feat: add global connection fallback registry 2026-06-10 13:57:38 +05:30
Manoj Bajaj b96d593883 fix: resolve pre-commit failures 2026-06-04 11:50:56 +05:30
Manoj Bajaj f661d8d360 feature!: Cleaner architechture, multi server compatible identities and cleaner ui 2026-06-03 15:34:55 +05:30
Manoj Bajaj 3a6e7e5231 refactor: Simplify server logic for clear reparation, reduce slop
Entire-Checkpoint: 34c348b255f6
2026-05-31 01:41:05 +05:30
beubax c42da7293a refactor: replace audit log file with SQLite-backed audit storage and rename hosted session components to browser sessions 2026-05-29 15:28:47 +05:30
beubax 7d43b567c8 feat: add principal_role parameter to AuthService and dependency injection routes 2026-05-29 13:30:34 +05:30
Tejas a3e52688ad Merge branch 'main' into feature/orthogonal-authsome-modules 2026-05-29 13:22:28 +05:30
beubax fbdf580cd6 refactor: introduce CredentialRepository and ProviderRepository to centralize storage and management logic; move functions into their respective domains 2026-05-28 18:30:14 +05:30
Manoj Bajaj 0ed077b9df feat: implement audit events and principal roles
Implement ADR 005 by routing audit events through OpenTelemetry with a server-owned SQLite exporter and query endpoint. Implement ADR 006 by persisting principal roles, assigning first principal admin, and enforcing admin-only routes at the FastAPI dependency layer.

Entire-Checkpoint: df60966364f1
2026-05-28 15:13:56 +05:30
beubax 6f0f61c372 refactor: replace file-based registry storage with a unified SQL-backed ServerStore implementation 2026-05-27 16:02:24 +05:30
beubax c161ab96d0 feat: implement HostedAccountService for email/password authentication and JWT session management 2026-05-22 18:13:06 +05:30
Manoj Bajaj 3610a69584 refactor: enforce module boundaries — registry impls to server/, AuthService to server/
Phases A–I of TODOS.md:

- Move all five registry classes (IdentityRegistry, PrincipalRegistry,
  VaultRegistry, IdentityClaimRegistry, PrincipalVaultBindingRegistry) from
  identity/ to server/registries.py. Domain model types stay in identity/.

- Break identity/local.py → cli/ coupling: inline _read/_write_active_identity_handle
  helpers so identity/ imports nothing from cli/.

- Remove VaultRegistry + get_server_home imports from auth/service.py; refactor
  revoke() to accept explicit vault_ids from the server layer.

- Move proxy_routes() and _build_route_entry() out of AuthService into
  server/proxy_catalog.py; proxy route delegates to build_proxy_routes().

- Move AuthService from auth/service.py to server/credential_service.py so
  auth/ becomes a true leaf (no vault/, audit/, or server/ imports). Update
  all 10+ import sites in server/, cli/ test files, and the top-level __init__.

- Remove global AuthService(identity="server") from app.py. Refactor /ready
  to resolve the local identity at request time and use app.state.vault directly.

- Remove vault.home property from Vault; replace all callers with store.home.

- Update AGENTS.md architecture table to reflect new file locations.

All 293 tests pass. ruff and ty clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 5c8526a4e7d2
2026-05-20 20:46:17 +05:30
Manoj Bajaj d8553baabb feat: ClaimStatus lifecycle, vault_id gating, ADR 0003 alignment
- Add ClaimStatus enum (PENDING/ACCEPTED/REJECTED) to IdentityClaimRecord
  with accept_claim() and reject_claim() on IdentityClaimRegistry
- HostedOwnershipResolver.resolve() now gates vault access on ACCEPTED;
  PENDING raises 403, REJECTED raises 403 with distinct message
- ensure_claimed_identity() auto-accepts on UI form submission — the form
  IS the approval act in this release; PENDING is transit state only
- Remove AuthService vault_id fallback (vault_id or identity); _coll now
  raises ValueError if vault_id is None, making missing wiring explicit
- /ready endpoint resolves vault_id via ownership_resolver instead of
  constructing AuthService with the identity handle as a stopgap
- create_auth_service() requires explicit vault_id parameter
- Rewrite ADR 0003 and update UBIQUITOUS_LANGUAGE.md to reflect opaque
  VaultId design (single segment, not principal_handle/vault_handle)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 8f56337e3615
2026-05-20 19:26:58 +05:30
beubax 923cc93aca feat: scope connections to vault, add claim flow and principal concept, confine UI session to principal view, and make vault/identity/principal orthogonal 2026-05-19 14:25:57 +05:30
beubax 378fa68a42 refactor: replace remote audit logging with local file-based audit and simplify daemon configuration management 2026-05-15 13:53:24 +05:30
beubax 79f0a96806 refactor: rename profile to identity 2026-05-13 14:45:51 +05:30
Manoj Bajaj 019bdd11e8 feat!: require server-registered identities
Make the daemon identity registry authoritative for protected PoP requests and remove implicit default-profile identity behavior.

Store daemon-owned state under server/ while keeping CLI signing identity files under identities/.

BREAKING CHANGE: Existing implicit default-profile installs must run authsome init again; profile:default credentials are not migrated.

Entire-Checkpoint: 557455816515
2026-05-12 19:58:43 +05:30
beubax 5b2a4fc845 refactor: convert synchronous API route handlers and service methods to asynchronous execution 2026-05-12 15:35:00 +05:30
beubax 32793d38ae refactor: update AuthService test fixture to remove unnecessary mock dependencies 2026-05-12 13:22:29 +05:30
Ankit Ranjan eaac7c4546 refactor: reformat mock patch statements in test_service for improved readability 2026-05-10 22:04:49 +05:30
Ankit Ranjan 9cd77ae6a6 test: add coverage for token refresh failure logging and audit trails in AuthService 2026-05-10 22:02:06 +05:30