Cross-Account Access Auditing
What you'll learn: How to monitor, log, and detect unauthorized access when identities from one cloud account interact with resources in another.
Why Cross-Account Access Needs Special Auditing
Cross-account access—where principals in Account A assume roles or access resources in Account B—creates a security boundary that attackers love to exploit. Unlike single-account activity, cross-account calls involve trust relationships that can hide malicious activity if not properly monitored. Think of it like having a master key to multiple buildings: you need to track every time that key is used and which building was accessed.
What to Monitor and Log
API Call Logging
Enable comprehensive cloud trail logging to capture:
- AssumeRole events: Who assumed what role, from which account, when
- Cross-account resource access: S3 bucket reads, Lambda invocations, secret retrievals
- Source IP addresses and user agents: Detect anomalous access patterns
- Denied attempts: Failed cross-account calls often indicate reconnaissance
Trust Relationship Reviews
Periodically audit trust policies to detect:
- Overly permissive principals: Does
"Principal": "*"appear with weak conditions? - Orphaned external IDs: Are third-party integrations still valid?
- Unexpected account IDs: Trust relationships added without authorization
- Missing conditions: No MFA requirement, no IP restrictions on sensitive roles
Detecting Unauthorized Access
Look for red flags:
- Role assumptions from unexpected geographic regions
- Spike in cross-account API calls during off-hours
- Access to resources the assumed role shouldn't touch
- Session tokens used beyond their intended scope
Set up automated alerts when trust policies change or when high-privilege cross-account roles are assumed.
Key Takeaway: Cross-account access auditing requires continuous monitoring of AssumeRole events, regular trust policy reviews, and automated detection of anomalous cross-account API patterns—because attackers exploit the seams between accounts where visibility often goes dark.