aldy120 / s3-note

Note for Amazon S3
0 stars 0 forks source link

sigv4 #18

Open aldy120 opened 3 years ago

aldy120 commented 3 years ago

sigV2

The sigv2 is deprecated. All bucket created after 2020-06-24 does not support sigv4 credential. https://aws.amazon.com/blogs/aws/amazon-s3-update-sigv2-deprecation-period-extended-modified/

sigv4

Each HTTP/HTTPS request that uses version 4 signing must contain these elements.

aldy120 commented 1 year ago

Sigv2 example

https://test-dub-12345678.s3.eu-west-1.amazonaws.com/test.txt?AWSAccessKeyId=AKIAUXOIYM7XYQRKV2OL&Signature=cn7SkMv0P%2FCEaeAl5E%2FZ74u8XdA%3D&Expires=1674382479

Sigv4 example

https://test-dub-12345678.s3.eu-west-1.amazonaws.com/test.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAUXOIYM7XYQRKV2OL%2F20230122%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20230122T091237Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=71e4e475be55e8e2b71f9ee7d47379c0038ac87fbb0bfbdd99a1bd2fd5f76394
aldy120 commented 1 year ago

boto3 https://boto3.amazonaws.com/v1/documentation/api/1.9.42/guide/s3.html

aldy120 commented 1 year ago

理論上升級新版可以解 https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingAWSSDK.html#UsingAWSSDK-move-to-Sig4