rgw/iam: add policy evaluation for Arn-based Conditions#62285
rgw/iam: add policy evaluation for Arn-based Conditions#62285
Conversation
|
first draft just copied the behavior of StringEquals, but the ARN matching is more complicated:
|
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 <cbodley@redhat.com>
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 <cbodley@redhat.com>
dbe93c8 to
c64d729
Compare
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 <cbodley@redhat.com>
c64d729 to
62c3e5e
Compare
|
opened https://tracker.ceph.com/issues/70481 for backports |
|
tested together with the bucket logging policy PR. follwoing policy. target resource ARN: was matched with matched source bucket ARN: |
|
jenkins test api |
|
jenkins test api |
|
This passed QA, but |
|
jenkins test api |
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