add card-scoped /auth/delegated-keys endpoints#574
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
✱ Stainless preview builds for gridThis PR will update the cli csharp go kotlin openapi php python ruby typescript ✅ grid-ruby studio · code
|
357e5a5 to
6c65f64
Compare
91998d0 to
87f26f1
Compare
87f26f1 to
2b2e4d1
Compare
d784a24 to
de24d16
Compare
be20645 to
cc2e38f
Compare
de24d16 to
d74182d
Compare
cc2e38f to
951aca3
Compare
951aca3 to
a5a89b7
Compare
d74182d to
972891c
Compare
a5a89b7 to
b8e1af2
Compare
972891c to
854df42
Compare
| @@ -0,0 +1,102 @@ | |||
| delete: | |||
There was a problem hiding this comment.
could we also add a get by id?
b8e1af2 to
f0d1d07
Compare
f0d1d07 to
bdc0231
Compare
POST /auth/delegated-keys (three-leg signed-retry creation),
GET /auth/delegated-keys (list), and DELETE /auth/delegated-keys/{id}
(signed-retry revocation, user-deletion first) for delegating Spark
token-transaction signing authority on an embedded wallet to a
platform-held P-256 API key.
Includes the regenerated bundles (openapi.yaml, mintlify/openapi.yaml)
via make build. make lint passes with no new findings.
bdc0231 to
8897e44
Compare
Merge activity
|

What
Adds the delegated signing key endpoints to the spec, wired to the schemas from the PR downstack:
POST /auth/delegated-keysGET /auth/delegated-keys?accountId=&cardId=PENDINGandREVOKEDDELETE /auth/delegated-keys/{id}Includes the regenerated bundles (
openapi.yaml,mintlify/openapi.yaml) viamake build.How the flows work
Delegation creates a non-root signer user holding a Grid-generated public key, then a policy granting that user raw-payload signing. The wallet owner alone constitutes the sub-org root quorum, so every activity must be stamped by the owner's session key — hence signed-retry legs mirroring
DELETE /auth/credentials/{id}:{cardId, nickname}on every leg. Initial call returns202withpayloadToSign,requestId, andexpiresAt; stamped retry returns a second202challenge; stamped retry of that challenge returns201DelegatedKey(ACTIVE). Grid derives the Embedded Wallet account from the card's funding sources. Each card may hold at most one non-revoked key (409otherwise); multiple cards can share the same funding account and still have distinct delegated keys. Abandoning mid-flow leaves aPENDINGkey that cannot sign.202withpayloadToSign,requestId, andexpiresAt; stamped retry deletes the signer user and its API key and returns204. That is the complete kill switch: signing stops because the credential is gone. The policy is intentionally left in place — its consensus references the deleted user (signer user IDs are never reused), so it is permanently inert and deleting it is unnecessary.The public 202 challenge shape is signer-agnostic. Clients sign
payloadToSignand retry withGrid-Wallet-SignatureandRequest-Id; Grid tracks the pending signer activity internally.After activation, Grid uses the card's custodied key to authorize signing for card-payment funding from the wallet balance — the platform never handles key material and the quote-execute contract is unchanged.
Security notes
Verification
make buildmake lint-openapiNotes for reviewers