Skip to content

docs(auth): remove provider-specific terms from public spec - #812

Draft
carsonp6 wants to merge 1 commit into
mainfrom
grid-api-strip-provider-terms
Draft

docs(auth): remove provider-specific terms from public spec#812
carsonp6 wants to merge 1 commit into
mainfrom
grid-api-strip-provider-terms

Conversation

@carsonp6

Copy link
Copy Markdown
Contributor

Summary

Concern-separated cleanup pass: strip pre-existing enclave/provider-specific vocabulary from the public Embedded Wallet auth spec and Global Accounts docs, replacing it with generic, accurate wording. No behavior or schema changes — description/example text only.

Grid's public API surface should not tip readers off to the enclave provider or its proprietary internals. This removes that provider-specific vocabulary while keeping every doc accurate.

What was genericized (prose)

Term removed Replaced with
TEK / "Target Encryption Key" "ephemeral P-256 keypair" / "session signing key" / "the private key it generated" (per context)
"enclave key", "signed enclave bundle", "the enclave expects", "sandbox enclave keypair" "encryption target key", "signed bundle", "Grid expects", "sandbox keypair"
kid":"turnkey" inside the example OTP payloadToSign JWT header regenerated JWT with a plain {"alg":"ES256"} header (token is illustrative/opaque; the client stamps it byte-for-byte either way)

Files touched: AuthMethodResponse, AuthSession, AuthSignedRequestChallenge, auth_credentials_{id}_verify, internal_accounts_{id}_export, and the Global Accounts snippets (authentication, client-keys, walkthrough, sandbox-global-account-magic). Bundle regenerated via make build.

What was KEPT (with reasoning) — please confirm

HPKE (RFC 9180). I deliberately kept HPKE. It is a public IETF standard, not a provider identifier — many services use it, and it does not point at any particular enclave vendor. More importantly it is load-bearing: the client-keys guide documents the exact cipher suite (DHKEM(P-256, HKDF-SHA256) + HKDF-SHA256 + AES-256-GCM) and the code samples import real HPKE libraries (@hpke/core, BouncyCastle HPKE, CryptoKit HPKE.Recipient). Genericizing it to "an encryption library" would make the integration guide non-functional and less accurate. Flagging per the "don't break accuracy" guidance — happy to strip it from narrative prose too if you'd rather, but it must stay in the cipher-suite spec + code.

What was FLAGGED, not changed (needs a design call)

These expose the real signed wire format or the real returned envelope structure. Genericizing them would make the examples lie about the bytes the client signs/receives, so I left them as-is:

  1. payloadToSign activity-request JSON — the literal bytes the client stamps, containing ACTIVITY_TYPE_* + "organizationId":"org_...":
    • openapi/paths/auth/auth_credentials.yaml (UPDATE_USER_EMAIL / UPDATE_USER_PHONE_NUMBER / CREATE_OAUTH_PROVIDERS / CREATE_AUTHENTICATORS_V2)
    • openapi/paths/customers/customers_{customerId}.yaml (UPDATE_USER_EMAIL / PHONE)
    • openapi/paths/auth/auth_sessions_{id}_refresh.yaml (CREATE_READ_WRITE_SESSION_V2)
    • openapi/paths/internal_accounts/internal_accounts_{id}.yaml (SIGN_RAW_PAYLOAD_V2)
    • openapi/components/schemas/common/SignedRequestChallenge.yaml (ACTIVITY_TYPE_EXAMPLE)
    • openapi/components/schemas/common/PaymentEmbeddedWalletInfo.yaml (SIGN_TRANSACTION_V2)
    • mirrored in authentication.mdx, exporting-wallet.mdx, walkthrough.mdx, managing-sessions.mdx
  2. enclaveQuorumPublic bundle envelope field — the real field name in the returned OTP-target / wallet-export bundles the client must parse (+ the export bundle's inner organizationId). Renaming it would misrepresent the wire format. Appears in AuthMethodResponse, auth_credentials, auth_credentials_{id}_challenge, InternalAccountExportResponse, and the export/walkthrough snippets.

Because the payloadToSign value is the exact byte string the client signs, you cannot hide the activity-type/org-id format without either (a) lying about what's signed, or (b) changing how payloadToSign is presented (e.g. an opaque base64 the client signs blindly). That is a product/design decision, not a docs edit — hence flagged rather than guessed.

Validation

  • make build — bundle regenerated, openapi.yaml + mintlify/openapi.yaml in sync with sources.
  • make lint (redocly + spectral) — 0 errors (remaining 147 warnings / 511 infos are pre-existing on unrelated schemas: BRL/CAD/COP/Stablecoin/etc.).
  • oasdiff breaking vs base — no breaking changes (description/example text only).

🤖 Generated with Claude Code

Strip enclave/provider-specific vocabulary from the public Embedded
Wallet auth spec and Global Accounts docs, replacing it with generic,
accurate wording:

- "TEK" / "Target Encryption Key" -> "ephemeral P-256 keypair" /
  "session signing key" / "the private key it generated", per context.
- Drop the gratuitous "enclave" framing in prose ("enclave key",
  "signed enclave bundle", "the enclave expects") in favor of
  "encryption target key" / "signed bundle" / "Grid expects".
- Regenerate the example OTP `payloadToSign` JWT so its header no
  longer carries a provider name in `kid` (the token is illustrative
  and opaque; the client stamps it byte-for-byte regardless).

Kept: HPKE (RFC 9180) where it is the load-bearing crypto standard the
client integration code genuinely uses (client-keys cipher-suite spec +
code samples) - it is a public IETF standard, not a provider identifier.

Wire-format examples that expose the real signed bytes
(`payloadToSign` activity JSON, `enclaveQuorumPublic` bundle envelopes)
are left untouched and flagged for a design call rather than falsified.

Bundle regenerated (`make build`); redocly + spectral lint clean
(0 errors); oasdiff reports no breaking changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Grid 🟢 Ready View Preview Aug 10, 2026, 5:26 PM

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Aug 10, 2026 5:24pm
grid-wallet-demo Ignored Ignored Aug 10, 2026 5:24pm

Request Review

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

chore(internal): regenerate SDK with no functional changes

go

docs(api): simplify authentication keypair terminology in credential docs

kotlin

docs(api): update keypair terminology in auth and customer documentation

openapi

docs(api): remove TEK terminology from auth credential verification docs

php

docs(api): update encryption keypair terminology in auth documentation

python

docs(api): simplify keypair terminology in auth credentials and sessions documentation

ruby

docs(api): remove TEK terminology from auth documentation

typescript

docs(api): remove TEK terminology from auth/customers documentation

Edit this comment to update them. They will appear in their respective SDK's changelogs.

⚠️ grid-typescript studio · code · diff

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅ (prev: build ⏭️) → lint ❗ (prev: lint ⏭️) → test ✅

npm install https://pkg.stainless.com/s/grid-typescript/c7be812dc9a1cfd2b0d62e13ad02e4a798c76b10/dist.tar.gz
grid-openapi studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️

grid-ruby studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅ (prev: build ⏭️) → lint ✅test ✅

grid-go studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅ (prev: build ⏭️) → lint ❗test ❗

go get github.com/stainless-sdks/grid-go@bded0b6248e1b2ed068bfa6531eb0362550777f1
grid-kotlin studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ✅lint ✅test ❗

⚠️ grid-python studio · code · diff

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅ (prev: build ⏭️) → lint ❗ (prev: lint ⏭️) → test ❗

pip install https://pkg.stainless.com/s/grid-python/da12473fec744793681d48be327af061196064f2/grid-0.0.1-py3-none-any.whl
grid-php studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅lint ✅test ✅

grid-cli studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ⏭️ (prev: build ❗) → lint ⏭️ (prev: lint ❗) → test ❗


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-08-10 17:32:39 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant