Chapter 7: Enterprise Cloud and Hybrid Security
Learning Outcomes:
- Design secure cloud architectures utilizing Cloud Access Security Brokers (CASBs).
- Apply the shared responsibility model to cloud infrastructure security.
- Implement container security and orchestration controls in cloud environments.
- Architect secure serverless workloads, functions, and resources.
- Design API security mechanisms including authorization, logging, and rate limiting.
- Evaluate cloud data security considerations, including exposure, leakage, and data remanence.
- Formulate customer-to-cloud connectivity strategies for hybrid infrastructures.
- Implement proactive, detective, and preventative cloud control strategies.
- Integrate government and industry-specific compliance requirements (e.g., FedRAMP) into cloud architectures.
Introduction
A decade ago, “the cloud” was still something experienced engineers argued about over coffee. Was it really more secure than a well-run data center? Could a regulated bank realistically put customer records on someone else’s servers? Was a multi-tenant environment with shared hardware ever going to be acceptable for sensitive workloads?
Those debates have largely ended — not because anyone won them on principle, but because the economics, scale, and operational maturity of public cloud platforms became impossible to ignore. The modern enterprise does not choose between cloud and on-premises in the way it once did. It runs hybrid: a mix of on-premises systems, public cloud, software-as-a-service applications, and a tangled web of integrations between all three. Each piece has its own threat model, its own controls, and its own division of responsibility between the customer and the provider.
This chapter is about navigating that complexity competently. We start with the foundational question of who is responsible for what in a cloud deployment — a question that, when answered wrong, has produced some of the most consequential breaches in recent history. We then examine the workloads themselves: containers, serverless functions, and the orchestration platforms that run them. From there, we look at how secure delivery pipelines extend into the cloud, how APIs and access brokers govern the boundary between users and services, and finally how cloud data is protected throughout its lifecycle — from creation to remanence.
Who is Responsible for Cloud Security?
The most common, most preventable, and most consequential cloud security failures all share a single root cause: a customer assumed the cloud provider was handling something the cloud provider was not handling. To avoid joining that list, the first concept any cloud architect must internalize is the shared responsibility model.
The Shared Responsibility Model
The shared responsibility model is a contractual and operational framework that defines which security obligations belong to the cloud provider and which belong to the customer. Every major cloud provider — AWS, Microsoft Azure, Google Cloud Platform, Oracle Cloud, IBM Cloud — publishes its own version of this model. The wording varies, but the underlying logic is consistent: the provider secures the infrastructure that delivers the cloud service, and the customer secures everything they put on top of it.
What “everything they put on top of it” means depends entirely on the service model:
Infrastructure as a Service (IaaS) — The customer rents virtual machines, virtual networks, and storage. The provider handles the physical data center, the host hardware, the hypervisor, and the network fabric. The customer handles the guest operating system, all software running on it, the data, identity and access controls, and network configuration. AWS EC2, Azure Virtual Machines, and Google Compute Engine are IaaS examples.
Platform as a Service (PaaS) — The customer deploys application code or containers onto a platform that the provider operates. The provider handles the OS, runtime, and patching of the underlying platform. The customer is responsible for application code, application configuration, data, and the identity layer. AWS Elastic Beanstalk, Azure App Service, and Google App Engine are PaaS examples.
Software as a Service (SaaS) — The customer consumes a complete application. The provider handles essentially everything except the customer’s data, the customer’s user accounts, and the customer’s configuration of the SaaS itself. Salesforce, Microsoft 365, and Google Workspace are SaaS examples.
Figure 7.1: The shared responsibility model across deployment types.
The further “up the stack” you move from on-premises to SaaS, the more
the provider takes on — but data and access management remain the
customer’s responsibility in every model.
A useful way to remember the dividing line: across every cloud service model, the customer is always responsible for data classification, identity and access management of their users, and configuration of the service. The provider may operate the database, but they cannot stop you from making the database publicly accessible. They run the storage backend, but they cannot stop you from disabling encryption. They authenticate API requests, but they cannot prevent you from issuing an access key with administrator privileges and committing it to a public Git repository.
| Layer | On-Premises | IaaS | PaaS | SaaS |
|---|---|---|---|---|
| Data and Access | Customer | Customer | Customer | Customer |
| Applications | Customer | Customer | Customer | Provider |
| Runtime / OS | Customer | Customer | Provider | Provider |
| Virtualization | Customer | Provider | Provider | Provider |
| Servers | Customer | Provider | Provider | Provider |
| Storage | Customer | Provider | Provider | Provider |
| Networking | Customer | Provider | Provider | Provider |
| Physical Facility | Customer | Provider | Provider | Provider |
Key Point Cloud providers are responsible for the security of the cloud (the infrastructure). Customers are responsible for security in the cloud (everything they configure, deploy, and store). When a misconfiguration leads to a breach, the customer owns the consequences — both regulatory and reputational — even if “the cloud” gets the news headline.
Example
The S3 bucket the provider cannot lock for you
An engineer at Emerald City Solutions creates an S3 bucket named
emerald-customer-exportsduring a prototype sprint. AWS encrypts it at rest by default using provider-managed AES-256 — that is the cloud’s responsibility, and it works. But the engineer switched off S3 Block Public Access (on by default for new buckets since 2023 (Amazon Web Services 2023b)) and set the bucket policy to"Principal": "*"(world-readable), because “it was just a test.” The sprint ended; the bucket did not.The data inside — monthly CSV exports with customer names and contract values — was the customer’s responsibility to protect. AWS’s infrastructure was not breached. Three controls the customer alone configures would have caught this: S3 Block Public Access enforced at the account level; a Service Control Policy (SCP), an AWS Organizations guardrail, that stops anyone from removing it or attaching public bucket policies; and a cloud security posture management (CSPM) scan — a tool that continuously compares cloud configuration to security baselines — flagging an “effective public read” bucket. All three were available. None was in place.
The shared responsibility model does not mean “the cloud is half to blame.” It means the dividing line is clearly documented, and misconfigurations on the customer side are the customer’s problem to own.
Customer-Managed vs. Cloud-Managed Keys and Licenses
A specific area where the shared responsibility line creates real architectural decisions is encryption key management. Every major cloud provider offers a spectrum of key-management options:
Cloud-managed keys (sometimes called “provider-managed keys”): The provider generates, stores, rotates, and uses encryption keys on behalf of the customer. The customer benefits from default-on encryption with minimal operational overhead, but the provider technically has access to the keys and can be compelled — by court order or by their own internal processes — to use them.
Customer-managed keys (CMK): The customer creates and controls the encryption keys, often through a managed service like AWS KMS, Azure Key Vault, or Google Cloud KMS. The provider still operates the key management infrastructure, but the customer controls policy, rotation, and revocation. This gives the customer the ability to revoke decryption — an option called cryptographic erasure (or crypto-shredding) that effectively renders all data encrypted under that key permanently inaccessible.
Bring Your Own Key (BYOK) and Hold Your Own Key (HYOK): For the most security-sensitive deployments, customers can import key material generated outside the cloud into the provider’s KMS (BYOK), or keep keys in an external HSM or key manager that the cloud must call out to for each cryptographic operation (HYOK). HYOK lets the customer instantly cut off cloud access by disconnecting that HSM, but at significant complexity, performance, and availability cost — if the key service goes down, so does access to the data.
The same logic applies to software licensing in the cloud. Some software (Windows Server or SQL Server on a cloud VM, for example) is rented with the license included in the hourly price. Other software is brought by the customer under a Bring Your Own License (BYOL) model, which can cost less but leaves license compliance, renewal, and vendor audits — including whether the terms permit cloud use — with the customer.
Quick Check 7.1
- Recall. Across IaaS, PaaS, and SaaS, which three responsibilities always remain with the customer?
- Discriminate. A team deploys code to Azure App Service. Microsoft patches the OS and runtime, while the team manages the application code, data, and identities. Which cloud service model is this?
- Apply. An engineer says, “The provider encrypts the bucket by default, so if the bucket is public that is the cloud’s problem.” Name two customer-side controls from the section that would have prevented the exposure.
Answers — Quick Check 7.1
- Data classification, identity and access management of the customer’s users, and service configuration. Those remain on the customer side in every cloud service model.
- PaaS. The provider runs and patches the platform, but the customer still owns the code, configuration, data, and identity layer.
- Account-level Block Public Access and an org-wide policy preventing public bucket policies would both have stopped the mistake. A CSPM scan would also have caught the effective public read before it became a breach.
How Do We Secure Cloud Workloads and Containers?
Once the responsibility lines are drawn, the next question is what we are actually running on the cloud platform. Most modern cloud workloads fall into two architectural styles: containerized applications running on orchestration platforms, and serverless functions that the platform invokes on demand. Each style has its own security model.
Container Orchestration Security
A container packages an application and its dependencies into a portable, lightweight execution unit that runs on top of a host operating system kernel. Docker is the most familiar container runtime; containerd and CRI-O are common alternatives. Containers do not virtualize hardware the way a VM does — they share the host kernel and are isolated through Linux namespaces and cgroups. This makes them dramatically faster to start and more efficient to run, but it also means that a kernel-level escape from a container reaches the host directly.
A handful of containers can be managed by hand. Hundreds or thousands of containers across multiple hosts cannot. Container orchestration platforms — overwhelmingly Kubernetes in modern environments — schedule containers across a fleet of hosts, manage their networking, restart failed instances, and roll out updates. Kubernetes deployments come in many forms: managed services like Amazon EKS, Azure AKS, and Google GKE; self-managed clusters; and lightweight distributions like K3s for edge environments.
Container security operates at four distinct layers:
Image security. The container image is the artifact you ship. Images should be built from minimal base images (Alpine, distroless), scanned for known vulnerabilities at build time using tools like Trivy, Clair, or Snyk, and signed cryptographically (using Cosign or similar) so that the runtime can verify their provenance before execution. Pulling unsigned images from public registries — or worse, latest-tagged images that change without notice — is a documented attack vector.
Registry security. Container images live in registries. Private registries (Amazon ECR, Azure Container Registry, Google Artifact Registry, or self-hosted Harbor) should require authentication, integrate with vulnerability scanning, and enforce signed-image-only policies for production pulls.
Runtime security. Once a container is running, what can it do? Kubernetes Pod Security Standards define three profiles (Privileged, Baseline, Restricted) that the built-in Pod Security Admission controller enforces per namespace; it replaced PodSecurityPolicy, removed in Kubernetes 1.25 (Project 2022). Under the stricter profiles, containers should not run as root, should not be privileged, should not mount the host filesystem, should drop all Linux capabilities except those they actually need, and should run with read-only root filesystems where possible. Tools like Falco watch syscalls inside containers and alert on anomalies — a container that suddenly opens a shell and starts probing the network is a strong indicator of compromise.
Orchestrator security. Kubernetes itself is a complex distributed system with its own attack surface. The Kubernetes API server is the central control plane and must be protected with strict authentication, role-based access control (RBAC), audit logging, and network restrictions. The etcd datastore that backs Kubernetes contains secrets and configuration; it must be encrypted at rest and access-restricted. Network policies (a Kubernetes resource) define which pods can talk to which other pods — without them, the cluster network is essentially flat, and a single compromised container can move laterally with ease. Admission controllers intercept API-server requests before objects are stored and can reject non-compliant ones — a privileged pod, or (through a policy engine such as OPA Gatekeeper or Kyverno) an unsigned image. Each pod should also get its own cloud identity (workload identity: IRSA or EKS Pod Identity on EKS, Entra Workload ID on AKS, Workload Identity Federation on GKE) rather than inheriting its node’s credentials.
Warning The default Kubernetes installation is permissive by design — it is engineered to “just work” so that developers can get a cluster running. This is the opposite of what production demands. RBAC must be tightened, network policies must be added, default service accounts must be replaced, and the API server must not be exposed to the internet without strong authentication. Several major cloud breaches have begun with an exposed Kubernetes dashboard or an unauthenticated etcd endpoint.
Serverless Functions and Resources
Serverless computing — also called Function as a Service (FaaS) — takes the abstraction one step further. The customer writes a function (a piece of code that responds to a specific event), uploads it to the platform, and the platform runs it on demand without the customer ever provisioning a server. AWS Lambda, Azure Functions, and Google Cloud Run functions (formerly Cloud Functions) are the canonical examples.
Serverless flips several familiar security assumptions:
There is no long-running host to patch. Each invocation runs in an ephemeral environment that the provider rebuilds from scratch. Operating system patching is the provider’s job, but the customer still owns the code, its libraries, and moving off deprecated language runtimes.
The attack surface shifts to the function’s permissions and triggers. The big questions become: what events can invoke this function, and what is the function authorized to do once invoked?
Logging and observability look different. There is no system to SSH into. Everything must be captured through the platform’s logging, tracing, and metrics infrastructure (CloudWatch, Application Insights, Cloud Logging).
Cold starts and ephemeral state mean traditional persistent runtime defenses (like long-lived RASP agents) need to be reimagined. Provider-native tools and dependency-based instrumentation become the primary controls.
The most important security control for serverless is the
principle of least privilege applied to function execution
roles (the IAM identity a function runs as). A function that
reads a single S3 bucket should have an IAM role that allows only
GetObject against that one bucket — not full S3 read, not
any other service. Over-permissioned functions are the
dominant serverless misconfiguration pattern, and they turn a small
code-level vulnerability into a much larger blast radius.
| Concern | Containers | Serverless Functions |
|---|---|---|
| OS Patching | Customer (image base layers) | Provider |
| Runtime Isolation | Namespaces + cgroups | Provider sandbox per invocation |
| Image / Code Scanning | Container image scanning at build | Code scanning + dependency scanning |
| Network Policy | Kubernetes NetworkPolicy / service mesh | Function event sources + VPC config |
| Identity / Permissions | Pod service account | Function execution role |
| Runtime Monitoring | Falco, EDR-style agents | Provider-native logs / traces |
| Persistent State | Persistent volumes or external stores | Externalized (DB, queue, cache) |
Case Study Dorothy Gale and the Sprawling Functions of Emerald City Solutions
Dorothy Gale joined Emerald City Solutions as a Cloud Architect, inheriting a serverless platform that had grown organically over four years. By any reasonable measure it was a success: more than 1,800 AWS Lambda functions handled everything from order processing to thumbnail generation to a half-dozen internal Slack bots built for fun, and the platform deployed reliably dozens of times a day. It was also, Dorothy quickly discovered, a security disaster.
Her first week, Dorothy ran an audit of IAM execution roles. Of the 1,800 functions, 1,200 had been deployed with a role originally created for a long-deleted prototype — a role that granted
*:*on*. In other words, twelve hundred functions, any one of which a remote attacker could potentially reach through a misconfigured event source, had full administrator permissions on the entire AWS account.Her second discovery was almost worse. The deployment pipeline embedded a shared API key into environment variables for any function that needed to talk to the company’s payment processor. The variable name was the same in every function. The key was visible to anyone with read access to the Lambda configuration — which, thanks to the same broad IAM role, was effectively anyone with developer credentials.
Dorothy’s response had three parts. First, she introduced an automated policy in the deployment pipeline that rejected any function whose execution role was wider than a small set of pre-approved templates. Existing functions were migrated in waves, with each team given a deadline and a tool that auto-generated a least-privilege role from the function’s actual API call history. Second, she replaced the embedded API key with a rotating secret stored in AWS Secrets Manager, retrieved at function start using a dedicated, auditable IAM permission. Third, she layered AWS CloudTrail logging into a SIEM and built alerts for any function that successfully invoked an API outside its declared least-privilege envelope — turning unexpected behavior into an investigation rather than a breach.
The payoff came a year later, when an attacker briefly compromised a developer’s laptop through a phishing email. The lateral path that would once have led to “everything” now ended at a single development function with read access to a single non-production bucket.
Quick Check 7.2
- Recall. What are the four layers of container security described in the section?
- Discriminate. A Kubernetes pod runs as root, is marked privileged, and mounts the host filesystem. Which container-security layer is failing most directly?
- Apply. Dorothy finds Lambda functions with
*:*permissions and a shared payment API key in environment variables. Name two changes she made to reduce that risk.
Answers — Quick Check 7.2
- Image security, registry security, runtime security, and orchestrator security. The chapter treats each as its own control layer.
- Runtime security. Those are exactly the kinds of conditions Kubernetes pod security standards are meant to prevent.
- She replaced the wildcard role with least-privilege execution-role templates and moved the shared API key into Secrets Manager with dedicated access permissions. She also layered logging and alerting around unexpected API use.
How Do We Automate Cloud Delivery Securely?
Cloud platforms are operated through APIs. Whatever you can do in a web console, you can do — and probably should do — in code. This is both an opportunity and a risk. Automation lets a small team safely manage thousands of resources; it also lets a single misconfigured pipeline create a thousand misconfigured resources before anyone notices.
CI/CD Pipelines for Cloud Platforms
The CI/CD principles introduced in Chapter 6 carry directly into cloud delivery, but a few cloud-specific concerns deserve emphasis:
Pipeline credentials must not be long-lived static keys. Modern cloud platforms support OIDC federation between CI/CD systems (GitHub Actions, GitLab CI, Azure DevOps) and cloud identity providers. The pipeline obtains a short-lived, audience-scoped token at run time rather than storing a permanent IAM access key. If the cloud role’s trust policy is pinned to a specific repository and branch (the token’s subject claim), a stolen token is useful only briefly and only for that pipeline — but a policy without that condition lets any repository on the platform request the role. A leaked static key gives full access until it is rotated.
Pipelines need their own least-privilege identity. A pipeline that deploys a frontend application does not need permission to read the customer database. Each pipeline should have a dedicated role that authorizes only the actions it actually performs.
Production deployments should require human approval. Automated deployments to development and staging are appropriate; automated deployments to production from a
mainmerge are common; but a deployment that touches production data, deletes resources, or modifies IAM should require explicit human sign-off in the pipeline.
Infrastructure as Code: Terraform, Ansible, and Configuration Management
Infrastructure as Code (IaC) is the practice of describing cloud infrastructure in declarative configuration files that are stored in version control, reviewed via pull requests, and applied through pipelines. The two most widely deployed tools in the SecurityX exam orbit are:
Terraform (source-available rather than open source since HashiCorp’s 2023 license change) and its open-source fork OpenTofu: Declarative IaC tools that support virtually every cloud provider through a plugin model. Terraform configurations describe the desired state of infrastructure; Terraform itself computes the diff between current and desired state and applies the necessary changes. Its state file records every managed resource’s attributes, including secrets such as database passwords, so keep it in an encrypted, access-controlled remote backend, never in Git. AWS CloudFormation and Azure Resource Manager (ARM/Bicep) fill the same role natively for their platforms; Google Cloud’s Deployment Manager has been retired in favor of the Terraform-based Infrastructure Manager (Google Cloud, n.d.).
Ansible: A configuration management tool that uses YAML “playbooks” to describe the desired state of systems. Ansible is agentless (it connects over SSH or WinRM) and is most commonly used to configure operating systems and applications inside virtual machines, though it can also provision cloud resources.
The security benefits of IaC are substantial: every infrastructure change is reviewable, auditable, and reproducible. The risk is that a single committed error — an open security group, a public storage bucket, an overly broad IAM role — gets propagated everywhere by automation.
The mitigation is policy-as-code. Tools like
Open Policy Agent (OPA) with the Rego policy language,
Checkov, and Trivy (which absorbed the
older tfsec scanner) scan IaC files in the pipeline and reject changes
that violate policy before they are applied. A Terraform pull
request that creates an S3 bucket without server-side encryption can be
rejected automatically; a Kubernetes manifest that requests
privileged: true can fail the merge check. This shifts
misconfiguration discovery from production audits to development
feedback loops.
Example
Catching a misconfigured storage bucket in Terraform before it ships
A developer submits a pull request adding a new Terraform resource:
resource "aws_s3_bucket" "reports" { bucket = "emerald-quarterly-reports" }No public-access block. No encryption configuration. Checkov, running in the CI pipeline, fails the PR instantly with two findings (abridged):
Check: CKV2_AWS_6: "Ensure that S3 bucket has a Public Access block" FAILED Check: CKV_AWS_19: "Ensure all data stored in the S3 bucket is securely encrypted at rest" FAILEDThe developer adds the two missing resources and the pipeline passes:
resource "aws_s3_bucket_public_access_block" "reports" { bucket = aws_s3_bucket.reports.id block_public_acls = true block_public_policy = true ignore_public_acls = true restrict_public_buckets = true } resource "aws_s3_bucket_server_side_encryption_configuration" "reports" { bucket = aws_s3_bucket.reports.id rule { apply_server_side_encryption_by_default { sse_algorithm = "AES256" } } }The check runs in seconds and catches a class of misconfiguration that has led to major public breaches. The principle is the same as SAST but for infrastructure: shift the discovery left, into the PR review, before the resource ever exists in production.
Quick Check 7.3
- Recall. What identity pattern should CI/CD pipelines use instead of long-lived static cloud keys, and what does policy-as-code do?
- Discriminate. Checkov rejects a Terraform pull request because it would create an unencrypted, publicly reachable bucket. Is that CSPM or policy-as-code?
- Apply. A frontend deployment pipeline stores a permanent cloud admin key and can modify production IAM. Name two design fixes from the section.
Answers — Quick Check 7.3
- OIDC federation with short-lived tokens should replace static keys. Policy-as-code scans IaC against security rules and rejects unsafe changes before deployment.
- Policy-as-code. The problem is being caught in the pipeline before the resource exists, not by post-deployment posture monitoring.
- Replace the static key with an OIDC-federated role and scope that role down to only the deployment actions the frontend pipeline actually needs. High-impact production or IAM changes should also require human approval.
Package and Dependency Monitoring
The same supply chain concerns covered in Chapter 6 apply with extra force in the cloud, because cloud workloads are continuously rebuilt and redeployed. Package monitoring strategies include:
- Pinning provider versions in IaC to prevent silent upgrades that could change behavior.
- Scanning container images and serverless deployment packages at build time for known vulnerabilities, and re-scanning what is already deployed, because new flaws are disclosed daily.
- Subscribing to vendor advisory feeds for the cloud platforms and managed services in use.
- Integrating SBoMs into the cloud delivery pipeline so that every deployed artifact has a corresponding inventory.
Warning A container image’s
latesttag is not a stable artifact. Building a container image that pullspython:latestproduces a different result this week than next week. For production systems, pin to specific image digests (sha256 hashes), not tags — the digest is immutable, the tag is not.
How Do We Govern Cloud Access and APIs?
Cloud applications are, almost by definition, distributed: users access services from many places, services call other services, partners integrate via APIs, and shadow IT is everywhere. Two control families dominate this layer: Cloud Access Security Brokers for governing user-to-cloud access, and API gateways for governing service-to-service and external-to-service access.
Cloud Access Security Brokers (CASBs)
A Cloud Access Security Broker (CASB) is a security control point — usually a SaaS service or a software appliance — that sits between users and the cloud applications they consume. The CASB enforces enterprise policy: who can access which apps, what data can be uploaded or downloaded, what actions are logged, and what constitutes anomalous behavior. CASBs were initially developed to address Shadow IT — the phenomenon of employees adopting cloud services without IT involvement — but they have grown into general-purpose cloud access governance platforms, and today they are usually delivered as one component of a SASE or Security Service Edge platform (Chapter 4).
CASBs operate in two architectural patterns, often combined:
API-based CASBs integrate with the SaaS platform’s management API to inspect data already stored in the service. They can scan for sensitive data, enforce DLP policies retroactively, and audit configurations. They cannot block actions in real time — they detect and respond after the fact.
Proxy-based CASBs (forward proxy or reverse proxy) sit inline between the user and the cloud service and inspect traffic in real time. They can block prohibited actions before they happen — preventing an upload of sensitive data, blocking access to an unsanctioned cloud app, or requiring step-up authentication for a high-risk action. Proxy mode is more powerful but introduces a critical path that must be highly available. A forward proxy usually needs an agent or proxy setting on a managed device; a reverse proxy (reached through single sign-on redirection) can cover unmanaged devices but often breaks thick clients and native apps.
CASBs typically deliver value across four functional pillars: visibility (discovering what cloud services are in use), compliance (enforcing policy on regulated data), data security (DLP across cloud apps), and threat protection (anomaly detection and account-takeover defense).
Shadow IT detection is one of the most consistently valuable CASB use cases. By analyzing egress firewall, web proxy, or DNS logs, the CASB can identify cloud services that employees are using without IT approval — the marketing intern who started uploading customer lists to a free file-sharing site, the engineer who set up a personal AWS account to “just test something,” the team that began collaborating in an unsanctioned Slack workspace. Visibility is the first step; policy enforcement is the second.
Example
Proxy-mode CASB blocking a sensitive upload in real time
An HR coordinator selects a PDF containing twenty employee termination letters, opens a personal Google Drive tab in her browser, and drags the file to the upload target.
The proxy-mode CASB intercepts the HTTPS upload before it reaches Google’s servers. It scans the content inline and finds DLP matches for employee names and Social Security numbers — data the organization has classified as Restricted. The upload is blocked. The coordinator’s browser shows: “This upload was blocked by your organization’s data loss prevention policy. If you believe this is an error, contact IT Security.”
The CASB also logs the user identity, filename, destination (personal Google Drive, not the company’s sanctioned Google Workspace tenant), matched DLP policy, and timestamp, and the event surfaces in the SOC’s Shadow IT dashboard. The helpdesk points the coordinator to the company’s encrypted email gateway, and no data leaves the organization.
API Authorization, Logging, and Rate Limiting
Cloud-native applications are built on APIs. Many are public; many more are internal-only but still critical. An API gateway is a centralized control point that all API traffic passes through, providing a uniform place to enforce security and operational policies.
Figure 7.2: An API gateway centralizes authentication,
coarse-grained authorization, rate limiting, request validation, and
observability at one choke point. It does not replace checks in the
services behind it: each microservice should still verify the caller and
enforce object-level authorization.
The security functions an API gateway typically performs include:
Authentication. Verifying the identity of the client, usually via OAuth 2.0 access tokens, JWTs, mutual TLS, or API keys (which identify an application but are weak as the only proof of identity). The gateway is where tokens are validated against the identity provider, so individual services can trust the identity claims passed through.
Authorization. Enforcing scopes, roles, or attribute-based policies. A token may be valid (authenticated) but not permitted to call a specific endpoint (unauthorized). The gateway evaluates these policies and rejects unauthorized calls without bothering the backend. It can enforce coarse rules (this token may call
GET /orders), but object-level checks — may this user read order 1234? — belong in the service; broken object-level authorization tops the OWASP API Security Top 10 (2023 edition) (OWASP Foundation 2023).Rate limiting and quotas. Throttling requests per client per unit time to prevent abuse, denial of service, and runaway costs. Rate limits are usually applied per API key or per authenticated user, and may also be applied per source IP for unauthenticated endpoints.
Request validation. Checking that incoming requests conform to the expected schema (correct fields, valid types, length limits). This blocks a class of injection and overflow attacks before they reach service code.
Logging and tracing. Every request flows through the gateway, so the gateway is the natural place to capture access logs, distributed-tracing identifiers, and security telemetry.
Routing and versioning. The gateway hides the internal service topology from clients and lets the backend evolve independently.
Modern API gateway implementations include AWS API Gateway, Azure API Management, Google Apigee, and self-hosted alternatives like Kong and Tyk.
Key Point An API gateway centralizes the security controls that, in its absence, every service would have to implement individually — and inevitably implement inconsistently. Authentication, authorization, rate limiting, and validation should be solved once, at the gateway, rather than reinvented per service. Backend services can then focus on business logic — provided they are reachable only through the gateway and still verify the caller’s token or service identity (the Zero Trust principle from Chapter 4) rather than trusting the network path.
Case Study The Capital One AWS SSRF Breach
In July 2019, Capital One disclosed a breach affecting the personal information of approximately 100 million people in the United States and 6 million in Canada, mostly credit card applicants and customers from 2005 through early 2019. Names, addresses, credit scores, credit limits, and balances were taken, plus smaller sets of sensitive identifiers: about 140,000 Social Security numbers, 1 million Canadian Social Insurance Numbers, and 80,000 linked bank account numbers. The breach is significant not only for its scale but because it laid out, in unusually clear terms, how cloud-specific design choices interact with cloud-specific attack techniques (Capital One Financial Corporation 2019; U.S. Department of Justice 2022).
The attacker exploited a Server-Side Request Forgery (SSRF) vulnerability in a misconfigured Web Application Firewall running on AWS EC2. SSRF is a class of attack in which a server is tricked into making a network request on behalf of an attacker — typically to a destination the attacker could not reach directly. In a cloud context, SSRF becomes especially dangerous because of a feature called the EC2 Instance Metadata Service (IMDS): a special internal endpoint at
169.254.169.254that returns information about the instance, including the temporary IAM credentials associated with the instance’s role.The attack chain was (Capital One Financial Corporation 2019; U.S. Department of Justice 2022):
- The attacker discovered the SSRF vulnerability in the WAF and used it to make the WAF’s host instance request
http://169.254.169.254/latest/meta-data/iam/security-credentials/.- The IMDS returned temporary AWS credentials for the IAM role attached to the WAF host.
- Those credentials were over-privileged. They granted access to read S3 buckets containing customer data — far more than a WAF needed.
- The attacker used the credentials to list and download the contents of multiple S3 buckets, exfiltrating roughly 30 GB of data.
The breach surfaced several lessons that map directly to topics in this chapter. The shared responsibility model placed the configuration of the WAF, the IAM role’s permissions, the S3 bucket access policies, and the application code that contained the SSRF squarely on the customer side. AWS’s infrastructure was not breached. The combination of an over-permissioned compute role and an unprotected metadata service turned a single application-layer flaw into a hundred-million-record disclosure.
In November 2019 AWS introduced IMDSv2, which requires a caller to first send an HTTP
PUTrequest to obtain a short-lived session token, then present that token in a header on every metadata request. A simple SSRF flaw that can only make a server sendGETrequests cannot complete that handshake; the token response is limited to one network hop by default, andPUTrequests carrying anX-Forwarded-Forheader are rejected (MacCárthaigh 2019). IMDSv2 is the default on Amazon Linux 2023, and an account can make it the Region-wide default for new instances, but older images and instances may still accept the legacy IMDSv1 unless v2 is required (Amazon Web Services 2023a, 2024). Even so, IMDSv2 is one layer of defense in depth, not a substitute for least-privilege IAM roles, network controls, and SSRF-resistant code.The consequences landed on Capital One’s side of the line. The attacker, Paige Thompson, was convicted in June 2022 of wire fraud and computer-intrusion offenses and sentenced that October to time served and five years of probation (U.S. Department of Justice 2022). The U.S. Office of the Comptroller of the Currency had already fined the bank $80 million in August 2020 for failing to establish effective risk assessment processes before moving significant IT operations to the cloud (Office of the Comptroller of the Currency 2020), and a customer class action settled for $190 million (Top Class Actions 2022).
Quick Check 7.4
- Recall. Name four security functions an API gateway centralizes.
- Discriminate. An inline control blocks an HR coordinator from uploading termination letters to a personal Google Drive account before the upload completes. Is that an API-based CASB or a proxy-based CASB?
- Apply. An EC2-hosted WAF has an SSRF flaw that can reach the instance metadata service. Name three defenses from the section that reduce the blast radius of that flaw.
Answers — Quick Check 7.4
- Authentication, authorization, rate limiting, and request validation are four of the core gateway functions. The chapter also adds logging and tracing.
- Proxy-based CASB. It is inspecting and blocking the action in real time, before the data reaches the SaaS provider.
- IMDSv2, a least-privilege IAM role for the WAF host, and
SSRF-resistant code (validating or blocking requests to
internal addresses such as
169.254.169.254) are the key defenses. Network egress restrictions and alerts on unusual S3 reads add further layers.
Beyond Rate Limiting: Cost Controls and DDoS
Two API security concerns deserve a final note. Cost controls are now a security topic in cloud environments — an attacker who cannot exfiltrate data may still be able to incur ruinous bills by triggering expensive operations, a pattern sometimes called a denial of wallet attack. Quotas, budget alerts, and circuit breakers in the API gateway help cap exposure. Cloud-native DDoS protection services (AWS Shield, Azure DDoS Protection, Google Cloud Armor, or edge providers such as Cloudflare) operate at the network and application layer and absorb volumetric attacks before they reach the gateway.
How Do We Protect Cloud Data?
Cloud data security spans three lifecycle stages — at rest, in transit, and in use — and several distinct failure modes. Many cloud breaches are not the result of sophisticated attacks; they are the result of data ending up somewhere it should not have been, or remaining accessible long after it should not have been.
Data Exposure, Leakage, Remanence, and Insecure Storage
Data exposure is the most common and most preventable cloud data security failure: a storage resource that should be private has been configured to allow public access. The pattern repeats across providers — public S3 buckets, public Azure blob containers, public Google Cloud Storage objects — and it is responsible for many of the highest-profile breaches of the past decade. Defenses include:
- Default-deny configurations at the account or organization level (AWS S3 Block Public Access, Azure’s setting that disables anonymous blob access, Google Cloud’s public access prevention) that prevent any storage resource from being made public unless explicitly overridden.
- Continuous configuration monitoring through Cloud Security Posture Management (CSPM) tools that scan for public buckets, weak access policies, and other misconfigurations and alert on them.
- Pre-deployment policy-as-code that prevents publicly-accessible storage from being created through IaC in the first place.
Data leakage is the loss of data through legitimate channels used in unintended ways: a user emails a sensitive spreadsheet to a personal address; a developer copies production data to a development environment for testing; a SaaS app is granted permissions to read a data store that contains more than it should. Cloud DLP services scan structured and unstructured data for sensitive patterns (credit card numbers, identifiers, classified markers) and apply policies based on the data’s classification and the destination.
Data remanence is the residual data that persists on storage after it has been “deleted.” On traditional hardware, secure deletion involves overwriting or destroying the storage medium. In the cloud, the underlying storage is shared, and a customer cannot physically destroy it. The dominant control is cryptographic erasure, introduced above: data is encrypted with a key that the customer controls, and “deletion” is implemented by destroying the key. Without the key, the encrypted bytes — wherever they may still be stored on provider-managed disks — are unrecoverable. This is the same principle covered for SEDs in Chapter 6, applied at cloud scale.
Insecure storage resources is a broader category that includes the previous failure modes plus issues like missing encryption, weak access policies, and improperly configured replication. Cloud providers offer encryption at rest by default for most storage services today, but legacy resources may pre-date these defaults, and some services still require explicit opt-in.
Proactive, Detective, and Preventative Cloud Controls
Cloud security controls fall into the same control families as on-premises controls, with cloud-specific implementations. The SecurityX exam expects familiarity with all three:
Preventative controls block a non-compliant action at the moment it is attempted. Examples: IAM policies that deny actions outright, organization-level guardrails (AWS Service Control Policies, Azure Policy in deny mode, GCP Organization Policies), network ACLs that restrict ingress paths, and default-on encryption or public-access blocks that individual engineers cannot switch off.
Detective controls identify issues that have already occurred (or are occurring) so that they can be responded to. Examples: cloud-native logging services (AWS CloudTrail, Azure Activity Log, GCP Cloud Audit Logs), Cloud Security Posture Management (CSPM) services that continuously assess configuration drift, anomaly detection through services like Amazon GuardDuty and Microsoft Defender for Cloud, intrusion detection at the VPC level.
Proactive controls act before a resource exists, or anticipate threats rather than react to them. Examples: policy-as-code and IaC scanning that reject a non-compliant template before it is deployed (AWS Control Tower implements its proactive controls as CloudFormation Hooks that check resources before they are provisioned (Amazon Web Services, n.d.)), threat modeling, and threat hunting that investigates hypothetical attack paths before any alert fires. They only help when changes actually pass through them, so they are paired with the other two families.
Automated remediation that closes a public bucket the moment it is opened is a responsive control that rides on top of detective ones. Many vendors bundle these capabilities into a Cloud-Native Application Protection Platform (CNAPP), which combines CSPM, workload protection (CWPP), cloud entitlement management (CIEM), and IaC scanning in one product.
A well-architected cloud security program uses all three families in concert: proactive controls keep bad configurations from being deployed, preventative controls block risky actions as they happen, and detective controls catch what slips through. Vendors do not always draw these lines identically; on the exam, the timing a scenario describes — before deployment, at the moment of the action, or after the fact — identifies the family.
Customer-to-Cloud Connectivity for Hybrid Architectures
Most large enterprises do not run only in the cloud. They run hybrid: some workloads on-premises, some in cloud, and traffic flowing between them. The security of that traffic depends on the connectivity model:
Internet-routed VPN. A site-to-site IPsec VPN encrypts traffic between the customer’s data center and a virtual gateway in the cloud VPC. This is the cheapest and most flexible option, but it shares the public internet’s variable performance and exposes the VPN endpoint to external probing.
Private dedicated connectivity. Services like AWS Direct Connect, Azure ExpressRoute, and Google Cloud Interconnect provide dedicated physical or logical circuits between the customer’s network and the cloud provider’s edge. Traffic does not traverse the public internet, latency is predictable, and bandwidth is contracted. These connections are typically paired with VPN as a backup.
Cloud-to-cloud and SD-WAN. Modern enterprises increasingly run multi-cloud and use SD-WAN overlays or service-mesh topologies (SD-WAN and SASE are covered in Chapter 4) to securely interconnect cloud regions and on-premises sites.
Whichever connectivity model is chosen, traffic should be encrypted end-to-end at the application or transport layer, not relied upon to be “private” because it traverses a private circuit — dedicated circuits are isolated, not automatically encrypted. Defense in depth applies: a misconfigured BGP advertisement or a compromised provider device should not expose plaintext traffic.
Cloud Service Integration and Adoption
Adopting a new cloud service — whether a SaaS application, a managed PaaS, or a third-party integration — should follow a deliberate process rather than a developer’s curiosity:
- Vendor security assessment. Does the provider publish a SOC 2 Type II report? An ISO 27001 certification? An entry in the Cloud Security Alliance’s STAR registry, built on its Cloud Controls Matrix? A penetration testing summary? Are SBoMs available? Where is data stored, and under what jurisdictions?
- Compliance review. Does the service support the regulatory frameworks relevant to your data (HIPAA BAA, PCI DSS, FedRAMP, GDPR data processing addendum)? Contracts matter as much as certificates: HIPAA requires a signed business associate agreement before a provider handles protected health information, and PCI DSS expects you to document which requirements the provider manages, which you manage, and which are shared.
- Architectural integration plan. How does the service authenticate users — does it federate with your IdP? What APIs will it call into your environment, and through which gateway? What data will flow into and out of it?
- Monitoring integration. How will the service’s logs reach your SIEM? What anomalies should trigger alerts?
- Exit strategy. How will you extract data, terminate the integration, and verify deletion if the relationship ends?
For government and regulated industries, FedRAMP (the Federal Risk and Authorization Management Program) is often a prerequisite for any cloud service used by federal agencies. It is a standardized security assessment of a cloud offering, built on NIST SP 800-53 controls, whose results agencies can reuse — but it does not replace an agency’s own risk decision about using the service for a particular mission (Joint Task Force 2020; Federal Risk and Authorization Management Program 2026a). The program is also mid-overhaul. Under its Consolidated Rules for 2026, FedRAMP renames “authorization” as FedRAMP Certification, relabels its familiar baselines as lettered certification classes (A through D, with Class A replacing the old “FedRAMP Ready” entry point), and adds an automated “20x” path beside the traditional Rev5 path. Early adoption began in July 2026, and the rules are scheduled to become mandatory on January 1, 2027 (Federal Risk and Authorization Management Program 2026b). Because the change is recent, vendors, agencies, and exam materials may still say “FedRAMP Authorized” and “Moderate,” so confirm which scheme applies. Similar frameworks exist internationally — IRAP in Australia, C5 in Germany, ENS in Spain — and integrating these requirements into cloud architecture early avoids painful re-architecture later.
Thought Question Your organization has just adopted a new SaaS marketing analytics platform. The vendor offers SAML federation, an API for data export, and admin-managed encryption keys. Your CISO asks you to enumerate the controls that you are responsible for in this deployment, and the controls that the vendor is responsible for. How would you structure the answer? Which controls sit in a genuinely shared zone where both parties contribute?
Chapter Review and Conclusion
Cloud and hybrid environments do not change the fundamentals of security — confidentiality, integrity, availability, least privilege, defense in depth — but they redistribute the work of achieving them. The cloud provider takes on the layers below your workload; you take on everything above. When customers misunderstand this division, they make the kind of mistakes that fill breach reports.
We began with the shared responsibility model: the provider runs the infrastructure of the cloud, the customer runs everything in it, and data classification, identity, and configuration are always the customer’s job. Customer-managed keys, with BYOK and HYOK for the most sensitive deployments, extend that control to encryption.
Container security spans image, registry, runtime, and orchestrator concerns, with Kubernetes as the dominant orchestrator. Serverless functions abstract away the OS but make execution-role permissions and event triggers the main attack surface; the dominant misconfiguration is the over-permissioned role. Secure delivery means short-lived OIDC-federated pipeline credentials, least-privilege pipeline roles, IaC with Terraform and Ansible, and policy-as-code that rejects misconfigurations before production.
CASBs sit between users and SaaS applications, providing shadow IT visibility, real-time enforcement, DLP, and threat detection in API mode, proxy mode, or both. API gateways centralize authentication, authorization, rate limiting, validation, and logging. The Capital One breach showed what happens when these layers are weak: one application-layer SSRF, an over-permissioned EC2 role, and a metadata service that required no session token produced a hundred-million-record disclosure.
Finally, cloud data security: exposure through public storage, leakage through legitimate-but-misused channels, and remanence addressed through cryptographic erasure. We mapped controls to the proactive / preventative / detective families and covered hybrid connectivity, service adoption discipline, and assurance frameworks like FedRAMP.
The throughline of cloud security is simple to state and difficult to execute: know exactly where your responsibility starts, automate every control you can, and assume that anything you have not explicitly secured is exposed.
Key Terms Review
- Shared Responsibility Model: Framework dividing security duties between cloud provider and customer; the customer always owns data, identity, and configuration.
- IaaS (Infrastructure as a Service): Cloud model providing virtualized compute, storage, and networking; the customer handles OS and everything above.
- PaaS (Platform as a Service): Cloud model providing a managed runtime; the customer handles application code and data.
- SaaS (Software as a Service): Cloud model providing a complete application; the customer handles only their data, accounts, and configuration.
- Customer-Managed Key (CMK): Encryption key controlled by the customer in a cloud KMS, enabling cryptographic deletion.
- BYOK / HYOK (Bring/Hold Your Own Key): Key management patterns where the customer imports key material into the provider’s KMS (BYOK) or keeps keys in an external HSM the cloud must call (HYOK).
- BYOL (Bring Your Own License): Model in which the customer supplies the software license and carries its compliance and audit obligations.
- Container Orchestration: Automated scheduling, networking, and lifecycle management of containers, dominated by Kubernetes.
- Pod Security Standards: Kubernetes policy profiles (Privileged, Baseline, Restricted) for pod-level constraints; enforced by Pod Security Admission, which replaced PodSecurityPolicy.
- Admission Controller: Kubernetes API-server component that can reject non-compliant objects, such as privileged pods or unsigned images.
- Workload Identity: A per-pod cloud identity that replaces credentials inherited from the node.
- Network Policy: Kubernetes resource that restricts which pods may communicate with which other pods.
- Serverless / FaaS: Compute model where the platform invokes customer functions on demand without persistent servers.
- Function Execution Role: The IAM identity granted to a serverless function; least privilege here is critical.
- Infrastructure as Code (IaC): Practice of describing cloud infrastructure in declarative, version-controlled configuration files (Terraform/OpenTofu, ARM/Bicep, CloudFormation).
- Policy-as-Code: IaC scanning that enforces security policy automatically (Checkov, Trivy, OPA).
- OIDC Federation (CI/CD): Pattern in which a pipeline obtains short-lived cloud credentials via OpenID Connect rather than storing static keys.
- CASB (Cloud Access Security Broker): Control point governing user access to cloud apps, with API and proxy deployment modes.
- Shadow IT: Cloud services adopted by employees without IT or security oversight.
- API Gateway: Centralized control point for authentication, authorization, rate limiting, validation, and observability of API traffic.
- SSRF (Server-Side Request Forgery): Vulnerability that causes a server to make attacker-controlled requests, particularly dangerous against cloud metadata services.
- IMDS (Instance Metadata Service): Internal cloud
endpoint exposing instance role credentials; IMDSv2 requires a
PUT-issued session token, which mitigates SSRF abuse. - Data Exposure: Cloud storage resource accessible to unauthorized parties, typically due to misconfiguration.
- Data Leakage: Loss of data through legitimate channels used in unintended ways.
- Data Remanence: Residual data that persists after deletion; addressed in the cloud through cryptographic erasure.
- CSPM (Cloud Security Posture Management): Tooling that continuously assesses cloud configuration against security baselines.
- Proactive / Preventative / Detective Controls: Control families that act before deployment, block risky actions as they happen, and find problems after the fact.
- CNAPP (Cloud-Native Application Protection Platform): Unified platform combining CSPM, workload protection, entitlement management, and IaC scanning.
- Direct Connect / ExpressRoute / Cloud Interconnect: Private dedicated connectivity options between customer networks and cloud providers.
- FedRAMP: U.S. federal program standardizing security assessment of cloud services, based on NIST SP 800-53; being renamed FedRAMP Certification (classes A–D).
Practice-Based Questions
Apply The Chapter
Dorothy Gale Secures the Emerald City Cloud
Design PBQ. Map each finding in an external cloud audit to its correct control — shared responsibility, IAM scoping, container admission policy, customer-managed keys, CASB, CSPM.
Diagnose The Failure
Dorothy Reviews the Emerald City Breach
Diagnostic PBQ. Seven months later, the Capital-One-shaped failure actually lands. 14.2M records exfiltrate in eleven hours. Walk backward through the CloudTrail timeline and name the specific control (including the encryption-choice reasoning) that failed at each step.
Synthesis Activities
These open-ended activities extend the chapter beyond what a search engine or chatbot can answer. Each works alone or in a group, and the goal is the conversation, debate, or artifact itself. Sidebars show how to use a chatbot as a practice partner, never as a source (Chapter 0 explains how).
Conduct an Interview (1 hour)
Talk to someone who operates cloud infrastructure: a cloud security engineer, DevOps engineer, platform engineer, or cloud architect. Good questions:
- Walk me through how a new service gets deployed in your environment — every place where the shared responsibility line shifts between you and the provider.
- What’s the most expensive misconfiguration you have personally seen, and what made it possible?
- Where has CSPM tooling genuinely changed your posture, and where is it just noise?
Listen for the gap between cloud-as-marketed (elastic, secure, audited) and cloud-as-operated (IAM sprawl, drift, surprise bills, and who owns the misconfigured bucket).
No one to interview? Rehearse with a chatbot playing a principal cloud security engineer at a company that runs 80% on AWS and 20% on Azure. It exposes which of your questions are too provider-agnostic to provoke a real answer.
Hold a Debate (1 hour)
Pick the position you find least sympathetic and argue it as well as you can (in class, assign positions and go live):
- Multi-cloud is strategically essential. Single-provider concentration creates unacceptable lock-in risk, both commercial (price) and operational (regional outages, account-level compromise), and justifies the engineering tax of running everywhere.
- Multi-cloud is a fantasy. The control plane, IAM model, and tooling are so provider-specific that “multi-cloud” means “single-cloud per workload with extra coordination overhead.” Pick one provider, get genuinely good at it, and treat the second as disaster recovery only.
- The whole framing is wrong. The real risk is cloud abstraction lock-in: the SaaS, observability, and identity vendors layered on top. By the time you can move clouds, you still can’t move off the tools, and that is where the switching cost lives.
Studying alone? Have a chatbot attack your argument as a senior cloud architect who deeply disagrees, citing real cloud outages, lock-in horror stories, and multi-cloud failure modes.
Track a Current Debate (20 min)
Find a cloud security event from the last six months. Good starting points: CISA advisories, Cloud Security Alliance Top Threats publications, and cloud providers’ security bulletins and post-mortems. Be ready to explain to a classmate, in two minutes, what happened, where on the shared responsibility line the failure sat, and what others are changing as a result. Bring two primary sources.
Lab Artifact: Read a Real IAM Policy (20 min)
AWS IAM policies are deceptively simple JSON: Effect,
Action, Resource, and optional
Condition keys. Cloud security lives in how those four
fields interact.
- Go to the AWS IAM identity-based policy examples at docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_examples.html. Pick one policy from the Amazon S3, Amazon EC2, or AWS IAM section. Good starters: “Allows full S3 access, but explicitly denies access to the Production bucket if the administrator has not signed in using MFA within the last thirty minutes,” or “Limits terminating Amazon EC2 instances to a specific IP address range.”
- Open the JSON. For each statement, identify the
Effect, theAction(which API calls), theResource(which ARNs), and anyConditionkeys (IP, MFA age, tags, request time). - In plain English, write what the policy permits and forbids — and what it does not say. (Policies are deny-by-default; absence is significant.)
- Answer the blast-radius question: if an attacker compromised a
principal with this policy attached, what could they do? Where do the
Conditionkeys stop them, and where would a small change in environment (a different IP, time, or tag) expand their reach?
Safety: This is a read-only exercise on public documentation. Do not attach this policy, or any policy, to an AWS principal in an environment you do not own. Do not test these policies against any AWS account that is not your own personal sandbox.
Map a Trust Boundary (2+ hours)
Cloud architectures concentrate trust in places on-prem architectures never had to worry about: the IAM control plane, the metadata service, the provider’s signing infrastructure, and third parties holding delegated roles.
Pick one system to model:
- A typical three-tier web application on AWS: ALB → ECS or Lambda → RDS, with secrets in Secrets Manager and logs in CloudWatch.
- A SaaS integration in which a third-party vendor assumes an IAM role
in your account via
sts:AssumeRolewithExternalId. - A CI/CD pipeline that uses OIDC federation (GitHub Actions → AWS via
sts:AssumeRoleWithWebIdentity) to deploy infrastructure.
Draw the system: every IAM principal, role-assumption relationship, shared secret, and cross-account trust, plus every place the provider’s own infrastructure is implicitly trusted (KMS, IMDS, the regional control plane). For each trust boundary, answer: what crosses it, what condition keys validate it, who controls the credentials, and what happens if the credential or the underlying provider service is compromised? Identify the boundary where you have the least confidence — that is the place to invest the next dollar of cloud security work.