Cloud accounts and container environments
Cloud failure is usually identity and exposure. Containers fail when they inherit the node's power. Both are environments you can learn without a production account.
Diagram
Who is responsible for what
Step 1 of 4
Provider
Physical security, hypervisors, and managed service internals.
# Provider # Physical security, hypervisors, and managed service # internals.
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.
Identity as perimeter
- What fails
- In cloud, permissions decide what can be reached.
- Who is affected
- Everything in the account.
- What you would notice
- Wildcard policies and long-lived keys.
- What you change
- Least privilege from usage data, and keyless workloads.
Default exposure
- What fails
- Some services can be made public with one setting.
- Who is affected
- Data in storage and databases.
- What you would notice
- Public buckets, open security groups.
- What you change
- Organization-level blocks and scanning.
Containers are not VMs
- What fails
- Containers share the host kernel.
- Who is affected
- Nodes and neighbors.
- What you would notice
- Privileged pods and host mounts.
- What you change
- Enforce restricted pod security.
Identity is the cloud firewall
A policy that allows all actions on all resources, attached because a tutorial would not start otherwise, is the cloud version of a world-writable directory. Workload roles should name the API calls that workload makes. Human roles should not be the same as deploy roles. Long-lived access keys on laptops are sessions that never expire. Prefer the provider's short-lived credentials.
Public storage, open security groups, and dashboards on the internet are the exposure class. Block public access at the organization level and carve exceptions. Management ports belong on a private network with strong identity, not on a wide-open address and a shared password.
What a container does not contain
A container is a process with a constrained view of the system, not a separate computer you can be careless inside. Running as root, mounting the container runtime socket, or granting every capability hands that process levers on the node. A node compromise is every neighbor on the node.
Practical baselines: non-root users, read-only root filesystems where the app allows it, dropped capabilities, no privileged pods for ordinary services, and network policy so a compromised front end cannot talk to the database port it does not need. Pin image versions. Scan images for known vulnerable packages and for secrets baked into layers. Admission control should reject the workloads that ignore the baseline, or the baseline is a suggestion.
Clusters
Kubernetes adds a powerful API in front of those containers. If that API is public and weakly authenticated, the cluster is public. Role bindings that grant cluster-admin to a CI job, a helm chart, or every developer are the same over-privilege problem as a cloud admin key. Secrets in environment variables end up in logs and in crash dumps. Use the platform's secret store and still assume the node can see them if the node is lost.
Learn this on a local cluster that has no route to real credentials, or on a provider's tutorial project. The goal is to read a manifest and say what it is allowed to do if the process inside is hostile. That sentence is the skill.
Check yourself
Recognition and the fix. Nothing here is a procedure.
A bucket is public. Under shared responsibility, whose problem is it?
Go deeper
Specific techniques, exercises, and glossary cards for this topic.
- 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.
- 02Pull requests from outside the trust boundaryCode from a fork or an untrusted branch is not your code yet. Includes the diagram and a defensive fix.
- 03Cloud security fundamentals: shared responsibility, identity, and the audit trailWhat 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. Includes the diagram and a defensive fix.
- 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.
- 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.
- 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.
- 07Over-privileged cloud identities: wildcards, admin roles, and unused rightsCloud roles collect permissions faster than they lose them. Includes the diagram and a defensive fix.
- 08Missing 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.
Exercises
- 01Control benchA failure is on the table. Choose the control that changes the outcome.
- 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.
- 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
- 01Public object storageA bucket or blob container is world-readable or world-writable, so data leaks or is replaced.
- 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.
- 03Missing cloud audit logsWithout a management trail you cannot answer who created a key or opened a firewall.
- 04Open security groupsA management port reachable from the internet is an invitation, whatever password sits on it.
- 05Disabled metadata protectionsA workload role can be stolen by anything that can make the instance ask for its own credentials.