Hanzo
OpenapiKms

Exchanges a machine credential for an IAM bearer token.

Exchanges a machine credential for an IAM bearer token.

POST /v1/kms/auth/login

Addresshttps://api.hanzo.ai/v1/kms/auth/login
MethodPOST
Operationpost_kms_auth_login
AuthAuthorization: Bearer $HANZO_API_KEY

Exchanges a machine credential for an IAM bearer token.

Takes a tenant's machine credential — a client id and client secret — and returns an owner-scoped IAM access token with its lifetime, which is the bearer the caller then carries on the org-scoped secret operations.

It is deliberately public and unauthenticated, because it IS the credential exchange and runs before any principal exists. That makes it the one route in this subsystem rate-limited PER SOURCE IP, keyed on the real TCP peer rather than on any caller-supplied header, and body-capped at the same door.

The submitted secret is never logged and never echoed, and failures collapse to one clean status with no upstream detail: 401 when the credential does not authenticate, 502 when the identity provider is unreachable, 503 when no issuer is configured. That is on purpose — a richer error would be a validity oracle for guessed credentials.

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
clientIdbodystringClientID is the machine identity's id, as IAM issued it.
clientSecretbodystringClientSecret is that identity's secret.

Response

StatusBodyMeaning
200kmsTokenok

200 body — 3 fields.

FieldInTypeAlwaysDescription
accessTokenbodystringAccessToken is IAM's own JWT, verbatim.
expiresInbodyintegerExpiresIn is the token's lifetime in seconds, as IAM reported it.
tokenTypebodystringTokenType is Bearer.

Failure carries the platform error shape — see Errors.

Examples

hanzo kms auth login

KMS API · All Hanzo APIs · Interactive reference

How is this guide?

On this page