-
Notifications
You must be signed in to change notification settings - Fork 736
Closed
Labels
closed-for-stalenessguidanceQuestion that needs advice or information.Question that needs advice or information.
Description
Confirm by changing [ ] to [x] below to ensure that it's a bug:
- I've gone though the API reference
- I've checked AWS Forums and StackOverflow for answers
- I've searched for previous similar issues and didn't find any solution
Describe the bug
When calling sts PresignGetCallerIdentity I could not find how to customise the request to specific headers would be additionaly signed ( x-k8s-aws-id ) / certain Amazon headers would not be added to request ( X-Amz-User-Agent )
Version of AWS SDK for Go?
github.com/aws/aws-sdk-go-v2 v1.2.0
github.com/aws/aws-sdk-go-v2/config v1.1.1
github.com/aws/aws-sdk-go-v2/credentials v1.1.1
github.com/aws/aws-sdk-go-v2/service/eks v1.1.1
github.com/aws/aws-sdk-go-v2/service/sts v1.1.1
Version of Go (go version)?
1.15.2
To Reproduce (observed behavior)
// -------- ...
stsSvc := sts.NewFromConfig(cfg)
getCallerIdentity, err := presignClient.PresignGetCallerIdentity(context.Background(), &sts.GetCallerIdentityInput{})
if err != nil {
panic(err)
}
// -------- ...
fmt.Println(getCallerIdentity.URL)
Which in turn produces
https://sts.eu-central-1.amazonaws.com/?Action=GetCallerIdentity
&Version=2011-06-15&
X-Amz-Algorithm=AWS4-HMAC-SHA256&
X-Amz-Credential=A**********7/20210216/eu-central-1/sts/aws4_request&
X-Amz-Date=20210216T005611Z&
X-Amz-SignedHeaders=host&
X-Amz-User-Agent=aws-sdk-go-v2/1.2.0 os/other lang/go/1.15.2 md/GOOS/darwin md/GOARCH/amd64&
X-Amz-Signature=cd8****************************************ac2
Expected behavior
I would expect a easy form to provide headers to be signed / headers to be not included in the signing process.
Additional context
Idea here was generating code to create EKS token value.
Metadata
Metadata
Assignees
Labels
closed-for-stalenessguidanceQuestion that needs advice or information.Question that needs advice or information.