Repository navigation
rgw/iam: add policy evaluation for Arn-based Conditions - #62285
Merged
Merged
Conversation
Contributor
Author
|
first draft just copied the behavior of StringEquals, but the ARN matching is more complicated:
|
4 of 14 tasks
cbodley
force-pushed
the
wip-rgw-iam-arnlike
branch
from
March 13, 2025 22:53
b6dc106 to
4fb233d
Compare
remove unused MATCH_POLICY_STRING ARN::match() was the only caller for MATCH_POLICY_ARN, but it was used to match the 'region' and 'account' components that were already parsed out of the colon-separated ARN string. for that use, we don't need the loop-over-colons behavior of match_policy() so can call match_wildcards() directly after doing the same for MATCH_POLICY_RESOURCE, we no longer have any non-looping callers of match_policy() so can treat 'bool colonblocks' as unconditionally true Signed-off-by: Casey Bodley <[email protected]>
now that the ArnLike conditions are the only user of MATCH_POLICY_ARN, change their case-sensitivity to comply with Amazon Resource Name (ARN) condition operators[1] [1] https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_ARN Signed-off-by: Casey Bodley <[email protected]>
cbodley
force-pushed
the
wip-rgw-iam-arnlike
branch
2 times, most recently
from
March 14, 2025 13:56
dbe93c8 to
c64d729
Compare
cbodley
marked this pull request as ready for review
March 14, 2025 13:56
arn-based conditions like ArnEquals etc are recognized by the policy parser, but not enforced during policy evaluation Fixes: https://tracker.ceph.com/issues/70481 Signed-off-by: Casey Bodley <[email protected]>
cbodley
force-pushed
the
wip-rgw-iam-arnlike
branch
from
March 14, 2025 14:23
c64d729 to
62c3e5e
Compare
Contributor
Author
Contributor
|
tested together with the bucket logging policy PR. follwoing policy. target resource ARN: was matched with matched source bucket ARN: |
yuvalif
approved these changes
Mar 18, 2025
Contributor
Author
|
jenkins test api |
adamemerson
approved these changes
Mar 19, 2025
Member
|
jenkins test api |
Member
Member
|
This passed QA, but |
Contributor
Author
|
jenkins test api |
This was referenced Mar 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
arn-based conditions[1] like ArnEquals etc are recognized by the policy parser, but not enforced during policy evaluation
[1] https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_ARN
Fixes: https://tracker.ceph.com/issues/70481
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job Definition