Skip to content

RGW: When using Keystone auth for RGW, include the Keystone user in ops log - #53365

Merged
AliMasarweh merged 1 commit into
ceph:mainfrom
AliMasarweh:wip-alimasa-keystone-auth-rgw
Apr 28, 2025
Merged

AliMasarweh merged 1 commit into
ceph:mainfrom
AliMasarweh:wip-alimasa-keystone-auth-rgw

Conversation

@AliMasarweh

@AliMasarweh AliMasarweh commented Sep 10, 2023 •

Copy link
Copy Markdown
Member

https://bugzilla.redhat.com/show_bug.cgi?id=1769182
Note: this will change the swift url authentication

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@AliMasarweh
AliMasarweh requested a review from a team as a code owner September 10, 2023 09:42
@AliMasarweh

Copy link
Copy Markdown
Member Author

jenkins test api

@mattbenjamin mattbenjamin left a comment

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.

this looks good; is there anything you've found in the keystone token or protocol that we have missed?

@AliMasarweh

Copy link
Copy Markdown
Member Author

this looks good; is there anything you've found in the keystone token or protocol that we have missed?

the tracker wants to log the username (which is more readable than just the Id) https://bugzilla.redhat.com/show_bug.cgi?id=1769182

@AliMasarweh
AliMasarweh force-pushed the wip-alimasa-keystone-auth-rgw branch from 82d6ecf to 766eb4e Compare September 13, 2023 13:12
@mattbenjamin

Copy link
Copy Markdown
Contributor

@mdw-at-linuxbox do you see a problem with this?

Comment thread src/rgw/rgw_auth_keystone.cc Resolved
@AliMasarweh
AliMasarweh force-pushed the wip-alimasa-keystone-auth-rgw branch from 766eb4e to 23c7ff0 Compare November 21, 2023 13:39
@mattbenjamin

Copy link
Copy Markdown
Contributor

sorry I'm missing it--where is keystone_user printed to/taken for the ops-log?

@AliMasarweh
AliMasarweh force-pushed the wip-alimasa-keystone-auth-rgw branch from 23c7ff0 to 5b26fa5 Compare November 22, 2023 12:57
@AliMasarweh

AliMasarweh commented Nov 22, 2023 •

Copy link
Copy Markdown
Member Author

sorry I'm missing it--where is keystone_user printed to/taken for the ops-log?

I wans't sure what member to use in rgw::auth::RemoteApplier::write_ops_log_entry, is this the correct one?

void rgw::auth::RemoteApplier::write_ops_log_entry(rgw_log_entry& entry) const
{
  entry.access_key_id = info.access_key_id;
  entry.subuser = info.subuser;
  entry.user = info.keystone_user;
}

@mattbenjamin

Copy link
Copy Markdown
Contributor

that looks plausible :)

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Jan 21, 2024
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions Bot closed this Feb 20, 2024
@mattbenjamin mattbenjamin reopened this Apr 4, 2024
@mattbenjamin

Copy link
Copy Markdown
Contributor

@AliMasarweh (@pritha-srivastava ) could we make an effort to finalize and merge this by 8.0?

@github-actions github-actions Bot removed the stale label Apr 4, 2024
@AliMasarweh

Copy link
Copy Markdown
Member Author

@AliMasarweh (@pritha-srivastava ) could we make an effort to finalize and merge this by 8.0?

I think I was waiting for a review last time, after the review it should be ready to merge

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Jun 11, 2024
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions Bot closed this Jul 11, 2024
@AliMasarweh
AliMasarweh force-pushed the wip-alimasa-keystone-auth-rgw branch 2 times, most recently from 039fed6 to 09100fb Compare August 20, 2024 14:59
@AliMasarweh

AliMasarweh commented Aug 21, 2024 •

Copy link
Copy Markdown
Member Author

I want to verify that we are logging the username
how can I look into the ops log?

@pritha-srivastava

Copy link
Copy Markdown
Contributor

I want to verify that we are logging the username how can I look into the ops log?

You can enable ops log using rgw_enable_ops_log and rgw_ops_log_socket_path options. Check the documentation here: https://docs.ceph.com/en/latest/radosgw/config-ref/#logging-settings.

@mattbenjamin mattbenjamin left a comment

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.

seems ok? really want ack from pritha

Comment thread src/rgw/rgw_auth.cc Resolved
@AliMasarweh

Copy link
Copy Markdown
Member Author

running ./qa/workunits/rgw/keystone-service-token.sh doesn't fail
but I am still not sure where to look to find if we log the correct username

@AliMasarweh
AliMasarweh force-pushed the wip-alimasa-keystone-auth-rgw branch from 09100fb to d3a34e9 Compare September 17, 2024 11:12
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Nov 16, 2024
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions Bot closed this Dec 16, 2024
@adamemerson adamemerson reopened this Apr 9, 2025
@github-actions github-actions Bot removed the stale label Apr 9, 2025
@AliMasarweh
AliMasarweh force-pushed the wip-alimasa-keystone-auth-rgw branch from d3a34e9 to 4716655 Compare April 21, 2025 12:56
@mattbenjamin

Copy link
Copy Markdown
Contributor

running ./qa/workunits/rgw/keystone-service-token.sh doesn't fail but I am still not sure where to look to find if we log the correct username

the obvious place to see it would be in the ops-log. do we have any existing automated tests for that?

@cbodley

cbodley commented Apr 22, 2025

Copy link
Copy Markdown
Contributor

do we have any existing automated tests for that?

not afaik

@AliMasarweh

Copy link
Copy Markdown
Member Author

can you guide where is exactly the ops-log? is it in ceph/build/out directory?

@mattbenjamin

Copy link
Copy Markdown
Contributor

has this been through an rgw suite run in teuthology?

@mattbenjamin
mattbenjamin self-requested a review April 25, 2025 16:06

@mattbenjamin mattbenjamin left a comment

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.

lgtm, please attempt a teuthology suite run

@AliMasarweh

Copy link
Copy Markdown
Member Author

jenkins test make check arm64

@AliMasarweh

Copy link
Copy Markdown
Member Author

@AliMasarweh

Copy link
Copy Markdown
Member Author

jenkins test make check arm64

@AliMasarweh
AliMasarweh merged commit 4e32f26 into ceph:main Apr 28, 2025
fa-at-pulsit added a commit to fa-at-pulsit/ceph that referenced this pull request Sep 24, 2026
Fixes: https://tracker.ceph.com/issues/73702
On-behalf-of: SAP <[email protected]>
Signed-off-by: Filipp Akinfiev <[email protected]>

Conflicts:
    src/rgw/rgw_auth.h
    src/rgw/rgw_auth.cc
    src/rgw/rgw_auth_keystone.cc
    src/rgw/rgw_rest_s3.cc
    - Squid lacks Ali Masarwa's PR ceph#53365 (commit 4716655),
      which introduced the keystone_user field on
      rgw::auth::RemoteApplier::AuthInfo. This backport therefore
      also carries the equivalent AuthInfo changes: the new
      keystone_user field and constructor argument, the two
      Keystone auth paths that populate it, and std::string()
      placeholders at the LDAP and STS call sites in
      rgw_rest_s3.cc.

(cherry picked from commit 3180812)
fa-at-pulsit added a commit to fa-at-pulsit/ceph that referenced this pull request Sep 25, 2026
Fixes: https://tracker.ceph.com/issues/73702
On-behalf-of: SAP <[email protected]>
Signed-off-by: Filipp Akinfiev <[email protected]>

Conflicts:
    src/rgw/rgw_auth.h
    src/rgw/rgw_auth.cc
    src/rgw/rgw_auth_keystone.cc
    src/rgw/rgw_rest_s3.cc
    - Squid lacks Ali Masarwa's PR ceph#53365 (commit 4716655),
      which introduced the keystone_user field on
      rgw::auth::RemoteApplier::AuthInfo. This backport therefore
      also carries the equivalent AuthInfo changes: the new
      keystone_user field and constructor argument, the two
      Keystone auth paths that populate it, and std::string()
      placeholders at the LDAP and STS call sites in
      rgw_rest_s3.cc.

(cherry picked from commit 3180812)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants