Repository navigation
fix(rotation): OAuth client ids are identifiers, never rotated (CLI 0.16.2) - #299
Merged
Merged
Conversation
….16.2) c0upons CoinPay sign-in broke with `invalid_client: Invalid client_id`. c0upons--prod's COINPAY_CLIENT_ID held the same value as COINPAY_API_KEY, and a rotation writes every vault:key with the value's fingerprint, whatever the key is called. The 2026-11-22 coinpay-api-key run minted a new cp_live_ key, wrote it into COINPAY_CLIENT_ID too, and saved the rotator state as __ROTATE__COINPAY_CLIENT_ID (targets[0] was the client id), so the plan showed the client id as provider/coinpay/automatic from then on. - New method `identifier`: every *_CLIENT_ID (COINPAY_CLIENT_ID, *_OAUTH_CLIENT_ID, GOOGLE_CLIENT_ID...) gets it from the catalog, never automatic, with the reason. A __ROTATE__ entry claiming otherwise is ignored and reported in the plan with the command to reset it. - rotate-keys never writes a rotated value into a client id under another name (named in the result instead), records rotator state under the plan's own key, and skips a client id outright. - coinpay-api-key and coinpay-webhook-secret refuse a client id in preflight and mint without calling CoinPay. - rotation-set refuses random/provider/command/ssh-keygen for a client id. - Tests for each; docs/rotation.md. Co-authored-by: riotcoder <riotcoder@profullstack.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan24 finding(s) in the 11 file(s) this pull request changes. MEDIUM: 14 | LOW: 10
37 pre-existing finding(s) elsewhere in the repository — **HIGH**: 3 | **MEDIUM**: 17 | **LOW**: 17Not introduced by this pull request.
…and 17 more; the full set is in the SARIF artifact. Snippets are redacted; ThreatCrush never prints matched credential material. |
| const team = await makeTeam({ "a--prod": { COINPAY_CLIENT_ID: SAME }, "b--prod": { RESEND_API_KEY: SAME } }); | ||
| const fetch = (async (_url: any, init: any = {}) => | ||
| (init.method ?? "GET") === "POST" | ||
| ? new Response(JSON.stringify({ id: "new-id", token: "re_new_yyyyyyyyyyyyyyyy" }), { status: 201 }) |
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.
c0upons CoinPay sign-in broke with
invalid_client: Invalid client_id.c0upons--prod's COINPAY_CLIENT_ID held the same value as COINPAY_API_KEY,
and a rotation writes every vault:key with the value's fingerprint,
whatever the key is called. The 2026-11-22 coinpay-api-key run minted a new
cp_live_ key, wrote it into COINPAY_CLIENT_ID too, and saved the rotator
state as __ROTATE__COINPAY_CLIENT_ID (targets[0] was the client id), so the
plan showed the client id as provider/coinpay/automatic from then on.
identifier: every *_CLIENT_ID (COINPAY_CLIENT_ID,*_OAUTH_CLIENT_ID, GOOGLE_CLIENT_ID...) gets it from the catalog, never
automatic, with the reason. A ROTATE entry claiming otherwise is
ignored and reported in the plan with the command to reset it.
name (named in the result instead), records rotator state under the
plan's own key, and skips a client id outright.
preflight and mint without calling CoinPay.
🤖 Generated with Claude Code