Commit Graph

29 Commits

Author SHA1 Message Date
Ankit Ranjan 256753f320 feat: add agent detail view 2026-06-17 15:49:37 +05:30
rishabhraj36 d9d2c60563 feat: derive agent identity from a single private-key env var 2026-06-16 13:32:04 +05:30
beubax c68de27a15 fix: preserve pop replay auth errors 2026-06-10 15:48:34 +05:30
Manoj Bajaj 6fe11073c8 feat: Fix failing tests 2026-06-09 09:06:58 +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 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
Tejas e4a17790f7 Merge branch 'main' into feature/orthogonal-authsome-modules 2026-05-29 13:51:07 +05:30
Manoj Bajaj 63bd4c90aa refactor!: unify local and hosted into a single deployment flow
The daemon branched on AUTHSOME_DEPLOYMENT_MODE and ran two parallel
implementations of nearly every ownership concept. "Local and hosted
behave the same" was asserted in prose (ADR 0006) but never enforced in
code, so the paths were free to drift, and the synthetic local principal
let a second local identity silently inherit the admin principal.

Collapse to one flow, identical for every deployment: authsome init
registers an identity and gets back a browser claim URL; the user
registers email+password (first principal becomes admin); that principal
confirms the claim; PoP calls are then authorized.

- Remove AUTHSOME_DEPLOYMENT_MODE, get_deployment_mode(),
  LOCAL_PRINCIPAL_EMAIL, the Local*/Hosted* resolver and bootstrap
  classes, and the AuthService(deployment_mode=...) parameter.
- OwnershipResolver and IdentityBootstrapService become single concrete
  classes (the former hosted, claim-based implementations).
- Admin gating is purely role-based: non-admin principals are blocked in
  every deployment (previously implicitly allowed in local mode).
- The server UI always requires a hosted browser session; remove the
  vestigial HealthResponse.mode field.
- CLI ensure_identity_ready was already mode-agnostic; it now prints the
  claim URL to stderr for headless use.

Add ADR 0007 recording the decision; amend ADR 0006 and CONTEXT.md.

BREAKING CHANGE: existing local installs have an unclaimed identity under
local@authsome.internal and are rejected until the user registers a
principal (email+password) and claims the identity.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Entire-Checkpoint: d31cf246f6f2
2026-05-29 13:18:41 +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 b76903d74b feat: replace flat master-key vault encryption with Argon2id KEK/DEK model
Replaces the flat FernetEncryptionWrapper + EncryptionConfig model with a
proper envelope encryption scheme:

- MasterSecretResolver: unified resolution order (env → file → keyring →
  auto-generate) under a single AUTHSOME_MASTER_KEY env var; no separate
  passphrase vs raw-key distinction — both go through Argon2id
- DekManager: generates a random 256-bit DEK, wraps it with an
  Argon2id-derived KEK (AES-256-GCM), and stores the wrapped record in the
  KV store under __vault_meta__:__dek__ so it works with any KV backend
- AesGcmEncryptionWrapper: drop-in BaseEncryptionWrapper using AES-256-GCM
  per-value encryption via closure; replaces FernetEncryptionWrapper
- Vault: simplified — no longer owns crypto or lifecycle; receives an
  already-encrypted AsyncKeyValue; close() removed (caller manages store)
- EncryptionConfig removed from ServerConfig and models __all__
- Health route updated to report crypto_source from Vault properties
- Tests rewritten with fixtures and SimpleStore (in-memory); no DiskStore

BREAKING CHANGE: existing Fernet-encrypted vaults cannot be read back;
migration requires re-importing credentials.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: a778dfa71075
2026-05-27 14:01:42 +05:30
rishabhraj36 f8cf93663f refactor!: mount dashboard at / instead of /ui 2026-05-26 16:17:40 +05:30
Ankit Ranjan 7e3a63480c refactor: remove vault rekey functionality and associated endpoints 2026-05-25 18:03:47 +05:30
beubax e26d5841f3 feat: enable provider configuration management for hosted admins with required credential inputs and scope persistence 2026-05-25 14:39:04 +05:30
Manoj Bajaj e0ea86dc99 Merge pull request #315 from agentrhq/feat/login_flow
feat: login flow
2026-05-22 18:16:17 +05:30
beubax 35b4d3d562 refactor: clean up UI dashboard and add provider credential configuration flow support 2026-05-21 17:43:20 +05:30
Ankit Ranjan e7f418707a feat: implement vault rekey functionality with encryption source validation and add corresponding API and unit tests. 2026-05-21 14:50:04 +05:30
beubax 62b875427b Merge branch 'main' into refactor/ui 2026-05-21 14:37:14 +05:30
beubax c2be2a29ee refactor: secure /ready health endpoint by requiring authentication and scoping checks to the current user 2026-05-21 14:30:49 +05:30
Manoj Bajaj bb5a2a6152 refactor!: Create version 0.4 which adds support for principal, identity, vault key loading precedence and many more fixes 2026-05-20 21:29:50 +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
Manoj Bajaj 3951af8239 fix: correct import path and test fixture for ready endpoint
- Fix `health.py` import from non-existent `authsome.identity` to
  `authsome.actors` where `current_from_home` is defined
- Add missing `ConnectionRecord`, `AuthType`, `ConnectionStatus` imports
  in test_pop_auth.py
- Use `vault=` (not `identity=`) in `build_store_key` so the stored key
  matches the `vault:` prefix that `list_connections` searches

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: f4892f79b920
2026-05-20 19:00:33 +05:30
Manoj Bajaj 8688268d4e Merge branch 'main' into feature/principal-vault-identity-design 2026-05-20 18:55:40 +05:30
beubax 438c69f00e feat: redesign dashboard provider and connection flows 2026-05-20 18:27:43 +05:30
Ankit Ranjan 3fa9f97c8b feat: update health check to validate connections based on active identity and add test coverage 2026-05-20 13:26:19 +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
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
Manoj Bajaj 7ad14f60a3 feat: add did pop daemon authorization
Entire-Checkpoint: a6b771e5077a
2026-05-12 19:18:25 +05:30