fix(aws): tag access points at create against their file system

EFS authorizes the elasticfilesystem:TagResource that a tagged
CreateAccessPoint needs against the parent file system's ARN, not the new
access point's: a workspace user's first Hybrid start was denied
("not authorized to perform: elasticfilesystem:TagResource on the
specified resource"). Verified live with a probe role: access-point/*
is denied; file-system/* is allowed, as is * with each of
elasticfilesystem:CreateAction, aws:RequestTag and aws:TagKeys.

TagOwnAccessPointsAtCreate now names file-system/* with the same
conditions (CreateAction = CreateAccessPoint, owner request tag, the
three tag keys); its check and owner-scoped test follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Opus 5.5 committed 2026-11-15 10:46:59 -08:00
1 parent 074cb28848
commit 1eed994da7
3 files changed
+9 -4

No files matched your search

+4 -2
View File
@@ -362,9 +362,11 @@ const WORKSPACE_USER_CHECKS: &[Check] = &[
(COMPONENT_RESOURCE_TAG, Literal("user-onboarding")),
],
),
// Authorized against the parent file system, not the new access point
// (verified live, phase 5).
write(
"elasticfilesystem:TagResource",
PROBE_ACCESS_POINT,
PROBE_FILE_SYSTEM,
&[
(OWNER_REQUEST_TAG, OwnerId),
(
@@ -993,7 +995,7 @@ mod tests {
),
(
"elasticfilesystem:TagResource",
"access-point/",
"file-system/",
OWNER_REQUEST_TAG,
),
(
+4 -1
View File
@@ -81,7 +81,10 @@ following:
their owner ID, and create them only on **their own** file system: one tagged
`triple-c:component` (their onboarding module tags it `user-onboarding`) *and*
`triple-c:owner = ${aws:userid}`. Each user has their own file system (strict tenancy), so
another user's file system is refused even though it is Triple-C's.
another user's file system is refused even though it is Triple-C's. The `TagResource` that a
tagged `CreateAccessPoint` needs is authorized against the **file system**, not the new access
point (verified live, phase 5), so `TagOwnAccessPointsAtCreate` names `file-system/*` and is
confined by `elasticfilesystem:CreateAction = CreateAccessPoint`.
- **Set only the ordinary tag keys.** Every request that tags something may set only
`triple-c:owner`, `triple-c:project` and `triple-c:environment` (`aws:TagKeys`). This applies to
`RunTask`, the ECS and EFS tag-on-create calls, `CreateSecret`, and secret `TagResource`. A
+1 -1
View File
@@ -254,7 +254,7 @@
"elasticfilesystem:TagResource"
],
"Resource": [
"arn:aws:elasticfilesystem:*:*:access-point/*"
"arn:aws:elasticfilesystem:*:*:file-system/*"
],
"Condition": {
"StringEquals": {