docs(cards): PATCH /cards/{id} is platform-authenticated, not SCA-railed - #799
Draft
kphurley7 wants to merge 1 commit into
Draft
docs(cards): PATCH /cards/{id} is platform-authenticated, not SCA-railed#799kphurley7 wants to merge 1 commit into
kphurley7 wants to merge 1 commit into
Conversation
The spec described a 202 -> signed-retry flow that the implementation never had. Rather than build it, drop it: the pattern signs with the session key of a credential on the owning internal account, so requiring it would make a platform unable to freeze or close a card without the cardholder present - which is exactly the fraud-response and offboarding case the verb exists for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JsJUrc9YRcfxEFqgXQEYvD
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
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.
Reason
PATCH /cards/{id}documented a202-> signed-retry flow that the implementation never had: it returns200directly, authenticated by the platform credential. One of the two has to give.The spec should give, because the documented flow is wrong for this verb. The 202 pattern signs the challenge with the session private key of a verified authentication credential on the card's owning internal account - the end user's key. That models actions taken by a user on their own credentials or funds, which is why
DELETE /auth/credentials/{id}andPOST /internal-accounts/{id}/exportuse it.Freezing or closing a card is routinely an action taken about a user and without them present: fraud response, offboarding, an ops-driven freeze. Under the documented flow none of those are possible through the public API, and the cardholder may be the adversary. We would have had to add a platform-authenticated bypass almost immediately, and that bypass would have become the path everyone actually used.
Overview
Grid-Wallet-SignatureandRequest-Idheader parameters.202response.200is no longer described as "signed retry accepted".401description, which described signature and challenge failures.Sensitive-data operations stay SCA-railed:
POST /cards/{id}/revealand 3DS password retrieval are unchanged, because there the cardholder is the party being served and user-present signing is the right model.Notes
No implementation change accompanies this - sparkcore already behaves this way, so this closes the divergence rather than opening one. Nothing is affected downstream: the card program is gated behind
GRID_CARD_PROGRAM_ENABLEDand is not public.Redocly validates clean; warning count unchanged at 50, none in this file. Spectral does not run locally (see #795).