Repository navigation
squid: rgw/sns: ListTopics uses account root arn for policy evaluation - #69274
Conversation
we need account root arns for various permission checks, and don't have a consistent way to construct them Signed-off-by: Casey Bodley <[email protected]> (cherry picked from commit ccdbebd) Conflicts: src/rgw/rgw_rest_iam_account.cc does not exist on squid
when called by a non-root account user, permissions from identity policy were not being applied correctly and always resulted in: > evaluate_iam_policies: implicit deny from identity-based policy passing a non-empty ARN argument to verify_user_permission() fixes this. while other SNS APIs use a specific topic's arn, ListTopics doesn't operate on individual topics so we use the account root user's arn Fixes: https://tracker.ceph.com/issues/74595 Signed-off-by: Casey Bodley <[email protected]> (cherry picked from commit b81bc95)
There was a problem hiding this comment.
Automated Backport Parity Review - Backport Deviation Alert
A conflict or unapproved 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.
Deviation in Backport 91fc6b6 (cherry-pick of ccdbebd)
Affected File(s)
src/rgw/rgw_rest_iam_account.cc
Range Diff
Click to expand
--- Original (ccdbebd9)
+++ Backport (91fc6b69)
@@ -4,3 +4,7 @@
a consistent way to construct them
Signed-off-by: Casey Bodley <[email protected]>
+(cherry picked from commit ccdbebd925b77eb7c5d0ba9a3a175642babcf291)
+
+Conflicts:
+ src/rgw/rgw_rest_iam_account.cc does not exist on squid
================================================================================
RANGE DIFF
================================================================================
1: ccdbebd925b ! 1: 91fc6b69c6e rgw/iam: add helper rgw::account::root_arn()
@@ Commit message
a consistent way to construct them
Signed-off-by: Casey Bodley <[email protected]>
+ (cherry picked from commit ccdbebd925b77eb7c5d0ba9a3a175642babcf291)
+
+ Conflicts:
+ src/rgw/rgw_rest_iam_account.cc does not exist on squid
## src/rgw/rgw_account.cc ##
@@
@@ src/rgw/rgw_account.h: bool validate_id(std::string_view id, std::string* err_ms
struct AdminOpState {
std::string account_id;
-
- ## src/rgw/rgw_rest_iam_account.cc ##
-@@
- // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*-
- // vim: ts=8 sw=2 sts=2 expandtab ft=cpp
-
-+#include "rgw_account.h"
- #include "rgw_process_env.h"
- #include "rgw_rest_iam_account.h"
-
-@@ src/rgw/rgw_rest_iam_account.cc: int RGWGetAccountSummary::verify_permission(optional_yield y)
- } else {
- return -ERR_METHOD_NOT_ALLOWED;
- }
-- const rgw::ARN arn{"", "root", account_id, true};
-+ const auto arn = rgw::account::root_arn(account_id);
- if (verify_user_permission(this, s, arn, rgw::IAM::iamGetAccountSummary)) {
- return 0;
- }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.
Commit Parity Visualizer
| BACKPORT PR #69274 | SOURCE PR | SOURCE STATUS |
|---|---|---|
| 91fc6b6 rgw/iam: add helper rgw::account::root_arn() | PR #68429 | ccdbebd rgw/iam: add helper rgw::account::root_arn() |
| a4e4cc8 rgw/sns: ListTopics uses account root arn for policy evaluation | b81bc95 rgw/sns: ListTopics uses account root arn for policy evaluation |
🛟 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.
CI Run Log: View Workflow Details
|
This PR has been added to wip-yuri9-testing-20260622.172413-squid. |
backport tracker: https://tracker.ceph.com/issues/76276
backport of #68429
parent tracker: https://tracker.ceph.com/issues/74595
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh