Interview Prep/DevSecOps/Cloud identity: IRSA, Workload Identity and CI OIDC

A role with `AdministratorAccess` gets `AccessDenied ... with an explicit deny in a service control policy`

IntermediateTroubleshootingCloud identity: IRSA, Workload Identity and CI OIDC
Answer

Likely causes → An AWS Organizations SCP denies the action in that account or OU, for example a region restriction, a ban on iam:CreateUser, or protection for CloudTrail. SCPs cap what any identity in the account can do, admins included. A permissions boundary has a similar effect (... with an explicit deny in a permissions boundary).

Diagnose → The error message names the policy type. Then:

aws organizations list-policies-for-target --target-id <account-id> --filter SERVICE_CONTROL_POLICY
aws iam get-role --role-name ci --query Role.PermissionsBoundary

Fix → If the action is legitimate, request an SCP exception (often a condition on aws:PrincipalArn for a break-glass or pipeline role). Do not try to work around the guardrail.

Prevent → Publish your SCP guardrails to teams, and test pipelines in an account under the same OU as prod.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Cloud identity: IRSA, Workload Identity and CI OIDC