fix container-config auth mode for 1Password-sourced Anthropic secrets - #468
Open
erichanwang wants to merge 1 commit into
Open
fix container-config auth mode for 1Password-sourced Anthropic secrets#468erichanwang wants to merge 1 commit into
erichanwang wants to merge 1 commit into
Conversation
buildOnePasswordMetadata hardcoded authMode: "api-key" for every 1Password-sourced anthropic/openai secret, since the server never sees the resolved value and can't detect the mode from it. container-config then always emitted ANTHROPIC_API_KEY instead of CLAUDE_CODE_OAUTH_TOKEN for OAuth tokens stored in 1Password, so OAuth injection silently never fired for that path. Adds an optional authMode field the caller sets explicitly for a 1Password-sourced anthropic secret (the UI now shows an API Key/OAuth Token toggle when a 1Password field is selected), and threads it through to the stored metadata that container-config branches on. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019XrcMxXTRMo1C8t4AyUJor
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.
fixes #387
changes
buildOnePasswordMetadata(secret-service.ts) hardcodedauthMode: "api-key"for every 1Password-sourced anthropic secret — the server never resolves the 1Password value, so it can't detect the mode from it the way it does for an inline value.container-configreads that storedauthModeand always emittedANTHROPIC_API_KEY, so OAuth token injection silently never fired for 1Password-sourced Anthropic OAuth tokens.authModefield tocreateSecretSchema/updateSecretSchema, threaded throughbuildOnePasswordMetadataso the caller can say which mode a 1Password-sourced anthropic secret isverification
pnpm --filter @onecli/api exec vitest run(all passing; pre-existing.prisma/clientfailure resolved afterpnpm db:generate, unrelated to this change)pnpm --filter @onecli/api exec tsc --noEmit -p .pnpm --filter web exec tsc --noEmit -p .pnpm --filter web exec eslint "src/app/(dashboard)/connections/_components/secret-dialog.tsx"git diff --checkpnpm check(full monorepo lint/check-types/format, ran via pre-push hook)