diff --git a/src/s3-blobstore-backup-restore/go.mod b/src/s3-blobstore-backup-restore/go.mod index 353c5812e..45d93997c 100644 --- a/src/s3-blobstore-backup-restore/go.mod +++ b/src/s3-blobstore-backup-restore/go.mod @@ -3,10 +3,10 @@ module s3-blobstore-backup-restore go 1.22.4 require ( - github.com/aws/aws-sdk-go-v2 v1.27.2 - github.com/aws/aws-sdk-go-v2/credentials v1.17.18 - github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 - github.com/aws/aws-sdk-go-v2/service/sts v1.28.12 + github.com/aws/aws-sdk-go-v2 v1.28.0 + github.com/aws/aws-sdk-go-v2/credentials v1.17.19 + github.com/aws/aws-sdk-go-v2/service/s3 v1.55.2 + github.com/aws/aws-sdk-go-v2/service/sts v1.28.13 github.com/cloudfoundry-incubator/bosh-backup-and-restore v1.9.65 github.com/maxbrunsfeld/counterfeiter/v6 v6.8.1 github.com/onsi/ginkgo/v2 v2.19.0 @@ -15,14 +15,14 @@ require ( require ( github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.6 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.10 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.10 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.10 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.12 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.12 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.10 // indirect github.com/aws/smithy-go v1.20.2 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect diff --git a/src/s3-blobstore-backup-restore/go.sum b/src/s3-blobstore-backup-restore/go.sum index e93103830..9c96bd3ca 100644 --- a/src/s3-blobstore-backup-restore/go.sum +++ b/src/s3-blobstore-backup-restore/go.sum @@ -1,29 +1,29 @@ -github.com/aws/aws-sdk-go-v2 v1.27.2 h1:pLsTXqX93rimAOZG2FIYraDQstZaaGVVN4tNw65v0h8= -github.com/aws/aws-sdk-go-v2 v1.27.2/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2 v1.28.0 h1:ne6ftNhY0lUvlazMUQF15FF6NH80wKmPRFG7g2q6TCw= +github.com/aws/aws-sdk-go-v2 v1.28.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= -github.com/aws/aws-sdk-go-v2/credentials v1.17.18 h1:D/ALDWqK4JdY3OFgA2thcPO1c9aYTT5STS/CvnkqY1c= -github.com/aws/aws-sdk-go-v2/credentials v1.17.18/go.mod h1:JuitCWq+F5QGUrmMPsk945rop6bB57jdscu+Glozdnc= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5 h1:dDgptDO9dxeFkXy+tEgVkzSClHZje/6JkPW5aZyEvrQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5/go.mod h1:gjvE2KBUgUQhcv89jqxrIxH9GaKs1JbZzWejj/DaHGA= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9 h1:cy8ahBJuhtM8GTTSyOkfy6WVPV1IE+SS5/wfXUYuulw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9/go.mod h1:CZBXGLaJnEZI6EVNcPd7a6B5IC5cA/GkRWtu9fp3S6Y= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9 h1:A4SYk07ef04+vxZToz9LWvAXl9LW0NClpPpMsi31cz0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9/go.mod h1:5jJcHuwDagxN+ErjQ3PU3ocf6Ylc/p9x+BLO/+X4iXw= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9 h1:vHyZxoLVOgrI8GqX7OMHLXp4YYoxeEsrjweXKpye+ds= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9/go.mod h1:z9VXZsWA2BvZNH1dT0ToUYwMu/CR9Skkj/TBX+mceZw= +github.com/aws/aws-sdk-go-v2/credentials v1.17.19 h1:R18G7nBBGLby51CFEqUBFF2IVl7LUdCtYj6iosUwh/0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.19/go.mod h1:xr9kUMnaLTB866HItT6pg58JgiBP77fSQLBwIa//zk8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.6 h1:vVOuhRyslJ6T/HteG71ZWCTas1q2w6f0NKsNbkXHs/A= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.6/go.mod h1:jimWaqLiT0sJGLh51dKCLLtExRYPtMU7MpxuCgtbkxg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.10 h1:LZIUb8sQG2cb89QaVFtMSnER10gyKkqU1k3hP3g9das= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.10/go.mod h1:BRIqay//vnIOCZjoXWSLffL2uzbtxEmnSlfbvVh7Z/4= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.10 h1:HY7CXLA0GiQUo3WYxOP7WYkLcwvRX4cLPf5joUcrQGk= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.10/go.mod h1:kfRBSxRa+I+VyON7el3wLZdrO91oxUxEwdAaWgFqN90= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.10 h1:KPPEosyvs2q6sGbRj/LIGMpqPStDZKtEy/CEbBl+tps= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.10/go.mod h1:6pZBDPNlCwrpj79TpGfjgaliXrC3lvoFGMCg7Rtc7p8= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11 h1:4vt9Sspk59EZyHCAEMaktHKiq0C09noRTQorXD/qV+s= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11/go.mod h1:5jHR79Tv+Ccq6rwYh+W7Nptmw++WiFafMfR42XhwNl8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 h1:o4T+fKxA3gTMcluBNZZXE9DNaMkJuUL1O3mffCUjoJo= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11/go.mod h1:84oZdJ+VjuJKs9v1UTC9NaodRZRseOXCTgku+vQJWR8= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 h1:TE2i0A9ErH1YfRSvXfCr2SQwfnqsoJT9nPQ9kj0lkxM= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9/go.mod h1:9TzXX3MehQNGPwCZ3ka4CpwQsoAMWSF48/b+De9rfVM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 h1:UAxBuh0/8sFJk1qOkvOKewP5sWeWaTPDknbQz0ZkDm0= -github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1/go.mod h1:hWjsYGjVuqCgfoveVcVFPXIWgz0aByzwaxKlN1StKcM= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.12 h1:M/1u4HBpwLuMtjlxuI2y6HoVLzF5e2mfxHCg7ZVMYmk= -github.com/aws/aws-sdk-go-v2/service/sts v1.28.12/go.mod h1:kcfd+eTdEi/40FIbLq4Hif3XMXnl5b/+t/KTfLt9xIk= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.12 h1:77ORAasgQRiNRi1du4UVmttQg2Wf41WSe7TvpmpmDg0= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.12/go.mod h1:PsApornkaurUc1DIGUdiBzC19GfF1fy2ZH93O2JWigc= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.12 h1:kO2J7WMroF/OTHN9WTcUtMjPhJ7ZoNxx0dwv6UCXQgY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.12/go.mod h1:mrNxrjYvXaSjZe5fkKaWgDnOQ6BExLn/7Ru9OpRsMPY= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.10 h1:1Hmy47QP13NjScoCMOr9kJo/hqKqf+tskyGpxVgNBxU= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.10/go.mod h1:8jZvhEt+MemeoHm9P4WFk/AVfIa9sCWL80OAKNDNTCM= +github.com/aws/aws-sdk-go-v2/service/s3 v1.55.2 h1:9UkFXpS7uU7ipUlj2sSkLtIo3Sa+LtbnObBJdx8yjd0= +github.com/aws/aws-sdk-go-v2/service/s3 v1.55.2/go.mod h1:Cijxa/K9vFQ9RPd16rq3cE+0Sg5hvmpEkTo+LThg43E= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.13 h1:TSzmuUeruVJ4XWYp3bYzKCXue70ECpJWmbP3UfEvhYY= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.13/go.mod h1:FppRtFjBA9mSWTj2cIAWCP66+bbBPMuPpBfWRXC5Yi0= github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/cloudfoundry-incubator/bosh-backup-and-restore v1.9.65 h1:Y6G7ZIVuY+EHEDQmL9i2q3QL4/6p5EIWa7D6ayc0Cnw= diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go new file mode 100644 index 000000000..6504a2186 --- /dev/null +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go @@ -0,0 +1,18 @@ +package aws + +// AccountIDEndpointMode controls how a resolved AWS account ID is handled for endpoint routing. +type AccountIDEndpointMode string + +const ( + // AccountIDEndpointModeUnset indicates the AWS account ID will not be used for endpoint routing + AccountIDEndpointModeUnset AccountIDEndpointMode = "" + + // AccountIDEndpointModePreferred indicates the AWS account ID will be used for endpoint routing if present + AccountIDEndpointModePreferred = "preferred" + + // AccountIDEndpointModeRequired indicates an error will be returned if the AWS account ID is not resolved from identity + AccountIDEndpointModeRequired = "required" + + // AccountIDEndpointModeDisabled indicates the AWS account ID will be ignored during endpoint routing + AccountIDEndpointModeDisabled = "disabled" +) diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go index 2264200c1..16000d792 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go @@ -162,6 +162,9 @@ type Config struct { // This variable is sourced from environment variable AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES or // the shared config profile attribute request_min_compression_size_bytes RequestMinCompressSizeBytes int64 + + // Controls how a resolved AWS account ID is handled for endpoint routing. + AccountIDEndpointMode AccountIDEndpointMode } // NewConfig returns a new Config pointer that can be chained with builder diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go index 714d4ad85..98ba77056 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go @@ -90,6 +90,9 @@ type Credentials struct { // The time the credentials will expire at. Should be ignored if CanExpire // is false. Expires time.Time + + // The ID of the account for the credentials. + AccountID string } // Expired returns if the credentials have expired. diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index a62b33dde..e707e8aea 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.27.2" +const goModuleVersion = "1.28.0" diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index c809fc490..0ad412a10 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.17.19 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.17.18 (2024-06-07) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index a7b069966..279ac4c81 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.18" +const goModuleVersion = "1.17.19" diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go index 289707b6d..4c7f7993f 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go @@ -308,6 +308,11 @@ func (p *AssumeRoleProvider) Retrieve(ctx context.Context) (aws.Credentials, err return aws.Credentials{Source: ProviderName}, err } + var accountID string + if resp.AssumedRoleUser != nil { + accountID = getAccountID(resp.AssumedRoleUser) + } + return aws.Credentials{ AccessKeyID: *resp.Credentials.AccessKeyId, SecretAccessKey: *resp.Credentials.SecretAccessKey, @@ -316,5 +321,6 @@ func (p *AssumeRoleProvider) Retrieve(ctx context.Context) (aws.Credentials, err CanExpire: true, Expires: *resp.Credentials.Expiration, + AccountID: accountID, }, nil } diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go index ddaf6df6c..b4b719708 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go @@ -5,6 +5,7 @@ import ( "fmt" "io/ioutil" "strconv" + "strings" "time" "github.com/aws/aws-sdk-go-v2/aws" @@ -135,6 +136,11 @@ func (p *WebIdentityRoleProvider) Retrieve(ctx context.Context) (aws.Credentials return aws.Credentials{}, fmt.Errorf("failed to retrieve credentials, %w", err) } + var accountID string + if resp.AssumedRoleUser != nil { + accountID = getAccountID(resp.AssumedRoleUser) + } + // InvalidIdentityToken error is a temporary error that can occur // when assuming an Role with a JWT web identity token. @@ -145,6 +151,19 @@ func (p *WebIdentityRoleProvider) Retrieve(ctx context.Context) (aws.Credentials Source: WebIdentityProviderName, CanExpire: true, Expires: *resp.Credentials.Expiration, + AccountID: accountID, } return value, nil } + +// extract accountID from arn with format "arn:partition:service:region:account-id:[resource-section]" +func getAccountID(u *types.AssumedRoleUser) string { + if u.Arn == nil { + return "" + } + parts := strings.Split(*u.Arn, ":") + if len(parts) < 5 { + return "" + } + return parts[4] +} diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md index 59b18c59f..e0f4bbc8a 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.16.6 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.16.5 (2024-06-07) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go index 53bf07399..b88b44ffe 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go @@ -3,4 +3,4 @@ package imds // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.16.5" +const goModuleVersion = "1.16.6" diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index e9cbca3c8..2073e9a5c 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.3.10 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.3.9 (2024-06-07) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 4147405a9..46d997c58 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.3.9" +const goModuleVersion = "1.3.10" diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index 8b9ffa0b2..ba4dd8ba7 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,7 @@ +# v2.6.10 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v2.6.9 (2024-06-07) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 7d3ecf1b7..fe4a42a08 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.6.9" +const goModuleVersion = "2.6.10" diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md index a8abe66f5..6968d4ae3 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.3.10 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.3.9 (2024-06-07) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go index 042146b5d..ec22f8e8b 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/internal/v4a/go_module_metadata.go @@ -3,4 +3,4 @@ package v4a // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.3.9" +const goModuleVersion = "1.3.10" diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md index 1f1119643..952e7b3c6 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.3.12 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.3.11 (2024-06-07) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go index 32a5bc388..accb26832 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/checksum/go_module_metadata.go @@ -3,4 +3,4 @@ package checksum // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.3.11" +const goModuleVersion = "1.3.12" diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md index 14bb43611..4debd2fc3 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.11.12 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.11.11 (2024-06-07) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go index c1a5e0da1..498849c31 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go @@ -3,4 +3,4 @@ package presignedurl // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.11" +const goModuleVersion = "1.11.12" diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md index a2575c118..11e9e817a 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.17.10 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.17.9 (2024-06-07) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go index d93861f19..e816c6573 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/internal/s3shared/go_module_metadata.go @@ -3,4 +3,4 @@ package s3shared // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.9" +const goModuleVersion = "1.17.10" diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md index c6c9e9ed7..9b94e1eef 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.55.2 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.55.1 (2024-06-07) * **Bug Fix**: Add clock skew correction on all service clients diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go index b3cdd690e..27e934991 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/api_client.go @@ -23,6 +23,7 @@ import ( s3sharedconfig "github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config" s3cust "github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations" smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" @@ -266,15 +267,16 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AccountIDEndpointMode: cfg.AccountIDEndpointMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -555,6 +557,18 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + type httpSignerV4a interface { SignHTTP(ctx context.Context, credentials v4a.Credentials, r *http.Request, payloadHash, service string, regionSet []string, signingTime time.Time, @@ -586,6 +600,25 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } +func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { + switch mode { + case aws.AccountIDEndpointModeUnset: + case aws.AccountIDEndpointModePreferred: + case aws.AccountIDEndpointModeDisabled: + case aws.AccountIDEndpointModeRequired: + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { + return fmt.Errorf("accountID is required but not set") + } else if ca.Credentials.AccountID == "" { + return fmt.Errorf("accountID is required but not set") + } + // default check in case invalid mode is configured through request config + default: + return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) + } + + return nil +} + func addMetadataRetrieverMiddleware(stack *middleware.Stack) error { return s3shared.AddMetadataRetrieverMiddleware(stack) } diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/auth.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/auth.go index 6ef631bd3..3a7bc64af 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/auth.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/auth.go @@ -12,12 +12,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { params.Region = options.Region } -func bindAuthEndpointParams(params *AuthResolverParameters, input interface{}, options Options) { - params.endpointParams = bindEndpointParams(input, options) +func bindAuthEndpointParams(ctx context.Context, params *AuthResolverParameters, input interface{}, options Options) { + params.endpointParams = bindEndpointParams(ctx, input, options) } type setLegacyContextSigningOptionsMiddleware struct { @@ -98,13 +98,13 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { params := &AuthResolverParameters{ Operation: operation, } - bindAuthEndpointParams(params, input, options) - bindAuthParamsRegion(params, input, options) + bindAuthEndpointParams(ctx, params, input, options) + bindAuthParamsRegion(ctx, params, input, options) return params } @@ -179,7 +179,7 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options) + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go index 39f416bcf..a938fec78 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/endpoints.go @@ -5757,7 +5757,7 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { params := &EndpointParameters{} params.Region = bindRegion(options.Region) @@ -5793,6 +5793,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return next.HandleFinalize(ctx, in) } + if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { + return out, metadata, fmt.Errorf("invalid accountID set: %w", err) + } + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -5802,7 +5806,7 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(getOperationInput(ctx), m.options) + params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go index 7dd7ac0de..dbf0a0645 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/go_module_metadata.go @@ -3,4 +3,4 @@ package s3 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.55.1" +const goModuleVersion = "1.55.2" diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go index c5ab084d1..d22a058f1 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/s3/options.go @@ -27,6 +27,9 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error + // Indicates how aws account ID is applied in endpoint2.0 routing + AccountIDEndpointMode aws.AccountIDEndpointMode + // The optional application specific identifier appended to the User-Agent header. AppID string diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index e43842793..113a56582 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.28.13 (2024-06-17) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.28.12 (2024-06-07) * **Bug Fix**: Add clock skew correction on all service clients diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go index b281ba293..25e652330 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go @@ -19,6 +19,7 @@ import ( acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding" presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url" smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" @@ -240,15 +241,16 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + AccountIDEndpointMode: cfg.AccountIDEndpointMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -495,6 +497,18 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} if err := stack.Build.Add(&mw, middleware.After); err != nil { @@ -506,6 +520,25 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } +func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { + switch mode { + case aws.AccountIDEndpointModeUnset: + case aws.AccountIDEndpointModePreferred: + case aws.AccountIDEndpointModeDisabled: + case aws.AccountIDEndpointModeRequired: + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { + return fmt.Errorf("accountID is required but not set") + } else if ca.Credentials.AccountID == "" { + return fmt.Errorf("accountID is required but not set") + } + // default check in case invalid mode is configured through request config + default: + return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) + } + + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go index 9db5bfd43..e842a7f7e 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { params.Region = options.Region } @@ -90,12 +90,12 @@ type AuthResolverParameters struct { Region string } -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { params := &AuthResolverParameters{ Operation: operation, } - bindAuthParamsRegion(params, input, options) + bindAuthParamsRegion(ctx, params, input, options) return params } @@ -157,7 +157,7 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options) + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go index 32e2d5435..c99982cb5 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go @@ -1045,7 +1045,7 @@ type endpointParamsBinder interface { bindEndpointParams(*EndpointParameters) } -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { params := &EndpointParameters{} params.Region = bindRegion(options.Region) @@ -1075,6 +1075,10 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return next.HandleFinalize(ctx, in) } + if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { + return out, metadata, fmt.Errorf("invalid accountID set: %w", err) + } + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -1084,7 +1088,7 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } - params := bindEndpointParams(getOperationInput(ctx), m.options) + params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index acc380e98..967080904 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go @@ -3,4 +3,4 @@ package sts // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.28.12" +const goModuleVersion = "1.28.13" diff --git a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go index bb291161a..a9a35881a 100644 --- a/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go +++ b/src/s3-blobstore-backup-restore/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go @@ -24,6 +24,9 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error + // Indicates how aws account ID is applied in endpoint2.0 routing + AccountIDEndpointMode aws.AccountIDEndpointMode + // The optional application specific identifier appended to the User-Agent header. AppID string diff --git a/src/s3-blobstore-backup-restore/vendor/modules.txt b/src/s3-blobstore-backup-restore/vendor/modules.txt index 628860a49..a471efad3 100644 --- a/src/s3-blobstore-backup-restore/vendor/modules.txt +++ b/src/s3-blobstore-backup-restore/vendor/modules.txt @@ -1,4 +1,4 @@ -# github.com/aws/aws-sdk-go-v2 v1.27.2 +# github.com/aws/aws-sdk-go-v2 v1.28.0 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/arn @@ -27,22 +27,22 @@ github.com/aws/aws-sdk-go-v2/internal/timeconv ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream/eventstreamapi -# github.com/aws/aws-sdk-go-v2/credentials v1.17.18 +# github.com/aws/aws-sdk-go-v2/credentials v1.17.19 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds github.com/aws/aws-sdk-go-v2/credentials/stscreds -# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.5 +# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.6 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.9 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.10 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.9 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.10 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 -# github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.9 +# github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.10 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/internal/v4a github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto @@ -50,25 +50,25 @@ github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4 # github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding -# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.11 +# github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.12 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/service/internal/checksum -# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.11 +# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.12 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url -# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.9 +# github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.10 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/service/internal/s3shared github.com/aws/aws-sdk-go-v2/service/internal/s3shared/arn github.com/aws/aws-sdk-go-v2/service/internal/s3shared/config -# github.com/aws/aws-sdk-go-v2/service/s3 v1.55.1 +# github.com/aws/aws-sdk-go-v2/service/s3 v1.55.2 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/service/s3 github.com/aws/aws-sdk-go-v2/service/s3/internal/arn github.com/aws/aws-sdk-go-v2/service/s3/internal/customizations github.com/aws/aws-sdk-go-v2/service/s3/internal/endpoints github.com/aws/aws-sdk-go-v2/service/s3/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.28.12 +# github.com/aws/aws-sdk-go-v2/service/sts v1.28.13 ## explicit; go 1.20 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints