SEC08-BP04 Enforce access control
Encryption protects data at rest, and access control decides who can reach that data. Apply least privilege, isolate data by sensitivity, block public access, and preserve prior versions to limit unauthorized access and damage from accidental or unauthorized changes.
Desired outcome:
-
You allow only authorized users and services to reach data, and only for the tasks that require it.
-
You scope access to decryption keys as tightly as access to the data itself.
-
You isolate data of different sensitivity levels, so exposure of one level does not expose others.
-
Your versioning and object retention protect critical data against modification and deletion.
-
You block public access to storage unless a specific, reviewed requirement allows it.
Common anti-patterns:
-
Teams store data of different sensitivity or classification together.
-
Administrators grant overly permissive permissions on decryption keys.
-
Teams classify data incorrectly, so the controls do not match its sensitivity.
-
Teams keep no detailed backups of important data.
-
Teams provide persistent access to production data instead of time-bound access.
-
Teams do not audit data access or review permissions on a regular cadence.
Benefits of establishing this best practice:
-
An identity under unauthorized control reaches only the data its narrow permissions allow, which limits blast radius.
-
Isolating classifications keeps a single exposure from cascading across your data estate.
-
Versioning and object locking give you a recovery path after accidental or unauthorized changes.
-
Regular access review removes standing permissions before they become an attack path.
Level of risk exposed if this best practice is not established: High
Implementation guidance
Access control for data at rest is layered. Identity permissions govern who can call operations, resource policies govern what a bucket, volume, or key allows, and account boundaries govern which workloads can see the resource. These layers overlap, so a mistake in one layer does not expose data by itself. Isolate data by classification into distinct accounts through AWS Organizations to keep a permission error contained.
Access to encryption keys is access to data. For example, a principal that can decrypt is able to read whatever the key protects. Apply the same least privilege scrutiny to AWS KMS key policies that you apply to data permissions. Review who can decrypt, and use conditions to constrain when and from where decryption is allowed.
Public exposure of storage is usually caused by a single permissive policy. Set a default of no public access, and use detective controls such as AWS Config managed rules to detect resources that become publicly reachable. Serve content through a distribution layer to keep the origin private. Apply the same review to other data sources that authorize access through identity policies.
Protect integrity and recoverability alongside confidentiality. Versioning preserves earlier copies, so you can reverse an accidental overwrite or deletion. Object locking and vault locking make protected copies immutable for a retention period, and even a highly privileged operator cannot delete them before the lock expires. Audit resource sharing regularly. Snapshots, images, and resources shared for a past need often stay shared long after, so revoke access that is no longer justified.
Implementation steps
-
Apply least privilege to data and keys: Review the permissions granted to users and services, and remove any that exceed what a task requires. Review access to encryption keys through your AWS KMS key policies, and confirm that appropriate conditions apply.
-
Isolate data by classification with separate accounts: Place each data classification level in a distinct AWS account, and manage those accounts centrally with AWS Organizations. This isolation reduces the risk that access to one level exposes another.
-
Review and restrict storage access: Regularly review Amazon S3 bucket policies, avoid publicly readable or writable buckets, and use AWS Config to detect resources that allow public access. Serve content through Amazon CloudFront
to keep the origin private, and apply the same review to databases and other sources that use IAM authentication. -
Analyze external and public access: Configure IAM Access Analyzer to generate findings when a policy grants access to an entity outside your defined boundary. Review the findings and correct any unintended access.
-
Preserve and lock critical data: Enable Amazon S3 versioning to recover from overwrites and deletions, and use Amazon S3 Object Lock to make objects immutable for a retention period, including archived objects in the Amazon Glacier storage classes.
-
Audit encryption and replication status: Use Amazon S3 Inventory to report on the encryption and replication status of your objects, and act on any gaps it reveals.
-
Review resource sharing regularly: Check your Amazon EBS snapshot and AMI sharing permissions to confirm that images and volumes are not shared with external accounts. Audit AWS Resource Access Manager shares and stop sharing resources that no longer need it.
Resources
Related best practices:
Related documents:
Related videos:
Related examples: