add DelegatedKey schemas#573
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Greptile SummaryAdds six new OpenAPI component schemas for the upcoming delegated signing key endpoints (
Confidence Score: 4/5The create request schema is incomplete or its description is wrong — resolving the publicKey discrepancy before the endpoint implementation lands upstack is necessary to avoid a schema/implementation mismatch. The create request schema omits the
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/auth/DelegatedKeyCreateRequest.yaml | Missing publicKey property: the PR description lists it as required but neither required nor properties includes it; DelegatedKey.yaml's description contradicts the PR's "platform-held key" framing. |
| openapi/components/schemas/auth/DelegatedKey.yaml | Well-structured response schema; description "generated and custodied by Grid" is inconsistent with the PR's "platform-held" framing — needs alignment with whichever model is correct. |
| openapi/components/schemas/auth/DelegatedKeyStatus.yaml | Clean enum with bullet-list style descriptions for each status value; matches repo conventions. |
| openapi/components/schemas/auth/DelegatedKeyChallengeStep.yaml | Four-value enum (CREATE_USER, CREATE_POLICY, DELETE_USER, DELETE_POLICY) with clear descriptions tying each step to its endpoint; no issues. |
| openapi/components/schemas/auth/DelegatedKeySignedRequestChallenge.yaml | Correct allOf composition with SignedRequestChallenge; step discriminator wired to DelegatedKeyChallengeStep with proper required declaration. |
| openapi/components/schemas/auth/DelegatedKeyListResponse.yaml | Simple list wrapper consistent with AuthCredentialListResponse and other auth list schemas in the repo; no pagination needed at this resource cardinality. |
Sequence Diagram
sequenceDiagram
participant Platform
participant Grid API
Note over Platform,Grid API: Create Delegated Key (POST /auth/delegated-keys)
Platform->>Grid API: DelegatedKeyCreateRequest (accountId, nickname[, publicKey?])
Grid API-->>Platform: 202 DelegatedKeySignedRequestChallenge (payloadToSign, requestId, expiresAt, step=CREATE_USER)
Platform->>Grid API: Retry with Grid-Wallet-Signature + Request-Id
Grid API-->>Platform: 202 DelegatedKeySignedRequestChallenge (step=CREATE_POLICY)
Platform->>Grid API: Retry with Grid-Wallet-Signature + Request-Id
Grid API-->>Platform: 200 DelegatedKey (id, accountId, publicKey, nickname, status=ACTIVE)
Note over Platform,Grid API: Revoke Delegated Key (DELETE /auth/delegated-keys/{id})
Platform->>Grid API: DELETE request
Grid API-->>Platform: 202 DelegatedKeySignedRequestChallenge (step=DELETE_USER)
Platform->>Grid API: Retry with Grid-Wallet-Signature + Request-Id
Grid API-->>Platform: 202 DelegatedKeySignedRequestChallenge (step=DELETE_POLICY)
Platform->>Grid API: Retry with Grid-Wallet-Signature + Request-Id
Grid API-->>Platform: 200 DelegatedKey (status=REVOKED)
Reviews (4): Last reviewed commit: "feat(openapi): add DelegatedKey schemas" | Re-trigger Greptile
357e5a5 to
6c65f64
Compare
6c65f64 to
d784a24
Compare
Component schemas for the upcoming /auth/delegated-keys endpoints: DelegatedKeyCreateRequest, DelegatedKey, DelegatedKeyStatus, DelegatedKeyListResponse, DelegatedKeyChallengeStep, and DelegatedKeySignedRequestChallenge (SignedRequestChallenge + step). Schemas only — not yet referenced by any path, so the generated bundle is unchanged. Endpoints land in the next PR up the stack.
d784a24 to
de24d16
Compare

What
Adds the component schemas for the upcoming delegated signing key endpoints (
/auth/delegated-keys, next PR up the stack):DelegatedKeyCreateRequestaccountId+nickname— Grid generates and custodies the keypair server-sideDelegatedKeyDelegatedKeyStatusPENDING(no policy yet — cannot sign) /ACTIVE/REVOKEDDelegatedKeyListResponseDelegatedKeyChallengeStepCREATE_USER/CREATE_POLICY/DELETE_USER/DELETE_POLICYDelegatedKeySignedRequestChallengeSignedRequestChallengebase +stepdiscriminating which signer activity the stamp authorizesWhy
Grid needs delegated signing authority over an embedded wallet so it can act when the user requests a payment (recurring payments, automated settlement). Delegation registers a Grid-generated P-256 API key as a non-root signer user on the wallet's sub-organization with a policy granting signing authority — every step authorized by the wallet owner via the existing signed-retry stamp pattern. The private key is custodied by Grid and never returned to the platform.
Notes for reviewers
openapi.yaml) is unchanged in this PR. Endpoints + bundle regen land upstack.make lintpasses with no new findings.🤖 Generated with Claude Code