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.47.10 to 1.48.0
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.47.10...v1.48.0)

Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.25.1 to 1.25.3
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.25.1...config/v1.25.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/aws/aws-sdk-go-v2/service/sts
  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:
dependabot[bot]
2023-11-20 20:28:57 +00:00
committed by mergify[bot]
parent afe3873947
commit b3ce6eff97
59 changed files with 3346 additions and 1574 deletions

View File

@ -1,3 +1,9 @@
# Release (2023-11-15)
## Module Highlights
* `github.com/aws/smithy-go`: v1.17.0
* **Feature**: Support identity/auth components of client reference architecture.
# Release (2023-10-31)
## Module Highlights

3
vendor/github.com/aws/smithy-go/auth/auth.go generated vendored Normal file
View File

@ -0,0 +1,3 @@
// Package auth defines protocol-agnostic authentication types for smithy
// clients.
package auth

47
vendor/github.com/aws/smithy-go/auth/identity.go generated vendored Normal file
View File

@ -0,0 +1,47 @@
package auth
import (
"context"
"time"
"github.com/aws/smithy-go"
)
// Identity contains information that identifies who the user making the
// request is.
type Identity interface {
Expiration() time.Time
}
// IdentityResolver defines the interface through which an Identity is
// retrieved.
type IdentityResolver interface {
GetIdentity(context.Context, smithy.Properties) (Identity, error)
}
// IdentityResolverOptions defines the interface through which an entity can be
// queried to retrieve an IdentityResolver for a given auth scheme.
type IdentityResolverOptions interface {
GetIdentityResolver(schemeID string) IdentityResolver
}
// AnonymousIdentity is a sentinel to indicate no identity.
type AnonymousIdentity struct{}
var _ Identity = (*AnonymousIdentity)(nil)
// Expiration returns the zero value for time, as anonymous identity never
// expires.
func (*AnonymousIdentity) Expiration() time.Time {
return time.Time{}
}
// AnonymousIdentityResolver returns AnonymousIdentity.
type AnonymousIdentityResolver struct{}
var _ IdentityResolver = (*AnonymousIdentityResolver)(nil)
// GetIdentity returns AnonymousIdentity.
func (*AnonymousIdentityResolver) GetIdentity(_ context.Context, _ smithy.Properties) (Identity, error) {
return &AnonymousIdentity{}, nil
}

25
vendor/github.com/aws/smithy-go/auth/option.go generated vendored Normal file
View File

@ -0,0 +1,25 @@
package auth
import "github.com/aws/smithy-go"
type (
authOptionsKey struct{}
)
// Option represents a possible authentication method for an operation.
type Option struct {
SchemeID string
IdentityProperties smithy.Properties
SignerProperties smithy.Properties
}
// GetAuthOptions gets auth Options from Properties.
func GetAuthOptions(p *smithy.Properties) ([]*Option, bool) {
v, ok := p.Get(authOptionsKey{}).([]*Option)
return v, ok
}
// SetAuthOptions sets auth Options on Properties.
func SetAuthOptions(p *smithy.Properties, options []*Option) {
p.Set(authOptionsKey{}, options)
}

20
vendor/github.com/aws/smithy-go/auth/scheme_id.go generated vendored Normal file
View File

@ -0,0 +1,20 @@
package auth
// Anonymous
const (
SchemeIDAnonymous = "smithy.api#noAuth"
)
// HTTP auth schemes
const (
SchemeIDHTTPBasic = "smithy.api#httpBasicAuth"
SchemeIDHTTPDigest = "smithy.api#httpDigestAuth"
SchemeIDHTTPBearer = "smithy.api#httpBearerAuth"
SchemeIDHTTPAPIKey = "smithy.api#httpApiKeyAuth"
)
// AWS auth schemes
const (
SchemeIDSigV4 = "aws.auth#sigv4"
SchemeIDSigV4A = "aws.auth#sigv4a"
)

View File

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

View File

@ -7,12 +7,10 @@ type PropertiesReader interface {
}
// Properties provides storing and reading metadata values. Keys may be any
// comparable value type. Get and set will panic if key is not a comparable
// value type.
// comparable value type. Get and Set will panic if a key is not comparable.
//
// Properties uses lazy initialization, and Set method must be called as an
// addressable value, or pointer. Not doing so may cause key/value pair to not
// be set.
// The zero value for a Properties instance is ready for reads/writes without
// any additional initialization.
type Properties struct {
values map[interface{}]interface{}
}
@ -22,21 +20,16 @@ type Properties struct {
//
// Panics if key type is not comparable.
func (m *Properties) Get(key interface{}) interface{} {
m.lazyInit()
return m.values[key]
}
// Set stores the value pointed to by the key. If a value already exists at
// that key it will be replaced with the new value.
//
// Set method must be called as an addressable value, or pointer. If Set is not
// called as an addressable value or pointer, the key value pair being set may
// be lost.
//
// Panics if the key type is not comparable.
func (m *Properties) Set(key, value interface{}) {
if m.values == nil {
m.values = map[interface{}]interface{}{}
}
m.lazyInit()
m.values[key] = value
}
@ -44,9 +37,26 @@ func (m *Properties) Set(key, value interface{}) {
//
// Panics if the key type is not comparable.
func (m *Properties) Has(key interface{}) bool {
if m.values == nil {
return false
}
m.lazyInit()
_, ok := m.values[key]
return ok
}
// SetAll accepts all of the given Properties into the receiver, overwriting
// any existing keys in the case of conflicts.
func (m *Properties) SetAll(other *Properties) {
if other.values == nil {
return
}
m.lazyInit()
for k, v := range other.values {
m.values[k] = v
}
}
func (m *Properties) lazyInit() {
if m.values == nil {
m.values = map[interface{}]interface{}{}
}
}

21
vendor/github.com/aws/smithy-go/transport/http/auth.go generated vendored Normal file
View File

@ -0,0 +1,21 @@
package http
import (
"context"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/auth"
)
// AuthScheme defines an HTTP authentication scheme.
type AuthScheme interface {
SchemeID() string
IdentityResolver(auth.IdentityResolverOptions) auth.IdentityResolver
Signer() Signer
}
// Signer defines the interface through which HTTP requests are supplemented
// with an Identity.
type Signer interface {
SignRequest(context.Context, *Request, auth.Identity, smithy.Properties) error
}

View File

@ -0,0 +1,45 @@
package http
import (
"context"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/auth"
)
// NewAnonymousScheme returns the anonymous HTTP auth scheme.
func NewAnonymousScheme() AuthScheme {
return &authScheme{
schemeID: auth.SchemeIDAnonymous,
signer: &nopSigner{},
}
}
// authScheme is parameterized to generically implement the exported AuthScheme
// interface
type authScheme struct {
schemeID string
signer Signer
}
var _ AuthScheme = (*authScheme)(nil)
func (s *authScheme) SchemeID() string {
return s.schemeID
}
func (s *authScheme) IdentityResolver(o auth.IdentityResolverOptions) auth.IdentityResolver {
return o.GetIdentityResolver(s.schemeID)
}
func (s *authScheme) Signer() Signer {
return s.signer
}
type nopSigner struct{}
var _ Signer = (*nopSigner)(nil)
func (*nopSigner) SignRequest(context.Context, *Request, auth.Identity, smithy.Properties) error {
return nil
}

View File

@ -0,0 +1,80 @@
package http
import smithy "github.com/aws/smithy-go"
type (
sigV4SigningNameKey struct{}
sigV4SigningRegionKey struct{}
sigV4ASigningNameKey struct{}
sigV4ASigningRegionsKey struct{}
isUnsignedPayloadKey struct{}
disableDoubleEncodingKey struct{}
)
// GetSigV4SigningName gets the signing name from Properties.
func GetSigV4SigningName(p *smithy.Properties) (string, bool) {
v, ok := p.Get(sigV4SigningNameKey{}).(string)
return v, ok
}
// SetSigV4SigningName sets the signing name on Properties.
func SetSigV4SigningName(p *smithy.Properties, name string) {
p.Set(sigV4SigningNameKey{}, name)
}
// GetSigV4SigningRegion gets the signing region from Properties.
func GetSigV4SigningRegion(p *smithy.Properties) (string, bool) {
v, ok := p.Get(sigV4SigningRegionKey{}).(string)
return v, ok
}
// SetSigV4SigningRegion sets the signing region on Properties.
func SetSigV4SigningRegion(p *smithy.Properties, region string) {
p.Set(sigV4SigningRegionKey{}, region)
}
// GetSigV4ASigningName gets the v4a signing name from Properties.
func GetSigV4ASigningName(p *smithy.Properties) (string, bool) {
v, ok := p.Get(sigV4ASigningNameKey{}).(string)
return v, ok
}
// SetSigV4ASigningName sets the signing name on Properties.
func SetSigV4ASigningName(p *smithy.Properties, name string) {
p.Set(sigV4ASigningNameKey{}, name)
}
// GetSigV4ASigningRegion gets the v4a signing region set from Properties.
func GetSigV4ASigningRegions(p *smithy.Properties) ([]string, bool) {
v, ok := p.Get(sigV4ASigningRegionsKey{}).([]string)
return v, ok
}
// SetSigV4ASigningRegions sets the v4a signing region set on Properties.
func SetSigV4ASigningRegions(p *smithy.Properties, regions []string) {
p.Set(sigV4ASigningRegionsKey{}, regions)
}
// GetIsUnsignedPayload gets whether the payload is unsigned from Properties.
func GetIsUnsignedPayload(p *smithy.Properties) (bool, bool) {
v, ok := p.Get(isUnsignedPayloadKey{}).(bool)
return v, ok
}
// SetIsUnsignedPayload sets whether the payload is unsigned on Properties.
func SetIsUnsignedPayload(p *smithy.Properties, isUnsignedPayload bool) {
p.Set(isUnsignedPayloadKey{}, isUnsignedPayload)
}
// GetDisableDoubleEncoding gets whether the payload is unsigned from Properties.
func GetDisableDoubleEncoding(p *smithy.Properties) (bool, bool) {
v, ok := p.Get(disableDoubleEncodingKey{}).(bool)
return v, ok
}
// SetDisableDoubleEncoding sets whether the payload is unsigned on Properties.
func SetDisableDoubleEncoding(p *smithy.Properties, disableDoubleEncoding bool) {
p.Set(disableDoubleEncodingKey{}, disableDoubleEncoding)
}