feat(agents-login): store captured credentials in agents-api Postgres, not Vault#730
Merged
Merged
Conversation
…, not Vault
The login worker no longer writes Claude/Codex tokens to Vault. On a
successful capture it POSTs them to agents-api's in-cluster ingest
endpoint (POST /api/v1/internal/credentials, bearer-authenticated),
which persists them per user in Postgres; capture fails loudly and
stores nothing when no token is produced.
- New agentsApiClient replaces vaultClient; config gains
AGENTS_API_INTERNAL_URL + AGENTS_API_INTERNAL_BEARER and drops the
Vault settings.
- Worker manifest wires the agents-api URL + internal bearer and drops
the Vault role/env; egress to agents-system retained.
- The Vault claude-oauth / codex-oauth VaultStaticSecrets, their
kustomization entries, and the agents/{claude,codex}-oauth Vault
policy paths + agents-oauth-writer role are removed.
- Docs updated to describe Postgres-via-agents-api storage.
The agents/claude-oauth + agents/codex-oauth Vault paths and the agents-oauth-writer role were removed (OAuth tokens now persist in agents-api Postgres), so the bootstrap-validate workflow no longer asserts them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to the agents-repo user-scoped credential store. The agents-login worker stops writing Vault and hands captured Claude/Codex tokens to agents-api, which persists them per user in Postgres.
POST /api/v1/internal/credentials(bearer-authenticated, in-cluster) with{userId, provider, payload};agentsApiClientreplacesvaultClient. Capture fails loudly and persists nothing when no token is produced.config.ts: addsAGENTS_API_INTERNAL_URL+AGENTS_API_INTERNAL_BEARER, removes the Vault settings.claude-oauth/codex-oauthVaultStaticSecrets + kustomization entries, and theagents/{claude,codex}-oauthVault policy paths +agents-oauth-writerrole in bootstrap-auth.sh.Validation
agents-login: 78 tests + typecheck + lint pass. platform:
node --test56/56 pass. Render unaffected.