[#80] iam: Skip unsupported conditions in native chains #80

Merged
dkirillov merged 1 commit from dkirillov/policy-engine:bugfix/skip_aws_condition_in_native_converters into master 2024-09-04 19:51:23 +00:00
Member

Skip conditions with

  • aws:RequestTag
  • aws:ResourceTag
    keys

Signed-off-by: Denis Kirillov d.kirillov@yadro.com

Skip conditions with * aws:RequestTag * aws:ResourceTag keys Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
dkirillov self-assigned this 2024-06-10 14:36:08 +00:00
dkirillov changed title from WIP: [#XX] iam: Skip unsupported conditions in native chains to WIP: [#80] iam: Skip unsupported conditions in native chains 2024-06-11 08:10:18 +00:00
dkirillov force-pushed bugfix/skip_aws_condition_in_native_converters from a5f3d51dcc to 64e06f5b7c 2024-06-11 08:15:41 +00:00 Compare
dkirillov requested review from storage-core-committers 2024-06-11 09:20:29 +00:00
dkirillov changed title from WIP: [#80] iam: Skip unsupported conditions in native chains to [#80] iam: Skip unsupported conditions in native chains 2024-06-11 09:20:39 +00:00
dkirillov requested review from storage-core-developers 2024-06-11 09:20:43 +00:00
dkirillov requested review from storage-services-developers 2024-06-11 09:20:57 +00:00
dkirillov requested review from storage-services-committers 2024-06-11 09:21:08 +00:00
alexvanin approved these changes 2024-06-11 10:00:44 +00:00
alexvanin left a comment
Owner

Looks brilliant, see small question and comment suggestion.

Looks brilliant, see small question and comment suggestion.
@ -238,0 +243,4 @@
res.Conditions = append(res.Conditions, gr.Conditions[i])
case strings.HasPrefix(gr.Conditions[i].Key, condKeyAWSRequestTagPrefix) ||
strings.HasPrefix(gr.Conditions[i].Key, condKeyAWSResourceTagPrefix):
continue
Owner

Small comment about the reason we skip these conditions will be nice, e.g.

Tags exist only in S3 requests, so native protocol should not process such conditions.
Small comment about the reason we skip these conditions will be nice, e.g. ``` Tags exist only in S3 requests, so native protocol should not process such conditions. ```
alexvanin marked this conversation as resolved
@ -181,1 +181,4 @@
case gr.Conditions[i].Key == condKeyAWSMFAPresent:
gr.Conditions[i].Key = s3.PropertyKeyAccessBoxAttrMFA
case strings.HasPrefix(gr.Conditions[i].Key, condKeyAWSResourceTagPrefix):
Owner

We don't check condKeyAWSRequestTagPrefix unlike native converter because by default it goes to request condition?

We don't check `condKeyAWSRequestTagPrefix` unlike native converter because by default it goes to request condition?
Author
Member

Yes

Yes
alexvanin marked this conversation as resolved
dkirillov force-pushed bugfix/skip_aws_condition_in_native_converters from bf60335380 to ac965e8d17 2024-06-11 10:29:48 +00:00 Compare
acid-ant approved these changes 2024-06-11 12:36:26 +00:00
dkirillov merged commit ac965e8d17 into master 2024-06-13 08:06:14 +00:00
dkirillov deleted branch bugfix/skip_aws_condition_in_native_converters 2024-06-13 08:06:24 +00:00
Sign in to join this conversation.
No description provided.