Here’s the part nobody puts on the conference slide: the security lake is the most complete map of your organization that has ever existed — every identity, every system, every packet — and by construction it is also one bucket policy away from being the breach itself. You built the thing to detect the intrusion. A leaked credential plus one missing policy turns it into the intrusion. Let’s not do that.
Three perimeters
Three questions, asked in order. Identity: is the caller one of ours at all? Network: did the request arrive from a place we expect it to arrive from? Resource: are they touching something we own, and is it allowed to go where they’re sending it? If any answer is no, the request doesn’t happen. Every perimeter you will ever write — bucket policy, SCP, VPC endpoint rule, firewall — is some spelling of those three sentences.
- Identity: only our principals can touch our data.
- Network: only from networks we expect (our VPC endpoints, our egress IPs).
- Resource: our principals can only send data to resources we own.
AWS spells the three questions out as policy conditions. Identity: aws:PrincipalOrgID — only principals in our organization, full stop. Network: aws:SourceVpce — only requests that came through our VPC endpoint (or aws:SourceIp if you’re allowing a known egress range). Resource: aws:ResourceOrgID — callers can only act on resources that belong to our org. GCP answers with Organization Policy constraints and VPC Service Controls; Azure answers with management-group conditions and Private Link. Different acronyms, same three questions — if your cloud’s answer to one of them is “we can’t express that,” that’s a finding, not a limitation you accept.
Would it have stopped the leak?
Back to Catgirl University. The attacker had real credentials, so identity checks passed. Find what the other two perimeters would have caught.
Everything that's supposed to touch cgu-registrar comes through the campus VPC endpoint. How many requests to it didn't?
Nothing pinned yet. Crack a question and its clue lands here.
Writing the policies
A bucket policy that denies anything not from the VPC endpoint is about ten lines: deny s3:* when aws:SourceVpce is anything other than your endpoint. The scarier half is writes: an SCP (or an endpoint policy on the bucket) that denies writes to any bucket outside your org cuts off the “copy everything to the attacker’s account” finale of every breach. Then comes the awkward part nobody gets to skip: break-glass and service exceptions. The backup job needs in, the log shipper needs in, the scanner needs read. Enumerate them explicitly, scope them as tightly as you can, and log every use loudly — the nightly backup shows up in your own detections for a reason.
Watching the perimeter
Every perimeter you write becomes a detection for free. Alert on any access to the lake’s buckets from outside the VPC endpoint — if the policy is right, that should be impossible, which is exactly why you want the page. Alert on writes to buckets outside your org ID; that’s the exfil tail call. Alert on service credentials doing what humans do, and on humans doing what service credentials do. These are not exotic hunts — they’re one line each on top of the lake you already have. The lake ends up paying for its own security program, which is a sentence I enjoy writing.
Check it
You should be able to answer these now. Try each one before you open it.
What are the three perimeter questions, in order?
Identity: is the caller one of ours? Network: did the request come from where we expect? Resource: are they touching, or sending data to, something we own?
Which AWS condition keys spell out each perimeter?
aws:PrincipalOrgID for identity, aws:SourceVpce (or aws:SourceIp) for network, and aws:ResourceOrgID for resource.
The attacker had real credentials. Why didn't that make the perimeter useless?
Valid credentials only pass the identity check. The network check stops access from outside your VPC endpoint, and the resource check stops copying data to a bucket outside your org.
How does each perimeter become a detection?
Alert on whatever the policy should make impossible: lake access from outside the VPC endpoint, writes to buckets outside your org, and service credentials behaving like humans or humans like service credentials.