Authentication models

Pydantic models generated from the OpenAPI document; import them from carmen_cloud_client.auth.models.

Key​

FieldTypeRequiredDescription
ktystr | NoneKey type; always RSA.
nstr | NoneRSA modulus (base64url).
estr | NoneRSA public exponent (base64url).
kidstr | NoneKey id — matches the kid header of minted tokens.
algstr | NoneSignature algorithm; always RS256.
usestr | NoneKey use; always sig.

JsonWebKeySet​

FieldTypeRequiredDescription
keyslist[Key]yesThe active signing key(s). Two entries appear briefly during key rotation.

OAuthErrorResponse​

FieldTypeRequiredDescription
errorstryesOAuth-style error code: invalid_client (missing/unknown API key) or access_denied (the key cannot use the bearer surface).
error_descriptionstr | NoneHuman-readable explanation.

TokenResponse​

FieldTypeRequiredDescription
access_tokenstryesThe bearer access token (RS256 JWT). Present it as Authorization: Bearer <token> on the /workspace/{workspaceId}/** routes.
token_typestryesAlways Bearer.
expires_inintyesToken lifetime in seconds (RFC 6749 §5.1); 3600 today. Tokens cannot be revoked once issued — request a new one after expiry.
expires_atintyesAbsolute expiry as unix epoch seconds (equals the token’s exp claim) — a convenience for wall-clock renewal scheduling.
workspace_idstryesThe workspace the API key belongs to — the {workspaceId} to use on the workspace routes; no separate discovery call needed.
rolestryesThe API key’s workspace role, e.g. ADMIN.
scopestryesThe granted scope, cc.workspace.<role>.<workspaceId> — the same format Cloud-Console tokens carry.