s3api: take a session's aws:userid from its signed parent user

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chris LuandClaude Opus 5.5 committed 2026-11-13 03:19:01 -08:00
1 parent e456d891a4
commit a0d69a7ede
1 file changed
+5
+5
View File
@@ -539,6 +539,11 @@ func (iam *IdentityAccessManagement) validateSTSSessionToken(r *http.Request, se
} else {
delete(claims, "aws:username")
}
if sessionInfo.ParentUser != "" {
claims["aws:userid"] = sessionInfo.ParentUser
} else {
delete(claims, "aws:userid")
}
// Key the principal on the OIDC subject so a session resolves to the same
// identity on the SigV4 and JWT paths (see s3_iam_middleware.go); fall back to