Skip to content

Commit 4987acf

Browse files
committed
Carve out s3 express handling for now
1 parent 5dd0187 commit 4987acf

File tree

2 files changed

+125
-10
lines changed

2 files changed

+125
-10
lines changed

iamlivecore/logger.go

+5
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,11 @@ func getStatementsForProxyCall(call Entry) (statements []Statement) {
671671
for iamMapMethodName, iamMapMethods := range iamMap.SDKMethodIAMMappings {
672672
if strings.ToLower(iamMapMethodName) == lowerPriv {
673673
for mappedPrivIndex, mappedPriv := range iamMapMethods {
674+
// special override for S3 express
675+
if strings.HasPrefix(mappedPriv.Action, "s3express:") && len(iamMapMethods) > 1 {
676+
continue
677+
}
678+
674679
resources := []string{}
675680

676681
// arn_override

iamlivecore/map.json

+120-10
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,17 @@
462462
"BucketName": {
463463
"template": "${Bucket}"
464464
}
465-
}
465+
},
466+
"notice": "Only applicable when the bucket name does not end with --x-s3"
467+
},
468+
{
469+
"action": "s3express:PutEncryptionConfiguration",
470+
"resource_mappings": {
471+
"BucketName": {
472+
"template": "${Bucket}"
473+
}
474+
},
475+
"notice": "Only applicable when the bucket name ends with --x-s3"
466476
}
467477
],
468478
"S3.DeleteBucketInventoryConfiguration": [
@@ -578,7 +588,17 @@
578588
"BucketName": {
579589
"template": "${Bucket}"
580590
}
581-
}
591+
},
592+
"notice": "Only applicable when the bucket name does not end with --x-s3"
593+
},
594+
{
595+
"action": "s3express:GetEncryptionConfiguration",
596+
"resource_mappings": {
597+
"BucketName": {
598+
"template": "${Bucket}"
599+
}
600+
},
601+
"notice": "Only applicable when the bucket name ends with --x-s3"
582602
}
583603
],
584604
"S3.GetBucketInventoryConfiguration": [
@@ -608,7 +628,17 @@
608628
"BucketName": {
609629
"template": "${Bucket}"
610630
}
611-
}
631+
},
632+
"notice": "Only applicable when the bucket name does not end with --x-s3"
633+
},
634+
{
635+
"action": "s3express:GetLifecycleConfiguration",
636+
"resource_mappings": {
637+
"BucketName": {
638+
"template": "${Bucket}"
639+
}
640+
},
641+
"notice": "Only applicable when the bucket name ends with --x-s3"
612642
}
613643
],
614644
"S3.GetBucketMetricsConfiguration": [
@@ -728,7 +758,17 @@
728758
"BucketName": {
729759
"template": "${Bucket}"
730760
}
731-
}
761+
},
762+
"notice": "Only applicable when the bucket name does not end with --x-s3"
763+
},
764+
{
765+
"action": "s3express:PutEncryptionConfiguration",
766+
"resource_mappings": {
767+
"BucketName": {
768+
"template": "${Bucket}"
769+
}
770+
},
771+
"notice": "Only applicable when the bucket name ends with --x-s3"
732772
}
733773
],
734774
"S3.PutBucketInventoryConfiguration": [
@@ -758,7 +798,17 @@
758798
"BucketName": {
759799
"template": "${Bucket}"
760800
}
761-
}
801+
},
802+
"notice": "Only applicable when the bucket name does not end with --x-s3"
803+
},
804+
{
805+
"action": "s3express:PutLifecycleConfiguration",
806+
"resource_mappings": {
807+
"BucketName": {
808+
"template": "${Bucket}"
809+
}
810+
},
811+
"notice": "Only applicable when the bucket name ends with --x-s3"
762812
}
763813
],
764814
"S3.PutBucketMetricsConfiguration": [
@@ -36851,6 +36901,26 @@
3685136901
"S3.CreateBucket": [
3685236902
{
3685336903
"action": "s3:CreateBucket",
36904+
"resource_mappings": {
36905+
"BucketName": {
36906+
"template": "${Bucket}"
36907+
}
36908+
},
36909+
"notice": "Only applicable when the bucket name does not end with --x-s3"
36910+
},
36911+
{
36912+
"action": "s3express:CreateBucket",
36913+
"resource_mappings": {
36914+
"BucketName": {
36915+
"template": "${Bucket}"
36916+
}
36917+
},
36918+
"notice": "Only applicable when the bucket name ends with --x-s3"
36919+
}
36920+
],
36921+
"S3.CreateSession": [
36922+
{
36923+
"action": "s3express:CreateSession",
3685436924
"resource_mappings": {
3685536925
"BucketName": {
3685636926
"template": "${Bucket}"
@@ -36865,7 +36935,17 @@
3686536935
"BucketName": {
3686636936
"template": "${Bucket}"
3686736937
}
36868-
}
36938+
},
36939+
"notice": "Only applicable when the bucket name does not end with --x-s3"
36940+
},
36941+
{
36942+
"action": "s3express:DeleteBucket",
36943+
"resource_mappings": {
36944+
"BucketName": {
36945+
"template": "${Bucket}"
36946+
}
36947+
},
36948+
"notice": "Only applicable when the bucket name ends with --x-s3"
3686936949
}
3687036950
],
3687136951
"S3.DeleteBucketOwnershipControls": [
@@ -36885,7 +36965,17 @@
3688536965
"BucketName": {
3688636966
"template": "${Bucket}"
3688736967
}
36888-
}
36968+
},
36969+
"notice": "Only applicable when the bucket name does not end with --x-s3"
36970+
},
36971+
{
36972+
"action": "s3express:DeleteBucketPolicy",
36973+
"resource_mappings": {
36974+
"BucketName": {
36975+
"template": "${Bucket}"
36976+
}
36977+
},
36978+
"notice": "Only applicable when the bucket name ends with --x-s3"
3688936979
}
3689036980
],
3689136981
"S3.DeleteBucketWebsite": [
@@ -36981,7 +37071,17 @@
3698137071
"BucketName": {
3698237072
"template": "${Bucket}"
3698337073
}
36984-
}
37074+
},
37075+
"notice": "Only applicable when the bucket name does not end with --x-s3"
37076+
},
37077+
{
37078+
"action": "s3express:GetBucketPolicy",
37079+
"resource_mappings": {
37080+
"BucketName": {
37081+
"template": "${Bucket}"
37082+
}
37083+
},
37084+
"notice": "Only applicable when the bucket name ends with --x-s3"
3698537085
}
3698637086
],
3698737087
"S3.GetBucketPolicyStatus": [
@@ -37165,7 +37265,17 @@
3716537265
"BucketName": {
3716637266
"template": "${Bucket}"
3716737267
}
37168-
}
37268+
},
37269+
"notice": "Only applicable when the bucket name does not end with --x-s3"
37270+
},
37271+
{
37272+
"action": "s3express:PutBucketPolicy",
37273+
"resource_mappings": {
37274+
"BucketName": {
37275+
"template": "${Bucket}"
37276+
}
37277+
},
37278+
"notice": "Only applicable when the bucket name ends with --x-s3"
3716937279
}
3717037280
],
3717137281
"S3.PutBucketRequestPayment": [
@@ -168338,7 +168448,7 @@
168338168448
],
168339168449
"S3.ListDirectoryBuckets": [
168340168450
{
168341-
"action": "s3:ListAllMyBuckets",
168451+
"action": "s3express:ListAllMyDirectoryBuckets",
168342168452
"undocumented": true,
168343168453
"resource_mappings": {}
168344168454
}

0 commit comments

Comments
 (0)