A valid cloud credential used from the wrong network, or pointed at a bucket the attacker owns, passes every IAM check you have written. Data perimeters close that gap by adding organisation-wide guardrails that ask three questions on every request: is the identity ours, is the resource ours, and did the request come from a network we expect? AWS, Microsoft Azure and Google Cloud each answer those questions with different tools: service control policies, resource control policies and VPC endpoint policies on AWS; VPC Service Controls and organisation policy constraints on Google Cloud; private endpoints, Network Security Perimeter and storage account settings on Azure. This guide compares the three models side by side, shows how to design and roll out a perimeter without breaking production, and explains how to detect the access the perimeter was built to stop. It is written for cloud security architects and platform engineers running more than one provider. For the AWS-only detail see the AWS Resource Control Policies and Data Perimeter Guide, and for exfiltration in general see the Data Exfiltration Guide.
Key takeaways
- Three conditions, every request: AWS frames the perimeter as trusted identities, trusted resources and expected networks; access is allowed only when all three hold. The same model works as a design language for Azure and Google Cloud.
- Guardrails, not grants: SCPs, RCPs, VPC Service Controls perimeters and Network Security Perimeter in enforced mode only restrict. They never grant access, so they sit above and survive mistakes in individual IAM or resource policies.
- Each provider has gaps you must fill: RCPs cover a listed set of AWS services and never apply to the management account; VPC Service Controls does not control metadata or unsupported services; Azure service endpoint policies cover only Storage.
- Dry run first, always: Google's dry run mode, Azure's transition mode and CloudTrail AccessDenied analysis for AWS let you see what would break before you enforce. Skipping this step is the main reason perimeters get rolled back.
- Exceptions are the attack surface: the tags, access levels, ingress rules and trusted service exceptions that let legitimate traffic through must themselves be protected, reviewed and logged.
The data perimeter model
A data perimeter is a coarse-grained set of preventive controls applied at organisation level, sitting above the fine-grained permissions application teams write. The AWS whitepaper Building a Data Perimeter on AWS defines three elements and the AWS data perimeter policy examples repository defines them as follows:
- Trusted identities: principals (IAM roles or users) within your accounts, or cloud services acting on your behalf.
- Trusted resources: resources owned by your accounts, or by cloud services acting on your behalf.
- Expected networks: your on-premises data centres and virtual networks, or the networks of cloud services acting on your behalf.
Each element is enforced from two directions, which gives six control objectives. The table translates them into the three providers' controls.
| Control objective | Risk reduced | AWS | Google Cloud | Azure |
|---|---|---|---|---|
| Only trusted identities can access my resources | External principals granted access by a careless resource policy | RCP with aws:PrincipalOrgID | Domain restricted sharing (iam.allowedPolicyMemberDomains or iam.managed.allowedPolicyMembers); perimeter ingress rules | Tenant-bound Entra ID authorisation; disable Shared Key and anonymous access; NSP inbound rules by subscription |
| Only trusted identities are allowed from my network | Attacker-owned credentials used from inside your VPC | VPC endpoint policy with aws:PrincipalOrgID | VPC Service Controls perimeter (requests from inside are evaluated against the perimeter) | Entra ID tenant restrictions on egress proxies (identity layer, outside the network controls in this guide) |
| My identities can access only trusted resources | Copying data to an attacker-owned bucket or account | SCP with aws:ResourceOrgID | Perimeter egress rules; resources outside the perimeter blocked by default | Service endpoint policies (Storage); storage AllowedCopyScope; NSP outbound FQDN rules |
| Only trusted resources can be accessed from my network | Exfiltration through your own private paths | VPC endpoint policy with aws:ResourceOrgID | Restricted VIP (restricted.googleapis.com) so only perimeter-supported APIs resolve | Service endpoint policies; Azure Firewall FQDN filtering on egress |
| My identities can access resources only from expected networks | Stolen credentials replayed from the internet | SCP with aws:SourceIp, aws:SourceVpc or aws:VpceOrgID | Perimeter plus access levels in Access Context Manager | Conditional Access for users; private endpoints with public network access disabled |
| My resources can only be accessed from expected networks | Public exposure of storage, keys and secrets | RCP with the same network keys | Perimeter (denies unauthorised networks even when IAM allows) | Public network access Disabled; NSP enforced mode; storage firewall default action Deny |
The Azure column is the least symmetrical. Azure has no single organisation-wide deny policy that inspects identity, resource and network on every data plane call, so the perimeter is assembled from network isolation, per-service settings enforced by Azure Policy, and Entra ID controls. Treat that as a design fact, not a gap to paper over.
AWS: SCPs, RCPs and VPC endpoint policies
AWS builds the perimeter from three policy types, all of which only deny or limit:
- Service control policies (SCPs): applied to principals in member accounts. Use them for the resource perimeter (my identities only reach resources whose
aws:ResourceOrgIDis mine) and the identity-side network perimeter. - Resource control policies (RCPs): applied to resources in member accounts, and they affect principals inside and outside the organisation, including the root user. AWS documentation lists the supported services; at the time of writing that list includes Amazon S3, AWS KMS, AWS Secrets Manager, Amazon SQS, AWS STS, Amazon DynamoDB, Amazon ECR, CloudWatch Logs and others. RCPs require all features enabled in AWS Organizations.
- VPC endpoint policies: applied on the network path. The default example allows only requests where both the principal and the resource belong to your organisation, with explicit statements for known third-party patterns.
Condition keys that do the work
| Key | What it compares | Caveat from AWS documentation |
|---|---|---|
aws:PrincipalOrgID | Organisation of the calling principal | Absent for anonymous requests; pair Deny statements with aws:PrincipalIsAWSService false so service principals are not blocked |
aws:ResourceOrgID | Organisation that owns the target resource | Sensitive key: never use wildcards |
aws:SourceVpc / aws:SourceVpce | VPC or endpoint the request travelled through | Only present through a VPC endpoint; for forward access sessions add aws:ViaAWSService or aws:CalledVia |
aws:VpceOrgID | Organisation that owns the VPC endpoint | Only for supported services; scales better than listing VPC IDs |
aws:SourceIp | Public source IP of the request | Not present on requests through a VPC endpoint (use aws:VpcSourceIp) |
aws:PrincipalIsAWSService | Direct call by an AWS service principal | Use the BoolIfExists form |
Known AWS boundaries
- Management account: RCPs never restrict resources in the management account. Keep data out of it.
- Service-linked roles: calls by service-linked roles are not restricted by RCPs.
- AWS managed KMS keys: not affected by RCPs; use customer managed keys for data you want inside the perimeter.
- Services outside the RCP list: fall back to resource-based policies with the same conditions, which the AWS examples repository provides per service.
The examples repository scopes controls with tags such as dp:exclude:network, dp:exclude:identity and dp:exclude:resource, and ships a governance SCP and RCP that stop anyone except a tagged admin team from setting those tags. If you adopt tag-based exceptions, adopt the tag protection too.
Google Cloud: VPC Service Controls and organisation policy
VPC Service Controls draws a service perimeter around projects. Communication inside the perimeter is free; calls from outside to protected Google Cloud services are blocked by default, and Google states it denies access from unauthorised networks even where IAM would allow it. It protects against copying data out with operations such as gcloud storage cp or bq mk and against stolen OAuth or service account credentials used from outside. See the VPC Service Controls Guide for configuration depth.
- Access levels: defined in Access Context Manager by source IP range, identity, device and geolocation. Console access to protected resources needs an access level.
- Ingress and egress rules: the granular way to allow specific identities and methods across the boundary. Google recommends them over perimeter bridges, which are bidirectional and grant equal access within their scope.
- Restricted VIP:
restricted.googleapis.comresolves to199.36.153.4/30, a range not announced to the internet. Point private DNS at it so only perimeter-supported APIs are reachable from your VPCs. - Domain restricted sharing: the organisation policy constraints
iam.allowedPolicyMemberDomains(legacy list constraint, enforced by default for organisations created on or after 3 May 2024) andiam.managed.allowedPolicyMembersstop IAM grants to principals outside allowed domains, includingallUsersandallAuthenticatedUsers. This is the identity perimeter at the policy layer.
What it does not cover: Google documents that VPC Service Controls is not designed for comprehensive control of metadata such as bucket names, does not block third-party APIs or internet services, does not replace IAM, and does not support every service. Unsupported services should not be relied on inside a perimeter.
Azure: private endpoints, Network Security Perimeter and service settings
Azure assembles the perimeter from several controls. The Microsoft Azure Security Guide covers the platform; the perimeter-specific pieces are:
- Private endpoints with public network access disabled: each PaaS resource receives a private IP in your virtual network over Private Link, and the public endpoint is turned off. This is the resource-side network perimeter.
- Network Security Perimeter (NSP): a logical boundary around PaaS resources deployed outside virtual networks. It denies public access by default, allows traffic between members, and uses inbound rules (subscription-based, IP-based, service tags in preview) and outbound FQDN rules. It has a transition mode (formerly learning mode) that logs without blocking, and an enforced mode set explicitly. Microsoft lists Storage, Key Vault, Event Hubs, Service Bus, Azure AI Search, Azure Monitor and Microsoft Foundry as generally available, with Cosmos DB, SQL Database and Azure OpenAI in preview at the time of writing. Private endpoint traffic needs no NSP rule; service endpoint traffic is not supported.
- Service endpoint policies: filter outbound traffic from a subnet over the Storage service endpoint to named storage accounts, resource groups or subscriptions. Without one, a subnet with the service endpoint can reach any storage account. They cover Azure Storage only, do not apply to on-premises traffic or peered networks, and have no central log.
- Storage account settings: firewall default action Deny with virtual network rules (up to 400) and IP rules (up to 400), resource instance rules, trusted service exceptions, and
AllowedCopyScope(Permitted scope for copy operations), which limits server-side copy sources to the same Entra tenant or to accounts with private endpoints on the same virtual network. - Azure Policy: enforce all of the above at management group scope with Deny and DeployIfNotExists effects. See the Azure Policy and Management Groups Guide.
Watch two NSP caveats Microsoft documents: Log Analytics workspaces with Microsoft Sentinel enabled do not support NSP, and Azure Backup is not supported for NSP-enabled storage accounts. Subscription-based inbound rules do not support SAS token authentication. The Microsoft SAS token exposure of 2023 shows why SAS and Shared Key paths deserve their own control: an over-permissive token bypasses identity checks entirely.
Choosing controls: decision guidance
| Situation | Start with | Why |
|---|---|---|
| Single provider, AWS, many accounts | Identity perimeter RCP on S3, KMS, Secrets Manager; resource perimeter SCP | Highest-value data stores, fewest third-party exceptions |
| Google Cloud with BigQuery and Cloud Storage analytics | Domain restricted sharing, then a VPC Service Controls perimeter in dry run around data projects | Analytics projects are the classic exfiltration path |
| Azure PaaS-heavy estate | Azure Policy to disable public network access and Shared Key; private endpoints; NSP in transition mode | No single deny policy exists, so baseline settings carry the load |
| Multi-cloud data platform | Pick the resource perimeter first in each provider: stop identities copying to non-owned storage | Cross-cloud exfiltration usually ends in an attacker-owned bucket (ATT&CK T1537 Transfer Data to Cloud Account) |
| Small organisation, one or two accounts | Resource-level settings (block public access, private endpoints) and domain restriction | Organisation-wide policies add operational cost before they add value |
| Heavy partner data exchange | Explicit partner account or organisation IDs in perimeter policies; separate exchange accounts or projects | Keeps exceptions narrow and auditable instead of widening the whole perimeter |
Large organisations should own the perimeter centrally (one team, policy as code, change review) and let application teams request exceptions through a ticketed process. Smaller teams can get most of the value from the resource-side network controls and the identity perimeter alone, and add the network perimeter on identities later.
Rolling out a perimeter
- Define trust boundaries: list your organisation IDs, Google organisation and Workspace customer IDs, Entra tenant IDs, expected IP ranges and VPC or virtual network IDs. Collect partner account IDs that legitimately exchange data.
- Inventory access patterns: on AWS, query CloudTrail for calls where the principal or resource is outside your organisation; on Google Cloud, enable the perimeter in dry run; on Azure, put NSP in transition mode and run the storage copy-source query Microsoft provides against
StorageBlobLogsbefore settingAllowedCopyScope. - Start with the identity perimeter on crown-jewel stores: S3, KMS and Secrets Manager on AWS; data projects on Google Cloud; Storage and Key Vault on Azure.
- Pilot down the hierarchy: AWS strongly recommends not attaching RCPs to the organisation root without testing; start with test accounts and move up through OUs. Use a sandbox folder or management group in the other providers.
- Enforce, then watch denials: track AccessDenied (AWS), VPC Service Controls violation logs (Google) and NSP access logs (Azure) for two to four weeks after each step.
- Add the network perimeter: on identities first for human access, then on resources. This is where most legitimate exceptions appear (CI runners, SaaS integrations, analysts on the move).
- Roll back by detaching, not editing: keep the previous policy version in source control; on AWS detach the SCP or RCP from the OU, on Google move the perimeter back to dry run, on Azure set NSP back to transition mode. Each is a single, fast change.
Detection and measurement
A perimeter produces the best exfiltration signal you will get: a denied request that should never have been attempted. Send these to your SIEM and alert on them (see the Cloud Detection Engineering Guide):
- AWS: CloudTrail
errorCodeAccessDenied where the error message references a service control policy or resource control policy;AttachPolicy,DetachPolicyandUpdatePolicyin AWS Organizations; changes todp:*tags. - Google Cloud: audit log entries with VPC Service Controls violation reasons, dry run violations, and changes to access policies, access levels and organisation policy constraints.
- Azure: NSP diagnostic access logs, Activity Log writes to
publicNetworkAccess, private endpoint deletions and Azure Policy exemptions.
| Metric | Target |
|---|---|
| Share of sensitive data stores inside an enforced perimeter | Rising quarter on quarter, 100% for regulated data |
| Number of active perimeter exceptions, with owner and expiry | Every exception owned; none older than its review date |
| Perimeter denials investigated within SLA | Above 95% |
| Storage accounts and buckets with public network access enabled | Zero without an approved exception |
| Time from new account or project creation to perimeter coverage | Same day, through vending automation |
Where identity fits
Perimeters are identity controls as much as network controls. Workload identities are what attackers actually use: the Capital One breach of 2019 involved temporary role credentials taken through the instance metadata service and used to read S3 data, which is exactly the pattern a network perimeter on identities (ATT&CK T1552.005 Cloud Instance Metadata API, then T1530 Data from Cloud Storage) is meant to block. Service accounts, CI pipelines and SaaS integrations also generate most perimeter exceptions, so review them with the same rigour as human access. See the Cloud Workload Identity Guide and the Workload Identity Federation Guide.
Common failure patterns
- Enforcing at the root on day one: breaks service integrations and AWS service principals, and the perimeter is removed under incident pressure. Pilot by OU, folder or management group.
- Forgetting service-to-service calls: Deny statements without
aws:PrincipalIsAWSServiceoraws:ViaAWSServiceexclusions break logging, replication and backups. - Unprotected exception mechanisms: exception tags anyone can set, access levels with broad IP ranges, or perimeter bridges used where a narrow egress rule would do.
- Assuming coverage that does not exist: data in the AWS management account, services not supported by RCPs or VPC Service Controls, and Azure services outside NSP support.
- Leaving Shared Key and SAS paths open: Azure storage with Shared Key authorisation enabled lets anyone with a key or token bypass Entra ID based controls.
- No owner for denials: perimeter denials land in a log nobody reads, so the strongest exfiltration signal is wasted.
Framework mapping
| Framework | Reference | How the perimeter maps |
|---|---|---|
| NIST SP 800-53 Rev. 5 | AC-4 Information Flow Enforcement; SC-7 Boundary Protection; SC-7(10) Prevent Exfiltration; AC-3 Access Enforcement | Organisation-wide deny policies and perimeters enforce approved flows |
| NIST CSF 2.0 | PR.DS-01; PR.IR-01; PR.AA-05; DE.CM-01 | Data at rest protection, environment protection, least privilege, network monitoring |
| CIS Controls v8.1 | Control 3 Data Protection; Control 13 Network Monitoring and Defense | Data access control and boundary monitoring |
| ISO/IEC 27001:2022 Annex A | 5.15 Access control; 8.12 Data leakage prevention; 8.22 Segregation of networks | Perimeter policies are a technical data leakage prevention measure |
| MITRE ATT&CK v20 | T1537 Transfer Data to Cloud Account; T1530 Data from Cloud Storage; T1567.002 Exfiltration to Cloud Storage; T1078.004 Cloud Accounts | Techniques the six control objectives are designed to prevent |
Practitioner checklist
- Write down your trusted identities, trusted resources and expected networks for each provider, including partner IDs.
- Deploy an identity perimeter on S3, KMS and Secrets Manager (AWS), data projects (Google Cloud) and Storage and Key Vault (Azure).
- Deploy a resource perimeter so your identities cannot write to storage your organisation does not own.
- Enforce domain restricted sharing in Google Cloud and disable Shared Key and public network access on Azure storage through Azure Policy.
- Run every new perimeter in dry run or transition mode and review denials before enforcement.
- Protect exception tags, access levels and policy exemptions with their own guardrails and change logging.
- Keep sensitive data out of the AWS management account and away from services the perimeter does not support.
- Alert on perimeter denials and on any change to perimeter policies, and assign an owner to investigate.
- Bake perimeter coverage into account, subscription and project vending so new environments start inside it.
Standards and references
- AWS: Building a Data Perimeter on AWS (whitepaper)
- AWS Samples: Data Perimeter Policy Examples
- AWS: Resource control policies (RCPs)
- Google Cloud: Overview of VPC Service Controls
- Google Cloud: Restricting identities by domain
- Microsoft Learn: What is a network security perimeter?
- Microsoft Learn: Virtual network service endpoint policies for Azure Storage
- NIST: SP 800-53 Rev. 5
Related NHI Mgmt Group resources: AWS Resource Control Policies and Data Perimeter Guide · VPC Service Controls Guide · Data Exfiltration Guide · Cloud Security Guide