diff --git a/app/src-tauri/src/aws/policies.rs b/app/src-tauri/src/aws/policies.rs index 40aed77..d0ac553 100644 --- a/app/src-tauri/src/aws/policies.rs +++ b/app/src-tauri/src/aws/policies.rs @@ -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, ), ( diff --git a/aws/README.md b/aws/README.md index d250679..f436609 100644 --- a/aws/README.md +++ b/aws/README.md @@ -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 diff --git a/aws/policies/workspace-user.json b/aws/policies/workspace-user.json index 230c11d..9f1d9ac 100644 --- a/aws/policies/workspace-user.json +++ b/aws/policies/workspace-user.json @@ -254,7 +254,7 @@ "elasticfilesystem:TagResource" ], "Resource": [ - "arn:aws:elasticfilesystem:*:*:access-point/*" + "arn:aws:elasticfilesystem:*:*:file-system/*" ], "Condition": { "StringEquals": {