0

enter image description here

I am passing my AWS access key and secret using the Authorization > AWS Signature section in postman.

I am handling the request using a Golang project.

Now, I am getting the request under this variable : r *http.Request I tried getting different values with r.Header.Get() and facing 2 particular issues:

  1. I am not able to get the value of secret
  2. I am getting the value of region and access_key using r.Header.Get("Authorization") but its in between a long string. How can I extract them properly ?

I want to

Keval Bhogayata
  • 4,422
  • 3
  • 13
  • 36
  • 1
    Secret isn't included in the request; it's only used to sign the request. – erik258 Oct 18 '21 at 23:44
  • Thanks @DanielFarrell, I was not aware of it. But then, how do I get the secret inside my code ? Because I am using it to create an AWS session. can I recalculate it ? – Keval Bhogayata Oct 19 '21 at 03:28
  • In AWS, the secret is generated on the aws side and available for access by the user only at creation time. It's stored on the AWS side and used to verify request signatures, but cannot be retrieved or computed. If add to the question to describe what you hope to achieve we might be able to meme a better recommendation. What is it that motivates the use of AWS signature for requests to your application? – erik258 Oct 19 '21 at 15:05

0 Answers0