Skip to main content
emnode
Compliance

Enforce a user identity on EFS access points

Security Hub EFS.4 — an access point without an enforced POSIX user lets clients present whatever UID and GID they like, so the file system's own permissions become the only thing standing between an application and everyone else's data.

11 min·10 sections·AWS

Last reviewed

Remediates AWS Security Hub: EFS.4

EFS access point user identity: the basics

Why an access point without a POSIX user is a hole, not a door

An Amazon EFS access point is an application-specific entry point into a shared file system. It exists so that instead of mounting the raw file system and trusting every client to behave, each application mounts through its own access point with its own scoped view. EFS.4 checks one specific property of that access point: whether it enforces a user identity — a POSIX PosixUser made up of a Uid, a Gid, and optional SecondaryGids. The control fails if no POSIX user identity is defined when the access point is created.

When a PosixUser is enforced, every single NFS request that arrives through the access point is rewritten to run as that user and group, no matter what UID the connecting client claims. Without it, the access point is transparent: a client connecting as Uid=0 (root) or any other UID it chooses is taken at its word, and the only remaining guardrail is whatever POSIX mode bits happen to sit on the files themselves. That's a fragile last line of defence, and it's exactly the kind of implicit trust this control is built to remove.

It's flagged because it maps to least-privilege requirements — NIST 800-53 AC-6(2) and PCI DSS v4.0.1 requirement 7.3.1 — and because the failure mode is silent. The access point works perfectly in testing whether or not identity is enforced; the difference only shows up the day a misconfigured or compromised client connects as a UID it shouldn't have and reads or overwrites files that were never meant for it. The resource type is AWS::EFS::AccessPoint, the severity is Medium, and the check is change-triggered, so it re-evaluates the moment an access point is created or modified.

In this lesson you'll learn what an EFS access point is, what a POSIX user identity (Uid, Gid, SecondaryGids) does when it's enforced, and exactly why EFS.4 fails an access point that omits it. You'll see how this differs from EFS.3 (which enforces a root directory rather than an identity), the AWS CLI commands to find non-compliant access points and create compliant ones, the file-system permission model that makes enforcement matter, and an Infrastructure-as-Code pattern that prevents the gap from reappearing.

Fun fact

The access point that trusted everyone

POSIX file permissions were designed in the 1970s for multi-user mainframes where a central administrator assigned every user a fixed UID. NFS — the protocol EFS speaks — famously inherited a weaker model: by default the client tells the server which UID it is, and the server believes it. That's why a raw EFS mount from a misconfigured client running as UID 0 can act as root across the whole file system. EFS access points with an enforced PosixUser are AWS's fix for that 50-year-old trust assumption: the server stops believing the client and substitutes the identity you configured, every time, for every request.

Enforcing identity on an access point in action

Devon, a platform engineer, gets a Security Hub EFS.4 finding on an access point named fsap-analytics-shared. It was created months ago for a data pipeline and works fine — which is exactly why nobody noticed it has no enforced identity. The pipeline's task role lets it mount the access point, and the containers happen to run as UID 1000, so everything has worked by coincidence rather than by design.

He describes the access point and confirms the gap: the PosixUser field is empty. That means any container that can reach this access point — including a future one a teammate launches as root by default — would connect with whatever UID it has and could traverse files owned by other UIDs on the same file system. The check isn't theoretical; it's flagging that the doorway forces no identity at all.

Access points are immutable, so Devon can't patch the existing one — he creates a replacement with PosixUser set to Uid=1000,Gid=1000, points the pipeline's mount config at the new access point ID, drains the old tasks, and deletes the original. The finding clears on the next change-triggered evaluation. Total work: about fifteen minutes, no data moved, and now every request through the doorway runs as exactly one identity regardless of what the client claims.

First, list every access point on a file system and surface its PosixUser so you can spot the ones with no enforced identity.

$ aws efs describe-access-points --file-system-id fs-0a1b2c3d4e5f6a7b8 --query 'AccessPoints[].{Id:AccessPointId,PosixUser:PosixUser,Root:RootDirectory.Path}' --output table
-----------------------------------------------------------------------
| DescribeAccessPoints |
+----------------------+--------------------------+-------------------+
| Id | PosixUser | Root |
+----------------------+--------------------------+-------------------+
| fsap-analytics-share | None | / |
| fsap-billing-jobs | Uid=1500, Gid=1500 | /billing |
| fsap-legacy-mount | None | / |
+----------------------+--------------------------+-------------------+
# Two access points have no PosixUser — both will fail EFS.4.

An empty PosixUser is the EFS.4 failure condition. fsap-billing-jobs is compliant; the other two are not.

Access points are immutable, so the fix is to create a replacement with PosixUser enforced, then repoint the application and delete the old one.

$ aws efs create-access-point --file-system-id fs-0a1b2c3d4e5f6a7b8 --posix-user 'Uid=1000,Gid=1000' --root-directory 'Path=/analytics,CreationInfo={OwnerUid=1000,OwnerGid=1000,Permissions=0750}' --tags Key=Name,Value=analytics-shared-v2
{
"AccessPointId": "fsap-0c9d8e7f6a5b4c3d2",
"FileSystemId": "fs-0a1b2c3d4e5f6a7b8",
"PosixUser": {
"Uid": 1000,
"Gid": 1000
},
"LifeCycleState": "creating"
}
# Every NFS request through this access point now runs as Uid 1000 / Gid 1000.

Setting --posix-user enforces the identity. Repoint the app to the new ID, then delete the old access point.

EFS access point identity under the hooddeep dive

EFS speaks NFSv4.1, and NFS's native trust model lets the client assert its own UID and GID — the server takes those values at face value when mapping requests to file ownership and POSIX mode bits. An EFS access point with an enforced PosixUser overrides that: the access point's Uid, Gid, and any SecondaryGids are substituted onto every request, so the client's claimed identity is discarded entirely. This is what "enforce a user identity" means concretely — the server stops trusting the client's assertion and uses the configured one for all permission checks.

EFS.4 evaluates exactly one thing: whether PosixUser is set on the access point. The backing AWS Config rule is efs-access-point-enforce-user-identity, the resource type is AWS::EFS::AccessPoint, and it's change-triggered, so it re-evaluates on every create or modify. Note that PosixUser is set only at creation time and cannot be modified afterward — access points are immutable. Remediation therefore always means create-new-then-delete-old, never an in-place patch.

This is a different control from EFS.3, and it's worth keeping the two straight. EFS.3 (efs-access-point-enforce-root-directory) checks RootDirectory.Path and fails if it is /, confining the access point to a subdirectory. EFS.4 checks PosixUser and is about identity, not location. The two are complementary — together they answer "who am I treated as?" (EFS.4) and "what part of the tree can I see?" (EFS.3) — but each can pass while the other fails, and they are reported as separate findings.

# Audit a file system: flag any access point whose PosixUser is null (fails EFS.4).
aws efs describe-access-points \
  --file-system-id fs-0a1b2c3d4e5f6a7b8 \
  --query 'AccessPoints[?PosixUser==`null`].[AccessPointId,RootDirectory.Path]' \
  --output text

# Inspect a single access point's full identity and root-directory config.
aws efs describe-access-points \
  --access-point-id fsap-0c9d8e7f6a5b4c3d2 \
  --query 'AccessPoints[0].{PosixUser:PosixUser,RootDirectory:RootDirectory}'

What is the impact of an access point with no enforced identity?

The primary impact is a least-privilege gap on shared data. Without an enforced PosixUser, the access point passes the client's self-declared UID and GID straight through, so the access boundary collapses onto the file system's own POSIX permissions. If those permissions are loose — a directory mode of 0777, files owned by a UID a client can claim — then any application or compromised container reaching that access point can read, modify, or delete data that was never intended for it. The control exists to close that gap structurally rather than hoping the underlying mode bits are always correct.

There is no AWS billing impact either way — enforcing identity is free, and leaving it off saves nothing. That's important framing: this is a pure risk control, so the cost of a failing finding is measured entirely in exposure and compliance friction, not dollars on the invoice. Anyone treating it as a cost-versus-benefit trade is using the wrong lens; the benefit is real and the cost is zero.

The compliance impact is concrete because EFS.4 maps to NIST 800-53 AC-6(2) and PCI DSS v4.0.1 requirement 7.3.1. For any organisation under PCI scope or asserting NIST alignment, an open finding here is a documented control gap that an auditor or assessor will require evidence on, and that a customer's security review may treat as a blocker. The remediation is trivial, which makes a lingering open finding look worse than it is — it reads as a process gap, not a hard problem.

Finally there's the silent-failure characteristic. An access point with no enforced identity behaves identically to a compliant one until the day a client connects with an unexpected UID. Nothing breaks, no alarm fires, no cost spikes — which is precisely why these gaps survive for months. The impact isn't felt until it's an incident, and by then the cheap fix has become an expensive investigation.

How do you enforce a user identity on EFS access points?

Remediation is a four-step loop: find the non-compliant access points, create compliant replacements (access points are immutable), cut applications over and delete the old ones, and enforce the identity by default so the gap can't reopen.

1. Inventory access points that fail the check

Across every file system, region, and account, list access points whose PosixUser is null — those are the ones failing EFS.4. The describe-access-points query filtering on PosixUser==null does this directly, and Security Hub already surfaces the findings tied to the AWS::EFS::AccessPoint resource type. Note alongside each one which application mounts it, since you'll need to repoint that application during the fix.

2. Create a compliant replacement with PosixUser set

Because an access point's PosixUser is immutable, you cannot patch the existing one — create a new access point with --posix-user 'Uid=<n>,Gid=<n>' (add SecondaryGids if the application needs supplementary group access). Choose the UID and GID that match how the application's processes actually run so file ownership stays consistent. Pair this with an enforced root directory (the EFS.3 control) on the same access point for defence in depth, but keep them as the two distinct properties they are.

3. Cut the application over, then delete the old access point

Update the application's mount configuration — the accessPointId in an ECS volume config, a Kubernetes EFS-CSI persistent volume, or a Lambda file-system config — to reference the new access point ID. Drain or redeploy so live mounts move to the new doorway, verify the workload still reads and writes correctly, then delete the old access point. The finding clears on the next change-triggered evaluation; no data moves because both access points point at the same underlying file system.

4. Make enforced identity the default so it can't recur

Bake the requirement into the path that creates access points. In Terraform or CloudFormation, make posix_user a required input on the shared module so an access point literally cannot be defined without it. Add the AWS Config rule efs-access-point-enforce-user-identity for continuous detection, and consider a Service Control Policy or a CI policy check that rejects access-point definitions lacking a POSIX user. The fix in steps 1-3 is a one-time cleanup; this step is what stops you doing it again next quarter.

# Find every access point with no enforced identity on a file system, then
# create a compliant replacement for one of them.
FS=fs-0a1b2c3d4e5f6a7b8

aws efs describe-access-points --file-system-id $FS \
  --query 'AccessPoints[?PosixUser==`null`].AccessPointId' \
  --output text

# Replacement with an enforced POSIX user (and a non-root directory for EFS.3).
aws efs create-access-point \
  --file-system-id $FS \
  --posix-user 'Uid=1000,Gid=1000,SecondaryGids=[1001,1002]' \
  --root-directory 'Path=/analytics,CreationInfo={OwnerUid=1000,OwnerGid=1000,Permissions=0750}' \
  --tags Key=Name,Value=analytics-shared-v2

# After repointing the application and confirming it works, delete the old one.
aws efs delete-access-point --access-point-id fsap-OLDID

Quick quiz

Question 1 of 5

Security Hub flags an EFS access point under EFS.4. You inspect it and confirm its PosixUser field is null. What's the correct remediation?

You've completed Enforce a user identity on EFS access points. You now know what EFS.4 checks — a non-null PosixUser (Uid, Gid, optional SecondaryGids) on an access point — why an enforced identity overrides NFS's trust-the-client model, how it differs from EFS.3's root-directory check, and the create-new-repoint-delete-old remediation that immutable access points require. Next time the control fires, you'll have a clean path from finding to fix, plus the default-on pattern that stops it recurring.

Back to the library