test: verify Requester field is the assumed-role ARN#749
Open
ShreeJejurikar wants to merge 1 commit into
Open
Conversation
yuvalif
reviewed
May 14, 2026
| def test_bucket_logging_requester_assumed_role(): | ||
| """verify the standard access log Requester field contains the assumed-role ARN | ||
| for requests made with STS temporary credentials | ||
| https://tracker.ceph.com/issues/71742""" |
Contributor
There was a problem hiding this comment.
probably no need to mention the tracker here
yuvalif
approved these changes
May 14, 2026
Add a bucket logging test that asserts the standard access log Requester field is set to the assumed-role ARN (per AWS S3 spec) when a request is made with STS temporary credentials. The test creates an IAM role assumable by the alt user, assumes it via STS, performs an S3 PutObject with the temporary credentials, flushes the bucket log, and verifies the log record's Requester field matches arn:aws:sts:::assumed-role/<role>/<session>. Tracker: https://tracker.ceph.com/issues/71742 Signed-off-by: Shree Jejurikar <shree.jejurikar@gmail.com>
40db126 to
aa206bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a bucket logging test that asserts the standard access log Requester field is set to the assumed-role ARN (per AWS S3 spec) when a request is made with STS temporary credentials.
The test:
sts:AssumeRole, and attaches an inlines3:*policysts.AssumeRole, builds a boto3 S3 client from the temporary credentialsarn:aws:sts::and containsassumed-role/<role>/<session>Reuses existing helpers (
get_iam_client,get_sts_client,_set_log_bucket_policy_tenant,_flush_logs,_parse_log_record,nuke_role) — no new helper code added.Pairs with the fix in ceph/ceph#68887. The test will fail in CI against
mainuntil that lands.Tracker: https://tracker.ceph.com/issues/71742