Repository navigation
Conversation
The cache key was the role ARN alone, and both environments default to `_default`, so a staging login overwrote the prod entry (and `creds` would silently serve/refresh staging credentials for a prod profile). Key entries by `<proxy host>/<role>` and let `creds` take `--proxy-url` / `SOURCE_PROXY_URL` to select the environment. BREAKING CHANGE: existing cached logins are no longer found; run `source-coop login` once after upgrading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Existing prod caches (keyed by role ARN alone) stay readable, so upgrading needs no re-login. Only non-production proxies get the host prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rebuild per-proxy cache keys on main's slot-based cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Key the login session by environment as well as role credentials, so a staging login no longer replaces production's session. Normalize proxy URLs with url::Url, keep non-default environments in their own cache directory, ignore cached entries minted at another environment's proxy, and add --proxy-url to 'auth token'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onment - The bare (pre-environment) slots now always mean data.source.coop, so staging and production builds sharing the keyring can't read each other's caches. - Sessions record their proxy and are ignored under another environment. - An environment with nothing cached adopts its entry from the production slot, where versions before environments stored every proxy's. - Ports get their own cache-directory segment, since '_' is legal in hosts. - login writes credentials under the role lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bare entries record no proxy, so the ones in the production slot are production's; copying them into an empty staging slot served prod credentials as staging until they expired. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eyring STS credentials are short-lived and re-minted from the login session, so they don't need the keyring. Keeping them out of it means a creds call with fresh credentials never touches the keyring, and macOS asks for the keychain password after each upgrade for one entry (the session) instead of one per role. Reads try the file first and fall back to the keyring, so credentials cached by earlier versions keep working. Entries that still carry their own refresh token (v0.3.0 and earlier) stay in the keyring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude finished @alukach's task in 14s —— View job ✅ No blocking issues — safe to merge. I read
Non-blocking note: an old keyring entry is never deleted once the file takes over. If the user never runs Simplify (ponytail)
💰 Estimated review cost: $0.11 · 0m13s · 6 turns |
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.
Problem
macOS keychain entries trust only the binary that created them. Release binaries aren't signed with a Developer ID, so after every CLI upgrade the Keychain asks for the user's password once for each entry: the login session plus one per role, per environment. A user with a couple of roles across prod and staging gets a burst of password prompts after each upgrade.
Change
0600cache files, not the keyring. They're short-lived and re-created from the session, much like the AWS CLI's own~/.aws/cli/cache. Acredscall that finds fresh credentials never touches the keyring.loginwrites a file that takes precedence.Result: after an upgrade, one keychain prompt per environment (for the session), and only when credentials actually need re-creating.
Testing
cargo testandcargo test --features staging: 30 passed, including the newrole_entries_round_trip_through_their_filecargo clippy --all-targets: cleancredswithHOMEpointed at a temp dir holding only a file-cached entry prints it, with no keychain access🤖 Generated with Claude Code