Skip to content
Hexel StudioDocs

Test whether a principal or workload identity could assume a role

POST/roles/{role_id}/trust-policy/simulate

Runs the same decision as role assumption without minting a session or changing anything. Pass a draft trust policy in policy to test it before saving. The simulated caller must belong to the role's organization; a role caller is simulated as a fresh one-hour session.

Path parameters

role_idstring

Role ID

Headers

Bearer <token>.

Body parameters

Simulation

calleroptional object

Caller is a principal of the role's organization (principal_type user, service_user or role, and id). Exactly one of Caller or Identity.

identityoptional object

Identity is a verified workload identity as STS would present it.

policyoptional object

Policy is a draft trust policy; empty uses the role's stored policy.

session_nameoptional string

Returns

200OKAssumeCheckResponse

allowedoptional boolean
durationoptional integer
matched_statementoptional string
organization_idoptional string
provider_idoptional string
reasonoptional string
role_idoptional string
scopeoptional AssumeScope
sourceoptional SourceIdentity

Errors

  • 400Bad Request
  • 404Not Found