Skip to content

tentacle: rgw/logging: use assumed-role ARN as Requester for STS requests - #71500

Open
mheler wants to merge 2 commits into
ceph:tentaclefrom
mheler:wip-77035-tentacle
Open

mheler wants to merge 2 commits into
ceph:tentaclefrom
mheler:wip-77035-tentacle

Conversation

@mheler

@mheler mheler commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

When a request is made with STS temporary credentials, the bucket logging
Requester field was being set to the underlying user ID instead of the
assumed-role ARN. Per the AWS S3 server-access-log spec, the Requester
field should contain the assumed-role ARN (e.g.
arn:aws:sts::<account>:assumed-role/<role>/<session>) for STS-credentialed
requests.

Detect TYPE_ROLE identities via s->auth.identity->get_identity_type() and
use the ARN returned by Identity::get_caller_identity() (already
implemented by RoleApplier in the expected AWS format) instead of falling
straight through to s->user->get_id(). Existing behavior for account- and
user-scoped requests is unchanged.

Fixes: https://tracker.ceph.com/issues/71742
Signed-off-by: Shree Jejurikar <[email protected]>
(cherry picked from commit 1854995)
Set rgw sts key and enable rgw s3 auth use sts, both needed by
test_bucket_logging_requester_assumed_role. Mirrors the existing
settings in qa/suites/rgw/verify/overrides.yaml.

Signed-off-by: ShreeJejurikar <[email protected]>
(cherry picked from commit 6ff6a55)
@mheler
mheler requested a review from a team as a code owner September 2, 2026 16:51
@mheler mheler added this to the tentacle milestone Sep 2, 2026
@mheler mheler added the rgw label Sep 2, 2026
@github-actions github-actions Bot added tests releng-audit-pass Release engineering: passed backport verification audit. labels Sep 2, 2026
@anrao19

anrao19 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

@anrao19

anrao19 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

This PR has been removed from tentacle integration testing by anuchaithra started 2026-09-30-07:32.

@anrao19

anrao19 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

// AWS S3 spec: log the assumed-role ARN for STS-credentialed requests.
std::string user_or_account;
if (s->auth.identity && s->auth.identity->get_identity_type() == TYPE_ROLE) {
if (auto caller_arn = s->auth.identity->get_caller_identity(); caller_arn) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anrao19 / @mheler

In tentacle, this line is causing build failure:

C{++} Error in /ceph/debs/ubuntu/WORKDIR/ceph-20.2.4-467-g3cc0f68f/src/rgw/rgw_bucket_logging.cc:556:45

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

full error:

/ceph/debs/ubuntu/WORKDIR/ceph-20.2.4-467-g3cc0f68f/src/rgw/rgw_bucket_logging.cc:556:45: error: 'class rgw::auth::Identity' has no member named 'get_caller_identity'
  556 |     if (auto caller_arn = s->auth.identity->get_caller_identity(); caller_arn) {
      |                                             ^~~~~~~~~~~~~~~~~~~
make[3]: *** [src/rgw/CMakeFiles/rgw_common.dir/build.make:1918: src/rgw/CMakeFiles/rgw_common.dir/rgw_bucket_logging.cc.o] Error 1

looks like get_caller_identity() was not beackported to tentacle

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BBoozmen i think this needs to be fixed before testing could be done on this PR?
you should probably use a different method here

@anrao19

anrao19 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

This PR has been removed from tentacle integration testing by anuchaithra started 2026-10-06-07:53.

@anrao19

anrao19 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

@anrao19

anrao19 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@yuvalif

yuvalif commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to tentacle integration testing by anuchaithra started 2026-10-12-14:40.

@mheler , build creation still failing : https://shaman.ceph.com/builds/ceph/wip-anuchaithra-testing-20261012.144031-tentacle/

@mheler the code in the backport needs to change and use another function.
get_caller_identity() was not beackported to tentacle.

@anrao19

anrao19 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao2-testing-2026-11-02-0641-tentacle.

@anrao19

anrao19 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

This PR has been removed from wip-anrao2-testing-2026-11-02-0641-tentacle.

@anrao19

anrao19 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@anrao19

anrao19 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao19-testing-2026-11-06-0542-tentacle.

@anrao19

anrao19 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

This PR has been removed from wip-anrao19-testing-2026-11-06-0542-tentacle.

@anrao19

anrao19 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao19-testing-2026-11-06-0542-tentacle.

excluded from pr run as shamn build creation is failing : https://shaman.ceph.com/builds/ceph/wip-anrao19-testing-2026-11-06-0542-tentacle/
reason : missing get_caller_identity()

@mheler mheler removed the needs-qa label Nov 6, 2026
@mheler

mheler commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

removing label so this is not re-tested

@BenoitKnecht

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao19-testing-2026-11-06-0542-tentacle.

excluded from pr run as shamn build creation is failing : https://shaman.ceph.com/builds/ceph/wip-anrao19-testing-2026-11-06-0542-tentacle/ reason : missing get_caller_identity()

It requires #63672 to be backported to Tentacle. I've requested for the corresponding tracker issue (https://tracker.ceph.com/issues/72157) to be set to Pending Backport, as it cleanly applies to Tentacle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releng-audit-pass Release engineering: passed backport verification audit. rgw tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants