mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: bump the github-dependencies group with 3 updates
Bumps the github-dependencies group with 3 updates: [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go), [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) and [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo). Updates `github.com/aws/aws-sdk-go` from 1.48.5 to 1.48.12 - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.48.5...v1.48.12) Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.25.4 to 1.26.2 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.25.4...service/s3/v1.26.2) Updates `github.com/onsi/ginkgo/v2` from 2.13.1 to 2.13.2 - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.13.1...v2.13.2) --- 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 - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
a57953313a
commit
d68769f39d
2
vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package aws
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.23.1"
|
||||
const goModuleVersion = "1.23.5"
|
||||
|
319
vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go
generated
vendored
Normal file
319
vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go
generated
vendored
Normal file
@ -0,0 +1,319 @@
|
||||
// Package metrics implements metrics gathering for SDK development purposes.
|
||||
//
|
||||
// This package is designated as private and is intended for use only by the
|
||||
// AWS client runtime. The exported API therein is not considered stable and
|
||||
// is subject to breaking changes without notice.
|
||||
package metrics
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
const (
|
||||
// ServiceIDKey is the key for the service ID metric.
|
||||
ServiceIDKey = "ServiceId"
|
||||
// OperationNameKey is the key for the operation name metric.
|
||||
OperationNameKey = "OperationName"
|
||||
// ClientRequestIDKey is the key for the client request ID metric.
|
||||
ClientRequestIDKey = "ClientRequestId"
|
||||
// APICallDurationKey is the key for the API call duration metric.
|
||||
APICallDurationKey = "ApiCallDuration"
|
||||
// APICallSuccessfulKey is the key for the API call successful metric.
|
||||
APICallSuccessfulKey = "ApiCallSuccessful"
|
||||
// MarshallingDurationKey is the key for the marshalling duration metric.
|
||||
MarshallingDurationKey = "MarshallingDuration"
|
||||
// InThroughputKey is the key for the input throughput metric.
|
||||
InThroughputKey = "InThroughput"
|
||||
// OutThroughputKey is the key for the output throughput metric.
|
||||
OutThroughputKey = "OutThroughput"
|
||||
// RetryCountKey is the key for the retry count metric.
|
||||
RetryCountKey = "RetryCount"
|
||||
// HTTPStatusCodeKey is the key for the HTTP status code metric.
|
||||
HTTPStatusCodeKey = "HttpStatusCode"
|
||||
// AWSExtendedRequestIDKey is the key for the AWS extended request ID metric.
|
||||
AWSExtendedRequestIDKey = "AwsExtendedRequestId"
|
||||
// AWSRequestIDKey is the key for the AWS request ID metric.
|
||||
AWSRequestIDKey = "AwsRequestId"
|
||||
// BackoffDelayDurationKey is the key for the backoff delay duration metric.
|
||||
BackoffDelayDurationKey = "BackoffDelayDuration"
|
||||
// StreamThroughputKey is the key for the stream throughput metric.
|
||||
StreamThroughputKey = "Throughput"
|
||||
// ConcurrencyAcquireDurationKey is the key for the concurrency acquire duration metric.
|
||||
ConcurrencyAcquireDurationKey = "ConcurrencyAcquireDuration"
|
||||
// PendingConcurrencyAcquiresKey is the key for the pending concurrency acquires metric.
|
||||
PendingConcurrencyAcquiresKey = "PendingConcurrencyAcquires"
|
||||
// SigningDurationKey is the key for the signing duration metric.
|
||||
SigningDurationKey = "SigningDuration"
|
||||
// UnmarshallingDurationKey is the key for the unmarshalling duration metric.
|
||||
UnmarshallingDurationKey = "UnmarshallingDuration"
|
||||
// TimeToFirstByteKey is the key for the time to first byte metric.
|
||||
TimeToFirstByteKey = "TimeToFirstByte"
|
||||
// ServiceCallDurationKey is the key for the service call duration metric.
|
||||
ServiceCallDurationKey = "ServiceCallDuration"
|
||||
// EndpointResolutionDurationKey is the key for the endpoint resolution duration metric.
|
||||
EndpointResolutionDurationKey = "EndpointResolutionDuration"
|
||||
// AttemptNumberKey is the key for the attempt number metric.
|
||||
AttemptNumberKey = "AttemptNumber"
|
||||
// MaxConcurrencyKey is the key for the max concurrency metric.
|
||||
MaxConcurrencyKey = "MaxConcurrency"
|
||||
// AvailableConcurrencyKey is the key for the available concurrency metric.
|
||||
AvailableConcurrencyKey = "AvailableConcurrency"
|
||||
)
|
||||
|
||||
// MetricPublisher provides the interface to provide custom MetricPublishers.
|
||||
// PostRequestMetrics will be invoked by the MetricCollection middleware to post request.
|
||||
// PostStreamMetrics will be invoked by ReadCloserWithMetrics to post stream metrics.
|
||||
type MetricPublisher interface {
|
||||
PostRequestMetrics(*MetricData) error
|
||||
PostStreamMetrics(*MetricData) error
|
||||
}
|
||||
|
||||
// Serializer provides the interface to provide custom Serializers.
|
||||
// Serialize will transform any input object in its corresponding string representation.
|
||||
type Serializer interface {
|
||||
Serialize(obj interface{}) (string, error)
|
||||
}
|
||||
|
||||
// DefaultSerializer is an implementation of the Serializer interface.
|
||||
type DefaultSerializer struct{}
|
||||
|
||||
// Serialize uses the default JSON serializer to obtain the string representation of an object.
|
||||
func (DefaultSerializer) Serialize(obj interface{}) (string, error) {
|
||||
bytes, err := json.Marshal(obj)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(bytes), nil
|
||||
}
|
||||
|
||||
type metricContextKey struct{}
|
||||
|
||||
// MetricContext contains fields to store metric-related information.
|
||||
type MetricContext struct {
|
||||
connectionCounter *SharedConnectionCounter
|
||||
publisher MetricPublisher
|
||||
data *MetricData
|
||||
}
|
||||
|
||||
// MetricData stores the collected metric data.
|
||||
type MetricData struct {
|
||||
RequestStartTime time.Time
|
||||
RequestEndTime time.Time
|
||||
APICallDuration time.Duration
|
||||
SerializeStartTime time.Time
|
||||
SerializeEndTime time.Time
|
||||
MarshallingDuration time.Duration
|
||||
ResolveEndpointStartTime time.Time
|
||||
ResolveEndpointEndTime time.Time
|
||||
EndpointResolutionDuration time.Duration
|
||||
InThroughput float64
|
||||
OutThroughput float64
|
||||
RetryCount int
|
||||
Success uint8
|
||||
StatusCode int
|
||||
ClientRequestID string
|
||||
ServiceID string
|
||||
OperationName string
|
||||
PartitionID string
|
||||
Region string
|
||||
RequestContentLength int64
|
||||
Stream StreamMetrics
|
||||
Attempts []AttemptMetrics
|
||||
}
|
||||
|
||||
// StreamMetrics stores metrics related to streaming data.
|
||||
type StreamMetrics struct {
|
||||
ReadDuration time.Duration
|
||||
ReadBytes int64
|
||||
Throughput float64
|
||||
}
|
||||
|
||||
// AttemptMetrics stores metrics related to individual attempts.
|
||||
type AttemptMetrics struct {
|
||||
ServiceCallStart time.Time
|
||||
ServiceCallEnd time.Time
|
||||
ServiceCallDuration time.Duration
|
||||
FirstByteTime time.Time
|
||||
TimeToFirstByte time.Duration
|
||||
ConnRequestedTime time.Time
|
||||
ConnObtainedTime time.Time
|
||||
ConcurrencyAcquireDuration time.Duration
|
||||
CredentialFetchStartTime time.Time
|
||||
CredentialFetchEndTime time.Time
|
||||
SignStartTime time.Time
|
||||
SignEndTime time.Time
|
||||
SigningDuration time.Duration
|
||||
DeserializeStartTime time.Time
|
||||
DeserializeEndTime time.Time
|
||||
UnMarshallingDuration time.Duration
|
||||
RetryDelay time.Duration
|
||||
ResponseContentLength int64
|
||||
StatusCode int
|
||||
RequestID string
|
||||
ExtendedRequestID string
|
||||
HTTPClient string
|
||||
MaxConcurrency int
|
||||
PendingConnectionAcquires int
|
||||
AvailableConcurrency int
|
||||
ActiveRequests int
|
||||
ReusedConnection bool
|
||||
}
|
||||
|
||||
// Data returns the MetricData associated with the MetricContext.
|
||||
func (mc *MetricContext) Data() *MetricData {
|
||||
return mc.data
|
||||
}
|
||||
|
||||
// ConnectionCounter returns the SharedConnectionCounter associated with the MetricContext.
|
||||
func (mc *MetricContext) ConnectionCounter() *SharedConnectionCounter {
|
||||
return mc.connectionCounter
|
||||
}
|
||||
|
||||
// Publisher returns the MetricPublisher associated with the MetricContext.
|
||||
func (mc *MetricContext) Publisher() MetricPublisher {
|
||||
return mc.publisher
|
||||
}
|
||||
|
||||
// ComputeRequestMetrics calculates and populates derived metrics based on the collected data.
|
||||
func (md *MetricData) ComputeRequestMetrics() {
|
||||
|
||||
for idx := range md.Attempts {
|
||||
attempt := &md.Attempts[idx]
|
||||
attempt.ConcurrencyAcquireDuration = attempt.ConnObtainedTime.Sub(attempt.ConnRequestedTime)
|
||||
attempt.SigningDuration = attempt.SignEndTime.Sub(attempt.SignStartTime)
|
||||
attempt.UnMarshallingDuration = attempt.DeserializeEndTime.Sub(attempt.DeserializeStartTime)
|
||||
attempt.TimeToFirstByte = attempt.FirstByteTime.Sub(attempt.ServiceCallStart)
|
||||
attempt.ServiceCallDuration = attempt.ServiceCallEnd.Sub(attempt.ServiceCallStart)
|
||||
}
|
||||
|
||||
md.APICallDuration = md.RequestEndTime.Sub(md.RequestStartTime)
|
||||
md.MarshallingDuration = md.SerializeEndTime.Sub(md.SerializeStartTime)
|
||||
md.EndpointResolutionDuration = md.ResolveEndpointEndTime.Sub(md.ResolveEndpointStartTime)
|
||||
|
||||
md.RetryCount = len(md.Attempts) - 1
|
||||
|
||||
latestAttempt, err := md.LatestAttempt()
|
||||
|
||||
if err != nil {
|
||||
fmt.Printf("error retrieving attempts data due to: %s. Skipping Throughput metrics", err.Error())
|
||||
} else {
|
||||
|
||||
md.StatusCode = latestAttempt.StatusCode
|
||||
|
||||
if md.Success == 1 {
|
||||
if latestAttempt.ResponseContentLength > 0 && latestAttempt.ServiceCallDuration > 0 {
|
||||
md.InThroughput = float64(latestAttempt.ResponseContentLength) / latestAttempt.ServiceCallDuration.Seconds()
|
||||
}
|
||||
if md.RequestContentLength > 0 && latestAttempt.ServiceCallDuration > 0 {
|
||||
md.OutThroughput = float64(md.RequestContentLength) / latestAttempt.ServiceCallDuration.Seconds()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// LatestAttempt returns the latest attempt metrics.
|
||||
// It returns an error if no attempts are initialized.
|
||||
func (md *MetricData) LatestAttempt() (*AttemptMetrics, error) {
|
||||
if md.Attempts == nil || len(md.Attempts) == 0 {
|
||||
return nil, fmt.Errorf("no attempts initialized. NewAttempt() should be called first")
|
||||
}
|
||||
return &md.Attempts[len(md.Attempts)-1], nil
|
||||
}
|
||||
|
||||
// NewAttempt initializes new attempt metrics.
|
||||
func (md *MetricData) NewAttempt() {
|
||||
if md.Attempts == nil {
|
||||
md.Attempts = []AttemptMetrics{}
|
||||
}
|
||||
md.Attempts = append(md.Attempts, AttemptMetrics{})
|
||||
}
|
||||
|
||||
// SharedConnectionCounter is a counter shared across API calls.
|
||||
type SharedConnectionCounter struct {
|
||||
mu sync.Mutex
|
||||
|
||||
activeRequests int
|
||||
pendingConnectionAcquire int
|
||||
}
|
||||
|
||||
// ActiveRequests returns the count of active requests.
|
||||
func (cc *SharedConnectionCounter) ActiveRequests() int {
|
||||
cc.mu.Lock()
|
||||
defer cc.mu.Unlock()
|
||||
|
||||
return cc.activeRequests
|
||||
}
|
||||
|
||||
// PendingConnectionAcquire returns the count of pending connection acquires.
|
||||
func (cc *SharedConnectionCounter) PendingConnectionAcquire() int {
|
||||
cc.mu.Lock()
|
||||
defer cc.mu.Unlock()
|
||||
|
||||
return cc.pendingConnectionAcquire
|
||||
}
|
||||
|
||||
// AddActiveRequest increments the count of active requests.
|
||||
func (cc *SharedConnectionCounter) AddActiveRequest() {
|
||||
cc.mu.Lock()
|
||||
defer cc.mu.Unlock()
|
||||
|
||||
cc.activeRequests++
|
||||
}
|
||||
|
||||
// RemoveActiveRequest decrements the count of active requests.
|
||||
func (cc *SharedConnectionCounter) RemoveActiveRequest() {
|
||||
cc.mu.Lock()
|
||||
defer cc.mu.Unlock()
|
||||
|
||||
cc.activeRequests--
|
||||
}
|
||||
|
||||
// AddPendingConnectionAcquire increments the count of pending connection acquires.
|
||||
func (cc *SharedConnectionCounter) AddPendingConnectionAcquire() {
|
||||
cc.mu.Lock()
|
||||
defer cc.mu.Unlock()
|
||||
|
||||
cc.pendingConnectionAcquire++
|
||||
}
|
||||
|
||||
// RemovePendingConnectionAcquire decrements the count of pending connection acquires.
|
||||
func (cc *SharedConnectionCounter) RemovePendingConnectionAcquire() {
|
||||
cc.mu.Lock()
|
||||
defer cc.mu.Unlock()
|
||||
|
||||
cc.pendingConnectionAcquire--
|
||||
}
|
||||
|
||||
// InitMetricContext initializes the metric context with the provided counter and publisher.
|
||||
// It returns the updated context.
|
||||
func InitMetricContext(
|
||||
ctx context.Context, counter *SharedConnectionCounter, publisher MetricPublisher,
|
||||
) context.Context {
|
||||
if middleware.GetStackValue(ctx, metricContextKey{}) == nil {
|
||||
ctx = middleware.WithStackValue(ctx, metricContextKey{}, &MetricContext{
|
||||
connectionCounter: counter,
|
||||
publisher: publisher,
|
||||
data: &MetricData{
|
||||
Attempts: []AttemptMetrics{},
|
||||
Stream: StreamMetrics{},
|
||||
},
|
||||
})
|
||||
}
|
||||
return ctx
|
||||
}
|
||||
|
||||
// Context returns the metric context from the given context.
|
||||
// It returns nil if the metric context is not found.
|
||||
func Context(ctx context.Context) *MetricContext {
|
||||
mctx := middleware.GetStackValue(ctx, metricContextKey{})
|
||||
if mctx == nil {
|
||||
return nil
|
||||
}
|
||||
return mctx.(*MetricContext)
|
||||
}
|
8
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
generated
vendored
8
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
generated
vendored
@ -3,6 +3,7 @@ package retry
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@ -225,6 +226,13 @@ func (r *Attempt) handleAttempt(
|
||||
// that time. Potentially early exist if the sleep is canceled via the
|
||||
// context.
|
||||
retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err)
|
||||
mctx := metrics.Context(ctx)
|
||||
if mctx != nil {
|
||||
attempt, err := mctx.Data().LatestAttempt()
|
||||
if err != nil {
|
||||
attempt.RetryDelay = retryDelay
|
||||
}
|
||||
}
|
||||
if reqErr != nil {
|
||||
return out, attemptResult, releaseRetryToken, reqErr
|
||||
}
|
||||
|
29
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
generated
vendored
29
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
generated
vendored
@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics"
|
||||
v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4"
|
||||
internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
@ -300,7 +301,22 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl
|
||||
return out, metadata, &SigningError{Err: fmt.Errorf("computed payload hash missing from context")}
|
||||
}
|
||||
|
||||
mctx := metrics.Context(ctx)
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.CredentialFetchStartTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
credentials, err := s.credentialsProvider.Retrieve(ctx)
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.CredentialFetchEndTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &SigningError{Err: fmt.Errorf("failed to retrieve credentials: %w", err)}
|
||||
}
|
||||
@ -321,7 +337,20 @@ func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middl
|
||||
})
|
||||
}
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.SignStartTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, signingRegion, sdk.NowTime(), signerOptions...)
|
||||
|
||||
if mctx != nil {
|
||||
if attempt, err := mctx.Data().LatestAttempt(); err == nil {
|
||||
attempt.SignEndTime = sdk.NowTime()
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return out, metadata, &SigningError{Err: fmt.Errorf("failed to sign http request, %w", err)}
|
||||
}
|
||||
|
16
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
generated
vendored
16
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
generated
vendored
@ -68,6 +68,9 @@ import (
|
||||
const (
|
||||
signingAlgorithm = "AWS4-HMAC-SHA256"
|
||||
authorizationHeader = "Authorization"
|
||||
|
||||
// Version of signing v4
|
||||
Version = "SigV4"
|
||||
)
|
||||
|
||||
// HTTPSigner is an interface to a SigV4 signer that can sign HTTP requests
|
||||
@ -103,6 +106,11 @@ type SignerOptions struct {
|
||||
// This will enable logging of the canonical request, the string to sign, and for presigning the subsequent
|
||||
// presigned URL.
|
||||
LogSigning bool
|
||||
|
||||
// Disables setting the session token on the request as part of signing
|
||||
// through X-Amz-Security-Token. This is needed for variations of v4 that
|
||||
// present the token elsewhere.
|
||||
DisableSessionToken bool
|
||||
}
|
||||
|
||||
// Signer applies AWS v4 signing to given request. Use this to sign requests
|
||||
@ -136,6 +144,7 @@ type httpSigner struct {
|
||||
|
||||
DisableHeaderHoisting bool
|
||||
DisableURIPathEscaping bool
|
||||
DisableSessionToken bool
|
||||
}
|
||||
|
||||
func (s *httpSigner) Build() (signedRequest, error) {
|
||||
@ -284,6 +293,7 @@ func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *ht
|
||||
Time: v4Internal.NewSigningTime(signingTime.UTC()),
|
||||
DisableHeaderHoisting: options.DisableHeaderHoisting,
|
||||
DisableURIPathEscaping: options.DisableURIPathEscaping,
|
||||
DisableSessionToken: options.DisableSessionToken,
|
||||
KeyDerivator: s.keyDerivator,
|
||||
}
|
||||
|
||||
@ -360,6 +370,7 @@ func (s *Signer) PresignHTTP(
|
||||
IsPreSign: true,
|
||||
DisableHeaderHoisting: options.DisableHeaderHoisting,
|
||||
DisableURIPathEscaping: options.DisableURIPathEscaping,
|
||||
DisableSessionToken: options.DisableSessionToken,
|
||||
KeyDerivator: s.keyDerivator,
|
||||
}
|
||||
|
||||
@ -502,7 +513,8 @@ func (s *httpSigner) setRequiredSigningFields(headers http.Header, query url.Val
|
||||
|
||||
if s.IsPreSign {
|
||||
query.Set(v4Internal.AmzAlgorithmKey, signingAlgorithm)
|
||||
if sessionToken := s.Credentials.SessionToken; len(sessionToken) > 0 {
|
||||
sessionToken := s.Credentials.SessionToken
|
||||
if !s.DisableSessionToken && len(sessionToken) > 0 {
|
||||
query.Set("X-Amz-Security-Token", sessionToken)
|
||||
}
|
||||
|
||||
@ -512,7 +524,7 @@ func (s *httpSigner) setRequiredSigningFields(headers http.Header, query url.Val
|
||||
|
||||
headers[v4Internal.AmzDateKey] = append(headers[v4Internal.AmzDateKey][:0], amzDate)
|
||||
|
||||
if len(s.Credentials.SessionToken) > 0 {
|
||||
if !s.DisableSessionToken && len(s.Credentials.SessionToken) > 0 {
|
||||
headers[v4Internal.AmzSecurityTokenKey] = append(headers[v4Internal.AmzSecurityTokenKey][:0], s.Credentials.SessionToken)
|
||||
}
|
||||
}
|
||||
|
17
vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go
generated
vendored
17
vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go
generated
vendored
@ -16,6 +16,9 @@ const SigV4 = "sigv4"
|
||||
// Authentication Scheme Signature Version 4A
|
||||
const SigV4A = "sigv4a"
|
||||
|
||||
// SigV4S3Express identifies the S3 S3Express auth scheme.
|
||||
const SigV4S3Express = "sigv4-s3express"
|
||||
|
||||
// None is a constant representing the
|
||||
// None Authentication Scheme
|
||||
const None = "none"
|
||||
@ -24,9 +27,10 @@ const None = "none"
|
||||
// that indicates the list of supported AWS
|
||||
// authentication schemes
|
||||
var SupportedSchemes = map[string]bool{
|
||||
SigV4: true,
|
||||
SigV4A: true,
|
||||
None: true,
|
||||
SigV4: true,
|
||||
SigV4A: true,
|
||||
SigV4S3Express: true,
|
||||
None: true,
|
||||
}
|
||||
|
||||
// AuthenticationScheme is a representation of
|
||||
@ -93,10 +97,11 @@ func GetAuthenticationSchemes(p *smithy.Properties) ([]AuthenticationScheme, err
|
||||
for _, scheme := range authSchemes {
|
||||
authScheme, _ := scheme.(map[string]interface{})
|
||||
|
||||
switch authScheme["name"] {
|
||||
case SigV4:
|
||||
version := authScheme["name"].(string)
|
||||
switch version {
|
||||
case SigV4, SigV4S3Express:
|
||||
v4Scheme := AuthenticationSchemeV4{
|
||||
Name: SigV4,
|
||||
Name: version,
|
||||
SigningName: getSigningName(authScheme),
|
||||
SigningRegion: getSigningRegion(authScheme),
|
||||
DisableDoubleEncoding: getDisableDoubleEncoding(authScheme),
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go
generated
vendored
@ -36,7 +36,7 @@ func (v *BearerTokenProviderAdapter) GetIdentity(ctx context.Context, _ smithy.P
|
||||
) {
|
||||
token, err := v.Provider.RetrieveBearerToken(ctx)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("get token: %v", err)
|
||||
return nil, fmt.Errorf("get token: %w", err)
|
||||
}
|
||||
|
||||
return &BearerTokenAdapter{Token: token}, nil
|
||||
|
@ -27,7 +27,7 @@ func (v *BearerTokenSignerAdapter) SignRequest(ctx context.Context, r *smithyhtt
|
||||
|
||||
signed, err := v.Signer.SignWithBearerToken(ctx, ca.Token, r)
|
||||
if err != nil {
|
||||
return fmt.Errorf("sign request: %v", err)
|
||||
return fmt.Errorf("sign request: %w", err)
|
||||
}
|
||||
|
||||
*r = *signed.(*smithyhttp.Request)
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go
generated
vendored
@ -39,7 +39,7 @@ func (v *CredentialsProviderAdapter) GetIdentity(ctx context.Context, _ smithy.P
|
||||
|
||||
creds, err := v.Provider.Retrieve(ctx)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("get credentials: %v", err)
|
||||
return nil, fmt.Errorf("get credentials: %w", err)
|
||||
}
|
||||
|
||||
return &CredentialsAdapter{Credentials: creds}, nil
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go
generated
vendored
@ -46,7 +46,7 @@ func (v *V4SignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request
|
||||
o.LogSigning = v.LogSigning
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("sign http: %v", err)
|
||||
return fmt.Errorf("sign http: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
16
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
generated
vendored
16
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
generated
vendored
@ -1,3 +1,19 @@
|
||||
# v1.2.8 (2023-12-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.7 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.6 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.5 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.4 (2023-11-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package configsources
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.2.4"
|
||||
const goModuleVersion = "1.2.8"
|
||||
|
16
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
generated
vendored
16
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
generated
vendored
@ -1,3 +1,19 @@
|
||||
# v2.5.8 (2023-12-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.7 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.6 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.5 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.5.4 (2023-11-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package endpoints
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "2.5.4"
|
||||
const goModuleVersion = "2.5.8"
|
||||
|
8
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
generated
vendored
8
vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md
generated
vendored
@ -1,3 +1,11 @@
|
||||
# v1.10.3 (2023-11-30)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.10.2 (2023-11-29)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.10.1 (2023-11-15)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
@ -3,4 +3,4 @@
|
||||
package acceptencoding
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.10.1"
|
||||
const goModuleVersion = "1.10.3"
|
||||
|
16
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
16
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
@ -1,3 +1,19 @@
|
||||
# v1.10.8 (2023-12-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.7 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.6 (2023-11-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.5 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.4 (2023-11-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
@ -3,4 +3,4 @@
|
||||
package presignedurl
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.10.4"
|
||||
const goModuleVersion = "1.10.8"
|
||||
|
24
vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
generated
vendored
24
vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
generated
vendored
@ -1,3 +1,27 @@
|
||||
# v1.26.2 (2023-12-01)
|
||||
|
||||
* **Bug Fix**: Correct wrapping of errors in authentication workflow.
|
||||
* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.26.1 (2023-11-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.26.0 (2023-11-29)
|
||||
|
||||
* **Feature**: Expose Options() accessor on service clients.
|
||||
* **Documentation**: Documentation updates for AWS Security Token Service.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.25.6 (2023-11-28.2)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.25.5 (2023-11-28)
|
||||
|
||||
* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
|
||||
|
||||
# v1.25.4 (2023-11-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
19
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
generated
vendored
19
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
generated
vendored
@ -46,8 +46,6 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveRetryer(&options)
|
||||
|
||||
resolveHTTPClient(&options)
|
||||
|
||||
resolveHTTPSignerV4(&options)
|
||||
@ -60,6 +58,8 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
resolveRetryer(&options)
|
||||
|
||||
ignoreAnonymousAuth(&options)
|
||||
|
||||
resolveAuthSchemes(&options)
|
||||
@ -71,6 +71,15 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
||||
return client
|
||||
}
|
||||
|
||||
// Options returns a copy of the client configuration.
|
||||
//
|
||||
// Callers SHOULD NOT perform mutations on any inner structures within client
|
||||
// config. Config overrides should instead be made on a per-operation basis through
|
||||
// functional options.
|
||||
func (c *Client) Options() Options {
|
||||
return c.options.Copy()
|
||||
}
|
||||
|
||||
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
|
||||
ctx = middleware.ClearStackValues(ctx)
|
||||
stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
|
||||
@ -134,7 +143,7 @@ func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in mi
|
||||
|
||||
func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
|
||||
if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
|
||||
return fmt.Errorf("add ResolveAuthScheme: %v", err)
|
||||
return fmt.Errorf("add ResolveAuthScheme: %w", err)
|
||||
}
|
||||
if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
|
||||
return fmt.Errorf("add GetIdentity: %v", err)
|
||||
@ -143,7 +152,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o
|
||||
return fmt.Errorf("add ResolveEndpointV2: %v", err)
|
||||
}
|
||||
if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil {
|
||||
return fmt.Errorf("add Signing: %v", err)
|
||||
return fmt.Errorf("add Signing: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -506,7 +515,7 @@ func (m *presignContextPolyfillMiddleware) HandleFinalize(ctx context.Context, i
|
||||
|
||||
schemeID := rscheme.Scheme.SchemeID()
|
||||
|
||||
if schemeID == "aws.auth#sigv4" {
|
||||
if schemeID == "aws.auth#sigv4" || schemeID == "com.amazonaws.s3#sigv4express" {
|
||||
if sn, ok := smithyhttp.GetSigV4SigningName(&rscheme.SignerProperties); ok {
|
||||
ctx = awsmiddleware.SetSigningName(ctx, sn)
|
||||
}
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
generated
vendored
@ -205,7 +205,7 @@ type AssumeRoleInput struct {
|
||||
// Services STS. The following is an example of a ProvidedContext value that
|
||||
// includes a single trusted context assertion and the ARN of the context provider
|
||||
// from which the trusted context assertion was generated.
|
||||
// [{"ProviderArn":"arn:aws:iam::aws:contextProvider/identitycenter","ContextAssertion":"trusted-context-assertion"}]
|
||||
// [{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}]
|
||||
ProvidedContexts []types.ProvidedContext
|
||||
|
||||
// The identification number of the MFA device that is associated with the user
|
||||
|
6
vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go
generated
vendored
6
vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go
generated
vendored
@ -154,7 +154,7 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid
|
||||
params := bindAuthResolverParams(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: %v", err)
|
||||
return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
|
||||
}
|
||||
|
||||
scheme, ok := m.selectScheme(options)
|
||||
@ -234,7 +234,7 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar
|
||||
|
||||
identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties)
|
||||
if err != nil {
|
||||
return out, metadata, fmt.Errorf("get identity: %v", err)
|
||||
return out, metadata, fmt.Errorf("get identity: %w", err)
|
||||
}
|
||||
|
||||
ctx = setIdentity(ctx, identity)
|
||||
@ -283,7 +283,7 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar
|
||||
}
|
||||
|
||||
if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil {
|
||||
return out, metadata, fmt.Errorf("sign request: %v", err)
|
||||
return out, metadata, fmt.Errorf("sign request: %w", err)
|
||||
}
|
||||
|
||||
return next.HandleFinalize(ctx, in)
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package sts
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.25.4"
|
||||
const goModuleVersion = "1.26.2"
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go
generated
vendored
@ -213,7 +213,7 @@ func WithSigV4SigningRegion(region string) func(*Options) {
|
||||
}
|
||||
|
||||
func ignoreAnonymousAuth(options *Options) {
|
||||
if _, ok := options.Credentials.(aws.AnonymousCredentials); ok {
|
||||
if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) {
|
||||
options.Credentials = nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user