EFS file system has all access points with a defined POSIX user
Amazon EFS access points are evaluated for a defined POSIX user (uid, gid, optional secondary groups). The check inspects each access point on a file system and flags those without a configured POSIX user identity.
Risk
Without enforced POSIX identity, NFS clients can supply arbitrary UIDs/GIDs, enabling impersonation, unauthorized reads/writes, and ownership spoofing. This undermines confidentiality and integrity of shared data and can enable lateral movement across applications sharing the file system.
Run this check with Prowler
Run in Prowler Cloudprowler aws --checks efs_access_point_enforce_user_identityRecommendation
Enforce a POSIX user identity on every access point using least-privilege uid/gid (avoid 0). Apply separation of duties with dedicated access points per application and minimal groups. Use IAM to require access point usage and add defense in depth by enforcing a restricted root directory.
Remediation
Terraform
resource "aws_efs_access_point" "example" {
file_system_id = "<example_resource_id>"
# Critical: enforces a POSIX user for all requests via this access point
posix_user {
uid = 1000 # Critical: user ID enforced
gid = 1000 # Critical: group ID enforced
}
}NativeIaC
Resources:
ExampleAccessPoint:
Type: AWS::EFS::AccessPoint
Properties:
FileSystemId: "<example_resource_id>"
PosixUser: # Critical: enforces a POSIX user for all requests via this access point
Uid: "<uid>" # Critical: POSIX user ID enforced
Gid: "<gid>" # Critical: POSIX group ID enforcedOther
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.efs.efs_client import efs_client
class efs_access_point_enforce_user_identity(Check):
def execute(self):
findings = []
for fs in efs_client.filesystems.values():
if fs.access_points:
report = Check_Report_AWS(metadata=self.metadata(), resource=fs)
report.status = "PASS"
report.status_extended = (
f"EFS {fs.id} has all access points with defined POSIX user."
)
access_points = []
for access_point in fs.access_points:
if not access_point.posix_user:
access_points.append(access_point)
if access_points:
report.status = "FAIL"
report.status_extended = f"EFS {fs.id} has access points with no POSIX user: {', '.join([ap.id for ap in access_points])}."
findings.append(report)
return findingsReferences
- https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html
- https://repost.aws/knowledge-center/efs-access-points-directory-access
- https://www.plerion.com/cloud-knowledge-base/efs-access-points-should-be-configured-to-enforce-a-user-identity
- https://docs.aws.amazon.com/efs/latest/ug/enforce-identity-access-points.html
- https://docs.aws.amazon.com/securityhub/latest/userguide/efs-controls.html#efs-4