Repository navigation
rgw: Add Keystone scope information to ops logging - #66111
Conversation
Config Diff Tool Output+ added: rgw_keystone_scope_include_user (rgw.yaml.in)
+ added: rgw_keystone_scope_enabled (rgw.yaml.in)
+ added: rgw_keystone_scope_include_roles (rgw.yaml.in)
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. |
|
/config check ok |
cbodley
left a comment
There was a problem hiding this comment.
the auth and ops logging changes look very reasonable to me. only minor comments about encoding
| encode(id, bl); | ||
| encode(name, bl); | ||
| domain.encode(bl); |
There was a problem hiding this comment.
please prefer the free functions encode(domain, bl) and decode(domain, p) for consistency with builtin/std types
There was a problem hiding this comment.
Addressed. I've switched to using free functions for consistency:
- Added namespace-level free function overloads for all types
- Top-level calls now use
encode(project, bl)style - Inside nested structs, kept
domain.encode(bl)to avoid forward-declaration issues - Added
using ceph::encode/decodefor template visibility
| __u8 has_user = user.has_value(); | ||
| encode(has_user, bl); | ||
| if (has_user) { | ||
| user->encode(bl); | ||
| } | ||
|
|
||
| encode(roles, bl); | ||
|
|
||
| __u8 has_app_cred = app_cred.has_value(); | ||
| encode(has_app_cred, bl); | ||
| if (has_app_cred) { | ||
| app_cred->encode(bl); | ||
| } |
There was a problem hiding this comment.
note that include/encoding.h already supports encode/decode for std::optional, so you should be able to encode(user, bl) and encode(app_cred, bl) directly
same for rgw_log_entry::keystone_scope
There was a problem hiding this comment.
Done. Now using encode(user, bl) and encode(app_cred, bl) directly, leveraging the std::optional support from include/encoding.h. Removed all manual __u8 has_* flags.
| - name: rgw_keystone_scope_enabled | ||
| type: bool | ||
| level: advanced | ||
| desc: Enable logging of Keystone scope information in ops log | ||
| long_desc: When enabled, operations authenticated via Keystone will include project, | ||
| user, domain, and role information in the ops log. Requires rgw_enable_ops_log | ||
| to be enabled. | ||
| default: false |
There was a problem hiding this comment.
is this off by default for the same privacy reasons as rgw_keystone_scope_include_user?
There was a problem hiding this comment.
Updated config expanation. Clarified in the long_desc that it's disabled by default to avoid adding overhead to every log entry, not for privacy (user identity has separate privacy control via rgw_keystone_scope_include_user).
|
@tobias-urdin @mdw-at-linuxbox can i please ask for your review on the keystone-facing bits? |
a118bc4 to
c8d5c46
Compare
|
The Keystone parts LGTM, but you mention GDPR shouldn't that also apply for project name and domain name if we are to only log user/operator names if config options is true? In other words, should we hide project name and domain name when dumping the scope unless at config is true for that? |
|
@tobias-urdin You’re right that project and domain names can identify users in some deployments, so it makes sense to treat them the same as other “human-readable identity” fields. I will adjust the logging so that:
This ensures that:
I’ll update the implementation and configuration documentation accordingly. Agree? |
Sounds good to me! :) |
c8d5c46 to
3143da3
Compare
|
@tobias-urdin - it's done, as described |
|
jenkins test make check |
|
jenkins test make check arm64 |
|
jenkins test api |
|
jenkins test docs |
3143da3 to
c83c836
Compare
|
jenkins test make check |
|
jenkins test make check arm64 |
|
jenkins test docs |
|
New build created and execution is in progress : https://tracker.ceph.com/issues/74079 |
…uid' into release/cobaltcore-storage-v19.2.3+fasttrack-1 PR ceph#66111 * backports/19.2.3/filipp-wip-73702-rgw-keystone-scope-squid: rgw: Add Keystone scope information to ops logging
|
Execution complete, tracker approved by @ivancich. tracker detail: https://tracker.ceph.com/issues/74079 |
|
jenkins test docs |
…uid' into release/cobaltcore-storage-v19.2.3-fasttrack-2 PR ceph#66111 * backports/19.2.3/filipp-wip-73702-rgw-keystone-scope-squid: rgw: Add Keystone scope information to ops logging
|
jenkins test docs |
|
Can one of the admins verify this patch? |
|
jenkins rebuild docs |
Fixes: https://tracker.ceph.com/issues/73702 On-behalf-of: SAP <[email protected]> Signed-off-by: Filipp Akinfiev <[email protected]>
c83c836 to
3180812
Compare
|
jenkins test make check |
|
jenkins test windows |
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
|
Would backports to tentacle, squid be accepted? |
…nto release/cobaltcore-storage-v19.2.3-fasttrack-4 PR ceph#66111 + WIP S3 Bucket Policy Keystone Role Support * backports/19.2.3/rgw-keystone-scope-s3-bucket-policy: rgw: fix role name copy only up to admin rgw: Feature flag keystone role injection rgw: Inject keystone roles into IAM policy backport: iam policy condition test infrastructure rgw: Add Keystone scope information to ops logging
…nto release/cobaltcore-storage-v19.2.3-fasttrack-5 PR ceph#66111 + WIP S3 Bucket Policy Keystone Role Support * backports/19.2.3/rgw-keystone-scope-s3-bucket-policy: rgw: fix role name copy only up to admin rgw: Feature flag keystone role injection backport: Account for pre NotEquals OR->AND PR ceph#65606 rgw: Inject keystone roles into IAM policy backport: iam policy condition test infrastructure rgw: Add Keystone scope information to ops logging
…nto release/cobaltcore-storage-v19.2.3-fasttrack-6 PR ceph#66111 + WIP S3 Bucket Policy Keystone Role Support * backports/19.2.3/rgw-keystone-scope-s3-bucket-policy: backport: Account for pre NotEquals OR->AND PR ceph#65606 rgw: Inject keystone roles into IAM policy backport: iam policy condition test infrastructure rgw: Fix missing keystone scope initialization rgw: Add Keystone scope information to ops logging
…nto release/cobaltcore-storage-v19.2.3-fasttrack-7 PR ceph#66111 + WIP S3 Bucket Policy Keystone Role Support * backports/19.2.3/rgw-keystone-scope-s3-bucket-policy: backport: Account for pre NotEquals OR->AND PR ceph#65606 rgw: Inject keystone roles into IAM policy backport: iam policy condition test infrastructure rgw: Fix missing keystone scope initialization rgw: Add Keystone scope information to ops logging
…nto release/cobaltcore-storage-v19.2.3-fasttrack-8 PR ceph#66111 + WIP S3 Bucket Policy Keystone Role Support * backports/19.2.3/rgw-keystone-scope-s3-bucket-policy: backport: Account for pre NotEquals OR->AND PR ceph#65606 rgw: Inject keystone roles into IAM policy backport: iam policy condition test infrastructure rgw: Fix missing keystone scope initialization rgw: Add Keystone scope information to ops logging
…nto release/cobaltcore-storage-v19.2.3-fasttrack-9 PR ceph#66111 + WIP S3 Bucket Policy Keystone Role Support * backports/19.2.3/rgw-keystone-scope-s3-bucket-policy: backport: Account for pre NotEquals OR->AND PR ceph#65606 rgw: Inject keystone roles into IAM policy backport: iam policy condition test infrastructure rgw: Fix missing keystone scope initialization rgw: Add Keystone scope information to ops logging
Retroactive <uuid>.md for the Keystone scope logging + IAM role injection backport already landed on this branch as merge commit c582732. Backport-Id: 019e92ed-d2cc-7bce-a481-77ca769cfda9 Backport-Merge: c582732 Upstream-PRs: ceph#66111, ceph#67752
Backport-Id: 019eb0c0-4142-7fc8-9332-370dc54e89c9 Backport-PR: #5 Upstream-PRs: ceph#66111
Backport-Id: 01a06155-747f-7eb1-a335-4f887b8cef7e Backport-PR: #11 Upstream-PRs: ceph#66111, ceph#68627
Backport-Id: 01a11121-2d48-7bc9-b20f-193fd7344cfd Backport-PR: #23 Upstream-PRs: ceph#66111, ceph#71580
Backport-Id: 01a06155-747f-7eb1-a335-4f887b8cef7e Backport-PR: #11 Upstream-PRs: ceph#66111, ceph#68627
…#36) Backport-Id: 01a14457-8152-7959-bc90-fa067d6a5230 Backport-PR: #36 Upstream-PRs: ceph#66111, ceph#68627
Summary
This PR adds detailed OpenStack Keystone authentication scope information to RGW operations logs.
It enables more comprehensive audit trails for multi-tenant and compliance-sensitive environments.
keystone_scopefield (project, user, domain, roles, application credentials)Tracker: https://tracker.ceph.com/issues/73702