>samit_hota
Back to research
Cloud Security

The Seam of Failure: Why Identity Handoffs Break Cloud Security

Samit Hota·
#cloud-security#iam#aws#threat-modeling

Every cloud practitioner knows the textbook Shared Responsibility Model diagram. It presents a clean, reassuring line: the cloud provider secures everything of the cloud—the hypervisors, physical datacenters, and underlying networking—while the customer secures everything in the cloud—the OS, runtime, application code, and data.

It is a tidy abstraction. It is also a dangerous fiction.

The vast majority of high-impact cloud incidents do not originate from zero-day hypervisor escapes on the provider’s side, nor do they come from simple, headline-grabbing mistakes like an open S3 bucket or a hardcoded API key in a public repository. The most destructive breaches occur directly in the grey zone between those two clean halves: the identity handoff seam where provider-managed orchestration meets customer-managed access logic.

When an incident turns catastrophic, it is almost always because an attacker found an implicit trust relationship sitting right on this interface—a boundary where both parties assumed the other was enforcing security controls.

The Myth of the Clean Line

The Shared Responsibility Model was drafted in an era dominated by simple Infrastructure-as-a-Service (IaaS). If you ran a virtual machine in EC2 or Compute Engine, the boundary was clear enough: AWS managed the Xen/KVM hypervisor; you managed the SSH keys and the Linux kernel.

Modern cloud architecture is rarely just IaaS. We now build systems using managed Kubernetes clusters, serverless pipelines, asynchronous event buses, and federated deployment workflows. In this architecture, cloud provider infrastructure is constantly executing code, making network calls, and manipulating resources on behalf of customer identities.

This creates a structural ambiguity. When AWS EventBridge invokes an AWS Lambda function, or when an EKS control plane provisions an AWS Application Load Balancer, who owns the runtime security boundary of that interaction?

The answer is that the boundary lives in the configuration of trust: resource-based policies, service-linked roles, and web identity federation. This is not pure provider infrastructure, nor is it pure customer application code. It is an identity glue layer. Cloud providers design this layer to be extremely permissive by default to reduce friction, leaving customers to discover the security implications only after a compromise.

The Mutual Assumption Trap

The handoff seam is so prone to failure because it relies on two diametrically opposed, implicit assumptions.

The cloud provider’s stance is strictly mechanistic: “We provided the policy grammar and validated the signature. If the customer signed off on a trust policy that allows sts:AssumeRole under these conditions, it is intentional business logic.”

The customer’s stance is operational: “We are using a managed service native to the cloud platform. The platform handles isolation, so as long as we follow the standard integration guides, the service boundary is safe.”

This mutual assumption creates a blind spot where critical authorization logic goes completely unmonitored.

Take service-linked roles and cross-account service principals. When a customer enables a managed security or logging service, the platform often requests permission to create broad IAM roles to operate across the entire organization. Security teams routinely grant these permissions because the service comes directly from the vendor.

However, if an attacker manages to exploit a logic flaw or a SSRF vulnerability in a workload that interacts with that managed service, they do not need to escalate privileges within their own operating environment. They simply leverage the delegated authority that the customer granted to the provider’s management plane, pivoting across boundaries that traditional network firewalls and host-based agents cannot even see.

Where the Seam Tears: OIDC and Confused Deputies

To see how this plays out in practice, consider two specific, pervasive failure modes at the handoff boundary: OpenID Connect (OIDC) federation and the classic Confused Deputy problem.

Federating CI/CD pipelines (like GitHub Actions or GitLab CI) with cloud IAM via OIDC is widely recommended as a security best practice because it eliminates long-lived static credentials. However, the security of this handoff rests entirely on claim validation—a check that sits directly on the boundary between the external identity provider and the cloud’s Security Token Service (STS).

When a developer configures an IAM role’s trust policy for GitHub Actions, AWS STS validates that the JWT was legitimately signed by GitHub. AWS has fulfilled its obligation. GitHub issued a valid token for a running workflow. GitHub has fulfilled its obligation.

Yet, if the customer’s IAM trust policy matches on the issuer (token.actions.githubusercontent.com) but fails to strictly enforce the sub (subject) condition down to the specific repository, environment, or git ref, any GitHub workflow in any public repository on the entire platform can present a valid JWT and assume administrative access to the customer’s cloud account.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "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"
        }
      }
    }
  ]
}

The configuration above is syntactically valid, uses valid vendor primitives, and passes basic syntax checks. It is also an immediate, critical vulnerability. Neither AWS nor GitHub broke; the failure occurred entirely in the semantic translation at the handoff.

A similar dynamic drives cross-account confused deputy vectors. When customers delegate access to third-party SaaS vendors or internal multi-tenant platforms using IAM roles, they frequently omit or misconfigure mandatory context conditions like aws:SourceArn or aws:SourceAccount. Without these explicit constraints, an attacker can trick the managed platform into using its legitimate, trusted access to act against an entirely different customer’s environment. The platform isn’t compromised, and the IAM role isn’t publicly exposed—yet the trust bridge between them is totally broken.

Why Automated Tooling Keeps Missing the Gap

Standard Cloud Security Posture Management (CSPM) tools fail to catch these issues because they are built to check simple, static states. They look for binary indicators: Is S3 bucket encryption turned on? Is port 22 open to 0.0.0.0/0? Is root MFA enabled?

These checks are easy to code, but they evaluate resources in isolation. They treat an IAM policy as a static document rather than a dynamic authorization graph evaluated against cross-platform identity claims.

Static analysis tools struggle with the handoff seam because detecting a seam vulnerability requires understanding intent across system boundaries. An IAM trust policy that delegates access to an external identity or a managed service principal is not inherently bad—it is how modern cloud architectures function. To determine if that delegation is secure, a scanner must evaluate:

  1. The exact scope of the condition keys enforced during token exchange.
  2. The operational trust model of the external entity sending the claims.
  3. The intersection of identity-based policies, resource-based policies, and service control policies (SCPs) acting on that trust path simultaneously.

Because conventional tooling treats identity and infrastructure as isolated domains, these ambient execution paths remain invisible until an attacker uses them to walk straight past the perimeter.

Redefining Control at the Identity Interface

If we want to stop real-world cloud breaches, we have to stop treating trust relationships as administrative overhead and start treating them as attack surface.

Security teams need to shift their threat modeling away from static workload scanning and focus explicitly on the identity handoff layer:

  • Enforce Strict Condition Grammar by Default: Never permit a cross-account or federated trust relationship without explicit context keys. For OIDC, mandatory enforcement of exact string/wildcard matches on subject claims (sub) must be built into pipeline automation templates. For provider services, aws:SourceArn and aws:SourceAccount must be non-negotiable prerequisites in deployment gates.
  • Audit the Interaction of Resource and Identity Policies: Evaluation logic in major clouds is notoriously non-intuitive when resource policies enter the picture. A resource policy on an S3 bucket or KMS key that grants access to an external account bypasses explicit identity boundaries in subtle ways. Model identity access paths holistically rather than auditing IAM roles in a vacuum.
  • Minimize Transitive Delegations: Treat every managed service role as an untrusted proxy. Apply explicit permission boundaries (PermissionsBoundary) to roles used by orchestration engines to ensure that even if the service logic is manipulated, it cannot escalate beyond its defined operational envelope.

The shared responsibility model isn’t broken, but the way we draw it is naive. The most dangerous point in your cloud architecture isn’t where you control the server, nor where the provider controls the hypervisor. It is the handshake in between.

Want a second set of eyes on your security posture?

Let's talk about where your real exposure is.

Book an advisory call