tonia.ai · Concepts

Security in Cloud Networks

In the cloud, the network is software. Firewalls, routers, and whole data centers appear from an API call and vanish just as fast. That makes strong security cheap to deploy and catastrophic mistakes just as cheap to make, and it moves the real perimeter from the network edge to identity.

01The shared responsibility model

A cloud provider secures the infrastructure; the customer secures what they build on it. Where the line falls depends on the service model, and most cloud breaches happen on the customer's side of that line.

layer IaaSPaaSSaaS Data & access Applications Network config OS & runtime Virtualization Physical network Data center customer provider
Even in SaaS, data and access remain the customer's job: who has accounts, with what permissions, and with what authentication.

02Virtual networks

A virtual private cloud (VPC) is an isolated, software-defined network inside the provider's data centers. You choose its address range, carve it into subnets, write its route tables, and decide which pieces can reach the internet. Nothing is connected unless you connect it.

Internet VPC 10.0.0.0/16 IGW public subnet · 10.0.1.0/24 load balancerNAT gateway private subnets · no route from internet app serversdatabase outbound only reachable only from app tier
The classic layout: only the load balancer is internet-facing. Private workloads reach out through NAT but cannot be reached in.

Connecting VPCs (peering, transit gateways) or linking them to an office (site-to-site VPN, dedicated circuits) recreates the same segmentation questions from earlier weeks. A flat mesh of peered VPCs lets one compromise travel everywhere.

03Security groups and network ACLs

Cloud filtering happens in the virtualization layer, so rules can wrap every single instance rather than only the network edge. Two kinds of control usually coexist:

Security group (instance firewall)Network ACL (subnet filter)
Attached toEach network interfaceA whole subnet
StateStateful: replies allowed automaticallyStateless: both directions need rules
RulesAllow only; default denyOrdered allow and deny
Can referenceOther security groups, not just IPsIP ranges only
Best forMicrosegmentation by roleCoarse guardrails, explicit blocks
sg-webin: 443 from anywhere sg-appin: 8080 from sg-web sg-dbin: 5432 from sg-app rules follow roles, not addresses: new instances inherit the right access automatically the classic mistake: 0.0.0.0/0 on SSH, RDP, or a database port
Referencing groups instead of IP addresses keeps policy correct as autoscaling adds and removes instances.

04Keeping traffic private

By default, calls from a VM to the provider's own services (object storage, databases, queues) may travel over public endpoints. Private endpoints put those services inside your VPC's address space, so data never needs a public route and you can block internet egress entirely.

Private endpoints

Reach managed services over private IPs. Combine with endpoint policies that allow only your own buckets or accounts.

Egress control

Restrict outbound traffic to known destinations. Malware and data theft both need a way out.

Encryption everywhere

TLS in transit even inside the VPC, and provider-managed keys (KMS) for data at rest, with key access logged and limited.

Edge protection

Put public apps behind the provider's DDoS protection, CDN, and web application firewall, and hide origin addresses.

05Identity is the new perimeter

In the cloud, the most powerful network is the provider's API. Anyone holding valid credentials can create, change, or delete infrastructure from anywhere on the internet.

Every VM, function, and container runs with an identity (a role or service account) that grants API permissions. If an attacker can make a workload reveal its credentials, network controls around it no longer matter.

Attackercrafted URL Web app / WAFfetches any URL (SSRF) Metadata service169.254.169.254 Storage APIcustomer data ① request ② returns role credentials ③ attacker readsevery bucket the role can
The 2019 Capital One breach followed this pattern: a misconfigured web application firewall was tricked into fetching temporary credentials, which had broad storage permissions.

Least-privilege roles

Grant each workload only the specific actions and resources it needs; review unused permissions regularly.

Harden metadata access

Require session-token metadata requests (such as IMDSv2) and block the metadata address where it is not needed.

No long-lived keys

Use short-lived, automatically rotated credentials and workload identity federation instead of static access keys in code.

Protect humans

Phishing-resistant MFA on every console and admin account; separate break-glass accounts.

06Misconfiguration: the dominant cloud risk

Cloud platforms rarely get "hacked" in the traditional sense. Far more often, a customer leaves something open: a public storage bucket, a database with no password on a public IP, an administrator port open to the world, or a role that can do everything. Attackers scan the entire internet for these continuously.

exposure Public storage

Buckets readable or writable by anyone have leaked millions of records and been used to plant malicious code.

exposure Open services

Databases, dashboards, and container APIs reachable from the internet, often with default or no authentication.

privilege Over-broad IAM

Wildcard permissions turn any small compromise into full-account control.

secrets Leaked credentials

Access keys committed to public code repositories are found by automated scanners within minutes.

Cloud security posture management (CSPM) tools continuously compare live configuration against benchmarks and alert on drift.

07Containers, Kubernetes, and service mesh

Containerized applications add another network inside the network. By default, every pod in a Kubernetes cluster can talk to every other pod, so a single compromised container can probe the whole cluster.

Kubernetes cluster namespace: frontend namespace: orders namespace: payments web podorders podpayments pod mTLSmTLS web → payments: denied by NetworkPolicy
Network policies restrict which pods may talk; a service mesh adds mutual TLS so every connection is encrypted and both sides are authenticated by workload identity.

08Multi-tenancy and isolation

Your workloads share physical servers, networks, and storage with strangers. Providers isolate tenants with hypervisors, lightweight micro-VMs, and network virtualization, but isolation is a property to be verified, not assumed.

Early research showed an attacker could deliberately place a VM on the same physical host as a target and extract information through shared hardware side channels. Later CPU flaws (Spectre, Meltdown) raised the same concern at a deeper level. Providers responded with hardened hypervisors, dedicated-host options, and confidential computing that encrypts memory even from the host.

09Visibility and detection

You cannot plug a network tap into someone else's data center, but the cloud offers telemetry that is often richer than on premises, if you turn it on and keep it.

SourceShowsExample question
API audit logsEvery control-plane action and who made itWho opened port 22 to the world at 2 a.m.?
Flow logsConnection metadata per interfaceWhich instance sent 40 GB to an unknown address?
DNS logsNames resolved by workloadsIs anything resolving known C2 domains?
Managed threat detectionProvider analytics over the aboveAre credentials being used from an unusual country?

Send logs to a separate, locked-down account so an attacker who compromises production cannot erase the evidence.

10Infrastructure and policy as code

Because cloud networks are defined by API calls, they can be defined in code: reviewed, version-controlled, tested, and scanned before deployment. Mistakes become pull requests that a reviewer or an automated check can reject.

WriteTerraform, etc. Scanmisconfig rules Reviewhuman approval Deploypolicy enforced Monitordetect drift "shift left": a public database is cheapest to catch before it exists
Code can also carry security smells: hard-coded secrets, overly permissive rules, and disabled encryption copied from examples.

11Common misconceptions

MythThe provider handles security.
RealityThe provider secures the platform. Configuration, identities, and data are yours.
MythPrivate subnets are safe.
RealityA workload with a powerful role is exposed through the API no matter which subnet it sits in.
MythLift-and-shift keeps on-premises security intact.
RealityPerimeter appliances do not see API calls, metadata services, or managed-service access. Controls must be redesigned.
MythThe cloud is less secure than our data center.
RealityThe platform is usually better defended than most companies can manage. Risk concentrates in how it is configured.

—References

Peer-reviewed

  1. Agache, A. et al. (2020). Firecracker: lightweight virtualization for serverless applications. USENIX NSDI. usenix.org
  2. Armbrust, M. et al. (2010). A view of cloud computing. CACM, 53(4). doi:10.1145/1721654.1721672
  3. Continella, A. et al. (2018). There's a hole in that bucket! ACSAC. doi:10.1145/3274694.3274736
  4. Khan, S. et al. (2022). A systematic analysis of the Capital One data breach. ACM TOPS, 26(1). doi:10.1145/3546068
  5. Rahman, A., Parnin, C. & Williams, L. (2019). The seven sins. IEEE/ACM ICSE. doi:10.1109/ICSE.2019.00033
  6. Ristenpart, T. et al. (2009). Hey, you, get off of my cloud. ACM CCS. doi:10.1145/1653662.1653687
  7. Shamim, M. S. I., Bhuiyan, F. A. & Rahman, A. (2020). XI commandments of Kubernetes security. IEEE SecDev. doi:10.1109/SecDev45635.2020.00025

Standards and guidance