Repository navigation
squid: rgw: add Keystone scope and application credential info to ops log - #68627
Conversation
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
13 similar comments
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
jenkins retest this please |
|
Why is build-sig requested as a reviewer? (or likely several others, like ceph-volume, and crimson, and...) Are you confused about the point of having groups for code review? |
|
@dmick the initial issue was that the base branch was set wrong:
Mistargeted branches is a frequent cause of PRs that end up touching excessive numbers of files and since github doesn't know better it uses the codeowners for all those owners. |
|
jenkins test make check |
|
/audit retest |
|
🔄 Audit Retest Triggered by @fa-at-pulsit. |
|
/config check ok |
|
/audit retest |
|
🔄 Audit Retest Triggered by @fa-at-pulsit. |
|
Backport audit correctly flagged this as a deviation from a clean cherry-pick of #66111. Reason documented in the commit's Functional result matches applying #53365 then #66111 in sequence. Could someone review and apply |
|
/audit override |
|
✅ Audit Override Applied by @adamemerson. |
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)
|
New commits were pushed to this PR, so the previous override has been removed. |
There was a problem hiding this comment.
Ceph Release Engineering Audit Report
Commit Parity Visualizer
| BACKPORT PR #68627 | SOURCE PR |
SOURCE STATUS |
|---|---|---|
| 80f81d3 rgw: Add Keystone scope information to ops logging | PR #66111 | 3180812 rgw: Add Keystone scope information to ops logging |
Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations
A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.
This does not necessarily indicate an issue but a maintainer should review.
**Click to expand conflict summaries.**
Deviation in Backport 80f81d3 (cherry-pick of 3180812)
Affected File(s)
src/rgw/rgw_auth.ccsrc/rgw/rgw_auth.hsrc/rgw/rgw_auth_keystone.ccsrc/rgw/rgw_keystone.cc
Range Diff
Click to expand
--- Original (3180812e)
+++ Backport (80f81d31)
@@ -3,3 +3,19 @@
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 #53365 (commit 47166556c5b),
+ 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 3180812e54197784ba5b7fc7027e62553144e175)
================================================================================
RANGE DIFF
================================================================================
1: 3180812e541 ! 1: 80f81d31382 rgw: Add Keystone scope information to ops logging
@@ Commit message
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 #53365 (commit 47166556c5b),
+ 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 3180812e54197784ba5b7fc7027e62553144e175)
+
+ ## PendingReleaseNotes ##
+@@
+ Benchmarks showed that the lower thread count improves throughput and reduces latency
+ on NVMe and HDD based environments. Users with specific workload requirements can
+ tune this value; see also ``rgw_max_concurrent_requests``.
++* RGW: New Keystone scope logging options for the ops log. When
++ ``rgw_keystone_scope_enabled`` is true (default false), operations
++ authenticated via Keystone include scope information (project, domain,
++ roles, and, for application-credential auth, the credential metadata)
++ in the ops log. Human-readable names are opt-in via
++ ``rgw_keystone_scope_include_user`` (default false, GDPR-friendly) —
++ opaque IDs are always logged so operators can correlate with Keystone
++ without exposing names. Role names can be omitted via
++ ``rgw_keystone_scope_include_roles`` (default true).
+
+
+ * DASHBOARD: A new Overview landing page provides an at-a-glance cluster summary
+
## src/common/options/rgw.yaml.in ##
@@ src/common/options/rgw.yaml.in: options:
- '1'
@@ src/rgw/CMakeLists.txt: set(librgw_common_srcs
## src/rgw/rgw_auth.cc ##
@@ src/rgw/rgw_auth.cc: void rgw::auth::RemoteApplier::write_ops_log_entry(rgw_log_entry& entry) const
+ if (account) {
entry.account_id = account->id;
}
- entry.user = info.keystone_user;
++ entry.user = info.keystone_user;
+
+ if (info.keystone_scope.has_value()) {
+ entry.keystone_scope = info.keystone_scope;
@@ src/rgw/rgw_auth.h
#define RGW_USER_ANON_ID "anonymous"
@@ src/rgw/rgw_auth.h: public:
+ const uint32_t acct_type;
const std::string access_key_id;
const std::string subuser;
- const std::string keystone_user;
++ const std::string keystone_user;
+ const std::optional<rgw::keystone::ScopeInfo> keystone_scope;
public:
enum class acct_privilege_t {
@@ src/rgw/rgw_auth.h: public:
+ const acct_privilege_t level,
const std::string access_key_id,
const std::string subuser,
- const std::string keystone_user,
- const uint32_t acct_type=TYPE_NONE)
++ const std::string keystone_user,
+ const uint32_t acct_type=TYPE_NONE,
+ std::optional<rgw::keystone::ScopeInfo> keystone_scope=std::nullopt)
: acct_user(acct_user),
acct_name(acct_name),
perm_mask(perm_mask),
-@@ src/rgw/rgw_auth.h: public:
+ is_admin(acct_privilege_t::IS_ADMIN_ACCT == level),
acct_type(acct_type),
access_key_id(access_key_id),
- subuser(subuser),
-- keystone_user(keystone_user) {
+- subuser(subuser) {
++ subuser(subuser),
+ keystone_user(keystone_user),
+ keystone_scope(std::move(keystone_scope)) {
}
@@ src/rgw/rgw_auth_keystone.cc: TokenEngine::get_creds_info(const TokenEngine::tok
/* Suggested account name for the authenticated user. */
rgw_user(token.get_project_id()),
@@ src/rgw/rgw_auth_keystone.cc: TokenEngine::get_creds_info(const TokenEngine::token_envelope_t& token
+ level,
rgw::auth::RemoteApplier::AuthInfo::NO_ACCESS_KEY,
rgw::auth::RemoteApplier::AuthInfo::NO_SUBUSER,
- token.get_user_name(),
- TYPE_KEYSTONE
++ token.get_user_name(),
+ TYPE_KEYSTONE,
+ std::move(keystone_scope)
};
@@ src/rgw/rgw_auth_keystone.cc: EC2Engine::get_creds_info(const EC2Engine::token_e
/* Suggested account name for the authenticated user. */
rgw_user(token.get_project_id()),
@@ src/rgw/rgw_auth_keystone.cc: EC2Engine::get_creds_info(const EC2Engine::token_envelope_t& token,
+ level,
access_key_id,
rgw::auth::RemoteApplier::AuthInfo::NO_SUBUSER,
- token.get_user_name(),
- TYPE_KEYSTONE
++ token.get_user_name(),
+ TYPE_KEYSTONE,
+ std::move(keystone_scope)
};
@@ src/rgw/rgw_auth_keystone.cc: EC2Engine::get_creds_info(const EC2Engine::token_e
## src/rgw/rgw_keystone.cc ##
@@ src/rgw/rgw_keystone.cc: void rgw::keystone::TokenEnvelope::User::decode_json(JSONObj *obj)
- JSONDecoder::decode_json("domain", domain, obj);
+ JSONDecoder::decode_json("roles", roles_v2, obj);
}
+void rgw::keystone::TokenEnvelope::ApplicationCredential::decode_json(JSONObj *obj)
@@ src/rgw/rgw_keystone.cc: void rgw::keystone::TokenEnvelope::User::decode_json(JS
+ JSONDecoder::decode_json("restricted", restricted, obj, true);
+}
+
- void rgw::keystone::TokenEnvelope::decode(JSONObj* const root_obj)
+ void rgw::keystone::TokenEnvelope::decode_v3(JSONObj* const root_obj)
{
std::string expires_iso8601;
-@@ src/rgw/rgw_keystone.cc: void rgw::keystone::TokenEnvelope::decode(JSONObj* const root_obj)
+@@ src/rgw/rgw_keystone.cc: void rgw::keystone::TokenEnvelope::decode_v3(JSONObj* const root_obj)
JSONDecoder::decode_json("roles", roles, root_obj, true);
JSONDecoder::decode_json("project", project, root_obj, true);
@@ src/rgw/rgw_keystone.h: public:
std::list<Role> roles;
+ std::optional<ApplicationCredential> app_cred;
- void decode(JSONObj* obj);
-
+ void decode_v3(JSONObj* obj);
+ void decode_v2(JSONObj* obj);
## src/rgw/rgw_keystone_scope.cc (new) ##
@@
@@ src/rgw/rgw_log.h: struct rgw_log_entry {
DECODE_FINISH(p);
}
void dump(ceph::Formatter *f) const;
+
+ ## src/rgw/rgw_rest_s3.cc ##
+@@ src/rgw/rgw_rest_s3.cc: rgw::auth::s3::LDAPEngine::get_creds_info(const rgw::RGWToken& token) const noex
+ acct_privilege_t::IS_PLAIN_ACCT,
+ rgw::auth::RemoteApplier::AuthInfo::NO_ACCESS_KEY,
+ rgw::auth::RemoteApplier::AuthInfo::NO_SUBUSER,
++ std::string(), // keystone_user (not applicable for LDAP)
+ TYPE_LDAP
+ };
+ }
+@@ src/rgw/rgw_rest_s3.cc: rgw::auth::s3::STSEngine::get_creds_info(const STS::SessionToken& token) const n
+ (token.is_admin) ? acct_privilege_t::IS_ADMIN_ACCT: acct_privilege_t::IS_PLAIN_ACCT,
+ token.access_key_id,
+ rgw::auth::RemoteApplier::AuthInfo::NO_SUBUSER,
++ std::string(), // keystone_user (not applicable for STS)
+ token.acct_type
+ };
+ }How to proceed:
- Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git
Conflicts:block intact) and include an explanation for changes. - Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
- Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting
/audit override.
Be familiar with the rules and guidelines for writing backports.
🛟 Need Help?
If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.
📋 Component Lead / Release Manager
To override the audit failure, apply releng-audit-override label or comment /audit override.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
|
@adamemerson - force-pushed 80f81d3 (small clang+dbstore fix in rgw_keystone_scope.h: switched to |
|
jenkins test docs |
|
/audit override |
|
✅ Audit Override Applied by @adamemerson. |
|
This PR has been added to squid integration testing by anuchaithra started 2026-09-28-05:33. |
pr testing completed and approved by @ivancich, more details in https://tracker.ceph.com/issues/80955. |
Backport of #66111 to the
squid release branch.
Tracker: https://tracker.ceph.com/issues/76067
Original feature tracker: https://tracker.ceph.com/issues/73702
Description
Adds a new
keystone_scopefield to the RGW ops log entry, containing theauthenticated Keystone project, user, domain, role list, and (when applicable)
the application credential
{id, name, restricted}.Emission is gated by a new
rgw_keystone_log_scope_infoconfig option(default:
false), so existing operators are unaffected unless they optin. The field is encoded as struct version 16 of
rgw_log_entry,backward compatible with prior versions.
Backport notes
The squid branch lacks the prerequisite commit on main that introduced the
keystone_userfield onrgw::auth::RemoteApplier::AuthInfo. To keep thisbackport self-contained, the patch additionally:
keystone_usermember and constructor parameter toAuthInfo(
src/rgw/rgw_auth.h)token.get_user_name()through the keystone engines(
src/rgw/rgw_auth_keystone.cc)keystone_userplaceholder at the LDAP and STS callsites (
src/rgw/rgw_rest_s3.cc)entry.user = info.keystone_userinrgw_auth.ccAll other hunks (the
rgw::keystone::ScopeInfostruct,rgw_log_entryencoding bump to v16, ops-log JSON emission, yaml options, CMakeLists)
are identical to the main commit.
Testing
Verified end-to-end against a local Keystone + RGW deployment:
keystone_scopepopulated in the ops-log JSONL output for bothpassword-token and application-credential authentication
application_credentialblock present ({id, name, restricted}) whenthe token is scoped via an app credential
regression from the v16 bump)
empty
keystone_userplaceholderContribution Guidelines
Backports for the proper workflow.
Checklist