Repository navigation
umbrella: rgw: Policy evalaution logging - #70531
Conversation
Typo in a lookup table. Signed-off-by: Adam C. Emerson <[email protected]> (cherry picked from commit 12d88e8) Fixes: https://tracker.ceph.com/issues/78661 Signed-off-by: Adam C. Emerson <[email protected]>
Signed-off-by: Adam C. Emerson <[email protected]> (cherry picked from commit c62ee11) Fixes: https://tracker.ceph.com/issues/78661 Signed-off-by: Adam C. Emerson <[email protected]>
Signed-off-by: Adam C. Emerson <[email protected]> Fixes: https://tracker.ceph.com/issues/78661 (cherry picked from commit 8191c81) Signed-off-by: Adam C. Emerson <[email protected]>
Create a log entry where we can fill a buffer with `format` instead of needing to go through stringstream. Signed-off-by: Adam C. Emerson <[email protected]> Fixes: https://tracker.ceph.com/issues/78661 (cherry picked from commit e885b11) Signed-off-by: Adam C. Emerson <[email protected]>
Signed-off-by: Adam C. Emerson <[email protected]> (cherry picked from commit 05d82da) Fixes: https://tracker.ceph.com/issues/78661 Signed-off-by: Adam C. Emerson <[email protected]>
Signed-off-by: Adam C. Emerson <[email protected]> (cherry picked from commit 7582c32) Fixes: https://tracker.ceph.com/issues/78661 Signed-off-by: Adam C. Emerson <[email protected]>
Config Diff Tool Output+ added: rgw_copious_policy_logging (rgw.yaml.in)
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. |
|
/config check ok |
|
/audit override |
|
jenkins test config |
|
✅ Audit Override Applied by @adamemerson. |
When the `rgw_copious_policy_logging` option is set to true, a detailed trace of policy evaluation is logged. Assisted-by: Claude Opus 4.6 <[email protected]> (I wanted to see how it performed on rebase conflict resolution.) Assisted-by: Claude Fable 5 <[email protected]> (I figured I should have it look at the policy evaluation code for bugs while it's included, and it found a few mistakes in output.) Signed-off-by: Adam C. Emerson <[email protected]> (cherry picked from commit 7bdb627) Conflicts: src/rgw/rgw_bucket_logging.cc - Clash with minimal environment production from <ceph#69264>. Fixes: https://tracker.ceph.com/issues/78661 Signed-off-by: Adam C. Emerson <[email protected]>
This is an identity backed by a `Principal`, for use when we don't have any sort of RGW driver. Signed-off-by: Adam C. Emerson <[email protected]> (cherry picked from commit 3a1686c) Fixes: https://tracker.ceph.com/issues/78661 Signed-off-by: Adam C. Emerson <[email protected]>
Annotated evaluation of a policy. Signed-off-by: Adam C. Emerson <[email protected]> (cherry picked from commit 5a176d3) Fixes: https://tracker.ceph.com/issues/78661 Signed-off-by: Adam C. Emerson <[email protected]>
d0a7187 to
80b3087
Compare
|
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 #70531 | SOURCE PR |
SOURCE STATUS |
|---|---|---|
5f8b7c4 rgw/policy: Properly spell RemoveClientIdFromOIDCProvider in table |
PR #67732 | 12d88e8 rgw/policy: Properly spell RemoveClientIdFromOIDCProvider in table |
| c59d2d1 rgw/policy: Add missing strings for actions | c62ee11 rgw/policy: Add missing strings for actions | |
| d6dcef3 include/types: Add std::unordered_multimap support | 8191c81 include/types: Add std::unordered_multimap support | |
| ca60299 log: Add StringEntry to avoid using ostream | e885b11 log: Add StringEntry to avoid using ostream | |
| 9a2d02a rgw: Make ARNs libfmt-able | 05d82da rgw: Make ARNs libfmt-able | |
a3a29da rgw: Make rgw::auth::Identity libfmt-able |
7582c32 rgw: Make rgw::auth::Identity libfmt-able |
|
| 6545d6c rgw/policy: Allow logging policy evaluation | 7bdb627 rgw/policy: Allow logging policy evaluation | |
a4e7dd3 rgw: Add PrincipalIdentity for use in testing and utilities |
3a1686c rgw: Add PrincipalIdentity for use in testing and utilities |
|
| 80b3087 rgw/policy: Add rgw-policy-test command line tool | 5a176d3 rgw/policy: Add rgw-policy-test command line tool |
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 6545d6c (cherry-pick of 7bdb627)
Affected File(s)
src/rgw/rgw_bucket_logging.cc
Range Diff
Click to expand
--- Original (7bdb627a)
+++ Backport (6545d6ca)
@@ -9,3 +9,12 @@
(I figured I should have it look at the policy evaluation code for
bugs while it's included, and it found a few mistakes in output.)
Signed-off-by: Adam C. Emerson <[email protected]>
+(cherry picked from commit 7bdb627a85c18ea9bb24f3239e21d0aaddf1dc0e)
+
+Conflicts:
+ src/rgw/rgw_bucket_logging.cc
+ - Clash with minimal environment production from
+ <https://github.com/ceph/ceph/pull/69264>.
+
+Fixes: https://tracker.ceph.com/issues/78661
+Signed-off-by: Adam C. Emerson <[email protected]>
================================================================================
RANGE DIFF
================================================================================
1: 7bdb627a85c ! 1: 6545d6cab37 rgw/policy: Allow logging policy evaluation
@@ Commit message
(I figured I should have it look at the policy evaluation code for
bugs while it's included, and it found a few mistakes in output.)
Signed-off-by: Adam C. Emerson <[email protected]>
+ (cherry picked from commit 7bdb627a85c18ea9bb24f3239e21d0aaddf1dc0e)
+
+ Conflicts:
+ src/rgw/rgw_bucket_logging.cc
+ - Clash with minimal environment production from
+ <https://github.com/ceph/ceph/pull/69264>.
+
+ Fixes: https://tracker.ceph.com/issues/78661
+ Signed-off-by: Adam C. Emerson <[email protected]>
## src/common/options/rgw.yaml.in ##
@@ src/common/options/rgw.yaml.in: options:
@@ src/common/options/rgw.yaml.in: options:
## src/rgw/rgw_bucket_logging.cc ##
@@ src/rgw/rgw_bucket_logging.cc: int verify_target_bucket_policy(const DoutPrefixProvider* dpp,
- rgw::IAM::Environment env;
- const auto arn_it = env.emplace("aws:SourceArn", std::move(source_bucket_arn));
- const auto acct_it = env.emplace("aws:SourceAccount", std::move(source_account));
-- if (policy.eval(env, ident, rgw::IAM::s3PutObject, target_resource_arn) != rgw::IAM::Effect::Allow) {
-+ if (policy.eval(dpp, env, ident, rgw::IAM::s3PutObject, target_resource_arn) != rgw::IAM::Effect::Allow) {
+ const auto source_account = to_string(s->bucket_owner.id);
+ s->env.emplace("aws:SourceArn", source_bucket_arn);
+ s->env.emplace("aws:SourceAccount", source_account);
+- if (policy.eval(s->env, ident, rgw::IAM::s3PutObject, target_resource_arn) != rgw::IAM::Effect::Allow) {
++ if (policy.eval(dpp, s->env, ident, rgw::IAM::s3PutObject, target_resource_arn) != rgw::IAM::Effect::Allow) {
ldpp_dout(dpp, 1) << "ERROR: logging bucket: '" << target_bucket_id <<
"' must have a bucket policy that allows logging service principal to put objects in the following resource ARN: '" <<
- target_resource_arn.to_string() << "' from source bucket ARN: '" << arn_it->second <<
+ target_resource_arn.to_string() << "' from source bucket ARN: '" << source_bucket_arn <<
## src/rgw/rgw_common.cc ##
@@ src/rgw/rgw_common.cc: Effect eval_or_pass(const DoutPrefixProvider* dpp,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.
|
/audit override |
|
✅ Audit Override Applied by @adamemerson. |
Upstream PR: #67732
Upstream tracker: https://tracker.ceph.com/issues/77740
Backport tracker: https://tracker.ceph.com/issues/78661