Repository navigation
Add more testing for presigned URLs - #544
Conversation
|
a1c2d24 to
94e1180
Compare
94e1180 to
3eab156
Compare
cbodley
left a comment
There was a problem hiding this comment.
tox -- s3tests_boto3/functional/test_s3.py -k 'test_object_presigned_put_object_with_acl or test_cors_presigned or test_object_raw_get_x_amz_expires_not_expired' -v
i managed to run these against aws and saw them pass against both us-east-1 and -2 👍
that took a few minor changes to work around errors like AclWithBlockPublicAccessError and IllegalLocationConstraintException, and it didn't exercise tenants. i used the same iam user credentials for [s3 main] [s3 alt] and [s3 tenant]
| bucket_name = get_new_bucket() | ||
| client.create_bucket(Bucket=bucket_name) |
There was a problem hiding this comment.
get_new_bucket() actually creates the bucket using the default get_client(), so client.create_bucket() always recreates it. in the tenant test, this recreation is expected to fail:
An error occurred (BucketAlreadyExists) when calling the CreateBucket operation: Cannot modify existing access control policy
strangely, i'm only seeing it fail that way in the rgw/dbstore suite
you can either call get_new_bucket(client) with the correct client, or call get_new_bucket_name() just to generate the name
There was a problem hiding this comment.
oh, the tenanted user would create a different bucket with the same name. i guess dbstore just doesn't handle the tenants correctly
There was a problem hiding this comment.
ah nice catch, I've changed to your suggestion get_new_bucket(client)
This improves the testing for presigned URLs for both get_object and put_object when using generate_presigned_url(). It covers the case where you pass for example a x-amz-acl (ACL in params for generated_presigned_url) header that should be signed. Tests the regression in [1]. [1] https://tracker.ceph.com/issues/64308 Signed-off-by: Tobias Urdin <[email protected]>
3eab156 to
055451f
Compare
|
cc @alimaredia i cherry-picked this to ceph-pacific after merging ceph/ceph#55550 it's still needed on ceph-master, but i'll wait until after the squid freeze in case there are pending jobs without the fix from ceph/ceph#55458 |
|
cherry-picked to ceph-master |
This improves the testing for presigned URLs for
both get_object and put_object when using
generate_presigned_url().
It covers the case where you pass for example
a x-amz-acl (ACL in params for generated_presigned_url) header that should be signed.
Tests the regression in [1].
[1] https://tracker.ceph.com/issues/64308