Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rgw/v2/lib/s3/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def do_auth_using_client(self, **config):
endpoint_url=self.endpoint_url,
config=additional_config,
verify=False,
region_name="",
region_name=config.get("region_name", ""),
aws_session_token=self.session_token if self.session_token else None,
)
return rgw
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# polarion test case id: CEPH-83593390
# test scripts : test_sts_policy_permutations.py
config:
user_count: 2
user_type: tenanted
bucket_count: 1
objects_count: 1
objects_size_range:
min: 5
max: 15
test_ops:
create_bucket: true
create_object: true
expected_allowed_actions: ['abort_multipart_upload', 'copy_object', 'delete_object', 'get_accelerate_configuration', 'get_bucket_location', 'get_object', 'head_bucket', 'head_object', 'list_bucket_multipart_uploads', 'list_objects', 'list_objects_v2', 'multipart_upload', 'put_object', 'select_object_content']
same_bucket_owner_and_principal: False
verify_static_sts_role_session_policy: True
sts:
trust_policy:
"Version": "2012-10-17"
"Statement":
[
{
"Effect": "Allow",
"Principal":
{
"AWS":
["arn:aws:iam::<tenant_name>:user/<user_name>"],
},
"Action": ["sts:AssumeRole"],
},
]
role_policy:
"Version": "2012-10-17"
"Statement":
[
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:ListBucketMultipartUploads",
"s3:ListMultipartUploadParts",
"s3:GetBucketLocation",
"s3:ListBucket",
"s3:ListAllMyBuckets",
"s3:AbortMultipartUpload",
"s3:DeleteObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3::<tenant_name>:*"
}
]
session_policy:
"Version": "2012-10-17"
"Statement":
[
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:ListBucket*"
],
"Resource": [
"arn:aws:s3::<tenant_name>:<bucket_name>"
]
},
{
"Effect": "Allow",
"Action": [
"s3:Get*",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:DeleteObject",
"s3:AbortMultipartUpload"
],
"Resource": [
"arn:aws:s3::<tenant_name>:<bucket_name>/warehouse",
"arn:aws:s3::<tenant_name>:<bucket_name>/warehouse/*",
"arn:aws:s3::<tenant_name>:<bucket_name>/warehouse/"
]
},
{
"Effect": "Allow",
"Action": [
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3::<tenant_name>:<bucket_name>"
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# bz: https://bugzilla.redhat.com/show_bug.cgi?id=2403635
# test scripts : test_sts_policy_permutations.py
config:
user_count: 2
user_type: tenanted
bucket_count: 1
objects_count: 1
objects_size_range:
min: 5
max: 15
test_ops:
create_bucket: true
create_object: true
expected_allowed_actions: ['abort_multipart_upload', 'copy_object', 'delete_object', 'get_accelerate_configuration', 'get_bucket_location', 'get_object', 'head_bucket', 'head_object', 'list_bucket_multipart_uploads', 'list_objects', 'list_objects_v2', 'multipart_upload', 'put_object', 'select_object_content']
same_bucket_owner_and_principal: True
verify_static_sts_role_session_policy: True
sts:
trust_policy:
"Version": "2012-10-17"
"Statement":
[
{
"Effect": "Allow",
"Principal":
{
"AWS":
["arn:aws:iam::<tenant_name>:user/<user_name>"],
},
"Action": ["sts:AssumeRole"],
},
]
role_policy:
"Version": "2012-10-17"
"Statement":
[
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:ListBucketMultipartUploads",
"s3:ListMultipartUploadParts",
"s3:GetBucketLocation",
"s3:ListBucket",
"s3:ListAllMyBuckets",
"s3:AbortMultipartUpload",
"s3:DeleteObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3::<tenant_name>:*"
}
]
session_policy:
"Version": "2012-10-17"
"Statement":
[
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:ListBucket*"
],
"Resource": [
"arn:aws:s3::<tenant_name>:<bucket_name>"
]
},
{
"Effect": "Allow",
"Action": [
"s3:Get*",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:DeleteObject",
"s3:AbortMultipartUpload"
],
"Resource": [
"arn:aws:s3::<tenant_name>:<bucket_name>/warehouse",
"arn:aws:s3::<tenant_name>:<bucket_name>/warehouse/*",
"arn:aws:s3::<tenant_name>:<bucket_name>/warehouse/"
]
},
{
"Effect": "Allow",
"Action": [
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3::<tenant_name>:<bucket_name>"
]
}
]
Loading