DEV Community

Cover image for Why Architecture is the True Security Boundary
Eyal Estrin for AWS Community Builders

Posted on Originally published at Medium

Why Architecture is the True Security Boundary

For decades, organizations have tried to define a single security boundary to separate what is considered internal (or trusted) from external networks and applications.

In the following blog post, I will review why traditional concepts like the network or even identity are not complete security boundaries on their own, and why architecture is the true security boundary.

Demystifying old myths about security boundaries

Before we discuss how to design modern security boundaries, let's review some of the common layers organizations used to treat as security boundaries before and during the cloud era:

The Physical Perimeter

This model relied on physical locks, biometric access gates, server racks, and isolated physical networks (air-gapping).

Why it fell: Cloud migration moved workloads onto shared physical hardware managed by cloud providers. At the same time, insider risks, compromised maintenance laptops, and supply chain hardware issues showed that physical access controls do not protect against logical or application-level attacks.

The Network Perimeter and IP Subnets

This approach depended on firewalls, DMZs, VPNs, IP address ranges, and later on, basic cloud VPC topologies. The assumption was simple: if traffic originated inside the network, it could be trusted.

Why it fell: Remote work, mobile devices, SaaS adoption, and microservices removed clear network edges. Once attackers gained an initial foothold through phishing or stolen credentials, they could easily move laterally across flat internal networks. Network location proved to be a weak indicator of trust.

Active Directory & Domain Trees

For nearly two decades, the Microsoft Active Directory domain (and forest boundary) defined the limits of administrative authority through Kerberos tickets, NTLM authentication, and Domain Admin permissions.

Why it fell: Attackers routinely abused legacy protocols (such as NTLM relay, Kerberos Golden or Silver Ticket attacks, and DCSync) to escalate privileges across domains. As organizations adopted cloud services, hybrid identity sync tools (like Entra ID Connect) allowed a local Active Directory compromise to turn into a full cloud tenant takeover.

Standard IAM Roles and Static API Tokens

In cloud environments, teams relied on user accounts, long-lived API access keys, and IAM policies tied to static identities (such as static AWS IAM user keys or GCP service account keys).

Why it fell: Hardcoded credentials in source code, leaks in CI/CD pipelines, and token theft bypass static identity controls completely. Authentication confirms who or what is making a request, but static IAM policies cannot evaluate runtime context or intent. This gap pushed teams to move toward temporary, short-lived STS tokens and Workload Identity Federation (OIDC).

Endpoint Security and Antivirus

Traditional endpoint security relied on host-based Antivirus (AV) and Endpoint Detection and Response (EDR) agents installed on workstations and servers to block malicious files.

Why it fell: Living-off-the-Land techniques allow attackers to use legitimate built-in tools like PowerShell, WMI, or cloud CLI utilities, bypassing signature-based detection. In addition, cloud-native serverless functions (such as AWS Lambda or Cloudflare Workers) and short-lived containers run without persistent operating system agents, making endpoint-only security ineffective for modern workloads.

Defining a security boundary

Without clear security boundaries, an environment becomes a single flat trust zone where a flaw in one component can expose everything else.

When designing cloud and application architectures, security boundaries serve four practical functions:

Containing Blast Radius (Fault Isolation)

Components fail, software has vulnerabilities, and credentials can leak. A security boundary ensures that a compromise in one part of the system (such as a public web front-end, a CI/CD runner, or an AI agent) does not automatically grant access to databases, identity providers, or management planes. It keeps an incident contained to a small, manageable scope.

Establishing Control Points for Inspection

You cannot inspect, log, or validate traffic moving between systems unless a clear boundary separates them. Security boundaries create defined transition points where you can enforce technical controls:

  • Decrypting and inspecting outbound traffic at egress firewalls or API gateways.
  • Evaluating dynamic authorization policies that check request context, not just static identity.
  • Applying rate limits, schema validation, and input sanitization before requests reach backend services.

Enforcing Least Privilege in Execution Space

Without boundaries, workloads often inherit broader permissions than they need. Architectural boundaries separate different data classifications (for example, regulated payment data versus general operational logs) and different execution environments (such as public-facing microservices versus internal core systems). This ensures each process runs only within its intended scope.

Eliminating Implicit Trust

Architectures without explicit boundaries rely on implicit trust, assuming that traffic coming from an internal server is safe. Modern attack methods (such as Server-Side Request Forgery, lateral movement, and prompt injection or confused deputy attacks against AI agents) take advantage of implicit trust. Security boundaries require explicit verification at each step, replacing assumptions with enforced runtime checks.

Why Architecture is the True Boundary

In recent years, many security practitioners have argued that identity has replaced the network as the new perimeter. While identity is critical, treating identity as the only boundary creates a dangerous blind spot, especially as organizations deploy non-human identities, microservices, and autonomous AI agents.

Architecture is the overall structure that defines how components (networks, identities, compute runtimes, storage, and application logic) interact under policy. Instead of replacing network or identity controls, architecture wraps around every single boundary layer and connects them into one cohesive defense model. Identity is only one enforcement mechanism inside that design; it is not the entire boundary.

To see why foundational architecture enforces security where identity alone falls short, consider four core architectural principles:

  • Defense-in-Depth and Compartmentalization: A compromised service credential or hijacked AI agent token should never grant broad access across an entire cloud environment. By combining multiple cloud accounts or subscriptions (such as AWS Organizations or Azure Management Groups), isolated VPCs, private endpoints (like AWS PrivateLink or Azure Private Link), and sandboxed compute runtimes (such as Firecracker microVMs or gVisor), the architecture limits what an attacker can reach even when a valid credential is stolen. For example, if an AI agent running inside an isolated container is tricked via prompt injection into querying internal resources, private network routing and account-level Service Control Policies (SCPs) block access to sensitive databases regardless of the agent's local permissions.

  • Hardening and Hard Guardrails: Identity defines what an entity is allowed to request, while architecture defines what the system is physically or logically capable of doing. System hardening, immutable infrastructure, read-only root filesystems, and strict egress filtering prevent an authenticated workload from modifying its runtime environment or sending data to unauthorized destinations. For instance, even if an attacker exploits an application flaw in a production Kubernetes pod and inherits its IAM role, a read-only filesystem prevents them from dropping malicious binaries, and a strict egress firewall blocks data exfiltration to external IP addresses.

  • Zero Trust as a Design Pattern: Zero Trust is often misunderstood as simply deploying multi-factor authentication and strong IAM policies. In practice, Zero Trust is an architectural design pattern built on continuous verification at every layer. It combines mutual TLS (mTLS) between microservices, encryption in transit and at rest, API gateway policy checks, and runtime integrity monitoring. For example, in a modern multi-tier payment application, each service call must pass network segmentation rules, validate a short-lived workload certificate, and pass application-level authorization checks before accessing customer records.

  • Ephemeral Credentials and Reduced Exposure: Relying on long-lived secrets forces teams to treat static credentials as permanent perimeter walls. Good architecture removes static secrets altogether by using short-lived STS tokens, automated secret rotation, and Workload Identity Federation (OIDC). For example, instead of storing static cloud access keys inside GitHub Actions or GitLab CI/CD pipelines, OIDC federation allows the build runner to request a temporary token scoped strictly to a specific deployment task and valid for only a few minutes. Even if that token is intercepted, its exposure window and blast radius remain minimal.

When you look at these layers together, it becomes clear why architecture wraps up every other security boundary. Network segmentation controls traffic paths, identity controls authentication and authorization, compute sandboxing isolates execution, and hardening restricts system behavior. None of these controls can carry the full security burden alone, but when aligned through deliberate architecture, they reinforce one another so that a failure in one layer does not lead to a full breach.

Summary

In this blog post, I have reviewed how security boundaries have evolved from physical walls and network perimeters to Active Directory, static IAM, and endpoint agents, and why none of those layers can serve as a standalone boundary today. Instead, architecture is the true security boundary because it brings network isolation, identity governance, compute hardening, and runtime verification together into a single defense-in-depth design.

Designing strong architecture is not just a technical exercise; it is a business necessity. Organizations adopt cloud services, APIs, and AI agents to move faster, scale globally, and deliver new capabilities to customers. If security controls are bolted on as isolated point solutions, they either slow down engineering teams or leave gaps between disconnected layers. A well-designed architecture aligns security directly with business requirements by building repeatable guardrails (such as landing zones, standardized CI/CD pipelines, and automated policy enforcement) that allow teams to innovate safely without constant manual bottlenecks.

At the same time, the threat landscape continues to evolve rapidly. Attackers increasingly target non-human identities, abuse legitimate cloud APIs, exploit supply chain dependencies, and manipulate AI agents through indirect prompt injection. Point-in-time defenses cannot keep up with these dynamic attack paths. By returning to security fundamentals (least privilege, hardening, zero trust, and temporary credentials) and embedding them directly into your system architecture, you ensure your environment remains resilient against both current and future threats.

About the Author

Eyal Estrin is a cloud and information security architect with more than 25 years in the industry. He is the author of Cloud Security Handbook and Security for Cloud Native Applications.

The views expressed are his own.

Top comments (2)

Collapse
 
heyvaldemar profile image
Vladimir Mikhalev AWS Community Builders •

Private routing left one way out when I tested this on AWS: name lookups. With no internet gateway and no NAT, a pod still got an answer for example.com from the Route 53 Resolver every VPC carries, and anything it puts into a lookup reaches the server that answers for that name.

A Route 53 Resolver DNS Firewall rule group with fail-open off closed it. Only AWS service names in the region and the VPC's private names resolve; the rest get NXDOMAIN. The check ran once with the firewall left out, to watch it fail, before it counted. The boundary alone costs about $0.11 a run.

So in your prompt-injected agent example I'd put the resolver on the list next to routes and SCPs. A boundary drawn on routes never sees the query.

Collapse
 
bobstar323 profile image
Austin Bob •

I’ve always found cloud security boundaries an interesting topic, especially as applications become more distributed and rely on more services working together. This article made me think about how easily we can overlook the bigger picture when we focus only on identity and access permissions.

I particularly agree with the point that identity alone isn't enough. We also need to think about what a compromised component can actually access and how far an attacker could move through the system.

That's where good architecture makes a real difference. Proper isolation, least privilege, and network segmentation can limit the damage even when valid credentials are compromised.

I think this becomes even more important as we introduce AI agents and automated workloads into cloud environments. We can't simply assume that an authenticated service or agent will always behave as expected.

I'm curious: When designing a new cloud-native application, what's the first architectural security decision you believe teams should get right?

I'd be happy to connect with other developers and security engineers who enjoy exchanging ideas about these challenges.