rebase: bump the github-dependencies group with 2 updates

Bumps the github-dependencies group with 2 updates: [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) and [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2).


Updates `github.com/aws/aws-sdk-go` from 1.50.21 to 1.50.26
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.50.21...v1.50.26)

Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.27.0 to 1.28.1
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/ecs/v1.28.1/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.27.0...service/ecs/v1.28.1)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sts
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot] 2024-02-26 20:50:16 +00:00 committed by mergify[bot]
parent 3a91487c8a
commit 328e4e5a0f
34 changed files with 290 additions and 165 deletions

16
go.mod
View File

@ -6,8 +6,8 @@ toolchain go1.21.5
require ( require (
github.com/IBM/keyprotect-go-client v0.12.2 github.com/IBM/keyprotect-go-client v0.12.2
github.com/aws/aws-sdk-go v1.50.21 github.com/aws/aws-sdk-go v1.50.26
github.com/aws/aws-sdk-go-v2/service/sts v1.27.0 github.com/aws/aws-sdk-go-v2/service/sts v1.28.1
github.com/ceph/ceph-csi/api v0.0.0-00010101000000-000000000000 github.com/ceph/ceph-csi/api v0.0.0-00010101000000-000000000000
github.com/ceph/go-ceph v0.26.0 github.com/ceph/go-ceph v0.26.0
github.com/container-storage-interface/spec v1.9.0 github.com/container-storage-interface/spec v1.9.0
@ -53,12 +53,12 @@ require (
github.com/ansel1/merry/v2 v2.0.1 // indirect github.com/ansel1/merry/v2 v2.0.1 // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
github.com/aws/aws-sdk-go-v2 v1.25.0 // indirect github.com/aws/aws-sdk-go-v2 v1.25.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 // indirect
github.com/aws/smithy-go v1.20.0 // indirect github.com/aws/smithy-go v1.20.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/cenkalti/backoff/v3 v3.2.2 // indirect

32
go.sum
View File

@ -821,22 +821,22 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/aws/aws-sdk-go v1.44.164/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go v1.44.164/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.50.21 h1:W8awpwiInOt4qHQE6JghRYQJhHcf/cDJS3mlZYqioSQ= github.com/aws/aws-sdk-go v1.50.26 h1:tuv8+dje59DBK1Pj65tSCdD36oamBxKYJgbng4bFylc=
github.com/aws/aws-sdk-go v1.50.21/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go v1.50.26/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go-v2 v1.25.0 h1:sv7+1JVJxOu/dD/sz/csHX7jFqmP001TIY7aytBWDSQ= github.com/aws/aws-sdk-go-v2 v1.25.2 h1:/uiG1avJRgLGiQM9X3qJM8+Qa6KRGK5rRPuXE0HUM+w=
github.com/aws/aws-sdk-go-v2 v1.25.0/go.mod h1:G104G1Aho5WqF+SR3mDIobTABQzpYV0WxMsKxlMggOA= github.com/aws/aws-sdk-go-v2 v1.25.2/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 h1:NPs/EqVO+ajwOoq56EfcGKa3L3ruWuazkIw1BqxwOPw= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 h1:bNo4LagzUKbjdxE0tIcR9pMzLR2U/Tgie1Hq1HQ3iH8=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0/go.mod h1:D+duLy2ylgatV+yTlQ8JTuLfDD0BnFvnQRc+o6tbZ4M= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2/go.mod h1:wRQv0nN6v9wDXuWThpovGQjqF1HFdcgWjporw14lS8k=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 h1:ks7KGMVUMoDzcxNWUlEdI+/lokMFD136EL6DWmUOV80= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 h1:EtOU5jsPdIQNP+6Q2C5e3d65NKT1PeCiQk+9OdzO12Q=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0/go.mod h1:hL6BWM/d/qz113fVitZjbXR0E+RCTU1+x+1Idyn5NgE= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2/go.mod h1:tyF5sKccmDz0Bv4NrstEr+/9YkSPJHrcO7UsUKf7pWM=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0 h1:a33HuFlO0KsveiP90IUJh8Xr/cx9US2PqkSroaLc+o8= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0/go.mod h1:SxIkWpByiGbhbHYTo9CMTUnx2G4p4ZQMrDPcRRy//1c= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 h1:SHN/umDLTmFTmYfI+gkanz6da3vK8Kvj/5wkqnTHbuA= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 h1:5ffmXjPtwRExp1zc7gENLgCPyHFbhEPwVTkTiH9niSk=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0/go.mod h1:l8gPU5RYGOFHJqWEpPMoRTP0VoaWQSkJdKo+hwWnnDA= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2/go.mod h1:Ru7vg1iQ7cR4i7SZ/JTLYN9kaXtbL69UdgG0OQWQxW0=
github.com/aws/aws-sdk-go-v2/service/sts v1.27.0 h1:cjTRjh700H36MQ8M0LnDn33W3JmwC77mdxIIyPWCdpM= github.com/aws/aws-sdk-go-v2/service/sts v1.28.1 h1:3I2cBEYgKhrWlwyZgfpSO2BpaMY1LHPqXYk/QGlu2ew=
github.com/aws/aws-sdk-go-v2/service/sts v1.27.0/go.mod h1:nXfOBMWPokIbOY+Gi7a1psWMSvskUCemZzI+SMB7Akc= github.com/aws/aws-sdk-go-v2/service/sts v1.28.1/go.mod h1:uQ7YYKZt3adCRrdCBREm1CD3efFLOUNH77MrUCvx5oA=
github.com/aws/smithy-go v1.20.0 h1:6+kZsCXZwKxZS9RfISnPc4EXlHoyAkm2hPuM8X2BrrQ= github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw=
github.com/aws/smithy-go v1.20.0/go.mod h1:uo5RKksAl4PzhqaAbjd4rLgFoq5koTsQKYuGe7dklGc= github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=

View File

@ -3,4 +3,4 @@
package aws package aws
// goModuleVersion is the tagged release for this module // goModuleVersion is the tagged release for this module
const goModuleVersion = "1.25.0" const goModuleVersion = "1.25.2"

View File

@ -139,16 +139,16 @@ func AddRecordResponseTiming(stack *middleware.Stack) error {
// raw response within the response metadata. // raw response within the response metadata.
type rawResponseKey struct{} type rawResponseKey struct{}
// addRawResponse middleware adds raw response on to the metadata // AddRawResponse middleware adds raw response on to the metadata
type addRawResponse struct{} type AddRawResponse struct{}
// ID the identifier for the ClientRequestID // ID the identifier for the ClientRequestID
func (m *addRawResponse) ID() string { func (m *AddRawResponse) ID() string {
return "AddRawResponseToMetadata" return "AddRawResponseToMetadata"
} }
// HandleDeserialize adds raw response on the middleware metadata // HandleDeserialize adds raw response on the middleware metadata
func (m addRawResponse) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( func (m AddRawResponse) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error, out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) { ) {
out, metadata, err = next.HandleDeserialize(ctx, in) out, metadata, err = next.HandleDeserialize(ctx, in)
@ -159,7 +159,7 @@ func (m addRawResponse) HandleDeserialize(ctx context.Context, in middleware.Des
// AddRawResponseToMetadata adds middleware to the middleware stack that // AddRawResponseToMetadata adds middleware to the middleware stack that
// store raw response on to the metadata. // store raw response on to the metadata.
func AddRawResponseToMetadata(stack *middleware.Stack) error { func AddRawResponseToMetadata(stack *middleware.Stack) error {
return stack.Deserialize.Add(&addRawResponse{}, middleware.Before) return stack.Deserialize.Add(&AddRawResponse{}, middleware.Before)
} }
// GetRawResponse returns raw response set on metadata // GetRawResponse returns raw response set on metadata

View File

@ -11,18 +11,22 @@ import (
func AddRequestIDRetrieverMiddleware(stack *middleware.Stack) error { func AddRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
// add error wrapper middleware before operation deserializers so that it can wrap the error response // add error wrapper middleware before operation deserializers so that it can wrap the error response
// returned by operation deserializers // returned by operation deserializers
return stack.Deserialize.Insert(&requestIDRetriever{}, "OperationDeserializer", middleware.Before) return stack.Deserialize.Insert(&RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
} }
type requestIDRetriever struct { // RequestIDRetriever middleware captures the AWS service request ID from the
// raw response.
type RequestIDRetriever struct {
} }
// ID returns the middleware identifier // ID returns the middleware identifier
func (m *requestIDRetriever) ID() string { func (m *RequestIDRetriever) ID() string {
return "RequestIDRetriever" return "RequestIDRetriever"
} }
func (m *requestIDRetriever) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( // HandleDeserialize pulls the AWS request ID from the response, storing it in
// operation metadata.
func (m *RequestIDRetriever) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error, out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) { ) {
out, metadata, err = next.HandleDeserialize(ctx, in) out, metadata, err = next.HandleDeserialize(ctx, in)

View File

@ -64,12 +64,12 @@ var validChars = map[rune]bool{
'-': true, '.': true, '^': true, '_': true, '`': true, '|': true, '~': true, '-': true, '.': true, '^': true, '_': true, '`': true, '|': true, '~': true,
} }
// requestUserAgent is a build middleware that set the User-Agent for the request. // RequestUserAgent is a build middleware that set the User-Agent for the request.
type requestUserAgent struct { type RequestUserAgent struct {
sdkAgent, userAgent *smithyhttp.UserAgentBuilder sdkAgent, userAgent *smithyhttp.UserAgentBuilder
} }
// newRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the // NewRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the
// request. // request.
// //
// User-Agent example: // User-Agent example:
@ -79,12 +79,12 @@ type requestUserAgent struct {
// X-Amz-User-Agent example: // X-Amz-User-Agent example:
// //
// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15 // aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15
func newRequestUserAgent() *requestUserAgent { func NewRequestUserAgent() *RequestUserAgent {
userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder() userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder()
addProductName(userAgent) addProductName(userAgent)
addProductName(sdkAgent) addProductName(sdkAgent)
r := &requestUserAgent{ r := &RequestUserAgent{
sdkAgent: sdkAgent, sdkAgent: sdkAgent,
userAgent: userAgent, userAgent: userAgent,
} }
@ -94,7 +94,7 @@ func newRequestUserAgent() *requestUserAgent {
return r return r
} }
func addSDKMetadata(r *requestUserAgent) { func addSDKMetadata(r *RequestUserAgent) {
r.AddSDKAgentKey(OperatingSystemMetadata, getNormalizedOSName()) r.AddSDKAgentKey(OperatingSystemMetadata, getNormalizedOSName())
r.AddSDKAgentKeyValue(LanguageMetadata, "go", languageVersion) r.AddSDKAgentKeyValue(LanguageMetadata, "go", languageVersion)
r.AddSDKAgentKeyValue(AdditionalMetadata, "GOOS", runtime.GOOS) r.AddSDKAgentKeyValue(AdditionalMetadata, "GOOS", runtime.GOOS)
@ -162,18 +162,18 @@ func AddRequestUserAgentMiddleware(stack *middleware.Stack) error {
return err return err
} }
func getOrAddRequestUserAgent(stack *middleware.Stack) (*requestUserAgent, error) { func getOrAddRequestUserAgent(stack *middleware.Stack) (*RequestUserAgent, error) {
id := (*requestUserAgent)(nil).ID() id := (*RequestUserAgent)(nil).ID()
bm, ok := stack.Build.Get(id) bm, ok := stack.Build.Get(id)
if !ok { if !ok {
bm = newRequestUserAgent() bm = NewRequestUserAgent()
err := stack.Build.Add(bm, middleware.After) err := stack.Build.Add(bm, middleware.After)
if err != nil { if err != nil {
return nil, err return nil, err
} }
} }
requestUserAgent, ok := bm.(*requestUserAgent) requestUserAgent, ok := bm.(*RequestUserAgent)
if !ok { if !ok {
return nil, fmt.Errorf("%T for %s middleware did not match expected type", bm, id) return nil, fmt.Errorf("%T for %s middleware did not match expected type", bm, id)
} }
@ -182,34 +182,34 @@ func getOrAddRequestUserAgent(stack *middleware.Stack) (*requestUserAgent, error
} }
// AddUserAgentKey adds the component identified by name to the User-Agent string. // AddUserAgentKey adds the component identified by name to the User-Agent string.
func (u *requestUserAgent) AddUserAgentKey(key string) { func (u *RequestUserAgent) AddUserAgentKey(key string) {
u.userAgent.AddKey(strings.Map(rules, key)) u.userAgent.AddKey(strings.Map(rules, key))
} }
// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string. // AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
func (u *requestUserAgent) AddUserAgentKeyValue(key, value string) { func (u *RequestUserAgent) AddUserAgentKeyValue(key, value string) {
u.userAgent.AddKeyValue(strings.Map(rules, key), strings.Map(rules, value)) u.userAgent.AddKeyValue(strings.Map(rules, key), strings.Map(rules, value))
} }
// AddUserAgentKey adds the component identified by name to the User-Agent string. // AddSDKAgentKey adds the component identified by name to the User-Agent string.
func (u *requestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) { func (u *RequestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) {
// TODO: should target sdkAgent // TODO: should target sdkAgent
u.userAgent.AddKey(keyType.string() + "/" + strings.Map(rules, key)) u.userAgent.AddKey(keyType.string() + "/" + strings.Map(rules, key))
} }
// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string. // AddSDKAgentKeyValue adds the key identified by the given name and value to the User-Agent string.
func (u *requestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) { func (u *RequestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) {
// TODO: should target sdkAgent // TODO: should target sdkAgent
u.userAgent.AddKeyValue(keyType.string(), strings.Map(rules, key)+"#"+strings.Map(rules, value)) u.userAgent.AddKeyValue(keyType.string(), strings.Map(rules, key)+"#"+strings.Map(rules, value))
} }
// ID the name of the middleware. // ID the name of the middleware.
func (u *requestUserAgent) ID() string { func (u *RequestUserAgent) ID() string {
return "UserAgent" return "UserAgent"
} }
// HandleBuild adds or appends the constructed user agent to the request. // HandleBuild adds or appends the constructed user agent to the request.
func (u *requestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( func (u *RequestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
out middleware.BuildOutput, metadata middleware.Metadata, err error, out middleware.BuildOutput, metadata middleware.Metadata, err error,
) { ) {
switch req := in.Request.(type) { switch req := in.Request.(type) {
@ -224,12 +224,12 @@ func (u *requestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildI
return next.HandleBuild(ctx, in) return next.HandleBuild(ctx, in)
} }
func (u *requestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) { func (u *RequestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) {
const userAgent = "User-Agent" const userAgent = "User-Agent"
updateHTTPHeader(request, userAgent, u.userAgent.Build()) updateHTTPHeader(request, userAgent, u.userAgent.Build())
} }
func (u *requestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) { func (u *RequestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) {
const sdkAgent = "X-Amz-User-Agent" const sdkAgent = "X-Amz-User-Agent"
updateHTTPHeader(request, sdkAgent, u.sdkAgent.Build()) updateHTTPHeader(request, sdkAgent, u.sdkAgent.Build())
} }

View File

@ -85,12 +85,12 @@ func (m *dynamicPayloadSigningMiddleware) HandleFinalize(
} }
if req.IsHTTPS() { if req.IsHTTPS() {
return (&unsignedPayload{}).HandleFinalize(ctx, in, next) return (&UnsignedPayload{}).HandleFinalize(ctx, in, next)
} }
return (&computePayloadSHA256{}).HandleFinalize(ctx, in, next) return (&ComputePayloadSHA256{}).HandleFinalize(ctx, in, next)
} }
// unsignedPayload sets the SigV4 request payload hash to unsigned. // UnsignedPayload sets the SigV4 request payload hash to unsigned.
// //
// Will not set the Unsigned Payload magic SHA value, if a SHA has already been // Will not set the Unsigned Payload magic SHA value, if a SHA has already been
// stored in the context. (e.g. application pre-computed SHA256 before making // stored in the context. (e.g. application pre-computed SHA256 before making
@ -98,21 +98,21 @@ func (m *dynamicPayloadSigningMiddleware) HandleFinalize(
// //
// This middleware does not check the X-Amz-Content-Sha256 header, if that // This middleware does not check the X-Amz-Content-Sha256 header, if that
// header is serialized a middleware must translate it into the context. // header is serialized a middleware must translate it into the context.
type unsignedPayload struct{} type UnsignedPayload struct{}
// AddUnsignedPayloadMiddleware adds unsignedPayload to the operation // AddUnsignedPayloadMiddleware adds unsignedPayload to the operation
// middleware stack // middleware stack
func AddUnsignedPayloadMiddleware(stack *middleware.Stack) error { func AddUnsignedPayloadMiddleware(stack *middleware.Stack) error {
return stack.Finalize.Insert(&unsignedPayload{}, "ResolveEndpointV2", middleware.After) return stack.Finalize.Insert(&UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
} }
// ID returns the unsignedPayload identifier // ID returns the unsignedPayload identifier
func (m *unsignedPayload) ID() string { func (m *UnsignedPayload) ID() string {
return computePayloadHashMiddlewareID return computePayloadHashMiddlewareID
} }
// HandleFinalize sets the payload hash magic value to the unsigned sentinel. // HandleFinalize sets the payload hash magic value to the unsigned sentinel.
func (m *unsignedPayload) HandleFinalize( func (m *UnsignedPayload) HandleFinalize(
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) ( ) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error, out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
@ -123,7 +123,7 @@ func (m *unsignedPayload) HandleFinalize(
return next.HandleFinalize(ctx, in) return next.HandleFinalize(ctx, in)
} }
// computePayloadSHA256 computes SHA256 payload hash to sign. // ComputePayloadSHA256 computes SHA256 payload hash to sign.
// //
// Will not set the Unsigned Payload magic SHA value, if a SHA has already been // Will not set the Unsigned Payload magic SHA value, if a SHA has already been
// stored in the context. (e.g. application pre-computed SHA256 before making // stored in the context. (e.g. application pre-computed SHA256 before making
@ -131,12 +131,12 @@ func (m *unsignedPayload) HandleFinalize(
// //
// This middleware does not check the X-Amz-Content-Sha256 header, if that // This middleware does not check the X-Amz-Content-Sha256 header, if that
// header is serialized a middleware must translate it into the context. // header is serialized a middleware must translate it into the context.
type computePayloadSHA256 struct{} type ComputePayloadSHA256 struct{}
// AddComputePayloadSHA256Middleware adds computePayloadSHA256 to the // AddComputePayloadSHA256Middleware adds computePayloadSHA256 to the
// operation middleware stack // operation middleware stack
func AddComputePayloadSHA256Middleware(stack *middleware.Stack) error { func AddComputePayloadSHA256Middleware(stack *middleware.Stack) error {
return stack.Finalize.Insert(&computePayloadSHA256{}, "ResolveEndpointV2", middleware.After) return stack.Finalize.Insert(&ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
} }
// RemoveComputePayloadSHA256Middleware removes computePayloadSHA256 from the // RemoveComputePayloadSHA256Middleware removes computePayloadSHA256 from the
@ -147,13 +147,13 @@ func RemoveComputePayloadSHA256Middleware(stack *middleware.Stack) error {
} }
// ID is the middleware name // ID is the middleware name
func (m *computePayloadSHA256) ID() string { func (m *ComputePayloadSHA256) ID() string {
return computePayloadHashMiddlewareID return computePayloadHashMiddlewareID
} }
// HandleFinalize computes the payload hash for the request, storing it to the // HandleFinalize computes the payload hash for the request, storing it to the
// context. This is a no-op if a caller has previously set that value. // context. This is a no-op if a caller has previously set that value.
func (m *computePayloadSHA256) HandleFinalize( func (m *ComputePayloadSHA256) HandleFinalize(
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) ( ) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error, out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
@ -196,35 +196,35 @@ func (m *computePayloadSHA256) HandleFinalize(
// Use this to disable computing the Payload SHA256 checksum and instead use // Use this to disable computing the Payload SHA256 checksum and instead use
// UNSIGNED-PAYLOAD for the SHA256 value. // UNSIGNED-PAYLOAD for the SHA256 value.
func SwapComputePayloadSHA256ForUnsignedPayloadMiddleware(stack *middleware.Stack) error { func SwapComputePayloadSHA256ForUnsignedPayloadMiddleware(stack *middleware.Stack) error {
_, err := stack.Finalize.Swap(computePayloadHashMiddlewareID, &unsignedPayload{}) _, err := stack.Finalize.Swap(computePayloadHashMiddlewareID, &UnsignedPayload{})
return err return err
} }
// contentSHA256Header sets the X-Amz-Content-Sha256 header value to // ContentSHA256Header sets the X-Amz-Content-Sha256 header value to
// the Payload hash stored in the context. // the Payload hash stored in the context.
type contentSHA256Header struct{} type ContentSHA256Header struct{}
// AddContentSHA256HeaderMiddleware adds ContentSHA256Header to the // AddContentSHA256HeaderMiddleware adds ContentSHA256Header to the
// operation middleware stack // operation middleware stack
func AddContentSHA256HeaderMiddleware(stack *middleware.Stack) error { func AddContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
return stack.Finalize.Insert(&contentSHA256Header{}, computePayloadHashMiddlewareID, middleware.After) return stack.Finalize.Insert(&ContentSHA256Header{}, computePayloadHashMiddlewareID, middleware.After)
} }
// RemoveContentSHA256HeaderMiddleware removes contentSHA256Header middleware // RemoveContentSHA256HeaderMiddleware removes contentSHA256Header middleware
// from the operation middleware stack // from the operation middleware stack
func RemoveContentSHA256HeaderMiddleware(stack *middleware.Stack) error { func RemoveContentSHA256HeaderMiddleware(stack *middleware.Stack) error {
_, err := stack.Finalize.Remove((*contentSHA256Header)(nil).ID()) _, err := stack.Finalize.Remove((*ContentSHA256Header)(nil).ID())
return err return err
} }
// ID returns the ContentSHA256HeaderMiddleware identifier // ID returns the ContentSHA256HeaderMiddleware identifier
func (m *contentSHA256Header) ID() string { func (m *ContentSHA256Header) ID() string {
return "SigV4ContentSHA256Header" return "SigV4ContentSHA256Header"
} }
// HandleFinalize sets the X-Amz-Content-Sha256 header value to the Payload hash // HandleFinalize sets the X-Amz-Content-Sha256 header value to the Payload hash
// stored in the context. // stored in the context.
func (m *contentSHA256Header) HandleFinalize( func (m *ContentSHA256Header) HandleFinalize(
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) ( ) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error, out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
@ -360,18 +360,21 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl
return next.HandleFinalize(ctx, in) return next.HandleFinalize(ctx, in)
} }
type streamingEventsPayload struct{} // StreamingEventsPayload signs input event stream messages.
type StreamingEventsPayload struct{}
// AddStreamingEventsPayload adds the streamingEventsPayload middleware to the stack. // AddStreamingEventsPayload adds the streamingEventsPayload middleware to the stack.
func AddStreamingEventsPayload(stack *middleware.Stack) error { func AddStreamingEventsPayload(stack *middleware.Stack) error {
return stack.Finalize.Add(&streamingEventsPayload{}, middleware.Before) return stack.Finalize.Add(&StreamingEventsPayload{}, middleware.Before)
} }
func (s *streamingEventsPayload) ID() string { // ID identifies the middleware.
func (s *StreamingEventsPayload) ID() string {
return computePayloadHashMiddlewareID return computePayloadHashMiddlewareID
} }
func (s *streamingEventsPayload) HandleFinalize( // HandleFinalize marks the input stream to be signed with SigV4.
func (s *StreamingEventsPayload) HandleFinalize(
ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
) ( ) (
out middleware.FinalizeOutput, metadata middleware.Metadata, err error, out middleware.FinalizeOutput, metadata middleware.Metadata, err error,

View File

@ -12,18 +12,20 @@ import (
func AddResponseErrorMiddleware(stack *middleware.Stack) error { func AddResponseErrorMiddleware(stack *middleware.Stack) error {
// add error wrapper middleware before request id retriever middleware so that it can wrap the error response // add error wrapper middleware before request id retriever middleware so that it can wrap the error response
// returned by operation deserializers // returned by operation deserializers
return stack.Deserialize.Insert(&responseErrorWrapper{}, "RequestIDRetriever", middleware.Before) return stack.Deserialize.Insert(&ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
} }
type responseErrorWrapper struct { // ResponseErrorWrapper wraps operation errors with ResponseError.
type ResponseErrorWrapper struct {
} }
// ID returns the middleware identifier // ID returns the middleware identifier
func (m *responseErrorWrapper) ID() string { func (m *ResponseErrorWrapper) ID() string {
return "ResponseErrorWrapper" return "ResponseErrorWrapper"
} }
func (m *responseErrorWrapper) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( // HandleDeserialize wraps the stack error with smithyhttp.ResponseError.
func (m *ResponseErrorWrapper) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
out middleware.DeserializeOutput, metadata middleware.Metadata, err error, out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
) { ) {
out, metadata, err = next.HandleDeserialize(ctx, in) out, metadata, err = next.HandleDeserialize(ctx, in)

View File

@ -1,3 +1,11 @@
# v1.3.2 (2024-02-23)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.3.1 (2024-02-21)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.3.0 (2024-02-13) # v1.3.0 (2024-02-13)
* **Feature**: Bump minimum Go version to 1.20 per our language support policy. * **Feature**: Bump minimum Go version to 1.20 per our language support policy.

View File

@ -3,4 +3,4 @@
package configsources package configsources
// goModuleVersion is the tagged release for this module // goModuleVersion is the tagged release for this module
const goModuleVersion = "1.3.0" const goModuleVersion = "1.3.2"

View File

@ -1,3 +1,11 @@
# v2.6.2 (2024-02-23)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.6.1 (2024-02-21)
* **Dependency Update**: Updated to the latest SDK module versions
# v2.6.0 (2024-02-13) # v2.6.0 (2024-02-13)
* **Feature**: Bump minimum Go version to 1.20 per our language support policy. * **Feature**: Bump minimum Go version to 1.20 per our language support policy.

View File

@ -3,4 +3,4 @@
package endpoints package endpoints
// goModuleVersion is the tagged release for this module // goModuleVersion is the tagged release for this module
const goModuleVersion = "2.6.0" const goModuleVersion = "2.6.2"

View File

@ -1,3 +1,7 @@
# v1.11.1 (2024-02-21)
* No change notes available for this release.
# v1.11.0 (2024-02-13) # v1.11.0 (2024-02-13)
* **Feature**: Bump minimum Go version to 1.20 per our language support policy. * **Feature**: Bump minimum Go version to 1.20 per our language support policy.

View File

@ -3,4 +3,4 @@
package acceptencoding package acceptencoding
// goModuleVersion is the tagged release for this module // goModuleVersion is the tagged release for this module
const goModuleVersion = "1.11.0" const goModuleVersion = "1.11.1"

View File

@ -1,3 +1,11 @@
# v1.11.2 (2024-02-23)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.11.1 (2024-02-21)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.11.0 (2024-02-13) # v1.11.0 (2024-02-13)
* **Feature**: Bump minimum Go version to 1.20 per our language support policy. * **Feature**: Bump minimum Go version to 1.20 per our language support policy.

View File

@ -3,4 +3,4 @@
package presignedurl package presignedurl
// goModuleVersion is the tagged release for this module // goModuleVersion is the tagged release for this module
const goModuleVersion = "1.11.0" const goModuleVersion = "1.11.2"

View File

@ -1,3 +1,20 @@
# v1.28.1 (2024-02-23)
* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future.
* **Dependency Update**: Updated to the latest SDK module versions
# v1.28.0 (2024-02-22)
* **Feature**: Add middleware stack snapshot tests.
# v1.27.2 (2024-02-21)
* **Dependency Update**: Updated to the latest SDK module versions
# v1.27.1 (2024-02-20)
* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure.
# v1.27.0 (2024-02-13) # v1.27.0 (2024-02-13)
* **Feature**: Bump minimum Go version to 1.20 per our language support policy. * **Feature**: Bump minimum Go version to 1.20 per our language support policy.

View File

@ -365,17 +365,37 @@ func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
} }
func addClientUserAgent(stack *middleware.Stack, options Options) error { func addClientUserAgent(stack *middleware.Stack, options Options) error {
if err := awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sts", goModuleVersion)(stack); err != nil { ua, err := getOrAddRequestUserAgent(stack)
if err != nil {
return err return err
} }
ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sts", goModuleVersion)
if len(options.AppID) > 0 { if len(options.AppID) > 0 {
return awsmiddleware.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)(stack) ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)
} }
return nil return nil
} }
func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) {
id := (*awsmiddleware.RequestUserAgent)(nil).ID()
mw, ok := stack.Build.Get(id)
if !ok {
mw = awsmiddleware.NewRequestUserAgent()
if err := stack.Build.Add(mw, middleware.After); err != nil {
return nil, err
}
}
ua, ok := mw.(*awsmiddleware.RequestUserAgent)
if !ok {
return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id)
}
return ua, nil
}
type HTTPSignerV4 interface { type HTTPSignerV4 interface {
SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
} }
@ -394,12 +414,48 @@ func newDefaultV4Signer(o Options) *v4.Signer {
}) })
} }
func addRetryMiddlewares(stack *middleware.Stack, o Options) error { func addClientRequestID(stack *middleware.Stack) error {
mo := retry.AddRetryMiddlewaresOptions{ return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After)
Retryer: o.Retryer, }
LogRetryAttempts: o.ClientLogMode.IsRetries(),
func addComputeContentLength(stack *middleware.Stack) error {
return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
}
func addRawResponseToMetadata(stack *middleware.Stack) error {
return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
}
func addRecordResponseTiming(stack *middleware.Stack) error {
return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
}
func addStreamingEventsPayload(stack *middleware.Stack) error {
return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before)
}
func addUnsignedPayload(stack *middleware.Stack) error {
return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
}
func addComputePayloadSHA256(stack *middleware.Stack) error {
return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
}
func addContentSHA256Header(stack *middleware.Stack) error {
return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After)
}
func addRetry(stack *middleware.Stack, o Options) error {
attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
m.LogAttempts = o.ClientLogMode.IsRetries()
})
if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
return err
} }
return retry.AddRetryMiddlewares(stack, mo) if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
return err
}
return nil
} }
// resolves dual-stack endpoint configuration // resolves dual-stack endpoint configuration
@ -432,12 +488,18 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
return nil return nil
} }
func addRecursionDetection(stack *middleware.Stack) error {
return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
}
func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
} }
func addResponseErrorMiddleware(stack *middleware.Stack) error { func addResponseErrorMiddleware(stack *middleware.Stack) error {
return awshttp.AddResponseErrorMiddleware(stack) return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
} }
// HTTPPresignerV4 represents presigner interface used by presign url client // HTTPPresignerV4 represents presigner interface used by presign url client

View File

@ -349,25 +349,25 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
if err = addSetLoggerMiddleware(stack, options); err != nil { if err = addSetLoggerMiddleware(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { if err = addClientRequestID(stack); err != nil {
return err return err
} }
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { if err = addComputeContentLength(stack); err != nil {
return err return err
} }
if err = addResolveEndpointMiddleware(stack, options); err != nil { if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err return err
} }
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { if err = addComputePayloadSHA256(stack); err != nil {
return err return err
} }
if err = addRetryMiddlewares(stack, options); err != nil { if err = addRetry(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { if err = addRawResponseToMetadata(stack); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { if err = addRecordResponseTiming(stack); err != nil {
return err return err
} }
if err = addClientUserAgent(stack, options); err != nil { if err = addClientUserAgent(stack, options); err != nil {
@ -388,7 +388,7 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRole(options.Region), middleware.Before); err != nil { if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRole(options.Region), middleware.Before); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecursionDetection(stack); err != nil { if err = addRecursionDetection(stack); err != nil {
return err return err
} }
if err = addRequestIDRetrieverMiddleware(stack); err != nil { if err = addRequestIDRetrieverMiddleware(stack); err != nil {

View File

@ -298,22 +298,22 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
if err = addSetLoggerMiddleware(stack, options); err != nil { if err = addSetLoggerMiddleware(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { if err = addClientRequestID(stack); err != nil {
return err return err
} }
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { if err = addComputeContentLength(stack); err != nil {
return err return err
} }
if err = addResolveEndpointMiddleware(stack, options); err != nil { if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err return err
} }
if err = addRetryMiddlewares(stack, options); err != nil { if err = addRetry(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { if err = addRawResponseToMetadata(stack); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { if err = addRecordResponseTiming(stack); err != nil {
return err return err
} }
if err = addClientUserAgent(stack, options); err != nil { if err = addClientUserAgent(stack, options); err != nil {
@ -334,7 +334,7 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithSAML(options.Region), middleware.Before); err != nil { if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithSAML(options.Region), middleware.Before); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecursionDetection(stack); err != nil { if err = addRecursionDetection(stack); err != nil {
return err return err
} }
if err = addRequestIDRetrieverMiddleware(stack); err != nil { if err = addRequestIDRetrieverMiddleware(stack); err != nil {

View File

@ -317,22 +317,22 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
if err = addSetLoggerMiddleware(stack, options); err != nil { if err = addSetLoggerMiddleware(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { if err = addClientRequestID(stack); err != nil {
return err return err
} }
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { if err = addComputeContentLength(stack); err != nil {
return err return err
} }
if err = addResolveEndpointMiddleware(stack, options); err != nil { if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err return err
} }
if err = addRetryMiddlewares(stack, options); err != nil { if err = addRetry(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { if err = addRawResponseToMetadata(stack); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { if err = addRecordResponseTiming(stack); err != nil {
return err return err
} }
if err = addClientUserAgent(stack, options); err != nil { if err = addClientUserAgent(stack, options); err != nil {
@ -353,7 +353,7 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(options.Region), middleware.Before); err != nil { if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(options.Region), middleware.Before); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecursionDetection(stack); err != nil { if err = addRecursionDetection(stack); err != nil {
return err return err
} }
if err = addRequestIDRetrieverMiddleware(stack); err != nil { if err = addRequestIDRetrieverMiddleware(stack); err != nil {

View File

@ -6,7 +6,6 @@ import (
"context" "context"
"fmt" "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http" smithyhttp "github.com/aws/smithy-go/transport/http"
) )
@ -95,25 +94,25 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
if err = addSetLoggerMiddleware(stack, options); err != nil { if err = addSetLoggerMiddleware(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { if err = addClientRequestID(stack); err != nil {
return err return err
} }
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { if err = addComputeContentLength(stack); err != nil {
return err return err
} }
if err = addResolveEndpointMiddleware(stack, options); err != nil { if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err return err
} }
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { if err = addComputePayloadSHA256(stack); err != nil {
return err return err
} }
if err = addRetryMiddlewares(stack, options); err != nil { if err = addRetry(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { if err = addRawResponseToMetadata(stack); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { if err = addRecordResponseTiming(stack); err != nil {
return err return err
} }
if err = addClientUserAgent(stack, options); err != nil { if err = addClientUserAgent(stack, options); err != nil {
@ -134,7 +133,7 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDecodeAuthorizationMessage(options.Region), middleware.Before); err != nil { if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDecodeAuthorizationMessage(options.Region), middleware.Before); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecursionDetection(stack); err != nil { if err = addRecursionDetection(stack); err != nil {
return err return err
} }
if err = addRequestIDRetrieverMiddleware(stack); err != nil { if err = addRequestIDRetrieverMiddleware(stack); err != nil {

View File

@ -6,7 +6,6 @@ import (
"context" "context"
"fmt" "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http" smithyhttp "github.com/aws/smithy-go/transport/http"
) )
@ -88,25 +87,25 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
if err = addSetLoggerMiddleware(stack, options); err != nil { if err = addSetLoggerMiddleware(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { if err = addClientRequestID(stack); err != nil {
return err return err
} }
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { if err = addComputeContentLength(stack); err != nil {
return err return err
} }
if err = addResolveEndpointMiddleware(stack, options); err != nil { if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err return err
} }
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { if err = addComputePayloadSHA256(stack); err != nil {
return err return err
} }
if err = addRetryMiddlewares(stack, options); err != nil { if err = addRetry(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { if err = addRawResponseToMetadata(stack); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { if err = addRecordResponseTiming(stack); err != nil {
return err return err
} }
if err = addClientUserAgent(stack, options); err != nil { if err = addClientUserAgent(stack, options); err != nil {
@ -127,7 +126,7 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccessKeyInfo(options.Region), middleware.Before); err != nil { if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccessKeyInfo(options.Region), middleware.Before); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecursionDetection(stack); err != nil { if err = addRecursionDetection(stack); err != nil {
return err return err
} }
if err = addRequestIDRetrieverMiddleware(stack); err != nil { if err = addRequestIDRetrieverMiddleware(stack); err != nil {

View File

@ -83,25 +83,25 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
if err = addSetLoggerMiddleware(stack, options); err != nil { if err = addSetLoggerMiddleware(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { if err = addClientRequestID(stack); err != nil {
return err return err
} }
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { if err = addComputeContentLength(stack); err != nil {
return err return err
} }
if err = addResolveEndpointMiddleware(stack, options); err != nil { if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err return err
} }
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { if err = addComputePayloadSHA256(stack); err != nil {
return err return err
} }
if err = addRetryMiddlewares(stack, options); err != nil { if err = addRetry(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { if err = addRawResponseToMetadata(stack); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { if err = addRecordResponseTiming(stack); err != nil {
return err return err
} }
if err = addClientUserAgent(stack, options); err != nil { if err = addClientUserAgent(stack, options); err != nil {
@ -119,7 +119,7 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCallerIdentity(options.Region), middleware.Before); err != nil { if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCallerIdentity(options.Region), middleware.Before); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecursionDetection(stack); err != nil { if err = addRecursionDetection(stack); err != nil {
return err return err
} }
if err = addRequestIDRetrieverMiddleware(stack); err != nil { if err = addRequestIDRetrieverMiddleware(stack); err != nil {

View File

@ -6,7 +6,6 @@ import (
"context" "context"
"fmt" "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sts/types" "github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http" smithyhttp "github.com/aws/smithy-go/transport/http"
@ -255,25 +254,25 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
if err = addSetLoggerMiddleware(stack, options); err != nil { if err = addSetLoggerMiddleware(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { if err = addClientRequestID(stack); err != nil {
return err return err
} }
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { if err = addComputeContentLength(stack); err != nil {
return err return err
} }
if err = addResolveEndpointMiddleware(stack, options); err != nil { if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err return err
} }
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { if err = addComputePayloadSHA256(stack); err != nil {
return err return err
} }
if err = addRetryMiddlewares(stack, options); err != nil { if err = addRetry(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { if err = addRawResponseToMetadata(stack); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { if err = addRecordResponseTiming(stack); err != nil {
return err return err
} }
if err = addClientUserAgent(stack, options); err != nil { if err = addClientUserAgent(stack, options); err != nil {
@ -294,7 +293,7 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFederationToken(options.Region), middleware.Before); err != nil { if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFederationToken(options.Region), middleware.Before); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecursionDetection(stack); err != nil { if err = addRecursionDetection(stack); err != nil {
return err return err
} }
if err = addRequestIDRetrieverMiddleware(stack); err != nil { if err = addRequestIDRetrieverMiddleware(stack); err != nil {

View File

@ -6,7 +6,6 @@ import (
"context" "context"
"fmt" "fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/sts/types" "github.com/aws/aws-sdk-go-v2/service/sts/types"
"github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http" smithyhttp "github.com/aws/smithy-go/transport/http"
@ -141,25 +140,25 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
if err = addSetLoggerMiddleware(stack, options); err != nil { if err = addSetLoggerMiddleware(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { if err = addClientRequestID(stack); err != nil {
return err return err
} }
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { if err = addComputeContentLength(stack); err != nil {
return err return err
} }
if err = addResolveEndpointMiddleware(stack, options); err != nil { if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err return err
} }
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { if err = addComputePayloadSHA256(stack); err != nil {
return err return err
} }
if err = addRetryMiddlewares(stack, options); err != nil { if err = addRetry(stack, options); err != nil {
return err return err
} }
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { if err = addRawResponseToMetadata(stack); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { if err = addRecordResponseTiming(stack); err != nil {
return err return err
} }
if err = addClientUserAgent(stack, options); err != nil { if err = addClientUserAgent(stack, options); err != nil {
@ -177,7 +176,7 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack,
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSessionToken(options.Region), middleware.Before); err != nil { if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSessionToken(options.Region), middleware.Before); err != nil {
return err return err
} }
if err = awsmiddleware.AddRecursionDetection(stack); err != nil { if err = addRecursionDetection(stack); err != nil {
return err return err
} }
if err = addRequestIDRetrieverMiddleware(stack); err != nil { if err = addRequestIDRetrieverMiddleware(stack); err != nil {

View File

@ -217,6 +217,13 @@ func resolveBaseEndpoint(cfg aws.Config, o *Options) {
} }
} }
func bindRegion(region string) *string {
if region == "" {
return nil
}
return aws.String(endpoints.MapFIPSRegion(region))
}
// EndpointParameters provides the parameters that influence how endpoints are // EndpointParameters provides the parameters that influence how endpoints are
// resolved. // resolved.
type EndpointParameters struct { type EndpointParameters struct {
@ -1041,7 +1048,7 @@ type endpointParamsBinder interface {
func bindEndpointParams(input interface{}, options Options) *EndpointParameters { func bindEndpointParams(input interface{}, options Options) *EndpointParameters {
params := &EndpointParameters{} params := &EndpointParameters{}
params.Region = aws.String(endpoints.MapFIPSRegion(options.Region)) params.Region = bindRegion(options.Region)
params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled)
params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled)
params.Endpoint = options.BaseEndpoint params.Endpoint = options.BaseEndpoint

View File

@ -31,6 +31,7 @@
"options.go", "options.go",
"protocol_test.go", "protocol_test.go",
"serializers.go", "serializers.go",
"snapshot_test.go",
"types/errors.go", "types/errors.go",
"types/types.go", "types/types.go",
"validators.go" "validators.go"

View File

@ -3,4 +3,4 @@
package sts package sts
// goModuleVersion is the tagged release for this module // goModuleVersion is the tagged release for this module
const goModuleVersion = "1.27.0" const goModuleVersion = "1.28.1"

View File

@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go" const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK // SDKVersion is the version of this SDK
const SDKVersion = "1.50.21" const SDKVersion = "1.50.26"

View File

@ -1,3 +1,9 @@
# Release (2024-02-21)
## Module Highlights
* `github.com/aws/smithy-go`: v1.20.1
* **Bug Fix**: Remove runtime dependency on go-cmp.
# Release (2024-02-13) # Release (2024-02-13)
## Module Highlights ## Module Highlights

View File

@ -3,4 +3,4 @@
package smithy package smithy
// goModuleVersion is the tagged release for this module // goModuleVersion is the tagged release for this module
const goModuleVersion = "1.20.0" const goModuleVersion = "1.20.1"

View File

@ -1,5 +1,4 @@
[dependencies] [dependencies]
"github.com/google/go-cmp" = "v0.5.8"
"github.com/jmespath/go-jmespath" = "v0.4.0" "github.com/jmespath/go-jmespath" = "v0.4.0"
[modules] [modules]

16
vendor/modules.txt vendored
View File

@ -17,7 +17,7 @@ github.com/antlr/antlr4/runtime/Go/antlr/v4
# github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a # github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a
## explicit ## explicit
github.com/asaskevich/govalidator github.com/asaskevich/govalidator
# github.com/aws/aws-sdk-go v1.50.21 # github.com/aws/aws-sdk-go v1.50.26
## explicit; go 1.19 ## explicit; go 1.19
github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws
github.com/aws/aws-sdk-go/aws/auth/bearer github.com/aws/aws-sdk-go/aws/auth/bearer
@ -62,7 +62,7 @@ github.com/aws/aws-sdk-go/service/sso/ssoiface
github.com/aws/aws-sdk-go/service/ssooidc github.com/aws/aws-sdk-go/service/ssooidc
github.com/aws/aws-sdk-go/service/sts github.com/aws/aws-sdk-go/service/sts
github.com/aws/aws-sdk-go/service/sts/stsiface github.com/aws/aws-sdk-go/service/sts/stsiface
# github.com/aws/aws-sdk-go-v2 v1.25.0 # github.com/aws/aws-sdk-go-v2 v1.25.2
## explicit; go 1.20 ## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws
github.com/aws/aws-sdk-go-v2/aws/defaults github.com/aws/aws-sdk-go-v2/aws/defaults
@ -84,24 +84,24 @@ github.com/aws/aws-sdk-go-v2/internal/sdk
github.com/aws/aws-sdk-go-v2/internal/strings github.com/aws/aws-sdk-go-v2/internal/strings
github.com/aws/aws-sdk-go-v2/internal/sync/singleflight github.com/aws/aws-sdk-go-v2/internal/sync/singleflight
github.com/aws/aws-sdk-go-v2/internal/timeconv github.com/aws/aws-sdk-go-v2/internal/timeconv
# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.0 # github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2
## explicit; go 1.20 ## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/internal/configsources github.com/aws/aws-sdk-go-v2/internal/configsources
# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.0 # github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2
## explicit; go 1.20 ## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2
# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.0 # github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1
## explicit; go 1.20 ## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding
# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.0 # github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2
## explicit; go 1.20 ## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url github.com/aws/aws-sdk-go-v2/service/internal/presigned-url
# github.com/aws/aws-sdk-go-v2/service/sts v1.27.0 # github.com/aws/aws-sdk-go-v2/service/sts v1.28.1
## explicit; go 1.20 ## explicit; go 1.20
github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts
github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/sts/types github.com/aws/aws-sdk-go-v2/service/sts/types
# github.com/aws/smithy-go v1.20.0 # github.com/aws/smithy-go v1.20.1
## explicit; go 1.20 ## explicit; go 1.20
github.com/aws/smithy-go github.com/aws/smithy-go
github.com/aws/smithy-go/auth github.com/aws/smithy-go/auth