57 Commits

Author SHA1 Message Date
beubax 9c50afc585 feat: add global connection fallback registry 2026-06-10 13:57:38 +05:30
Manoj Bajaj ad23d60754 feat: Simplify identity portability 2026-06-05 12:23:32 +05:30
Manoj Bajaj a033bfe93f chore: satisfy pylint ruff checks 2026-06-04 22:22:50 +05:30
Manoj Bajaj 10f6e8ae41 fix: Remove type checking hacks 2026-06-04 21:28:22 +05:30
Manoj Bajaj 3aab2fbd48 chore: run ruff lint 2026-06-04 16:14:00 +05:30
Manoj Bajaj b96d593883 fix: resolve pre-commit failures 2026-06-04 11:50:56 +05:30
Manoj Bajaj 635285a565 feat: add provider dashboard metadata 2026-06-03 15:17:43 +05:30
Manoj Bajaj e69508552f Merge remote-tracking branch 'origin/main' into feature/nextjs-static-ui
# Conflicts:
#	src/authsome/server/routes/audit.py
#	src/authsome/server/routes/connections.py
#	src/authsome/server/routes/health.py
#	src/authsome/server/routes/ui.py
2026-06-01 19:24:29 +05:30
Manoj Bajaj 29bb29a388 refactor: remove legacy dashboard routes
Delete the server-rendered dashboard pages, remove the static asset mount, and route the Next dashboard provider login form through the browser-session auth path.
2026-06-01 16:04:36 +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
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
Manoj Bajaj 394c7a8b3a Merge pull request #337 from agentrhq/feature/api-url-list-support
refactor: support multiple API URLs per provider to allow flexible proxy routing and configuration
2026-05-27 12:46:11 +05:30
rishabhraj36 f8cf93663f refactor!: mount dashboard at / instead of /ui 2026-05-26 16:17:40 +05:30
Ankit Ranjan 3190332b08 refactor: support multiple API URLs per provider to allow flexible proxy routing and configuration 2026-05-26 14:16:48 +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
rishabhraj36 83ab4691e6 fix(proxy): address PR review feedback on mode validation and route defaults 2026-05-18 15:50:35 +05:30
rishabhraj36 21e74cd99a Merge branch 'main' into 260-feat-configurable-proxy-mode-intercept-scope-unmatched-policy 2026-05-18 02:30:53 +05:30
rishabhraj36 98e3a9ecea refactor(proxy): move proxy.mode from ServerConfig to ClientConfig 2026-05-16 11:34:43 +05:30
Ankit Ranjan da185352b2 refactor: rename provider host_url configuration field to api_url throughout codebase and documentation 2026-05-15 19:01:55 +05:30
rishabhraj36 61025fc659 Merge branch 'main' into 260-feat-configurable-proxy-mode-intercept-scope-unmatched-policy 2026-05-15 15:40:13 +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
rishabhraj36 ae0291b0ca feat(proxy): include provider name and dashboard URL in 403 deny body 2026-05-15 11:02:00 +05:30
rishabhraj36 72260f9929 fix: ruff check 2026-05-14 19:03:58 +05:30
rishabhraj36 255a2db2e3 feat(proxy): configurable mode CLI + provider hint in deny body 2026-05-14 19:01:00 +05:30
beubax 5c98ea5412 refactor: transition to persistent storage backend for sessions, identities, and audit events with async support 2026-05-14 18:04:16 +05:30
rishabhraj36 9878be8994 feat(proxy): configurable intercept scope and unmatched policy 2026-05-14 16:33:15 +05:30
Ankit Ranjan 52682ff1af Merge branch 'main' into refactor--persist-CA-in-macOS 2026-05-13 17:22:06 +05:30
Ankit Ranjan 939b7bc29b refactor: move macOS keychain CA management from ProxyRunner to local store module and update tests 2026-05-13 17:19:30 +05:30
Ankit Ranjan 3116c81ef0 refactor: remove macOS keychain cleanup logic and simplify ProxyRunner test suite assertions 2026-05-13 16:57:07 +05:30
beubax ccc481058e Merge branch 'feature/did-identity-pop-auth' of https://github.com/agentrhq/authsome into feature/did-identity-pop-auth 2026-05-13 14:48:04 +05:30
beubax 79f0a96806 refactor: rename profile to identity 2026-05-13 14:45:51 +05:30
Manoj Bajaj d6958c8434 refactor!: unify Identity and Profile; remove profile management layer
Profile is now a pure credential namespace scoped by the Identity handle,
not an independently managed entity. The two were always 1:1 but modelled
as separate concepts; this commit makes that explicit.

Key changes:
- Add `active_identity` to GlobalConfig; `ensure_local_identity` reads it
  and errors hard if the configured handle is missing on disk (no silent
  re-creation)
- `authsome init` writes `active_identity` to config after registration
- Collapse `registered: bool` + `registration_status: str` on
  IdentityMetadata into a single `registered: bool`; add `mark_registered()`
- Remove vestigial `Identity` dataclass, `DEFAULT_IDENTITY`, `current()`
- Remove `name`, `description`, `owner_email` from IdentityMetadata (deferred
  to hosted version)
- Remove `ProfileMetadata`, `ProfileNotFoundError`, `create_profile`,
  `list_profiles`, `get_profile`, `set_default_profile`, `default_profile`
  shim in save_config — profile is a side-effect of identity registration
- Add hard-error test for missing configured identity
- Update UBIQUITOUS_LANGUAGE.md, AGENTS.md architecture section, and
  ADR 0002 to reflect current code (fix stale AuthsomeContext, AuthClient,
  config.json path, ProfileMetadata references)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 614885258a45
2026-05-13 14:29:18 +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
rishabhraj36 0afaf8780c feat: add audit logging for proxy request injection and resolution misses, and include pytest-asyncio dependency. 2026-05-12 17:48:13 +05:30
beubax a050fc093c test: refactor test_runner_adds_keychain_cert_on_macos_and_removes_after_run to use async/await 2026-05-12 17:11:46 +05:30
beubax c148d0f5f4 test: import Mock in proxy test suite 2026-05-12 16:53:22 +05:30
Tejas 145734acce Merge pull request #241 from agentrhq/bugfix/go-tls-macos-keychain
fix(proxy): add mitmproxy CA to macOS keychain for Go tool TLS compatibility
2026-05-12 16:23:01 +05:30
beubax 807f0250e8 refactor: centralize proxy route and credential resolution logic in AuthService and update async testing patterns 2026-05-12 16:02:32 +05:30
Manoj Bajaj c9a98425e5 fix(proxy): add mitmproxy CA to macOS keychain for Go tool TLS compatibility
Go's crypto/x509 on macOS delegates certificate verification to the native
Security framework (SecTrustEvaluateWithError), which ignores SSL_CERT_FILE.
This caused gh, terraform, kubectl, and other Go-based CLI tools to fail with
x509 certificate errors when run via `authsome run`.

Add _add_ca_to_macos_keychain() to temporarily register the mitmproxy CA in
the login keychain before the subprocess starts, and _remove_ca_from_macos_keychain()
to clean it up in the finally block. The add is skipped if a cert with CN=mitmproxy
is already present, preserving any pre-existing user configuration.

Fixes #234

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: a67cae1674f7
2026-05-12 16:01:12 +05:30
beubax 5b2a4fc845 refactor: convert synchronous API route handlers and service methods to asynchronous execution 2026-05-12 15:35:00 +05:30
Ankit Ranjan 292af5278d refactor: modularize CLI architecture by migrating context management and helpers to dedicated modules 2026-05-11 14:14:46 +05:30
Ankit Ranjan b0835eb299 refactor: decompose monolithic CLI tests into modular, feature-specific test files 2026-05-08 17:41:50 +05:30
beubax 006ce3f19a fix: resolve circular import in server dependencies 2026-05-08 14:37:34 +05:30
rishabhraj36 65e6b6aaaa fix: ruff check fixed 2026-05-06 16:12:26 +05:30
Manoj Bajaj e2e82dff6a Merge branch 'develop' into convenience-ux-issues 2026-04-29 15:57:13 +05:30
Tejas 1603210e22 Merge branch 'develop' into fix/export 2026-04-29 13:52:13 +05:30
beubax e831c53287 refactor: simplify CLI usage by removing complex setup instructions and mentions of init; update export to set environment variables directly 2026-04-29 13:50:19 +05:30
rishabhraj36 2d8022eb11 fix: added support for regex check for API keys 2026-04-29 12:54:56 +05:30
Manoj Bajaj a57a7de009 feat: support regex proxy host urls 2026-04-29 12:48:00 +05:30