A trust policy decides who is allowed to assume an IAM role — it grants no AWS permissions on its own. IAM Role Trust Relationship Generator builds that statement for five principal shapes in one form: an AWS account (root), a specific IAM role or user ARN, an AWS service principal, a Federated SAML or OIDC identity provider, and — with a strong warning — the anonymous "*" principal that some genuinely public or heavily-conditioned trust relationships require.
Federated principals get real branching, not a cosmetic label: choosing SAML sets the action to sts:AssumeRoleWithSAML, choosing OIDC sets it to sts:AssumeRoleWithWebIdentity, and an optional audience value builds the <provider-host>:aud condition AWS recommends for Web Identity federation so a role trusting an OIDC provider is not left open to tokens issued for any audience. Every other principal type uses the standard sts:AssumeRole.
Two more optional conditions cover the hardening patterns that come up in almost every real cross-account or public-ish trust relationship: an External ID (sts:ExternalId) as the standard confused-deputy mitigation, and a Require MFA switch (aws:MultiFactorAuthPresent). All conditions this tool builds merge into one Condition block.
The "*" anonymous option exists because it is a real trust-policy shape — some setups (a role meant to be assumable cross-organization behind a strict External ID, for instance) legitimately use it — but it is also the single easiest way to accidentally expose a role to the entire internet, so it is never presented without an on-page warning, and pairing it with a hard-to-guess External ID is called out explicitly.
As with the rest of this tool suite, the shared statement builder defaults every statement to Resource: "*"; because trust policies use Principal in place of Resource, this generator explicitly strips that field so the copied JSON never carries a stray Resource key. Validation is structural only — Version, Statement, Effect, Action, and Principal presence — never a live AWS check, and every value you type stays in your browser.