Cloud security fundamentals: shared responsibility, identity, and the audit trail

What the provider secures and what you do, why identity is the cloud perimeter, and the first read-only commands to understand an AWS, Azure, or Google Cloud account you are responsible for.

Lesson 14 of 18 · 13 min read · practice only with authorization

Diagram

Who secures which layer

Follow the path. One example at a time.

Step 1 of 4

Provider

Data centers, hardware, hypervisors, and the managed service internals.

Illustration: Provider
# Provider
# Data centers, hardware, hypervisors, and the managed
# service internals.
What changes the outcome
Perimeter

Firewall at the edge

Admin access

Physical or VPN

Inventory

Hardware list

The example on the open step is one illustration, or the fix you can paste into an application you own.

What this page is made of

3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.

  1. Identity is the perimeter

    What fails
    Anyone with a valid key can call the management API from anywhere.
    Who is affected
    Everything that key’s policy allows.
    What you would notice
    Long-lived access keys for people, or roles with wildcard actions.
    What you change
    Use SSO with MFA for people and short-lived roles for workloads.
  2. Turn the trail on first

    What fails
    Without CloudTrail, Activity Log, or Cloud Audit Logs retained, nobody can say what happened.
    Who is affected
    Responders and auditors.
    What you would notice
    No organization-wide trail, or one that keeps only 90 days of console history.
    What you change
    Enable organization-wide audit logging to a separate, locked account.
  3. Public by mistake

    What fails
    Storage buckets and snapshots can be shared publicly with one setting.
    Who is affected
    People whose data is in the bucket.
    What you would notice
    A bucket policy with Principal "*".
    What you change
    Turn on account-level public access blocks and alert on policy changes.

IaaS, PaaS, SaaS

With infrastructure as a service you manage the operating system and up. With platform services the provider runs the runtime and you manage code and configuration. With SaaS you manage users, data, and settings. The more managed the service, the more your security is configuration and identity.

Your first hour in an account you own

Confirm who you are, list the regions in use, check that audit logging is on, find users with console passwords but no MFA, and list any public storage. Do it in a sandbox account with a billing alert set before you create anything.

$ aws iam generate-credential-report >/dev/null; aws iam get-credential-report --query Content --output text | base64 -d | cut -d, -f1,4,8 | column -s, -t
user        password_enabled  mfa_active
<root>      not_supported     true
ana         true              true
build-bot   false             false

Tools that help

Provider services such as AWS Security Hub, Microsoft Defender for Cloud, and Google Security Command Center flag common misconfigurations. Open-source scanners such as Prowler and ScoutSuite run read-only checks against benchmarks. The cloud security workbench covers these hands-on.

Check yourself

Recognition and the fix. Nothing here is a procedure.

1 / 3

Under shared responsibility, who configures an S3 bucket policy?

Go deeper

Specific techniques, exercises, and glossary cards for this topic.

  1. 01Workload identity instead of static keysA long-lived access key on a laptop or in a repository is a session that does not expire. Includes the diagram and a defensive fix.
  2. 02Cloud accounts and container environmentsCloud failure is usually identity and exposure. Includes the diagram and a defensive fix.
  3. 03Cloud command lines: reading identity, not touring productionThe AWS, Azure, and Google Cloud CLIs are how you ask a cloud account what it believes. Includes the diagram and a defensive fix.
  4. 04Open security groups: SSH, RDP, and databases reachable from anywhereFirewall rules that allow 0.0.0.0/0 to management or database ports expose servers to constant scanning. Includes the diagram and a defensive fix.
  5. 05Public object storage: finding and closing open buckets and containersBuckets made public by mistake remain one of the most common cloud leaks. Includes the diagram and a defensive fix.
  6. 06Disabled metadata protections: IMDSv2 and why it blunts SSRFCloud instance metadata services hand out credentials to code on the machine. Includes the diagram and a defensive fix.
  7. 07Missing cloud audit logs: CloudTrail, Activity Log, and Audit Logs coverageWithout audit logs, you cannot answer who did what in a cloud account. Includes the diagram and a defensive fix.
  8. 08Over-privileged cloud identities: wildcards, admin roles, and unused rightsCloud roles collect permissions faster than they lose them. Includes the diagram and a defensive fix.

Exercises

  1. 01Control benchA failure is on the table. Choose the control that changes the outcome.
  2. 02Terminal mission: Database ports published to the worldA Compose file publishes ports for five services. Work out which ones listen on every interface, which are bound to localhost only, and why the host firewall does not save you.
  3. 03Terminal mission: A subdomain pointing at nothingOne shop.example subdomain still has a CNAME to a cloud app that was deleted. Find it before someone else registers the name and serves content under your domain.

Glossary

  1. 01Public object storageA bucket or blob container is world-readable or world-writable, so data leaks or is replaced.
  2. 02Over-privileged cloud identityA workload or person can create, read, or destroy far more than the job requires, so one stolen token is a wide incident.
  3. 03Missing cloud audit logsWithout a management trail you cannot answer who created a key or opened a firewall.
  4. 04Open security groupsA management port reachable from the internet is an invitation, whatever password sits on it.
  5. 05Disabled metadata protectionsA workload role can be stolen by anything that can make the instance ask for its own credentials.