mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 02:57:37 +01:00
* s3api: limit service account keys to their stored actions A service account created with an action subset authenticated as its parent and was authorized with the parent's full permissions. Map each restricted service account key to a copy of the parent that carries the subset as a boundary, and check it in the S3, bucket listing and IAM authorization paths. An empty action list still inherits the parent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3api: drop restricted service account keys with their removed parent RemoveIdentity only dropped keys that mapped to the parent itself, so a restricted service account key, which maps to its own bounded copy, kept authenticating after the parent was deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * sts: keep restricted service account keys out of their parent's roles A named role is admitted by its trust policy alone, so a service account key limited to Read could assume any role trusting its parent and use the role's permissions. Require the key's action subset to allow sts:AssumeRole. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3api: let a service account's scoped upload listing grant pass its boundary The upload and part listing routes are authorized as Read, and the legacy path falls back to the listing grant. The boundary check now does the same, so a service account limited to ListBucketMultipartUploads can still list uploads without being allowed object reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * sts: refuse self sessions for restricted service account keys AssumeRole without a RoleArn and GetFederationToken issue sessions that carry the caller's own policies, which for a service account are its parent's. A restricted key would shed its action subset that way, so refuse both for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * sts: give the restricted service account role test its own role Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3api: check a restricted key's parent grants apart from its boundary The boundary is checked against the request first, so the legacy action check only has to cover the parent's grants. Checking the boundary there again without the request denied a Read parent's upload listing to a key limited to ListBucketMultipartUploads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>