You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need a possibility to send Amazon Web Services requests.
For this purpose there should be an option to create an authentication header for AWS request with proper calculated AWS Signature
As an option,
A new step can be implemented to generate authentication header and calculate AWS signature
like
When I generate authentication header for AWS request and save it to $scopes variable `$variableName`:$parameters
Authentication header, created as a result of this step
should be in format: AWS4-HMAC-SHA256 Credential={AWSKEY}/20230515/{region}/{aws_service}/aws4_request, SignedHeaders=host;x-amz-date, Signature={signature}
and can be used in as a usual header in the When I set request headers:$headers step
Also a variable with timestamp value should be implicitly saved on STORY level to use it further in the requests, e.g.
${timestampRequest} with value 20230516T091931Z
Example:
When I generate authentication header for AWS request and save it to SCENARIO variable `awsAuth`:
|AWSAccessKey| AKABIAXENAAGRAATEST|
|SecretKey| JKTdymTaduEDZtiGTest|
|AWSRegion|us-east-1|
|Service Name|execute-api|
--Result of the previous step will be a variable ${awsAuth} with the value AWS4-HMAC-SHA256 Credential=AKABIAXENAAGRAATEST/20230516/us-east-1/execute-api/aws4_request, SignedHeaders=host;x-amz-date, Signature={signature}
-- Also implicitly a variable with timestamp value should be saved on STORY level to use it further in the requests, e.g.
${timestampRequest} with value 20230516T091931Z
When I set request headers:
|x-api-key| {x_api_key}|
|X-Amz-Date| ${timestampRequest}|
|Authorization| ${awsAuth} |
|X-Amz-Security-Token|only for temporary security credentials |
When I execute HTTP GET request for resource with URL `https://{restapi_id}.{aws_service}.{region}.amazonaws.com/{stage_name}`
AWS uses a custom HTTP scheme based on a keyed-HMAC (Hash Message Authentication Code) for authentication.
The official AWS Signature documentation provides more details:
I need a possibility to send Amazon Web Services requests.
For this purpose there should be an option to create an authentication header for AWS request with proper calculated AWS Signature
As an option,
A new step can be implemented to generate authentication header and calculate AWS signature
like
Authentication header, created as a result of this step
AWS4-HMAC-SHA256 Credential={AWSKEY}/20230515/{region}/{aws_service}/aws4_request, SignedHeaders=host;x-amz-date, Signature={signature}
When I set request headers:$headers
stepAlso a variable with timestamp value should be implicitly saved on STORY level to use it further in the requests, e.g.
${timestampRequest} with value 20230516T091931Z
Example:
Example of curl:
Note: today's date is 20230516
AWS uses a custom HTTP scheme based on a keyed-HMAC (Hash Message Authentication Code) for authentication.
The official AWS Signature documentation provides more details:
Useful links:
https://docs.aws.amazon.com/IAM/latest/UserGuide/create-signed-request.html
https://github.com/aws/aws-sdk-java-v2/blob/master/core/auth/src/main/java/software/amazon/awssdk/auth/signer/internal/BaseAws4Signer.java
https://github.com/Biruntha/AmazonEC2_Examples/blob/master/AWS_EC2_Example2/src/main/java/com/aws/ec2/AWSSignatureV4Generator.java
https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-examples-using-sdks.html
https://docs.aws.amazon.com/IAM/latest/UserGuide/create-signed-request.html
https://github.com/postmanlabs/postman-docs/blob/e4b6d9ee860a529e2532b26674e795de52c49c2c/src/pages/docs/sending-requests/authorization.md?plain=1#L420
https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html
https://github.com/postmanlabs/postman-collection/blob/1bc172eea982f9aa78035ff757036d189fbe7ea4/test/unit/request-auth.test.js
https://github.com/postmanlabs/postman-collection/blob/1bc172eea982f9aa78035ff757036d189fbe7ea4/lib/collection/request-auth/awsv4.js
https://stackoverflow.com/questions/35985931/how-to-generate-signature-in-aws-from-java
The text was updated successfully, but these errors were encountered: