OIDC Trust Check

OIDC Trust Check

Paste an AWS role trust policy and your GitHub Actions environment's branch and tag rules. See, for each release ref, whether GitHub or AWS would block it first.

The role's trust policy JSON, from IAM › Roles › Trust relationships. No credentials.

Repository, environment, account, subject format, the environment's branch and tag rules, and the refs to check. See the worked example below.

Ctrl + Enter checks

Paste the trust policy and the release configuration, then press Check refs.

Each ref you list gets a row: does the GitHub environment admit it, would the AWS role trust it, and which check blocks it first.

What it does

Moving a production release from a branch to tags touches two gates. The GitHub environment's deployment rules decide whether a job on that ref may use the environment at all, and the AWS role's trust policy decides whether the job's OIDC token may assume the role. A job that names an environment gets a sub claim that names the environment, not the ref, so a ref condition in the trust policy is a separate test. This page builds the default claims for each ref you list, checks both gates, and tells you which one blocks first.

Worked example: main releases, a tag does not

AWS role trust policy
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "GitHubMainRelease",
      "Effect": "Allow",
      "Principal": { "Federated": "arn:aws:iam::123456789012:oidc-provider/token.actions.githubusercontent.com" },
      "Action": "sts:AssumeRoleWithWebIdentity",
      "Condition": {
        "StringEquals": {
          "token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
          "token.actions.githubusercontent.com:sub": "repo:example-org/release-demo:environment:production",
          "token.actions.githubusercontent.com:ref": "refs/heads/main"
        }
      }
    }
  ]
}
Release configuration
{
  "repository": "example-org/release-demo",
  "environment": "production",
  "accountId": "123456789012",
  "subjectFormat": "legacy",
  "rules": {
    "mode": "selected",
    "branches": ["main", "release/*"],
    "tags": ["v1.*"]
  },
  "refs": ["refs/heads/main", "refs/tags/v1.2", "refs/tags/v2.0"]
}
Ref GitHub environment AWS trustIf the job runs First blocker
refs/heads/main Matches main Matches statement 1 Both supplied checks match
refs/tags/v1.2 Matches v1.* Blocks: ref expects refs/heads/main AWS trust policy
refs/tags/v2.0 Blocks: no tag rule matches Blocks: ref GitHub environment

v1.2 passes GitHub but not AWS: the trust policy still pins ref to refs/heads/main. To allow the intended tag family as well, move ref into a separate StringLike condition and give it both refs/heads/main and refs/tags/v1.*. Keep the exact sub and aud checks under StringEquals. v2.0 stays blocked by GitHub until a tag rule admits it.

How to use it

  1. Paste the role's trust policy from IAM.
  2. Write the release configuration: repository, environment, account ID, subject format, the environment's branch and tag rules, and the refs you plan to release from.
  3. Press Check refs and read the First blocker column. Fix that gate, then check again.

What it does not do

Questions

Why does my tag release fail with "Not authorized to perform sts:AssumeRoleWithWebIdentity"?

Often the trust policy checks ref for a branch, or the sub was written for a branch, while a job in an environment gets repo:OWNER/REPO:environment:NAME. Paste both here; the AWS column names the key that fails.

Why does GitHub say the tag is not allowed to deploy to the environment?

The environment's deployment rules list branch patterns and tag patterns separately. A tag needs a matching tag rule, even if a branch rule has the same text.

Is a wildcard in the sub condition safe?

A broad StringLike such as repo:example-org/* trusts every repository and environment in that owner. Prefer an exact environment subject, and use this page to confirm it still admits the refs you release from.

What does Indeterminate mean?

The page found something it will not judge safely, such as Protected branches only, a pattern with [ or an unsupported condition operator. It names it instead of guessing.

Do I need to paste credentials?

No. Only the policy document and the configuration JSON. Nothing is sent anywhere.

See it work

GitHub blocks v2.0 at its tag rules, and AWS blocks v1.2 at the role's ref condition.
GitHub blocks v2.0 at its tag rules, and AWS blocks v1.2 at the role's ref condition.
An explicit AWS deny blocks one tag, and an unsupported GitHub rule leaves another tag indeterminate.
An explicit AWS deny blocks one tag, and an unsupported GitHub rule leaves another tag indeterminate.
On a phone, each ref stacks with its first blocker last.
On a phone, each ref stacks with its first blocker last.

More pictures, and how OIDC Trust Check works