Let the service account sign in to applications with a token of another issuer, for example a GitLab CI job token, a GitHub Actions token or a Kubernetes ServiceAccount token. Principal accepts a token only when its iss equals issuer, its sub equals subject exactly, its aud contains audience, it is not expired and its signature matches the keys of the issuer. Without jwks Principal reads the keys through OIDC discovery of the issuer, only from public addresses. jwks holds the public keys of an issuer Principal can't reach. The rules of each application still decide whether the service account signs in. An API token makes this change only when it was issued with allow_security_changes.
Parameters
Identity ID (UUID) of the service account
Request body application/json · ServiceAccountTokenTrustCreateRequest
The iss claim of the token, an https URL.
The sub claim of the token, compared exactly.
A value the aud claim of the token must contain.
Public signing keys of the issuer as a JWKS document, for an issuer Principal can't reach.
Responses
Created
ServiceAccountTokenTrustResponse · 7 fields
discovery when Principal reads the keys of the issuer, static when keys were pasted.
discoverystaticBad Request: the user is not a service account, the issuer is not an https URL, a field is empty or too long, jwks is not a set of public signing keys, or the service account already trusts 20 tokens.
Forbidden: the caller's roles do not grant the permission of the operation, the administrator's second factor was not confirmed recently (details.reason=mfa_reauth_required), or the request uses an API token issued without allow_security_changes (details.reason=api_token_security_changes_not_allowed).
Not Found: no such user in the organization, or no such trusted token of this user.
Conflict: another service account of the organization already trusts this issuer and subject, or the idempotency key was reused with another request.
Common errors: 401 413 429 503 504. They mean the same for every operation, see Errors.