In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-11-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains the "AWS2 authentication process how to achieve", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "AWS2 authentication process how to achieve" it!
Many novice drivers look at the official document AWS2 authentication section, especially how the Authorization is generated is always obscure, the core is how the StringToSign is formed.
Authorization = "AWS" + "" + AWSAccessKeyId + ":" + Signature;Signature = Base64 (HMAC-SHA1 (YourSecretAccessKeyID, UTF-8-Encoding-Of (StringToSign); StringToSign = HTTP-Verb + "\ n" + Content-MD5 + "\ n" + Content-Type + "\ n" + Date + "\ n" + CanonicalizedAmzHeaders + CanonicalizedResource
Let's use bash to upload an Object to S3 as an example to explain the whole AWS2 signature process.
#! / bin/bashACCESS_KEY= "# fill in access keySECRET_KEY=" # fill in secret keyHOST= "s3.cephbook.com" # fill in the Endpoint address of S3 BUCKET= "demo" # fill in bucket name CONTENT_TYPE= "application/octet-stream" # MIMEFILENAME=/tmp/demo # File Local path ACL= "x-amz-acl:public-read" # Object ACLMETA_DATA= "x-amz-meta-ukey:value" # Custom medadataFILESIZE=$ (stat-c% s "$FILENAME") FILEMD5= `cat ${FILENAME} | openssl dgst-md5-binary | openssl enc-Base64`Auth _ PATH= "/ ${BUCKET} ${FILENAME}" CURRENT_TIME= `TZ = GMT LANG=en_US date "+% a % d% b% Y% H:%M:%S GMT 'stringToSign=' PUT\ n$ {FILEMD5}\ n$ {CONTENT_TYPE}\ n$ {CURRENT_TIME}\ n$ {ACL}\ n$ {META_DATA}\ n$ {AUTH_PATH} "echo $stringToSignsignature= `echo-en ${stringToSign} | openssl sha1-hmac ${SECRET_KEY}-binary | base64`curl-v-X PUT" http://${HOST}${AUTH_PATH}"\-H "Authorization: AWS ${ACCESS_KEY} : ${signature} "\-H" Date: ${CURRENT_TIME} "\-H" Host: ${HOST} "\-H" Content-Length: ${FILESIZE} "\-H" Content-MD5: ${FILEMD5} "\-H" Content-Type: ${CONTENT_TYPE} "\-H" ${ACL} "\-H" ${META_DATA} "\-T" ${FILENAME} "Thank you for reading The above is the content of "how to achieve the AWS2 authentication process". After the study of this article, I believe you have a deeper understanding of how to achieve this problem in the AWS2 certification process, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





 
             
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.