A deployment platform issues OIDC tokens from one issuer for many repositories, branches, and audiences. An IAM role must accept only tokens for AWS STS from one repository's production branch, without stored AWS credentials; which trust configuration meets these requirements?
Show the answer
Correct answerC. Trust the OIDC provider for AssumeRoleWithWebIdentity and require exact audience and subject claim matches.
AWhy not this: An audience restriction alone does not distinguish repositories or branches that use the same audience.
BWhy not this: A subject restriction alone does not enforce the required token audience.
CWhy this is right: The federated principal and action enable token exchange; audience and subject restrictions enforce all stated token boundaries.
DWhy not this: AssumeRole requires AWS-authenticated requests; an external ID does not validate an OIDC token's claims.
Web identity federation avoids stored AWS credentials. Exact audience and subject conditions restrict tokens to the intended recipient and repository branch. Checking only the audience leaves other repositories and branches using that audience eligible.