Skip to main content
POST
Assume role
Requires the IAM action iam:AssumeRole. See IAM permissions for the full list, what each one covers, and an example policy.

Authorizations

Authorization
string
header
required

An OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. This is the recommended way to authenticate.

Get one by exchanging a service account's access key pair at POST /v1/oauth/token with grant_type=client_credentials. It is the standard client-credentials grant, so any OAuth-aware library will obtain and refresh it for you.

Tokens last an hour by default. The same access key pair is separately your AWS SigV4 credential for the S3-compatible object endpoint, which speaks nothing else.

Body

application/json
role
string
required

Account role UUID, immutable name in the selected account, or crn:iam:::role/. AssumeRole may use a qualified CRN to target another account in the same organization. The resulting session is bound to the target role account.

Example:

"crn:iam::production:role/reports"

duration_seconds
integer
default:3600

Credential validity duration (15 min to 12 hours)

Required range: 900 <= x <= 43200
Example:

3600

policy
object

An inline policy that scopes down the credentials being minted. It grants nothing on its own: every request made with the resulting credentials must be allowed by the assumed role's effective policies and by this document, so it can only narrow the permissions of the assumed role.

The document is validated on the way in and stored with the session — an invalid one fails the call with INVALID_INPUT rather than being ignored. Statements take the same shape as in a managed policy but carry no conditions; a session policy fences on actions and resources only.

Example:

Response

Role assumed successfully

A role session's credentials, in both forms it can be presented.

access_token is a bearer token for this API — send it as Authorization: Bearer <token>. The other four fields are AWS SigV4 credentials for the S3-compatible object storage endpoint, which speaks nothing else.

Both come from the same session and share its expiry, so revoking the session stops both at once. Use whichever the endpoint you are calling needs; there is no need to choose one at request time.

access_token
string

Bearer token for the Basaltic API. Present on every role session.

Example:

"eyJhbGciOiJFUzI1NiIsInR5cCI6ImF0K2p3dCIsImtpZCI6Ii4uLiJ9..."

token_type
string

Always Bearer when access_token is present.

Example:

"Bearer"

expires_in
integer

Seconds until access_token expires.

Example:

3600

access_key_id
string

SigV4 access key id, for the S3 endpoint.

Example:

"AKIA..."

secret_access_key
string

SigV4 secret, for the S3 endpoint.

Example:

"wJalrXUtnFEMI..."

session_token
string

SigV4 session token, for the S3 endpoint. Send as X-Amz-Security-Token and include it in SignedHeaders.

Example:

"FwoGZXIvYXdzE..."

expiration
string<date-time>

When the session — and therefore both credential forms — expires.

Example:

"2026-01-15T09:30:00Z"

account_id
string<uuid>

Owning account UUID of the target role.

account_handle
string

Owning account handle of the target role.

role_id
string<uuid>

Immutable UUID of the assumed role.