CLUTCHCALL_CREDENTIALS points at. You
register the public half with the gateway through the methods on this
page.
PublishServiceAccount
Register a new public key for a tenant. For rotation, you can also add
a new key next to an existing key.
Returns
Empty. Multiple keys can coexist for one tenant. This is
useful for rolling rotations.
RevokeServiceAccount
Remove a key. The gateway stops accepting JWTs signed with the matching
kid. The gateway closes each in-flight QUIC connection authenticated
with that kid within ~1 RTT.
Returns
Empty.
SessionAuth
Mint a short-lived browser-scoped JWT from an existing service account.
Use this method to give a token to a frontend (e.g. the TypeScript SDK
in browser mode). The frontend never sees the service-account private
key.
Request (SessionAuthRequest):
Response (
SessionAuthResponse):
The gateway pins the issued token to the requesting tenant’s origin
(the
Origin header sent during the WebTransport handshake). You
cannot redirect a token issued for tenant_a to tenant_b’s gateway
URL.
Rotation pattern
- Call
PublishServiceAccountwith the newprivate_key_id. Both keys are now valid. - Update every host that runs the SDK to use the new private key.
- Wait until all in-flight tokens signed with the old key expire (≤ 1 hour by default).
- Call
RevokeServiceAccountfor the oldprivate_key_id.

