Article · Identity & Cryptography

IAM Wildcards Aren't the Whole Problem

A wildcard is a useful review signal. It is not a complete model of what a principal can actually do.

Published 4 min read

By

All articles
AWSIAMauthorizationleast privilege
Trust & provenance3 primary sources · reviewed Aug 12, 2026 · next review Nov 10, 2026
Trust and provenance

Editorial record

AI-assistance disclosure

AI assisted with repository-grounded drafting and source-packet assembly; Bryan Oubaita completed author review on 2026-08-12, and publication approval was recorded separately.

A human review was recorded.

Recorded limitations

  • The examples are analytical patterns and are not findings from a BaitaPhish or customer AWS account.
  • AWS services differ in resource-level permission, condition-key, and resource-policy support; current service authorization documentation must be checked.

Sources

  • Amazon Web ServicesPolicy evaluation logic

    Effective permissions depend on the interaction of identity, resource, boundary, session, SCP, and RCP policies.

    Retrieved
    Reuse
    link-only
  • Amazon Web ServicesProcessing the request context

    Applicable policies and condition results depend on the concrete request context.

    Retrieved
    Reuse
    link-only
  • Amazon Web ServicesIAM policy validation

    IAM Access Analyzer policy validation can identify policy errors and overly permissive patterns but does not replace environment-specific authorization analysis.

    Retrieved
    Reuse
    link-only

IAM wildcards deserve attention because they can express broad authority. Counting * characters, however, cannot tell you which requests a principal can actually make or what those requests can change.

An AWS authorization decision is evaluated for a concrete principal, action, resource, and request context across every applicable policy. A narrow-looking identity policy can combine with a permissive resource policy. A broad action can be constrained by resources and conditions. A permissions boundary, session policy, service control policy, resource control policy, or explicit deny can change the result.

A wildcard is a signal, not a risk score

Compare three policy fragments:

{ "Action": "s3:*", "Resource": "arn:aws:s3:::example/*" }
{ "Action": "s3:GetObject", "Resource": "*" }
{ "Action": "iam:PassRole", "Resource": "arn:aws:iam::111122223333:role/*" }

The first contains an action wildcard, the second a resource wildcard, and the third a partial resource wildcard. Their risk cannot be ranked from wildcard position alone. You need to know the data in the bucket, which buckets are reachable, whether conditions narrow the request, which roles can be passed, which services can receive them, and what those roles authorize.

Calculate the effective request path

AWS documents that authorization combines multiple policy types and that an explicit deny overrides an applicable allow. The combination rules vary with policy type and request context. AWS IAM policy evaluation logic

Review one request as a tuple:

principal × action × resource × context × applicable policies → decision

For each material path, capture:

DimensionQuestions
PrincipalUser, role, role session, service principal, or federated subject?
ActionRead, write, permission-management, or role-passing consequence?
ResourceWhich concrete ARN or resource class is reachable?
ContextSource identity, organization, network, tags, region, time, or session attributes?
PoliciesIdentity, resource, boundary, session, SCP, RCP, key, or trust policy?
EffectWhat data, identity, execution, or control-plane state can change?

AWS's request-context documentation describes how applicable policies compare principal, action, resource, and condition data from the request. AWS request-context documentation

Broad authority can hide without a visible wildcard

A policy can enumerate many sensitive actions and resources explicitly. It may contain no wildcard and still allow destructive administration. Conversely, a wildcard over a deliberately constrained resource namespace may present less reach than an explicit list covering production resources.

Other patterns also hide reach:

  • resource policies that name a principal or session;
  • role trust that accepts a broader federated subject than intended;
  • iam:PassRole combined with a service action;
  • tag-based conditions when the same principal can modify the tags;
  • KMS key policy and grant paths outside the identity policy being reviewed;
  • organization policies that differ between accounts or organizational units;
  • service-linked and cross-account behavior.

The question is not “does the document look broad?” It is “which high-impact effects are reachable, under which contexts, by which principal?”

Worked example: deployment plus role passing

Suppose a CI principal can update a compute service and pass one explicitly named runtime role. There may be no wildcard. If that runtime role can read all secrets and write to a production datastore, the deployment path can still obtain those capabilities by changing the workload image or configuration.

The exposure graph is:

CI principal → update service → pass runtime role → workload session → secrets/data

A line-by-line review of only the CI identity policy will miss the permissions attached to the passed role and the downstream resources that honor it. Remediation may require narrowing the pass-role condition, restricting deployment targets and artifacts, reducing the runtime role, and protecting the workflow that initiates deployment.

Use validators, then test meaningful paths

IAM Access Analyzer policy validation checks grammar and provides errors, security warnings, warnings, and suggestions. AWS IAM policy validation That is valuable static evidence. It should be combined with environment-aware analysis and controlled authorization tests for the requests that matter.

A useful review report should therefore include both:

  • syntactic and best-practice findings; and
  • effective access paths with principal, action, resource, context, policy sources, and consequence.

Practical takeaway

Keep wildcard checks because they are fast and often useful. Do not promote a wildcard count into an authorization verdict. Prioritize reachable high-impact effects, especially paths involving role assumption, role passing, resource policies, cryptographic keys, secret access, and production mutation.

Continue with Secure AWS Architecture: Decisions, Controls, Evidence, and Recovery for a broader control-and-evidence review.

Limitations

This Article does not calculate effective permissions for any AWS environment. The simplified policy fragments omit service-specific actions, conditions, and resource behavior. A real assessment must use current AWS service-authorization references, all applicable policies, and the deployed account and organization context.