The cross-cutting security disciplines for *aaS — what the cloud gives you, what it doesn't, and how the past decade's incidents shape the controls you actually need.
The cloud secures the infrastructure; you secure everything you run on it. Where the line falls depends on the *aaS layer (deck 01) — but in every model, four things are always yours.
Always yours, every layer
Your data — what you upload, encryption keys you choose
Your identities — users, roles, who has what
Your client config — secrets, OAuth apps, API keys
Your access policies — IAM, sharing controls, public flags
Always theirs, every layer
Physical security of data centres
Hardware integrity, hypervisor patching
Substrate network & cross-region transit
Availability of the underlying API
The compliance reports themselves (SOC 2 Type II, ISO 27001 certificates)
A worked example — S3 bucket
AWS ensures: hardware encryption, no-cross-tenant access at the storage layer, durability (11×9), TLS termination
You must: bucket policy, public-access block, encryption-at-rest, versioning + Object Lock, access logging, principal-based access — and notice when something is misconfigured
Where most breaches happen
Cloud Security Alliance & Verizon DBIR are consistent year after year: ~80% of cloud incidents are customer-side misconfiguration — public storage, lax IAM, leaked keys. Provider-side breaches are real but rare.
Read the contract
For each managed service, find the actual shared-responsibility doc: AWS publishes one per service, GCP has the "shared fate" model, Azure has the SaaS/PaaS/IaaS matrix. They differ.
03
IAM — Identity, Roles, Policies, STS
Identity policies
Attached to a principal — "what can this user/role do?". Most common kind.
Resource policies
Attached to a resource — "who can use this S3 bucket / KMS key / SQS queue?". Govern cross-account access.
SCPs & boundaries
Org-level guardrails — "even an admin in account X can't disable CloudTrail". The compliance backstop.
04
STS & Federation — No Long-Lived Keys
Long-lived AKIA…/JSON-key/service-principal-secret credentials are the thing leaked into GitHub at 03:00 every day. Replace them everywhere with short-lived tokens minted on demand.
For humans
SSO via IdP — Okta, Entra, Google Workspace, JumpCloud → cloud federated login
AWS IAM Identity Center (was SSO) / GCP Cloud Identity / Azure AD
SSO issues a short-lived role assumption (1–12 h)
No IAM users — ever
For workloads (in-cloud)
EC2 Instance Profile — VM gets a role via metadata service (IMDSv2)
EKS Pod Identity (2023) / IRSA — pods get role via service account
Every long-lived key in your org has a non-trivial probability of being leaked this year. Audit-as-you-go: aws iam list-access-keys, gcloud iam service-accounts keys list, weekly cron, alarm on anything > 30 days old.
05
Least Privilege — In Practice
"Least privilege" is the principle that every identity gets only the permissions it needs. Easy to say; in real cloud accounts most policies have grown to "*:*" by Tuesday.
Iterative tightening
Start coarse (managed policies are fine for week 1)
Use IAM Access Analyser / Cloud Asset Inventory / Microsoft PIM to surface unused permissions
Generate scoped policies from observed CloudTrail / Cloud Audit Logs
Add conditions — region, IP, MFA, time of day, principal tag
Versioned, IAM-gated, integrates with Lambda for rotation
SSM Parameter Store
Config + secrets
Strings (KMS-encrypted "SecureString")
Cheaper than Secrets Manager for low-rotation use
HashiCorp Vault
Secret store + dynamic creds
Anything; generates short-lived DB / cloud creds
The OSS standard; Boundary for SSH, Vault Enterprise for HSM
Doppler / 1Password / Infisical / Akeyless
SaaS secret manager
Application secrets
Developer-friendly, env-vars at deploy time
CloudHSM / Azure Dedicated HSM
HSM
Keys for compliance (FIPS 140-2 L3, single-tenant)
~$1/hr; only when an auditor demands it
Envelope encryption
# 1. App generates a random data-encryption key (DEK)
# 2. Encrypts data with DEK (fast, AES-256-GCM)
# 3. Asks KMS to encrypt the DEK with a master key (KEK)
# 4. Stores: ciphertext + encrypted-DEK
# 5. To decrypt: ask KMS to decrypt DEK; use DEK to decrypt data
ciphertext = AES-GCM(plaintext, DEK)
encrypted_DEK = KMS.Encrypt(DEK, KeyId="...master...")
store(ciphertext, encrypted_DEK)
BYOK / HYOK
BYOK — Bring Your Own Key. Customer imports key material into the cloud KMS. Common in regulated SaaS.
HYOK — Hold Your Own Key. Customer keeps the master key in their HSM; decryption requires their HSM. Stronger; harder to operate.
External Key Stores — AWS XKS, GCP EKM. The cloud calls back to your HSM on every cryptographic operation.
Default-encrypt everything at rest with provider-managed keys (free)
Move sensitive data to customer-managed keys (CMK) — get rotation, audit, revoke
For regulated tenants, offer BYOK with their CMK
For top-tier compliance / IP, evaluate HYOK / XKS / confidential compute — small fraction of workloads
Field-level encryption is its own problem
Database-level encryption protects against backup theft. Field-level (encrypt SSN before insert) protects against full DB compromise — but breaks SQL operators. Tokenisation (Vault Transform, Privacera, Skyflow) is usually the better answer.
08
Network Security — Beyond the VPC
East-west — service-to-service
Service mesh — Istio, Linkerd, Consul Connect, Cilium-based mesh; mTLS for free, traffic policy as code
Sidecarless mesh — eBPF-based (Cilium, Istio Ambient) — less overhead, no per-pod sidecar
SPIFFE / SPIRE — workload identity that predates the cloud's native ones; becomes the lingua franca across providers
North-south — at the edge
WAF — AWS WAF, Cloudflare WAF, GCP Cloud Armor, Azure Front Door — bot, OWASP, custom rules
Bot management — separate market: PerimeterX/HUMAN, DataDome, hCaptcha Enterprise
PrivateLink & service exposure
You expose one service to a customer's VPC, not the whole VPC
No NAT, no peering, no overlapping CIDRs
Single-tenant SaaS uses this to give enterprise customers a private DNS endpoint into your service
Cross-cloud: AWS PrivateLink, GCP Private Service Connect, Azure Private Link — same idea, slightly different APIs
Egress lockdown
Restrictive egress rules — workloads that don't need internet shouldn't have it
Egress proxies — Squid / NGINX / Cilium Network Policy + DNS filter to allow-list domains
VPC endpoints for AWS APIs — calls don't traverse the internet
Why: stops data exfiltration via opportunistic compromised library
DNS leaks
You can lock down IPs perfectly, then resolve evil.example through the cloud's DNS resolver. Use Route 53 Resolver query logs / Cloud DNS audit / Azure DNS analytics.
09
Zero Trust — The Replacement for the VPN
"Never trust, always verify." Replaces the corporate VPN as the only thing between trusted users and crown-jewel data.
Five tenets (NIST 800-207)
Every resource is treated as untrusted by default
Authenticate & authorise every request, every time
Use device posture (managed laptop, MDM, EDR running) as a factor
Decisions are dynamic — recalculate as context changes
Log everything; analyse continuously
What replaces the VPN
BeyondCorp (Google) — the original; published 2014
Cloudflare Zero Trust / Access — broker between user and HTTP/SSH/RDP services
Every internal app sits behind an IAP (Identity-Aware Proxy)
The IAP sees: user identity, device posture, location, time, threat-intel signals
It allows / denies / steps-up (MFA) per request
App receives a signed header with verified identity
Bastion / break-glass access
AWS SSM Session Manager — SSH without a public IP, all logged
GCP IAP TCP forwarding — same, via IAP
Teleport — multi-cloud, with session recording
Every break-glass action: ticketed, time-bound, audited, alerted
VPNs are still the #1 ransomware vector
FortiOS, Pulse, Cisco ASA, Ivanti — every year a new pre-auth RCE. Replace with zero-trust + IAP wherever it fits.
10
Supply Chain Security — SBOM, SLSA, Sigstore
Most cloud workloads ship with hundreds of third-party dependencies. The supply chain is now an attack vector — Codecov 2021, SolarWinds 2020, npm colors/faker 2022, xz utils 2024, every typosquatted-pypi incident.
SBOM — Software Bill of Materials
Machine-readable list of every dependency & version in your build
Formats: SPDX (Linux Foundation) and CycloneDX (OWASP)
Generated by Syft, Trivy, Grype, GitHub Dependency Graph
US Executive Order 14028 (2021) requires it for federal vendors
SLSA — provenance for builds
4-level framework, levels 1–4
L1 — build is scripted & documented
L2 — build runs on a hosted service, provenance signed
Common play: "AccessKey appears on GitHub" → quarantine key → notify owner → rotate
"Suspicious AssumeRole from new country" → step-up MFA
Don't ship every log
SIEM is priced per-GB ingested; CloudWatch Logs at $0.50/GB; Datadog logs at $1.27/GB indexed. Tier — sample app logs, full ingest of audit + IAM + DNS. Otherwise the bill is the security incident.
14
Real Incidents — What They Tell Us
Capital One (2019)
SSRF in a misconfigured WAF allowed access to EC2 metadata service → STS credentials → S3 buckets → 100M records. Fix: IMDSv2 (mandatory, hop-limit-bound), tight IAM scopes, VPC endpoint restrictions.
SolarWinds (2020)
Compromised build of Orion shipped to 18,000 customers including US Treasury. Fix: SLSA L3+, signed builds, reproducible builds, two-person build promotion.
Codecov (2021)
Bash uploader script modified in S3; exfiltrated CI secrets for months. Fix: short-lived tokens (OIDC) instead of static; signed scripts.
Okta support breach (2023)
HAR files uploaded to Okta support contained session cookies, used to compromise Okta customers. Fix: sanitised HAR uploads, customer-side session-binding (DPoP / mTLS).
MOVEit (2023)
Cl0p exploited zero-day in Progress MOVEit Transfer; ~2,700 organisations breached; tens of millions of records. Fix: third-party-software risk, network egress restriction, asset inventory of every internet-facing service.
Snowflake credential theft (2024)
Stealer-malware-collected creds reused on ~100 Snowflake customer accounts (no MFA enforced) → Ticketmaster, Santander, AT&T. Fix: MFA mandatory by default; provider-wide auth-policy enforcement.
XZ Utils backdoor (2024)
Multi-year social-engineering of an OSS maintainer slipped a backdoor into liblzma, almost making it into Debian/Fedora SSH. Fix: reproducible builds, multiple maintainers, sandboxed builders.
Microsoft / Storm-0558 (2023)
Stolen MSA signing key was usable for Azure AD tokens because of a validation bug. Fix: defence in depth at token validation; key isolation; audit-log surface for cross-tenant access.
15
Anti-Patterns
"0.0.0.0/0 on port 22 / 3389 / 3306 just for now"
Will be brute-forced inside an hour. SSM / IAP / Tailscale instead. No public DB ports, ever.
"MFA optional"
The Snowflake breach class — millions of credentials harvested by stealer malware, replayed on accounts without MFA. Make it mandatory at the IdP.
"Static keys committed to a private repo, it's fine"
Private becomes public on the first contractor offboard, fork, or SSO misconfiguration. GitGuardian / TruffleHog / Gitleaks scan; OIDC instead.
"Disable encryption for cost / perf"
Encryption-at-rest with provider-managed keys is free and adds < 1% perf overhead. Keep it on.
"CloudTrail off in dev"
Dev breaks first; you need the logs more there than in prod. Org-wide CloudTrail / Cloud Audit / Diagnostic Settings, no opt-out.
"Wildcard IAM permissions"
"Action":"*","Resource":"*" on a workload's role. Use Access Analyser, narrow on the next sprint.
"Compliance is a Vanta dashboard"
Auto-evidence is a productivity gain, not a strategy. The auditor still wants real controls; the customer still wants security, not green checkmarks.
"Security review at end of sprint"
Shift left. Threat model in design; SAST in CI; admission policies; pen test annually; bug bounty as the safety net.
16
Summary
Three takeaways
The cloud secures the substrate; you secure everything you build on it. Most breaches are still customer-side IAM / config.
Identity is the perimeter — short-lived tokens, federation, MFA mandatory, least privilege a habit.
Compliance is process, not magic. Tooling speeds it up; it does not replace the controls.
Next in series
06 LLM-as-a-Service — and the new security shapes that come with it
"Cloud security is identity, secrets, network and supply-chain — applied with discipline, audited continuously, and revisited the day after every incident report."