diff --git a/go.mod b/go.mod index 2737039..10dcacc 100644 --- a/go.mod +++ b/go.mod @@ -6,21 +6,21 @@ require gopkg.in/yaml.v3 v3.0.1 require ( github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.12 // indirect - github.com/aws/aws-sdk-go-v2/service/signin v1.13.1 // indirect + github.com/aws/aws-sdk-go-v2/service/signin v1.14.0 // indirect ) require ( github.com/aws/aws-sdk-go-v2 v1.48.0 - github.com/aws/aws-sdk-go-v2/config v1.33.18 - github.com/aws/aws-sdk-go-v2/credentials v1.21.0 // indirect + github.com/aws/aws-sdk-go-v2/config v1.33.21 + github.com/aws/aws-sdk-go-v2/credentials v1.21.3 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.9 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.12 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.8.12 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.25 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.12 // indirect - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.50.12 + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.51.0 github.com/aws/aws-sdk-go-v2/service/sso v1.39.5 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.44.5 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.52.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.53.0 // indirect github.com/aws/smithy-go v1.28.9 // indirect ) diff --git a/go.sum b/go.sum index 6bd5151..26b4bd2 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ github.com/aws/aws-sdk-go-v2 v1.48.0 h1:tFU7EJVm7MfyaXLsXdYTZ0Vd6vwt9OljCyqq0gqk0Mc= github.com/aws/aws-sdk-go-v2 v1.48.0/go.mod h1:oeKU5p+TQBnpeLmU42WZLWvzv+ORLn+74n4QVLnm/Z0= -github.com/aws/aws-sdk-go-v2/config v1.33.18 h1:WC0C4jM/tewXG8DWXnoxXnusJPZTryPazqk2k/zgd2s= -github.com/aws/aws-sdk-go-v2/config v1.33.18/go.mod h1:0kRpFgsnD59mC2bbbyOTVpaZ9RnXW/pFkqlfiwbgZaU= -github.com/aws/aws-sdk-go-v2/credentials v1.21.0 h1:OViwhqeipkQzSHuO2eQDUCdLrI6r3nzGxFUyM8GqnCs= -github.com/aws/aws-sdk-go-v2/credentials v1.21.0/go.mod h1:OffaVQod3fyZzhZJyPtw11WpHPF1uIHADc+/MYlXmbA= +github.com/aws/aws-sdk-go-v2/config v1.33.21 h1:NY1d3yXmplUSYnUAue0sR88svD+SJiaI+YJGp8TxSNg= +github.com/aws/aws-sdk-go-v2/config v1.33.21/go.mod h1:pVJNXUXaCLu9a/4/liTklg9zR3yO0xm/XBEQhgg5nzc= +github.com/aws/aws-sdk-go-v2/credentials v1.21.3 h1:bh+9VoJ4eDzJVEY6jfdNTBa0Dx7tdr+lWSPNovU1vXc= +github.com/aws/aws-sdk-go-v2/credentials v1.21.3/go.mod h1:4CNs0EBvjDEpyaXSYCdNeNRhFjHFX2Y373tFUaeTYXA= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.9 h1:oH1E0tjN0g+ZRusbX1dsuat4FJ0z05l8hWaycSbDuNc= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.9/go.mod h1:3ZaQGigIoaS45x9HgnLZ4sP475Fs7QoxU3IsZX/J3h4= github.com/aws/aws-sdk-go-v2/internal/configsources v1.5.12 h1:W0yUUzKBA8SofGQ0yZafEUuZq9UxfvijRgdc6vcRQPA= @@ -16,16 +16,16 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.25 h1:rKwkY3 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.25/go.mod h1:dBuAadQKd1F4Q4ZOg8gnFmuSHMRE40Pe3IfFwbtC4lE= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.12 h1:wzAqMZ2O4+ij9HQqIrk+P9PBGacE0wOTuWB7Mo97//I= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.12/go.mod h1:/0TfyruByHsOlphzP26xDTRe2DKD0J1I1Uyy2TyP8EI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.50.12 h1:3l6QhbrePQWfPEcNdtDUOeftM4hEoP3BZ8zq+bNb9rU= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.50.12/go.mod h1:pvkKaFkbMw9ehRD+fraRB1pdNyIFMeMOOo5Y4+NWB58= -github.com/aws/aws-sdk-go-v2/service/signin v1.13.1 h1:ssrDA6AKfXEc3h0Pf4EI4vQ8sN5Zd136SrU9Tjr0XPc= -github.com/aws/aws-sdk-go-v2/service/signin v1.13.1/go.mod h1:LdwHjKqPE9VCC7sTlWcOAizZx3ZJYjmfwC/EW2tIIAE= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.51.0 h1:caWOS7HN0IKMRSuxxcScg39MxIg4/DgFQbW6xNjQN1I= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.51.0/go.mod h1:pvkKaFkbMw9ehRD+fraRB1pdNyIFMeMOOo5Y4+NWB58= +github.com/aws/aws-sdk-go-v2/service/signin v1.14.0 h1:bIEk1HfTd3MGzvDa5YOQUodGr96D9+UTnmBLBB8ZJ10= +github.com/aws/aws-sdk-go-v2/service/signin v1.14.0/go.mod h1:LdwHjKqPE9VCC7sTlWcOAizZx3ZJYjmfwC/EW2tIIAE= github.com/aws/aws-sdk-go-v2/service/sso v1.39.5 h1:ANAoa+qt3/9kXnvQVgUyxcTzhzZf4DqaBS+M2DQrELU= github.com/aws/aws-sdk-go-v2/service/sso v1.39.5/go.mod h1:vsMi+SSR7xGQXtV430LVi49qbv/R+U+upHHSp1W/+QI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.44.5 h1:uIOBLMhef4N16WguadoHKuBy9etdz+RKTeqzchXErAI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.44.5/go.mod h1:NwWmkFLtsTVyXQpbzPOlYLwEoANkdCFjJRtrNcbg/vY= -github.com/aws/aws-sdk-go-v2/service/sts v1.52.0 h1:IaBLmJWiIEtKkjXMgMbYGZk7WKXbYA8148wCMCXq9hU= -github.com/aws/aws-sdk-go-v2/service/sts v1.52.0/go.mod h1:MG6N8U9+lY4LqchrlHPqCOSr7hyxw70XU0Et2YR3eNA= +github.com/aws/aws-sdk-go-v2/service/sts v1.53.0 h1:my9Y6lxcqvPV5k4OTqnxr8XbiTDDRos1leEh050Z93U= +github.com/aws/aws-sdk-go-v2/service/sts v1.53.0/go.mod h1:MG6N8U9+lY4LqchrlHPqCOSr7hyxw70XU0Et2YR3eNA= github.com/aws/smithy-go v1.28.9 h1:zkZ058OpNX0iGTK24b+ZUEQSMc11CBA6oO7xtKZfzkY= github.com/aws/smithy-go v1.28.9/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index d6cba6e..0fbfb90 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,15 @@ +# v1.33.21 (2026-11-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.20 (2026-11-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.19 (2026-11-16) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.33.18 (2026-11-10) * **Dependency Update**: Update to smithy-go v1.28.9. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index 913abb4..da244af 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.33.18" +const goModuleVersion = "1.33.21" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index 87e34eb..583d72f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,15 @@ +# v1.21.3 (2026-11-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.2 (2026-11-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.1 (2026-11-16) + +* **Bug Fix**: Refresh login credentials in the region stored in the cached token's `signInRegion` field. + # v1.21.0 (2026-11-10) * **Feature**: Make Retry Behavior 2.1 the default for standard and adaptive retry modes and remove the AWS_NEW_RETRIES_2026 flag. A retry costs 14 tokens, or 5 for a throttling error. Backoff uses a 50ms base, or 1s for throttling errors, and honors the x-amz-retry-after header. DynamoDB and DynamoDB Streams default to 4 attempts and a 25ms base. Long-polling operations (SQS ReceiveMessage, SFN GetActivityTask, SWF PollForActivityTask and PollForDecisionTask) back off when the retry quota is exhausted. HTTP 429 responses that don't deserialize to a modeled error type, including those from IMDS, are retried as throttling errors, as are HTTP 429 responses from the endpoint credentials provider. StandardOptions.RetryTimeoutCost and StandardOptions.Timeouts are deprecated and no longer used. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index 6309c26..a8d4df7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/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.21.0" +const goModuleVersion = "1.21.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/provider.go index 7d3669d..063cd9e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/provider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/provider.go @@ -37,6 +37,9 @@ type Options struct { Client TokenAPIClient // APIOptions to pass to the underlying CreateOAuth2Token operation. + // + // When the cached token names a sign-in region, that region overrides + // any region set here. ClientOptions []func(*signin.Options) // The path to the cached login token. @@ -84,9 +87,15 @@ func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) { return token.Credentials(), nil } - opts := make([]func(*signin.Options), len(p.options.ClientOptions)+1) - opts[0] = addSignDPOP(token) - copy(opts[1:], p.options.ClientOptions) + opts := []func(*signin.Options){addSignDPOP(token)} + opts = append(opts, p.options.ClientOptions...) + if token.SignInRegion != "" { + // the session must be refreshed in the region it was created in + region := token.SignInRegion + opts = append(opts, func(o *signin.Options) { + o.Region = region + }) + } out, err := p.options.Client.CreateOAuth2Token(ctx, &signin.CreateOAuth2TokenInput{ TokenInput: &types.CreateOAuth2TokenRequestBody{ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/token.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/token.go index 2b1e5ae..098c31a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/token.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/logincreds/token.go @@ -48,6 +48,7 @@ type loginToken struct { IdentityToken string `json:"identityToken"` ClientID string `json:"clientId"` DPOPKey string `json:"dpopKey"` + SignInRegion string `json:"signInRegion,omitempty"` } type loginTokenAccessToken struct { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/CHANGELOG.md index 0138b70..da09f87 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.51.0 (2026-11-12) + +* **Feature**: Adds support for cross-account replication with the new AssociateCrossAccountReplica, DisassociateCrossAccountReplica, and ListResourcePolicies APIs, CrossAccountPrimaryARN in CreateSecret, cross-account replication status in DescribeSecret, and PolicyName in the resource policy APIs. + # v1.50.12 (2026-11-10) * **Dependency Update**: Update to smithy-go v1.28.9. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_AssociateCrossAccountReplica.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_AssociateCrossAccountReplica.go new file mode 100644 index 0000000..d1c4d08 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_AssociateCrossAccountReplica.go @@ -0,0 +1,225 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package secretsmanager + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/service/secretsmanager/schemas" + "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +// Links a primary secret in your account to a replica secret in a different +// Amazon Web Services account and starts replication to this replica. The replica +// secret must already exist in the other Amazon Web Services account. Create the +// replica with CreateSecretand set its CrossAccountPrimaryARN field set to this primary +// secret's ARN. When you call AssociateCrossAccountReplica, Secrets Manager calls +// AcceptCrossAccountReplication on the replica secret on your behalf. +// +// The primary and replica secrets must be in the same Amazon Web Services Region +// and partition, and you must call this operation from the account that owns the +// primary secret. A primary secret can have at most one cross-account replica. +// This operation is idempotent, so you can call it again for the same replica to +// repair replication. If the association fails, Secrets Manager does not modify +// either the primary or replica secret. +// +// Secrets Manager generates a CloudTrail log entry when you call this action. Do +// not include sensitive information in request parameters because it might be +// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. +// +// Required permissions: secretsmanager:AssociateCrossAccountReplica , +// secretsmanager:GetSecretValue on the primary secret, and +// secretsmanager:AcceptCrossAccountReplication on the replica secret. You must +// also have kms:Decrypt permission for the Key Management Service (KMS) key that +// encrypts the primary secret, and kms:Encrypt permission for the Amazon Web +// Services KMS key that encrypts the replica secret. If you supply +// ReplicationRoleARN , you also need iam:PassRole for that role. For more +// information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. +// +// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html +// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html +// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions +func (c *Client) AssociateCrossAccountReplica(ctx context.Context, params *AssociateCrossAccountReplicaInput, optFns ...func(*Options)) (*AssociateCrossAccountReplicaOutput, error) { + if params == nil { + params = &AssociateCrossAccountReplicaInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateCrossAccountReplica", params, optFns, c.addOperationAssociateCrossAccountReplicaMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateCrossAccountReplicaOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateCrossAccountReplicaInput struct { + + // The ARN of the replica secret in the other Amazon Web Services account. The + // replica secret must be in the same Region and partition as the primary secret. + // Additionally, the replica account owner must have created the replica secret as + // a cross-account replica of the primary secret. For more information see CreateSecret. + // + // This member is required. + CrossAccountReplicaARN *string + + // The ARN or name of the primary secret in your account to replicate. + // + // For an ARN, we recommend that you specify a complete ARN rather than a partial + // ARN. See [Finding a secret from a partial ARN]. + // + // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen + // + // This member is required. + SecretId *string + + // Whether the replica account must belong to the same Amazon Web Services + // organization as the primary account: + // + // - SameOrg , which requires the replica account to be in the same organization + // as the primary account. This is the default. + // + // - NoRestriction , which allows the replica account to be in any organization. + ReplicaRestriction types.ReplicaRestrictionType + + // The ARN of an IAM role in the primary account that Secrets Manager assumes to + // perform replication. If you don't include this field, Secrets Manager replicates + // using the credentials of caller who updates the primary secret. For more + // information, see [Cross-account replication permissions]. + // + // [Cross-account replication permissions]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/cross-account-replicate-permissions.html + ReplicationRoleARN *string + + noSmithyDocumentSerde +} + +func (v *AssociateCrossAccountReplicaInput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.AssociateCrossAccountReplicaRequest) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *AssociateCrossAccountReplicaInput) SerializeMembers(s smithy.ShapeSerializer) { + if v.CrossAccountReplicaARN != nil { + s.WriteString(schemas.AssociateCrossAccountReplicaRequest_CrossAccountReplicaARN, *v.CrossAccountReplicaARN) + } + if v.ReplicaRestriction != "" { + s.WriteString(schemas.AssociateCrossAccountReplicaRequest_ReplicaRestriction, string(v.ReplicaRestriction)) + } + if v.ReplicationRoleARN != nil { + s.WriteString(schemas.AssociateCrossAccountReplicaRequest_ReplicationRoleARN, *v.ReplicationRoleARN) + } + if v.SecretId != nil { + s.WriteString(schemas.AssociateCrossAccountReplicaRequest_SecretId, *v.SecretId) + } +} + +type AssociateCrossAccountReplicaOutput struct { + + // The ARN of the primary secret. + ARN *string + + // The ARN of the replica secret in the other account. + CrossAccountReplicaARN *string + + // The status of replication to the replica secret. Possible values: + // + // - InSync , which indicates that replication to the replica completed + // successfully and the replica is up to date. + // + // - Failed , which indicates that replication to the replica did not succeed. + // + // - InProgress , which indicates that Secrets Manager is replicating to the + // replica. + // + // - Pending , which indicates that replication has not yet started. + // + // - Detached , which indicates that primary secret is no longer linked to the + // replica secret. + ReplicationStatus types.StatusType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (v *AssociateCrossAccountReplicaOutput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.AssociateCrossAccountReplicaResponse) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *AssociateCrossAccountReplicaOutput) SerializeMembers(s smithy.ShapeSerializer) { + if v.ARN != nil { + s.WriteString(schemas.AssociateCrossAccountReplicaResponse_ARN, *v.ARN) + } + if v.CrossAccountReplicaARN != nil { + s.WriteString(schemas.AssociateCrossAccountReplicaResponse_CrossAccountReplicaARN, *v.CrossAccountReplicaARN) + } + if v.ReplicationStatus != "" { + s.WriteString(schemas.AssociateCrossAccountReplicaResponse_ReplicationStatus, string(v.ReplicationStatus)) + } +} +func (v *AssociateCrossAccountReplicaOutput) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.AssociateCrossAccountReplicaResponse, func(s *smithy.Schema) error { + switch s { + case schemas.AssociateCrossAccountReplicaResponse_ARN: + v.ARN = new(string) + return d.ReadString(schemas.AssociateCrossAccountReplicaResponse_ARN, v.ARN) + case schemas.AssociateCrossAccountReplicaResponse_CrossAccountReplicaARN: + v.CrossAccountReplicaARN = new(string) + return d.ReadString(schemas.AssociateCrossAccountReplicaResponse_CrossAccountReplicaARN, v.CrossAccountReplicaARN) + case schemas.AssociateCrossAccountReplicaResponse_ReplicationStatus: + var ev string + if err := d.ReadString(schemas.AssociateCrossAccountReplicaResponse_ReplicationStatus, &ev); err != nil { + return err + } + v.ReplicationStatus = types.StatusType(ev) + return nil + } + return nil + }) +} +func (c *Client) addOperationAssociateCrossAccountReplicaMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&serializeRequestMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.AssociateCrossAccountReplica, schemas.AssociateCrossAccountReplicaRequest, schemas.AssociateCrossAccountReplicaResponse)}, middleware.After); err != nil { + return err + } + if err := stack.Deserialize.Add(&deserializeResponseMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.AssociateCrossAccountReplica, schemas.AssociateCrossAccountReplicaRequest, schemas.AssociateCrossAccountReplicaResponse), output: &AssociateCrossAccountReplicaOutput{}}, middleware.After); err != nil { + return err + } + + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpAssociateCrossAccountReplicaValidationMiddleware(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CancelRotateSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CancelRotateSecret.go index e945732..edbd8b3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CancelRotateSecret.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CancelRotateSecret.go @@ -17,7 +17,7 @@ import ( // the partially created version. You also need to determine whether to roll back // to the previous version of the secret by moving the staging label AWSCURRENT to // the version that has AWSPENDING . To determine which version has a specific -// staging label, call ListSecretVersionIds. Then use UpdateSecretVersionStage to change staging labels. For more information, +// staging label, call DescribeSecret. Then use UpdateSecretVersionStage to change staging labels. For more information, // see [How rotation works]. // // To turn on automatic rotation again, call RotateSecret. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CreateSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CreateSecret.go index 63da8ba..4d392f8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CreateSecret.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CreateSecret.go @@ -14,9 +14,10 @@ import ( // Creates a new secret. A secret can be a password, a set of credentials such as // a user name and password, an OAuth token, or other secret information that you // store in an encrypted form in Secrets Manager. The secret also includes the -// connection information to access a database or other service, which Secrets -// Manager doesn't encrypt. A secret in Secrets Manager consists of both the -// protected secret data and the important information needed to manage the secret. +// connection information to access a database or other service. Secrets Manager +// does not encrypt this connection information. A secret in Secrets Manager +// consists of both the encrypted secret versions and the metadata that Secrets +// Manager uses to manage the secret. // // For secrets that use managed rotation, you need to create the secret through // the managing service. For more information, see [Secrets Manager secrets managed by other Amazon Web Services services]. @@ -25,7 +26,7 @@ import ( // // To create a secret, you can provide the secret value to be encrypted in either // the SecretString parameter or the SecretBinary parameter, but not both. If you -// include SecretString or SecretBinary then Secrets Manager creates an initial +// include SecretString or SecretBinary , then Secrets Manager creates an initial // secret version and automatically attaches the staging label AWSCURRENT to it. // // For database credentials you want to rotate, for Secrets Manager to be able to @@ -36,21 +37,26 @@ import ( // Services managed key aws/secretsmanager . If this key doesn't already exist in // your account, then Secrets Manager creates it for you automatically. All users // and roles in the Amazon Web Services account automatically have access to use -// aws/secretsmanager . Creating aws/secretsmanager can result in a one-time -// significant delay in returning the result. +// aws/secretsmanager . Creating aws/secretsmanager can result in a one-time delay +// to complete the secret creation. // // If the secret is in a different Amazon Web Services account from the // credentials calling the API, then you can't use aws/secretsmanager to encrypt // the secret, and you must create and use a customer managed KMS key. // +// To create a cross-account replica secret, include CrossAccountPrimaryARN . The +// replica must use a customer managed KMS key, and can't include AddReplicaRegions +// , Description , SecretBinary , SecretString , or Type . +// // Secrets Manager generates a CloudTrail log entry when you call this action. Do // not include sensitive information in request parameters except SecretBinary or // SecretString because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail]. // // Required permissions: secretsmanager:CreateSecret . If you include tags in the // secret, you also need secretsmanager:TagResource . To add replica Regions, you -// must also have secretsmanager:ReplicateSecretToRegions . For more information, -// see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. +// must also have secretsmanager:ReplicateSecretToRegions . To create a +// cross-account replica secret, you must also have +// secretsmanager:PutResourcePolicy permissions. For more information, see [IAM policy actions for Secrets Manager] and [Authentication and access control in Secrets Manager]. // // To encrypt the secret with a KMS key other than aws/secretsmanager , you need // kms:GenerateDataKey and kms:Decrypt permission to the key. @@ -133,6 +139,14 @@ type CreateSecretInput struct { // [UUID-type]: https://wikipedia.org/wiki/Universally_unique_identifier ClientRequestToken *string + // The ARN of a primary secret in another Amazon Web Services account. Include + // this field to create a cross-account replica secret that receives replicated + // data from that primary secret. The primary secret must be in the same Amazon Web + // Services Region and partition as the replica, and you must specify a customer + // managed KMS key in KmsKeyId . You can't include SecretString , SecretBinary , + // Description , AddReplicaRegions , or Type . + CrossAccountPrimaryARN *string + // The description of the secret. Description *string @@ -235,6 +249,9 @@ func (v *CreateSecretInput) SerializeMembers(s smithy.ShapeSerializer) { if v.ClientRequestToken != nil { s.WriteString(schemas.CreateSecretRequest_ClientRequestToken, *v.ClientRequestToken) } + if v.CrossAccountPrimaryARN != nil { + s.WriteString(schemas.CreateSecretRequest_CrossAccountPrimaryARN, *v.CrossAccountPrimaryARN) + } if v.Description != nil { s.WriteString(schemas.CreateSecretRequest_Description, *v.Description) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteResourcePolicy.go index a02153b..ed636d3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteResourcePolicy.go @@ -49,6 +49,11 @@ type DeleteResourcePolicyInput struct { // This member is required. SecretId *string + // The name of the resource policy to delete. If you don't specify this field, + // Secrets Manager uses default . You can only delete the default policy; if you + // specify any other name, the operation returns an InvalidParameterException . + PolicyName *string + noSmithyDocumentSerde } @@ -59,6 +64,9 @@ func (v *DeleteResourcePolicyInput) Serialize(s smithy.ShapeSerializer) { } func (v *DeleteResourcePolicyInput) SerializeMembers(s smithy.ShapeSerializer) { + if v.PolicyName != nil { + s.WriteString(schemas.DeleteResourcePolicyRequest_PolicyName, *v.PolicyName) + } if v.SecretId != nil { s.WriteString(schemas.DeleteResourcePolicyRequest_SecretId, *v.SecretId) } @@ -72,6 +80,10 @@ type DeleteResourcePolicyOutput struct { // The name of the secret that the resource-based policy was deleted for. Name *string + // The name of the deleted resource policy. If you didn't specify PolicyName in + // the request, this is default . + PolicyName *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -91,6 +103,9 @@ func (v *DeleteResourcePolicyOutput) SerializeMembers(s smithy.ShapeSerializer) if v.Name != nil { s.WriteString(schemas.DeleteResourcePolicyResponse_Name, *v.Name) } + if v.PolicyName != nil { + s.WriteString(schemas.DeleteResourcePolicyResponse_PolicyName, *v.PolicyName) + } } func (v *DeleteResourcePolicyOutput) Deserialize(d smithy.ShapeDeserializer) error { return smithy.ReadStruct(d, schemas.DeleteResourcePolicyResponse, func(s *smithy.Schema) error { @@ -101,6 +116,9 @@ func (v *DeleteResourcePolicyOutput) Deserialize(d smithy.ShapeDeserializer) err case schemas.DeleteResourcePolicyResponse_Name: v.Name = new(string) return d.ReadString(schemas.DeleteResourcePolicyResponse_Name, v.Name) + case schemas.DeleteResourcePolicyResponse_PolicyName: + v.PolicyName = new(string) + return d.ReadString(schemas.DeleteResourcePolicyResponse_PolicyName, v.PolicyName) } return nil }) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteSecret.go index 0d9fbd9..d699143 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteSecret.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteSecret.go @@ -20,6 +20,12 @@ import ( // first delete the replicas using RemoveRegionsFromReplication, and then delete the primary secret. When you // delete a replica, it is deleted immediately. // +// You can't delete a cross-account primary secret that is associated with a +// cross-account replica secret. You must first disassociate each of the replicas +// using DisassociateCrossAccountReplica, before deleting the primary secret. Similarly, you can't delete a +// cross-account replica secret without first stopping replication. Call StopReplicationToReplicato stop +// replication, and then you can delete the secret. +// // You can't directly delete a version of a secret. Instead, you remove all // staging labels from the version using UpdateSecretVersionStage. This marks the version as deprecated, // and then Secrets Manager can automatically delete the version in the background. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DescribeSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DescribeSecret.go index ef70d8e..b1e4d98 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DescribeSecret.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DescribeSecret.go @@ -14,6 +14,11 @@ import ( // Retrieves the details of a secret. It does not include the encrypted secret // value. Secrets Manager only returns fields that have a value in the response. // +// The VersionIdsToStages field in the response includes every version ID that has +// a staging label attached, even if that version doesn't contain a secret value. +// In contrast, ListSecretVersionIds only returns versions that contain a secret +// value. To check whether a secret version contains a value, call GetSecretValue. +// // Secrets Manager generates a CloudTrail log entry when you call this action. Do // not include sensitive information in request parameters because it might be // logged. For more information, see [Logging Secrets Manager events with CloudTrail]. @@ -74,6 +79,17 @@ type DescribeSecretOutput struct { // The date the secret was created. CreatedDate *time.Time + // Information about the primary secret in the other Amazon Web Services account + // that this cross-account replica secret replicates from, including the primary + // secret ARN and the replication status. This field is omitted if the secret is + // not a cross-account replica. + CrossAccountPrimary *types.CrossAccountPrimaryType + + // A list of this secret's cross-account replica secrets and their replication + // status, if this secret is the primary for cross-account replication. This field + // is omitted if the secret has no cross-account replicas. + CrossAccountReplicas []types.CrossAccountReplicaEntry + // The date the secret is scheduled for deletion. If it is not scheduled for // deletion, this field is omitted. When you delete a secret, Secrets Manager // requires a recovery window of at least 7 days before deleting the secret. Some @@ -222,6 +238,14 @@ func (v *DescribeSecretOutput) SerializeMembers(s smithy.ShapeSerializer) { if v.CreatedDate != nil { s.WriteTime(schemas.DescribeSecretResponse_CreatedDate, *v.CreatedDate) } + if v.CrossAccountPrimary != nil { + s.WriteStruct(schemas.DescribeSecretResponse_CrossAccountPrimary) + v.CrossAccountPrimary.SerializeMembers(s) + s.CloseStruct() + } + if v.CrossAccountReplicas != nil { + serializeCrossAccountReplicaListType(s, schemas.DescribeSecretResponse_CrossAccountReplicas, v.CrossAccountReplicas) + } if v.DeletedDate != nil { s.WriteTime(schemas.DescribeSecretResponse_DeletedDate, *v.DeletedDate) } @@ -291,6 +315,11 @@ func (v *DescribeSecretOutput) Deserialize(d smithy.ShapeDeserializer) error { case schemas.DescribeSecretResponse_CreatedDate: v.CreatedDate = new(time.Time) return d.ReadTime(schemas.DescribeSecretResponse_CreatedDate, v.CreatedDate) + case schemas.DescribeSecretResponse_CrossAccountPrimary: + v.CrossAccountPrimary = &types.CrossAccountPrimaryType{} + return v.CrossAccountPrimary.Deserialize(d) + case schemas.DescribeSecretResponse_CrossAccountReplicas: + return deserializeCrossAccountReplicaListType(d, schemas.DescribeSecretResponse_CrossAccountReplicas, &v.CrossAccountReplicas) case schemas.DescribeSecretResponse_DeletedDate: v.DeletedDate = new(time.Time) return d.ReadTime(schemas.DescribeSecretResponse_DeletedDate, v.DeletedDate) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DisassociateCrossAccountReplica.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DisassociateCrossAccountReplica.go new file mode 100644 index 0000000..e19f1bb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DisassociateCrossAccountReplica.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package secretsmanager + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/service/secretsmanager/schemas" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +// Removes the link between a primary secret in your account and a cross-account +// replica secret, and stops replication to the replica secret. Call this operation +// on the primary secret. This action removes the replica association created by AssociateCrossAccountReplica. +// +// Disassociating the replica from the primary does not delete the replica secret +// or convert the replica secret to a standalone secret. The replica secret remains +// in the other account and its replication status changes to Detached . Secrets +// Manager no longer sends updates from the primary secret to the replica secret +// after disassociation. To convert a detached replica into a standalone secret, +// call StopReplicationToReplicaon the replica secret. +// +// You must disassociate a cross-account replica before you call DeleteSecret for the primary +// secret. The DeleteSecretcall fails if any replicas are still associated with the primary +// secret. +// +// Secrets Manager generates a CloudTrail log entry when you call this action. Do +// not include sensitive information in request parameters because it might be +// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. +// +// Required permissions: secretsmanager:DisassociateCrossAccountReplica . For more +// information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. +// +// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html +// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html +// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions +func (c *Client) DisassociateCrossAccountReplica(ctx context.Context, params *DisassociateCrossAccountReplicaInput, optFns ...func(*Options)) (*DisassociateCrossAccountReplicaOutput, error) { + if params == nil { + params = &DisassociateCrossAccountReplicaInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateCrossAccountReplica", params, optFns, c.addOperationDisassociateCrossAccountReplicaMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateCrossAccountReplicaOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateCrossAccountReplicaInput struct { + + // The ARN of the cross-account replica secret to unlink from the primary secret. + // + // This member is required. + CrossAccountReplicaARN *string + + // The ARN or name of the primary secret in your account. + // + // For an ARN, we recommend that you specify a complete ARN rather than a partial + // ARN. See [Finding a secret from a partial ARN]. + // + // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen + // + // This member is required. + SecretId *string + + noSmithyDocumentSerde +} + +func (v *DisassociateCrossAccountReplicaInput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.DisassociateCrossAccountReplicaRequest) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *DisassociateCrossAccountReplicaInput) SerializeMembers(s smithy.ShapeSerializer) { + if v.CrossAccountReplicaARN != nil { + s.WriteString(schemas.DisassociateCrossAccountReplicaRequest_CrossAccountReplicaARN, *v.CrossAccountReplicaARN) + } + if v.SecretId != nil { + s.WriteString(schemas.DisassociateCrossAccountReplicaRequest_SecretId, *v.SecretId) + } +} + +type DisassociateCrossAccountReplicaOutput struct { + + // The ARN of the primary secret. + ARN *string + + // The ARN of the replica secret that was unlinked from the primary secret. + CrossAccountReplicaARN *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (v *DisassociateCrossAccountReplicaOutput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.DisassociateCrossAccountReplicaResponse) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *DisassociateCrossAccountReplicaOutput) SerializeMembers(s smithy.ShapeSerializer) { + if v.ARN != nil { + s.WriteString(schemas.DisassociateCrossAccountReplicaResponse_ARN, *v.ARN) + } + if v.CrossAccountReplicaARN != nil { + s.WriteString(schemas.DisassociateCrossAccountReplicaResponse_CrossAccountReplicaARN, *v.CrossAccountReplicaARN) + } +} +func (v *DisassociateCrossAccountReplicaOutput) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.DisassociateCrossAccountReplicaResponse, func(s *smithy.Schema) error { + switch s { + case schemas.DisassociateCrossAccountReplicaResponse_ARN: + v.ARN = new(string) + return d.ReadString(schemas.DisassociateCrossAccountReplicaResponse_ARN, v.ARN) + case schemas.DisassociateCrossAccountReplicaResponse_CrossAccountReplicaARN: + v.CrossAccountReplicaARN = new(string) + return d.ReadString(schemas.DisassociateCrossAccountReplicaResponse_CrossAccountReplicaARN, v.CrossAccountReplicaARN) + } + return nil + }) +} +func (c *Client) addOperationDisassociateCrossAccountReplicaMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&serializeRequestMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.DisassociateCrossAccountReplica, schemas.DisassociateCrossAccountReplicaRequest, schemas.DisassociateCrossAccountReplicaResponse)}, middleware.After); err != nil { + return err + } + if err := stack.Deserialize.Add(&deserializeResponseMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.DisassociateCrossAccountReplica, schemas.DisassociateCrossAccountReplicaRequest, schemas.DisassociateCrossAccountReplicaResponse), output: &DisassociateCrossAccountReplicaOutput{}}, middleware.After); err != nil { + return err + } + + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDisassociateCrossAccountReplicaValidationMiddleware(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetResourcePolicy.go index 3b15fa5..62758cd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetResourcePolicy.go @@ -52,6 +52,11 @@ type GetResourcePolicyInput struct { // This member is required. SecretId *string + // The name of the resource policy to retrieve. If you don't specify this field, + // Secrets Manager uses default . If you specify a name other than default and no + // policy with that name exists, the operation returns a ResourceNotFoundException . + PolicyName *string + noSmithyDocumentSerde } @@ -62,6 +67,9 @@ func (v *GetResourcePolicyInput) Serialize(s smithy.ShapeSerializer) { } func (v *GetResourcePolicyInput) SerializeMembers(s smithy.ShapeSerializer) { + if v.PolicyName != nil { + s.WriteString(schemas.GetResourcePolicyRequest_PolicyName, *v.PolicyName) + } if v.SecretId != nil { s.WriteString(schemas.GetResourcePolicyRequest_SecretId, *v.SecretId) } @@ -75,6 +83,10 @@ type GetResourcePolicyOutput struct { // The name of the secret that the resource-based policy was retrieved for. Name *string + // The name of the resource policy. If you didn't specify PolicyName in the + // request, this is default . + PolicyName *string + // A JSON-formatted string that contains the permissions policy attached to the // secret. For more information about permissions policies, see [Authentication and access control for Secrets Manager]. // @@ -100,6 +112,9 @@ func (v *GetResourcePolicyOutput) SerializeMembers(s smithy.ShapeSerializer) { if v.Name != nil { s.WriteString(schemas.GetResourcePolicyResponse_Name, *v.Name) } + if v.PolicyName != nil { + s.WriteString(schemas.GetResourcePolicyResponse_PolicyName, *v.PolicyName) + } if v.ResourcePolicy != nil { s.WriteString(schemas.GetResourcePolicyResponse_ResourcePolicy, *v.ResourcePolicy) } @@ -113,6 +128,9 @@ func (v *GetResourcePolicyOutput) Deserialize(d smithy.ShapeDeserializer) error case schemas.GetResourcePolicyResponse_Name: v.Name = new(string) return d.ReadString(schemas.GetResourcePolicyResponse_Name, v.Name) + case schemas.GetResourcePolicyResponse_PolicyName: + v.PolicyName = new(string) + return d.ReadString(schemas.GetResourcePolicyResponse_PolicyName, v.PolicyName) case schemas.GetResourcePolicyResponse_ResourcePolicy: v.ResourcePolicy = new(string) return d.ReadString(schemas.GetResourcePolicyResponse_ResourcePolicy, v.ResourcePolicy) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListResourcePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListResourcePolicies.go new file mode 100644 index 0000000..9fdd51d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListResourcePolicies.go @@ -0,0 +1,272 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package secretsmanager + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/secretsmanager/schemas" + "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +// Lists the resource-based policies attached to a secret. The response contains +// only the names of the policies, not their contents. Secrets Manager lists +// default first, followed by any other policies in alphabetical order. To get the +// contents of a policy, use GetResourcePolicy. You can modify only the default policy. +// +// Secrets Manager generates a CloudTrail log entry when you call this action. Do +// not include sensitive information in request parameters because it might be +// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. +// +// Required permissions: secretsmanager:ListResourcePolicies . For more +// information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. +// +// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html +// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html +// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions +func (c *Client) ListResourcePolicies(ctx context.Context, params *ListResourcePoliciesInput, optFns ...func(*Options)) (*ListResourcePoliciesOutput, error) { + if params == nil { + params = &ListResourcePoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResourcePolicies", params, optFns, c.addOperationListResourcePoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResourcePoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListResourcePoliciesInput struct { + + // The ARN or name of the secret. + // + // For an ARN, we recommend that you specify a complete ARN rather than a partial + // ARN. See [Finding a secret from a partial ARN]. + // + // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen + // + // This member is required. + SecretId *string + + // The number of results to include in the response. If you don't specify this + // value, the service returns up to 100 results. + // + // If there are more results available, in the response, Secrets Manager includes + // NextToken . To get the next results, call ListResourcePolicies again with the + // value from NextToken . + MaxResults *int32 + + // A token that indicates where the output should continue from, if a previous + // call did not show all results. To get the next results, call + // ListResourcePolicies again with this value. + NextToken *string + + noSmithyDocumentSerde +} + +func (v *ListResourcePoliciesInput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.ListResourcePoliciesRequest) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *ListResourcePoliciesInput) SerializeMembers(s smithy.ShapeSerializer) { + if v.MaxResults != nil { + s.WriteInt32(schemas.ListResourcePoliciesRequest_MaxResults, *v.MaxResults) + } + if v.NextToken != nil { + s.WriteString(schemas.ListResourcePoliciesRequest_NextToken, *v.NextToken) + } + if v.SecretId != nil { + s.WriteString(schemas.ListResourcePoliciesRequest_SecretId, *v.SecretId) + } +} + +type ListResourcePoliciesOutput struct { + + // A list of the resource policies attached to the secret. + // + // This member is required. + ResourcePolicies []types.ResourcePolicySummary + + // Secrets Manager includes this value if there's more output available than what + // is included in the current response. To get the next results, call + // ListResourcePolicies again with this value. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (v *ListResourcePoliciesOutput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.ListResourcePoliciesResponse) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *ListResourcePoliciesOutput) SerializeMembers(s smithy.ShapeSerializer) { + if v.NextToken != nil { + s.WriteString(schemas.ListResourcePoliciesResponse_NextToken, *v.NextToken) + } + if v.ResourcePolicies != nil { + serializeResourcePolicySummaryListType(s, schemas.ListResourcePoliciesResponse_ResourcePolicies, v.ResourcePolicies) + } +} +func (v *ListResourcePoliciesOutput) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.ListResourcePoliciesResponse, func(s *smithy.Schema) error { + switch s { + case schemas.ListResourcePoliciesResponse_NextToken: + v.NextToken = new(string) + return d.ReadString(schemas.ListResourcePoliciesResponse_NextToken, v.NextToken) + case schemas.ListResourcePoliciesResponse_ResourcePolicies: + return deserializeResourcePolicySummaryListType(d, schemas.ListResourcePoliciesResponse_ResourcePolicies, &v.ResourcePolicies) + } + return nil + }) +} +func (c *Client) addOperationListResourcePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&serializeRequestMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.ListResourcePolicies, schemas.ListResourcePoliciesRequest, schemas.ListResourcePoliciesResponse)}, middleware.After); err != nil { + return err + } + if err := stack.Deserialize.Add(&deserializeResponseMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.ListResourcePolicies, schemas.ListResourcePoliciesRequest, schemas.ListResourcePoliciesResponse), output: &ListResourcePoliciesOutput{}}, middleware.After); err != nil { + return err + } + + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListResourcePoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListResourcePoliciesPaginatorOptions is the paginator options for +// ListResourcePolicies +type ListResourcePoliciesPaginatorOptions struct { + // The number of results to include in the response. If you don't specify this + // value, the service returns up to 100 results. + // + // If there are more results available, in the response, Secrets Manager includes + // NextToken . To get the next results, call ListResourcePolicies again with the + // value from NextToken . + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListResourcePoliciesPaginator is a paginator for ListResourcePolicies +type ListResourcePoliciesPaginator struct { + options ListResourcePoliciesPaginatorOptions + client ListResourcePoliciesAPIClient + params *ListResourcePoliciesInput + nextToken *string + firstPage bool +} + +// NewListResourcePoliciesPaginator returns a new ListResourcePoliciesPaginator +func NewListResourcePoliciesPaginator(client ListResourcePoliciesAPIClient, params *ListResourcePoliciesInput, optFns ...func(*ListResourcePoliciesPaginatorOptions)) *ListResourcePoliciesPaginator { + if params == nil { + params = &ListResourcePoliciesInput{} + } + + options := ListResourcePoliciesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListResourcePoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListResourcePoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListResourcePolicies page. +func (p *ListResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourcePoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListResourcePolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListResourcePoliciesAPIClient is a client that implements the +// ListResourcePolicies operation. +type ListResourcePoliciesAPIClient interface { + ListResourcePolicies(context.Context, *ListResourcePoliciesInput, ...func(*Options)) (*ListResourcePoliciesOutput, error) +} + +var _ ListResourcePoliciesAPIClient = (*Client)(nil) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecretVersionIds.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecretVersionIds.go index 614064d..fe1800e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecretVersionIds.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecretVersionIds.go @@ -16,6 +16,10 @@ import ( // // To list the secrets in the account, use ListSecrets. // +// ListSecretVersionIds only returns versions that contain a secret value. To see +// all version IDs that have staging labels attached, including ones without a +// secret value, call DescribeSecret and check VersionIdsToStages . +// // Secrets Manager generates a CloudTrail log entry when you call this action. Do // not include sensitive information in request parameters because it might be // logged. For more information, see [Logging Secrets Manager events with CloudTrail]. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutResourcePolicy.go index 9501265..b11e5b5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutResourcePolicy.go @@ -82,6 +82,11 @@ type PutResourcePolicyInput struct { // [Determine who has permissions to your secrets]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/determine-acccess_examine-iam-policies.html BlockPublicPolicy *bool + // The name of the resource policy to attach. If you don't specify this field, + // Secrets Manager uses default . You can only attach the default policy; if you + // specify any other name, the operation returns an InvalidParameterException . + PolicyName *string + noSmithyDocumentSerde } @@ -95,6 +100,9 @@ func (v *PutResourcePolicyInput) SerializeMembers(s smithy.ShapeSerializer) { if v.BlockPublicPolicy != nil { s.WriteBool(schemas.PutResourcePolicyRequest_BlockPublicPolicy, *v.BlockPublicPolicy) } + if v.PolicyName != nil { + s.WriteString(schemas.PutResourcePolicyRequest_PolicyName, *v.PolicyName) + } if v.ResourcePolicy != nil { s.WriteString(schemas.PutResourcePolicyRequest_ResourcePolicy, *v.ResourcePolicy) } @@ -111,6 +119,10 @@ type PutResourcePolicyOutput struct { // The name of the secret. Name *string + // The name of the resource policy. If you didn't specify PolicyName in the + // request, this is default . + PolicyName *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -130,6 +142,9 @@ func (v *PutResourcePolicyOutput) SerializeMembers(s smithy.ShapeSerializer) { if v.Name != nil { s.WriteString(schemas.PutResourcePolicyResponse_Name, *v.Name) } + if v.PolicyName != nil { + s.WriteString(schemas.PutResourcePolicyResponse_PolicyName, *v.PolicyName) + } } func (v *PutResourcePolicyOutput) Deserialize(d smithy.ShapeDeserializer) error { return smithy.ReadStruct(d, schemas.PutResourcePolicyResponse, func(s *smithy.Schema) error { @@ -140,6 +155,9 @@ func (v *PutResourcePolicyOutput) Deserialize(d smithy.ShapeDeserializer) error case schemas.PutResourcePolicyResponse_Name: v.Name = new(string) return d.ReadString(schemas.PutResourcePolicyResponse_Name, v.Name) + case schemas.PutResourcePolicyResponse_PolicyName: + v.PolicyName = new(string) + return d.ReadString(schemas.PutResourcePolicyResponse_PolicyName, v.PolicyName) } return nil }) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_StopReplicationToReplica.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_StopReplicationToReplica.go index 99f4462..bb0deb9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_StopReplicationToReplica.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_StopReplicationToReplica.go @@ -9,18 +9,28 @@ import ( "github.com/aws/smithy-go/middleware" ) -// Removes the link between the replica secret and the primary secret and promotes -// the replica to a primary secret in the replica Region. +// Removes the link between a replica secret and its primary secret, and stops +// replication to the replica. You call this operation from the replica account or +// Region. Depending on the type of replica, the behavior is: // -// You must call this operation from the Region in which you want to promote the -// replica to a primary secret. +// - Cross-Region replica: promotes the replica to a standalone primary secret +// in the replica Region. +// +// - Cross-account replica: promotes the replica in your account to a standalone +// secret and stops replication from its primary secret in the other account. +// Secrets Manager updates the primary secret's replication status to Detached +// for this replica. +// +// To stop cross-account replication from the primary account instead, use DisassociateCrossAccountReplica. // // Secrets Manager generates a CloudTrail log entry when you call this action. Do // not include sensitive information in request parameters because it might be // logged. For more information, see [Logging Secrets Manager events with CloudTrail]. // -// Required permissions: secretsmanager:StopReplicationToReplica . For more -// information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. +// Required permissions: secretsmanager:StopReplicationToReplica . For +// cross-account replica secrets, you must also have +// secretsmanager:DeleteResourcePolicy permissions. For more information, see [IAM policy actions for Secrets Manager] and [Authentication and access control in Secrets Manager] +// . // // [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html // [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html @@ -42,8 +52,12 @@ func (c *Client) StopReplicationToReplica(ctx context.Context, params *StopRepli type StopReplicationToReplicaInput struct { - // The name of the secret or the replica ARN. The replica ARN is the same as the - // original primary secret ARN expect the Region is changed to the replica Region. + // The ARN or name of the replica secret. + // + // For a cross-region replica, the replica ARN is the same as the original primary + // secret ARN except that the Region is changed to the replica Region. For a + // cross-account replica, this is the ARN or name of the replica secret in your + // account. // // This member is required. SecretId *string @@ -65,8 +79,9 @@ func (v *StopReplicationToReplicaInput) SerializeMembers(s smithy.ShapeSerialize type StopReplicationToReplicaOutput struct { - // The ARN of the promoted secret. The ARN is the same as the original primary - // secret except the Region is changed. + // The ARN of the promoted secret. For a cross-region replica, this ARN is the + // same as the original primary secret's ARN except that the Region is changed. For + // a cross-account replica, this is the ARN of the promoted secret in your account. ARN *string // Metadata pertaining to the operation's result. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/common_serde.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/common_serde.go index 13cac14..db9b071 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/common_serde.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/common_serde.go @@ -27,6 +27,16 @@ func serializeAPIErrorListType(s smithy.ShapeSerializer, schema *smithy.Schema, s.CloseList() } +func serializeCrossAccountReplicaListType(s smithy.ShapeSerializer, schema *smithy.Schema, v []types.CrossAccountReplicaEntry) { + s.WriteList(schema) + for _, vv := range v { + s.WriteStruct(schema.ListMember()) + vv.SerializeMembers(s) + s.CloseStruct() + } + s.CloseList() +} + func serializeExternalSecretRotationMetadataType(s smithy.ShapeSerializer, schema *smithy.Schema, v []types.ExternalSecretRotationMetadataItem) { s.WriteList(schema) for _, vv := range v { @@ -81,6 +91,16 @@ func serializeReplicationStatusListType(s smithy.ShapeSerializer, schema *smithy s.CloseList() } +func serializeResourcePolicySummaryListType(s smithy.ShapeSerializer, schema *smithy.Schema, v []types.ResourcePolicySummary) { + s.WriteList(schema) + for _, vv := range v { + s.WriteStruct(schema.ListMember()) + vv.SerializeMembers(s) + s.CloseStruct() + } + s.CloseList() +} + func serializeSecretIdListType(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) { s.WriteList(schema) for _, vv := range v { @@ -199,6 +219,28 @@ func deserializeAPIErrorListType(d smithy.ShapeDeserializer, s *smithy.Schema, v }) } +func deserializeCrossAccountReplicaListType(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]types.CrossAccountReplicaEntry) error { + *v = make([]types.CrossAccountReplicaEntry, 0) + var vv types.CrossAccountReplicaEntry + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero types.CrossAccountReplicaEntry + *v = append(*v, zero) + return nil + } + + vv = types.CrossAccountReplicaEntry{} + if err := vv.Deserialize(d); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + func deserializeExternalSecretRotationMetadataType(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]types.ExternalSecretRotationMetadataItem) error { *v = make([]types.ExternalSecretRotationMetadataItem, 0) var vv types.ExternalSecretRotationMetadataItem @@ -328,6 +370,28 @@ func deserializeReplicationStatusListType(d smithy.ShapeDeserializer, s *smithy. }) } +func deserializeResourcePolicySummaryListType(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]types.ResourcePolicySummary) error { + *v = make([]types.ResourcePolicySummary, 0) + var vv types.ResourcePolicySummary + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero types.ResourcePolicySummary + *v = append(*v, zero) + return nil + } + + vv = types.ResourcePolicySummary{} + if err := vv.Deserialize(d); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + func deserializeSecretIdListType(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error { *v = make([]string, 0) var vv string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/generated.json index 9bdbb41..60dac22 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/generated.json @@ -8,15 +8,18 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_AssociateCrossAccountReplica.go", "api_op_BatchGetSecretValue.go", "api_op_CancelRotateSecret.go", "api_op_CreateSecret.go", "api_op_DeleteResourcePolicy.go", "api_op_DeleteSecret.go", "api_op_DescribeSecret.go", + "api_op_DisassociateCrossAccountReplica.go", "api_op_GetRandomPassword.go", "api_op_GetResourcePolicy.go", "api_op_GetSecretValue.go", + "api_op_ListResourcePolicies.go", "api_op_ListSecretVersionIds.go", "api_op_ListSecrets.go", "api_op_PutResourcePolicy.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/go_module_metadata.go index a3fe09c..71701df 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/go_module_metadata.go @@ -3,4 +3,4 @@ package secretsmanager // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.50.12" +const goModuleVersion = "1.51.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/schemas/schemas.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/schemas/schemas.go index 19cb6fa..e24f4a2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/schemas/schemas.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/schemas/schemas.go @@ -8,6 +8,11 @@ import ( smithytraits "github.com/aws/smithy-go/traits" ) +var AssociateCrossAccountReplica = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "AssociateCrossAccountReplica", +}, smithy.ShapeTypeOperation, 0) + var BatchGetSecretValue = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "BatchGetSecretValue", @@ -38,6 +43,11 @@ var DescribeSecret = smithy.NewSchema(smithy.ShapeID{ Name: "DescribeSecret", }, smithy.ShapeTypeOperation, 0) +var DisassociateCrossAccountReplica = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "DisassociateCrossAccountReplica", +}, smithy.ShapeTypeOperation, 0) + var GetRandomPassword = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "GetRandomPassword", @@ -53,6 +63,11 @@ var GetSecretValue = smithy.NewSchema(smithy.ShapeID{ Name: "GetSecretValue", }, smithy.ShapeTypeOperation, 0) +var ListResourcePolicies = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "ListResourcePolicies", +}, smithy.ShapeTypeOperation, 0) + var ListSecrets = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "ListSecrets", @@ -172,6 +187,34 @@ var _CreatedDateType = smithy.NewSchema(smithy.ShapeID{ Name: "CreatedDateType", }, smithy.ShapeTypeTimestamp, 0) +var CrossAccountPrimaryType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "CrossAccountPrimaryType", +}, smithy.ShapeTypeStructure, 3) +var CrossAccountPrimaryType_PrimarySecretARN *smithy.Schema + +var CrossAccountPrimaryType_ReplicationStatus *smithy.Schema + +var CrossAccountPrimaryType_StatusMessage *smithy.Schema + +var CrossAccountReplicaEntry = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "CrossAccountReplicaEntry", +}, smithy.ShapeTypeStructure, 4) +var CrossAccountReplicaEntry_ReplicaSecretARN *smithy.Schema + +var CrossAccountReplicaEntry_ReplicationRoleARN *smithy.Schema + +var CrossAccountReplicaEntry_ReplicationStatus *smithy.Schema + +var CrossAccountReplicaEntry_StatusMessage *smithy.Schema + +var _CrossAccountReplicaListType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "CrossAccountReplicaListType", +}, smithy.ShapeTypeList, 1) +var _CrossAccountReplicaListType_member *smithy.Schema + var DecryptionFailure = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "DecryptionFailure", @@ -459,6 +502,14 @@ var ReplicaRegionType_Region *smithy.Schema var ReplicaRegionType_KmsKeyId *smithy.Schema +var ReplicaRestrictionType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "ReplicaRestrictionType", +}, smithy.ShapeTypeEnum, 2) +var ReplicaRestrictionType_SameOrg *smithy.Schema + +var ReplicaRestrictionType_NoRestriction *smithy.Schema + var _ReplicationStatusListType = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "ReplicationStatusListType", @@ -496,6 +547,23 @@ var ResourceNotFoundException = smithy.NewSchema(smithy.ShapeID{ }, smithy.ShapeTypeStructure, 1, &smithytraits.Error{Type: "client"}) var ResourceNotFoundException_Message *smithy.Schema +var _ResourcePolicyNameType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "ResourcePolicyNameType", +}, smithy.ShapeTypeString, 0) + +var ResourcePolicySummary = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "ResourcePolicySummary", +}, smithy.ShapeTypeStructure, 1) +var ResourcePolicySummary_PolicyName *smithy.Schema + +var _ResourcePolicySummaryListType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "ResourcePolicySummaryListType", +}, smithy.ShapeTypeList, 1) +var _ResourcePolicySummaryListType_member *smithy.Schema + var _RoleARNType = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "RoleARNType", @@ -708,13 +776,17 @@ var _StatusMessageType = smithy.NewSchema(smithy.ShapeID{ var StatusType = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "StatusType", -}, smithy.ShapeTypeEnum, 3) +}, smithy.ShapeTypeEnum, 5) var StatusType_InSync *smithy.Schema var StatusType_Failed *smithy.Schema var StatusType_InProgress *smithy.Schema +var StatusType_Pending *smithy.Schema + +var StatusType_Detached *smithy.Schema + var Tag = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "Tag", @@ -764,6 +836,28 @@ var _ValidationErrorsType = smithy.NewSchema(smithy.ShapeID{ }, smithy.ShapeTypeList, 1) var _ValidationErrorsType_member *smithy.Schema +var AssociateCrossAccountReplicaRequest = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "AssociateCrossAccountReplicaRequest", +}, smithy.ShapeTypeStructure, 4) +var AssociateCrossAccountReplicaRequest_SecretId *smithy.Schema + +var AssociateCrossAccountReplicaRequest_CrossAccountReplicaARN *smithy.Schema + +var AssociateCrossAccountReplicaRequest_ReplicaRestriction *smithy.Schema + +var AssociateCrossAccountReplicaRequest_ReplicationRoleARN *smithy.Schema + +var AssociateCrossAccountReplicaResponse = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "AssociateCrossAccountReplicaResponse", +}, smithy.ShapeTypeStructure, 3) +var AssociateCrossAccountReplicaResponse_ARN *smithy.Schema + +var AssociateCrossAccountReplicaResponse_CrossAccountReplicaARN *smithy.Schema + +var AssociateCrossAccountReplicaResponse_ReplicationStatus *smithy.Schema + var BatchGetSecretValueRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "BatchGetSecretValueRequest", @@ -805,7 +899,7 @@ var CancelRotateSecretResponse_VersionId *smithy.Schema var CreateSecretRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "CreateSecretRequest", -}, smithy.ShapeTypeStructure, 10) +}, smithy.ShapeTypeStructure, 11) var CreateSecretRequest_Name *smithy.Schema var CreateSecretRequest_ClientRequestToken *smithy.Schema @@ -826,6 +920,8 @@ var CreateSecretRequest_ForceOverwriteReplicaSecret *smithy.Schema var CreateSecretRequest_Type *smithy.Schema +var CreateSecretRequest_CrossAccountPrimaryARN *smithy.Schema + var CreateSecretResponse = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "CreateSecretResponse", @@ -841,17 +937,21 @@ var CreateSecretResponse_ReplicationStatus *smithy.Schema var DeleteResourcePolicyRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "DeleteResourcePolicyRequest", -}, smithy.ShapeTypeStructure, 1) +}, smithy.ShapeTypeStructure, 2) var DeleteResourcePolicyRequest_SecretId *smithy.Schema +var DeleteResourcePolicyRequest_PolicyName *smithy.Schema + var DeleteResourcePolicyResponse = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "DeleteResourcePolicyResponse", -}, smithy.ShapeTypeStructure, 2) +}, smithy.ShapeTypeStructure, 3) var DeleteResourcePolicyResponse_ARN *smithy.Schema var DeleteResourcePolicyResponse_Name *smithy.Schema +var DeleteResourcePolicyResponse_PolicyName *smithy.Schema + var DeleteSecretRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "DeleteSecretRequest", @@ -881,7 +981,7 @@ var DescribeSecretRequest_SecretId *smithy.Schema var DescribeSecretResponse = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "DescribeSecretResponse", -}, smithy.ShapeTypeStructure, 21) +}, smithy.ShapeTypeStructure, 23) var DescribeSecretResponse_ARN *smithy.Schema var DescribeSecretResponse_Name *smithy.Schema @@ -924,6 +1024,26 @@ var DescribeSecretResponse_PrimaryRegion *smithy.Schema var DescribeSecretResponse_ReplicationStatus *smithy.Schema +var DescribeSecretResponse_CrossAccountPrimary *smithy.Schema + +var DescribeSecretResponse_CrossAccountReplicas *smithy.Schema + +var DisassociateCrossAccountReplicaRequest = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "DisassociateCrossAccountReplicaRequest", +}, smithy.ShapeTypeStructure, 2) +var DisassociateCrossAccountReplicaRequest_SecretId *smithy.Schema + +var DisassociateCrossAccountReplicaRequest_CrossAccountReplicaARN *smithy.Schema + +var DisassociateCrossAccountReplicaResponse = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "DisassociateCrossAccountReplicaResponse", +}, smithy.ShapeTypeStructure, 2) +var DisassociateCrossAccountReplicaResponse_ARN *smithy.Schema + +var DisassociateCrossAccountReplicaResponse_CrossAccountReplicaARN *smithy.Schema + var GetRandomPasswordRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "GetRandomPasswordRequest", @@ -953,19 +1073,23 @@ var GetRandomPasswordResponse_RandomPassword *smithy.Schema var GetResourcePolicyRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "GetResourcePolicyRequest", -}, smithy.ShapeTypeStructure, 1) +}, smithy.ShapeTypeStructure, 2) var GetResourcePolicyRequest_SecretId *smithy.Schema +var GetResourcePolicyRequest_PolicyName *smithy.Schema + var GetResourcePolicyResponse = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "GetResourcePolicyResponse", -}, smithy.ShapeTypeStructure, 3) +}, smithy.ShapeTypeStructure, 4) var GetResourcePolicyResponse_ARN *smithy.Schema var GetResourcePolicyResponse_Name *smithy.Schema var GetResourcePolicyResponse_ResourcePolicy *smithy.Schema +var GetResourcePolicyResponse_PolicyName *smithy.Schema + var GetSecretValueRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "GetSecretValueRequest", @@ -994,6 +1118,24 @@ var GetSecretValueResponse_VersionStages *smithy.Schema var GetSecretValueResponse_CreatedDate *smithy.Schema +var ListResourcePoliciesRequest = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "ListResourcePoliciesRequest", +}, smithy.ShapeTypeStructure, 3) +var ListResourcePoliciesRequest_SecretId *smithy.Schema + +var ListResourcePoliciesRequest_MaxResults *smithy.Schema + +var ListResourcePoliciesRequest_NextToken *smithy.Schema + +var ListResourcePoliciesResponse = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.secretsmanager", + Name: "ListResourcePoliciesResponse", +}, smithy.ShapeTypeStructure, 2) +var ListResourcePoliciesResponse_ResourcePolicies *smithy.Schema + +var ListResourcePoliciesResponse_NextToken *smithy.Schema + var ListSecretsRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "ListSecretsRequest", @@ -1045,21 +1187,25 @@ var ListSecretVersionIdsResponse_Name *smithy.Schema var PutResourcePolicyRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "PutResourcePolicyRequest", -}, smithy.ShapeTypeStructure, 3) +}, smithy.ShapeTypeStructure, 4) var PutResourcePolicyRequest_SecretId *smithy.Schema var PutResourcePolicyRequest_ResourcePolicy *smithy.Schema +var PutResourcePolicyRequest_PolicyName *smithy.Schema + var PutResourcePolicyRequest_BlockPublicPolicy *smithy.Schema var PutResourcePolicyResponse = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "PutResourcePolicyResponse", -}, smithy.ShapeTypeStructure, 2) +}, smithy.ShapeTypeStructure, 3) var PutResourcePolicyResponse_ARN *smithy.Schema var PutResourcePolicyResponse_Name *smithy.Schema +var PutResourcePolicyResponse_PolicyName *smithy.Schema + var PutSecretValueRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.secretsmanager", Name: "PutSecretValueRequest", @@ -1273,6 +1419,32 @@ func init() { _APIErrorListType_member = _APIErrorListType.AddMember("member", APIErrorType) + StatusType_InSync = StatusType.AddMember("InSync", smithyprelude.Unit) + + StatusType_Failed = StatusType.AddMember("Failed", smithyprelude.Unit) + + StatusType_InProgress = StatusType.AddMember("InProgress", smithyprelude.Unit) + + StatusType_Pending = StatusType.AddMember("Pending", smithyprelude.Unit) + + StatusType_Detached = StatusType.AddMember("Detached", smithyprelude.Unit) + + CrossAccountPrimaryType_PrimarySecretARN = CrossAccountPrimaryType.AddMember("PrimarySecretARN", _SecretARNType) + + CrossAccountPrimaryType_ReplicationStatus = CrossAccountPrimaryType.AddMember("ReplicationStatus", StatusType) + + CrossAccountPrimaryType_StatusMessage = CrossAccountPrimaryType.AddMember("StatusMessage", _StatusMessageType) + + CrossAccountReplicaEntry_ReplicaSecretARN = CrossAccountReplicaEntry.AddMember("ReplicaSecretARN", _SecretARNType) + + CrossAccountReplicaEntry_ReplicationRoleARN = CrossAccountReplicaEntry.AddMember("ReplicationRoleARN", _RoleARNType) + + CrossAccountReplicaEntry_ReplicationStatus = CrossAccountReplicaEntry.AddMember("ReplicationStatus", StatusType) + + CrossAccountReplicaEntry_StatusMessage = CrossAccountReplicaEntry.AddMember("StatusMessage", _StatusMessageType) + + _CrossAccountReplicaListType_member = _CrossAccountReplicaListType.AddMember("member", CrossAccountReplicaEntry) + DecryptionFailure_Message = DecryptionFailure.AddMember("Message", _ErrorMessage) EncryptionFailure_Message = EncryptionFailure.AddMember("Message", _ErrorMessage) @@ -1325,11 +1497,9 @@ func init() { _RemoveReplicaRegionListType_member = _RemoveReplicaRegionListType.AddMember("member", _RegionType) - StatusType_InSync = StatusType.AddMember("InSync", smithyprelude.Unit) + ReplicaRestrictionType_SameOrg = ReplicaRestrictionType.AddMember("SameOrg", smithyprelude.Unit) - StatusType_Failed = StatusType.AddMember("Failed", smithyprelude.Unit) - - StatusType_InProgress = StatusType.AddMember("InProgress", smithyprelude.Unit) + ReplicaRestrictionType_NoRestriction = ReplicaRestrictionType.AddMember("NoRestriction", smithyprelude.Unit) ReplicationStatusType_Region = ReplicationStatusType.AddMember("Region", _RegionType) @@ -1347,6 +1517,10 @@ func init() { ResourceNotFoundException_Message = ResourceNotFoundException.AddMember("Message", _ErrorMessage) + ResourcePolicySummary_PolicyName = ResourcePolicySummary.AddMember("PolicyName", _ResourcePolicyNameType) + + _ResourcePolicySummaryListType_member = _ResourcePolicySummaryListType.AddMember("member", ResourcePolicySummary) + RotationRulesType_AutomaticallyAfterDays = RotationRulesType.AddMember("AutomaticallyAfterDays", _AutomaticallyRotateAfterDaysType) RotationRulesType_Duration = RotationRulesType.AddMember("Duration", _DurationType) @@ -1457,6 +1631,20 @@ func init() { _ValidationErrorsType_member = _ValidationErrorsType.AddMember("member", ValidationErrorsEntry) + AssociateCrossAccountReplicaRequest_SecretId = AssociateCrossAccountReplicaRequest.AddMember("SecretId", _SecretIdType) + + AssociateCrossAccountReplicaRequest_CrossAccountReplicaARN = AssociateCrossAccountReplicaRequest.AddMember("CrossAccountReplicaARN", _SecretARNType) + + AssociateCrossAccountReplicaRequest_ReplicaRestriction = AssociateCrossAccountReplicaRequest.AddMember("ReplicaRestriction", ReplicaRestrictionType) + + AssociateCrossAccountReplicaRequest_ReplicationRoleARN = AssociateCrossAccountReplicaRequest.AddMember("ReplicationRoleARN", _RoleARNType) + + AssociateCrossAccountReplicaResponse_ARN = AssociateCrossAccountReplicaResponse.AddMember("ARN", _SecretARNType) + + AssociateCrossAccountReplicaResponse_CrossAccountReplicaARN = AssociateCrossAccountReplicaResponse.AddMember("CrossAccountReplicaARN", _SecretARNType) + + AssociateCrossAccountReplicaResponse_ReplicationStatus = AssociateCrossAccountReplicaResponse.AddMember("ReplicationStatus", StatusType) + BatchGetSecretValueRequest_SecretIdList = BatchGetSecretValueRequest.AddMember("SecretIdList", _SecretIdListType) BatchGetSecretValueRequest_Filters = BatchGetSecretValueRequest.AddMember("Filters", _FiltersListType) @@ -1499,6 +1687,8 @@ func init() { CreateSecretRequest_Type = CreateSecretRequest.AddMember("Type", _MedeaTypeType) + CreateSecretRequest_CrossAccountPrimaryARN = CreateSecretRequest.AddMember("CrossAccountPrimaryARN", _SecretARNType) + CreateSecretResponse_ARN = CreateSecretResponse.AddMember("ARN", _SecretARNType) CreateSecretResponse_Name = CreateSecretResponse.AddMember("Name", _SecretNameType) @@ -1509,10 +1699,14 @@ func init() { DeleteResourcePolicyRequest_SecretId = DeleteResourcePolicyRequest.AddMember("SecretId", _SecretIdType) + DeleteResourcePolicyRequest_PolicyName = DeleteResourcePolicyRequest.AddMember("PolicyName", _ResourcePolicyNameType) + DeleteResourcePolicyResponse_ARN = DeleteResourcePolicyResponse.AddMember("ARN", _SecretARNType) DeleteResourcePolicyResponse_Name = DeleteResourcePolicyResponse.AddMember("Name", _NameType) + DeleteResourcePolicyResponse_PolicyName = DeleteResourcePolicyResponse.AddMember("PolicyName", _ResourcePolicyNameType) + DeleteSecretRequest_SecretId = DeleteSecretRequest.AddMember("SecretId", _SecretIdType) DeleteSecretRequest_RecoveryWindowInDays = DeleteSecretRequest.AddMember("RecoveryWindowInDays", _RecoveryWindowInDaysType) @@ -1569,6 +1763,18 @@ func init() { DescribeSecretResponse_ReplicationStatus = DescribeSecretResponse.AddMember("ReplicationStatus", _ReplicationStatusListType) + DescribeSecretResponse_CrossAccountPrimary = DescribeSecretResponse.AddMember("CrossAccountPrimary", CrossAccountPrimaryType) + + DescribeSecretResponse_CrossAccountReplicas = DescribeSecretResponse.AddMember("CrossAccountReplicas", _CrossAccountReplicaListType) + + DisassociateCrossAccountReplicaRequest_SecretId = DisassociateCrossAccountReplicaRequest.AddMember("SecretId", _SecretIdType) + + DisassociateCrossAccountReplicaRequest_CrossAccountReplicaARN = DisassociateCrossAccountReplicaRequest.AddMember("CrossAccountReplicaARN", _SecretARNType) + + DisassociateCrossAccountReplicaResponse_ARN = DisassociateCrossAccountReplicaResponse.AddMember("ARN", _SecretARNType) + + DisassociateCrossAccountReplicaResponse_CrossAccountReplicaARN = DisassociateCrossAccountReplicaResponse.AddMember("CrossAccountReplicaARN", _SecretARNType) + GetRandomPasswordRequest_PasswordLength = GetRandomPasswordRequest.AddMember("PasswordLength", _PasswordLengthType) GetRandomPasswordRequest_ExcludeCharacters = GetRandomPasswordRequest.AddMember("ExcludeCharacters", _ExcludeCharactersType) @@ -1589,12 +1795,16 @@ func init() { GetResourcePolicyRequest_SecretId = GetResourcePolicyRequest.AddMember("SecretId", _SecretIdType) + GetResourcePolicyRequest_PolicyName = GetResourcePolicyRequest.AddMember("PolicyName", _ResourcePolicyNameType) + GetResourcePolicyResponse_ARN = GetResourcePolicyResponse.AddMember("ARN", _SecretARNType) GetResourcePolicyResponse_Name = GetResourcePolicyResponse.AddMember("Name", _NameType) GetResourcePolicyResponse_ResourcePolicy = GetResourcePolicyResponse.AddMember("ResourcePolicy", _NonEmptyResourcePolicyType) + GetResourcePolicyResponse_PolicyName = GetResourcePolicyResponse.AddMember("PolicyName", _ResourcePolicyNameType) + GetSecretValueRequest_SecretId = GetSecretValueRequest.AddMember("SecretId", _SecretIdType) GetSecretValueRequest_VersionId = GetSecretValueRequest.AddMember("VersionId", _SecretVersionIdType) @@ -1615,6 +1825,16 @@ func init() { GetSecretValueResponse_CreatedDate = GetSecretValueResponse.AddMember("CreatedDate", _CreatedDateType) + ListResourcePoliciesRequest_SecretId = ListResourcePoliciesRequest.AddMember("SecretId", _SecretIdType) + + ListResourcePoliciesRequest_MaxResults = ListResourcePoliciesRequest.AddMember("MaxResults", _MaxResultsType) + + ListResourcePoliciesRequest_NextToken = ListResourcePoliciesRequest.AddMember("NextToken", _NextTokenType) + + ListResourcePoliciesResponse_ResourcePolicies = ListResourcePoliciesResponse.AddMember("ResourcePolicies", _ResourcePolicySummaryListType) + + ListResourcePoliciesResponse_NextToken = ListResourcePoliciesResponse.AddMember("NextToken", _NextTokenType) + ListSecretsRequest_IncludePlannedDeletion = ListSecretsRequest.AddMember("IncludePlannedDeletion", _BooleanType) ListSecretsRequest_MaxResults = ListSecretsRequest.AddMember("MaxResults", _MaxResultsType) @@ -1651,12 +1871,16 @@ func init() { PutResourcePolicyRequest_ResourcePolicy = PutResourcePolicyRequest.AddMember("ResourcePolicy", _NonEmptyResourcePolicyType) + PutResourcePolicyRequest_PolicyName = PutResourcePolicyRequest.AddMember("PolicyName", _ResourcePolicyNameType) + PutResourcePolicyRequest_BlockPublicPolicy = PutResourcePolicyRequest.AddMember("BlockPublicPolicy", _BooleanType) PutResourcePolicyResponse_ARN = PutResourcePolicyResponse.AddMember("ARN", _SecretARNType) PutResourcePolicyResponse_Name = PutResourcePolicyResponse.AddMember("Name", _NameType) + PutResourcePolicyResponse_PolicyName = PutResourcePolicyResponse.AddMember("PolicyName", _ResourcePolicyNameType) + PutSecretValueRequest_SecretId = PutSecretValueRequest.AddMember("SecretId", _SecretIdType) PutSecretValueRequest_ClientRequestToken = PutSecretValueRequest.AddMember("ClientRequestToken", _ClientRequestTokenType) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/common_serde.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/common_serde.go index 72d2cb0..ce479d2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/common_serde.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/common_serde.go @@ -26,6 +26,16 @@ func serializeAPIErrorListType(s smithy.ShapeSerializer, schema *smithy.Schema, s.CloseList() } +func serializeCrossAccountReplicaListType(s smithy.ShapeSerializer, schema *smithy.Schema, v []CrossAccountReplicaEntry) { + s.WriteList(schema) + for _, vv := range v { + s.WriteStruct(schema.ListMember()) + vv.SerializeMembers(s) + s.CloseStruct() + } + s.CloseList() +} + func serializeExternalSecretRotationMetadataType(s smithy.ShapeSerializer, schema *smithy.Schema, v []ExternalSecretRotationMetadataItem) { s.WriteList(schema) for _, vv := range v { @@ -80,6 +90,16 @@ func serializeReplicationStatusListType(s smithy.ShapeSerializer, schema *smithy s.CloseList() } +func serializeResourcePolicySummaryListType(s smithy.ShapeSerializer, schema *smithy.Schema, v []ResourcePolicySummary) { + s.WriteList(schema) + for _, vv := range v { + s.WriteStruct(schema.ListMember()) + vv.SerializeMembers(s) + s.CloseStruct() + } + s.CloseList() +} + func serializeSecretIdListType(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) { s.WriteList(schema) for _, vv := range v { @@ -198,6 +218,28 @@ func deserializeAPIErrorListType(d smithy.ShapeDeserializer, s *smithy.Schema, v }) } +func deserializeCrossAccountReplicaListType(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]CrossAccountReplicaEntry) error { + *v = make([]CrossAccountReplicaEntry, 0) + var vv CrossAccountReplicaEntry + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero CrossAccountReplicaEntry + *v = append(*v, zero) + return nil + } + + vv = CrossAccountReplicaEntry{} + if err := vv.Deserialize(d); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + func deserializeExternalSecretRotationMetadataType(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]ExternalSecretRotationMetadataItem) error { *v = make([]ExternalSecretRotationMetadataItem, 0) var vv ExternalSecretRotationMetadataItem @@ -327,6 +369,28 @@ func deserializeReplicationStatusListType(d smithy.ShapeDeserializer, s *smithy. }) } +func deserializeResourcePolicySummaryListType(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]ResourcePolicySummary) error { + *v = make([]ResourcePolicySummary, 0) + var vv ResourcePolicySummary + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero ResourcePolicySummary + *v = append(*v, zero) + return nil + } + + vv = ResourcePolicySummary{} + if err := vv.Deserialize(d); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + func deserializeSecretIdListType(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error { *v = make([]string, 0) var vv string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/enums.go index 699044d..f3da27f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/enums.go @@ -31,6 +31,25 @@ func (FilterNameStringType) Values() []FilterNameStringType { } } +type ReplicaRestrictionType string + +// Enum values for ReplicaRestrictionType +const ( + ReplicaRestrictionTypeSameOrg ReplicaRestrictionType = "SameOrg" + ReplicaRestrictionTypeNoRestriction ReplicaRestrictionType = "NoRestriction" +) + +// Values returns all known values for ReplicaRestrictionType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ReplicaRestrictionType) Values() []ReplicaRestrictionType { + return []ReplicaRestrictionType{ + "SameOrg", + "NoRestriction", + } +} + type SortByType string // Enum values for SortByType @@ -80,6 +99,8 @@ const ( StatusTypeInSync StatusType = "InSync" StatusTypeFailed StatusType = "Failed" StatusTypeInProgress StatusType = "InProgress" + StatusTypePending StatusType = "Pending" + StatusTypeDetached StatusType = "Detached" ) // Values returns all known values for StatusType. Note that this can be expanded @@ -91,5 +112,7 @@ func (StatusType) Values() []StatusType { "InSync", "Failed", "InProgress", + "Pending", + "Detached", } } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/types.go index bc1e60d..ccbbb25 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/types.go @@ -61,6 +61,148 @@ func (v *APIErrorType) Deserialize(d smithy.ShapeDeserializer) error { }) } +// Contains information about the primary secret that a cross-account replica +// secret replicates from, including its ARN and replication status. This +// information is only available for cross-account replica secrets. +type CrossAccountPrimaryType struct { + + // The ARN of the primary secret replicating into this replica secret. + PrimarySecretARN *string + + // The status of replication from the primary secret to this replica. The status + // can be: + // + // - InSync : Replication to the replica secret is complete. + // + // - Failed : Replication to the replica secret was unable to be completed. + // + // - InProgress : Replication to the replica secret has started but is not + // complete. + // + // - Pending : Replication has not yet started for the replica secret. + // + // - Detached : Replication to the replica secret was stopped by the primary. + ReplicationStatus StatusType + + // A message that describes the replication status, if Secrets Manager has more + // information to provide. + StatusMessage *string + + noSmithyDocumentSerde +} + +func (v *CrossAccountPrimaryType) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.CrossAccountPrimaryType) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *CrossAccountPrimaryType) SerializeMembers(s smithy.ShapeSerializer) { + if v.PrimarySecretARN != nil { + s.WriteString(schemas.CrossAccountPrimaryType_PrimarySecretARN, *v.PrimarySecretARN) + } + if v.ReplicationStatus != "" { + s.WriteString(schemas.CrossAccountPrimaryType_ReplicationStatus, string(v.ReplicationStatus)) + } + if v.StatusMessage != nil { + s.WriteString(schemas.CrossAccountPrimaryType_StatusMessage, *v.StatusMessage) + } +} +func (v *CrossAccountPrimaryType) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.CrossAccountPrimaryType, func(s *smithy.Schema) error { + switch s { + case schemas.CrossAccountPrimaryType_PrimarySecretARN: + v.PrimarySecretARN = new(string) + return d.ReadString(schemas.CrossAccountPrimaryType_PrimarySecretARN, v.PrimarySecretARN) + case schemas.CrossAccountPrimaryType_ReplicationStatus: + var ev string + if err := d.ReadString(schemas.CrossAccountPrimaryType_ReplicationStatus, &ev); err != nil { + return err + } + v.ReplicationStatus = StatusType(ev) + return nil + case schemas.CrossAccountPrimaryType_StatusMessage: + v.StatusMessage = new(string) + return d.ReadString(schemas.CrossAccountPrimaryType_StatusMessage, v.StatusMessage) + } + return nil + }) +} + +// Information about a cross-account replica secret. This information is only +// available for cross-account primary secrets. +type CrossAccountReplicaEntry struct { + + // The ARN of the replica secret. + ReplicaSecretARN *string + + // The ARN of the IAM role that Secrets Manager assumes to replicate to this + // replica, if one was specified when the replica was associated. + ReplicationRoleARN *string + + // The status of replication from this primary secret. The status can be: + // + // - InSync : Replication from the primary secret is complete. + // + // - Failed : Replication from the primary secret was unable to be completed. + // + // - InProgress : Replication from the primary secret has started but is not + // complete. + // + // - Detached : Replication from the primary secret was stopped by the replica. + ReplicationStatus StatusType + + // A message that describes the replication status, if Secrets Manager has more + // information to provide. + StatusMessage *string + + noSmithyDocumentSerde +} + +func (v *CrossAccountReplicaEntry) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.CrossAccountReplicaEntry) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *CrossAccountReplicaEntry) SerializeMembers(s smithy.ShapeSerializer) { + if v.ReplicaSecretARN != nil { + s.WriteString(schemas.CrossAccountReplicaEntry_ReplicaSecretARN, *v.ReplicaSecretARN) + } + if v.ReplicationRoleARN != nil { + s.WriteString(schemas.CrossAccountReplicaEntry_ReplicationRoleARN, *v.ReplicationRoleARN) + } + if v.ReplicationStatus != "" { + s.WriteString(schemas.CrossAccountReplicaEntry_ReplicationStatus, string(v.ReplicationStatus)) + } + if v.StatusMessage != nil { + s.WriteString(schemas.CrossAccountReplicaEntry_StatusMessage, *v.StatusMessage) + } +} +func (v *CrossAccountReplicaEntry) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.CrossAccountReplicaEntry, func(s *smithy.Schema) error { + switch s { + case schemas.CrossAccountReplicaEntry_ReplicaSecretARN: + v.ReplicaSecretARN = new(string) + return d.ReadString(schemas.CrossAccountReplicaEntry_ReplicaSecretARN, v.ReplicaSecretARN) + case schemas.CrossAccountReplicaEntry_ReplicationRoleARN: + v.ReplicationRoleARN = new(string) + return d.ReadString(schemas.CrossAccountReplicaEntry_ReplicationRoleARN, v.ReplicationRoleARN) + case schemas.CrossAccountReplicaEntry_ReplicationStatus: + var ev string + if err := d.ReadString(schemas.CrossAccountReplicaEntry_ReplicationStatus, &ev); err != nil { + return err + } + v.ReplicationStatus = StatusType(ev) + return nil + case schemas.CrossAccountReplicaEntry_StatusMessage: + v.StatusMessage = new(string) + return d.ReadString(schemas.CrossAccountReplicaEntry_StatusMessage, v.StatusMessage) + } + return nil + }) +} + // The metadata needed to successfully rotate a managed external secret. A list of // key value pairs in JSON format specified by the partner. For more information, // see [Managed external secret partners]. @@ -285,6 +427,41 @@ func (v *ReplicationStatusType) Deserialize(d smithy.ShapeDeserializer) error { }) } +// A structure that contains details about a resource policy attached to a secret. +// It does not contain the contents of the resource policy. To view the contents of +// the policy, use [GetResourcePolicy]. +// +// [GetResourcePolicy]: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetResourcePolicy.html +type ResourcePolicySummary struct { + + // The name of the resource policy. + PolicyName *string + + noSmithyDocumentSerde +} + +func (v *ResourcePolicySummary) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.ResourcePolicySummary) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *ResourcePolicySummary) SerializeMembers(s smithy.ShapeSerializer) { + if v.PolicyName != nil { + s.WriteString(schemas.ResourcePolicySummary_PolicyName, *v.PolicyName) + } +} +func (v *ResourcePolicySummary) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.ResourcePolicySummary, func(s *smithy.Schema) error { + switch s { + case schemas.ResourcePolicySummary_PolicyName: + v.PolicyName = new(string) + return d.ReadString(schemas.ResourcePolicySummary_PolicyName, v.PolicyName) + } + return nil + }) +} + // A structure that defines the rotation configuration for the secret. type RotationRulesType struct { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/validators.go index 90159c6..fc1dfea 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/validators.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/validators.go @@ -9,6 +9,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAssociateCrossAccountReplica struct { +} + +func (*validateOpAssociateCrossAccountReplica) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateCrossAccountReplica) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateCrossAccountReplicaInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateCrossAccountReplicaInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCancelRotateSecret struct { } @@ -109,6 +129,26 @@ func (m *validateOpDescribeSecret) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpDisassociateCrossAccountReplica struct { +} + +func (*validateOpDisassociateCrossAccountReplica) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDisassociateCrossAccountReplica) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DisassociateCrossAccountReplicaInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDisassociateCrossAccountReplicaInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetResourcePolicy struct { } @@ -149,6 +189,26 @@ func (m *validateOpGetSecretValue) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpListResourcePolicies struct { +} + +func (*validateOpListResourcePolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListResourcePolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListResourcePoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListResourcePoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListSecretVersionIds struct { } @@ -409,6 +469,10 @@ func (m *validateOpValidateResourcePolicy) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +func addOpAssociateCrossAccountReplicaValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateCrossAccountReplica{}, middleware.After) +} + func addOpCancelRotateSecretValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCancelRotateSecret{}, middleware.After) } @@ -429,6 +493,10 @@ func addOpDescribeSecretValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeSecret{}, middleware.After) } +func addOpDisassociateCrossAccountReplicaValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateCrossAccountReplica{}, middleware.After) +} + func addOpGetResourcePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetResourcePolicy{}, middleware.After) } @@ -437,6 +505,10 @@ func addOpGetSecretValueValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSecretValue{}, middleware.After) } +func addOpListResourcePoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListResourcePolicies{}, middleware.After) +} + func addOpListSecretVersionIdsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListSecretVersionIds{}, middleware.After) } @@ -489,6 +561,24 @@ func addOpValidateResourcePolicyValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpValidateResourcePolicy{}, middleware.After) } +func validateOpAssociateCrossAccountReplicaInput(v *AssociateCrossAccountReplicaInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateCrossAccountReplicaInput"} + if v.SecretId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SecretId")) + } + if v.CrossAccountReplicaARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("CrossAccountReplicaARN")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCancelRotateSecretInput(v *CancelRotateSecretInput) error { if v == nil { return nil @@ -564,6 +654,24 @@ func validateOpDescribeSecretInput(v *DescribeSecretInput) error { } } +func validateOpDisassociateCrossAccountReplicaInput(v *DisassociateCrossAccountReplicaInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DisassociateCrossAccountReplicaInput"} + if v.SecretId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SecretId")) + } + if v.CrossAccountReplicaARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("CrossAccountReplicaARN")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetResourcePolicyInput(v *GetResourcePolicyInput) error { if v == nil { return nil @@ -594,6 +702,21 @@ func validateOpGetSecretValueInput(v *GetSecretValueInput) error { } } +func validateOpListResourcePoliciesInput(v *ListResourcePoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListResourcePoliciesInput"} + if v.SecretId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SecretId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListSecretVersionIdsInput(v *ListSecretVersionIdsInput) error { if v == nil { return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md index 1d19fae..b5cb014 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.14.0 (2026-11-18) + +* **Feature**: These APIs enable customers and administrators to list, view, and revoke AWS Sign-In Sessions programmatically using the AWS CLI and SDKs, providing greater visibility and control over authenticated access. + # v1.13.1 (2026-11-10) * **Dependency Update**: Update to smithy-go v1.28.9. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_BatchRevokeSessions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_BatchRevokeSessions.go new file mode 100644 index 0000000..5658762 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_BatchRevokeSessions.go @@ -0,0 +1,157 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/service/signin/schemas" + "github.com/aws/aws-sdk-go-v2/service/signin/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" +) + +// Revokes up to five sign-in sessions. A revoked session can no longer be +// refreshed. Revoking a session that is already revoked succeeds. Each session +// must belong to the identity specified by principalArn, or to the caller if +// principalArn is omitted. Failures for individual sessions are returned in the +// errors list and do not fail the whole request. +func (c *Client) BatchRevokeSessions(ctx context.Context, params *BatchRevokeSessionsInput, optFns ...func(*Options)) (*BatchRevokeSessionsOutput, error) { + if params == nil { + params = &BatchRevokeSessionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchRevokeSessions", params, optFns, c.addOperationBatchRevokeSessionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchRevokeSessionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Input for BatchRevokeSessions operation +type BatchRevokeSessionsInput struct { + + // The ARNs of the sessions to revoke + // + // This member is required. + SessionArns []string + + // The identity that owns the sessions. Omit to use the caller. Specify + // arn:aws:iam::{account-id}:* to revoke any session in the account. + PrincipalArn *string + + // The reason for revoking the sessions + Reason *string + + noSmithyDocumentSerde +} + +func (v *BatchRevokeSessionsInput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.BatchRevokeSessionsInput) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *BatchRevokeSessionsInput) SerializeMembers(s smithy.ShapeSerializer) { + if v.PrincipalArn != nil { + s.WriteString(schemas.BatchRevokeSessionsInput_principalArn, *v.PrincipalArn) + } + if v.Reason != nil { + s.WriteString(schemas.BatchRevokeSessionsInput_reason, *v.Reason) + } + if v.SessionArns != nil { + serializeSessionArnList(s, schemas.BatchRevokeSessionsInput_sessionArns, v.SessionArns) + } +} +func (in *BatchRevokeSessionsInput) bindEndpointParams(p *EndpointParameters) { + + p.IsControlPlane = ptr.Bool(true) +} + +// Output for BatchRevokeSessions operation +type BatchRevokeSessionsOutput struct { + + // Sessions that could not be revoked + // + // This member is required. + Errors []types.BatchRevokeSessionError + + // Sessions that were revoked + // + // This member is required. + RevokedSessions []types.RevokedSession + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (v *BatchRevokeSessionsOutput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.BatchRevokeSessionsOutput) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *BatchRevokeSessionsOutput) SerializeMembers(s smithy.ShapeSerializer) { + if v.Errors != nil { + serializeBatchRevokeSessionErrorList(s, schemas.BatchRevokeSessionsOutput_errors, v.Errors) + } + if v.RevokedSessions != nil { + serializeRevokedSessionList(s, schemas.BatchRevokeSessionsOutput_revokedSessions, v.RevokedSessions) + } +} +func (v *BatchRevokeSessionsOutput) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.BatchRevokeSessionsOutput, func(s *smithy.Schema) error { + switch s { + case schemas.BatchRevokeSessionsOutput_errors: + return deserializeBatchRevokeSessionErrorList(d, schemas.BatchRevokeSessionsOutput_errors, &v.Errors) + case schemas.BatchRevokeSessionsOutput_revokedSessions: + return deserializeRevokedSessionList(d, schemas.BatchRevokeSessionsOutput_revokedSessions, &v.RevokedSessions) + } + return nil + }) +} +func (c *Client) addOperationBatchRevokeSessionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&serializeRequestMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.BatchRevokeSessions, schemas.BatchRevokeSessionsInput, schemas.BatchRevokeSessionsOutput)}, middleware.After); err != nil { + return err + } + if err := stack.Deserialize.Add(&deserializeResponseMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.BatchRevokeSessions, schemas.BatchRevokeSessionsInput, schemas.BatchRevokeSessionsOutput), output: &BatchRevokeSessionsOutput{}}, middleware.After); err != nil { + return err + } + + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpBatchRevokeSessionsValidationMiddleware(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithIAM.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithIAM.go index ca3431a..4428d86 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithIAM.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithIAM.go @@ -69,13 +69,13 @@ func (in *CreateOAuth2TokenWithIAMInput) bindEndpointParams(p *EndpointParameter // §5.1. type CreateOAuth2TokenWithIAMOutput struct { - // Access token containing principal identity, resource scope, and session + // The access token containing principal identity, resource scope, and session // metadata. // // This member is required. AccessToken *string - // Token lifetime in seconds. Value is the minimum of the caller's session + // The token lifetime in seconds. Value is the minimum of the caller's session // validity and 1 hour (3600 seconds). // // This member is required. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithTokenExchange.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithTokenExchange.go index bc3cba5..ec6827b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithTokenExchange.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_CreateOAuth2TokenWithTokenExchange.go @@ -30,20 +30,38 @@ func (c *Client) CreateOAuth2TokenWithTokenExchange(ctx context.Context, params // Input structure for CreateOAuth2TokenWithTokenExchange operation type CreateOAuth2TokenWithTokenExchangeInput struct { - // The OAuth 2.0 grant type. Currently only supports - // "urn:ietf:params:oauth:grant-type:token-exchange". + // The OAuth 2.0 grant type. Currently supports + // "urn:ietf:params:oauth:grant-type:token-exchange" and + // "urn:ietf:params:oauth:grant-type:jwt-bearer". // // This member is required. GrantType *string - // The OAuth resource for which the access token is requested. Required when - // "grant_type=urn:ietf:params:oauth:grant-type:token-exchange". Example: - // "glue.amazonaws.com". + // The JWT authorization grant, as defined in RFC 7523. Required when + // "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer". + Assertion *string + + // The OAuth 2.0 client identifier. If provided with + // "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer", must match the + // assertion's "client_id" claim. + ClientId *string + + // The OAuth resource for which the access token is requested: + // + // - "grant_type=urn:ietf:params:oauth:grant-type:token-exchange": Required. + // Must be a service principal. Example: "glue.amazonaws.com". + // - "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer": Required when the + // assertion has no "resource" claim, otherwise must match it. Must be a URI. + // Example: "https://aws-mcp.us-east-1.api.aws/mcp". Resource *string - // IAM managed policy Amazon Resource Names (ARNs) to apply as session policies - // that further scope down the permissions of the issued access token, provided as - // a space-delimited list. Example: "arn:aws:iam::444455556666:policy/MyPolicy". + // The IAM managed policy Amazon Resource Names (ARNs) to apply as session + // policies that further scope down the permissions of the issued access token, + // provided as a space-delimited list. Example: + // "arn:aws:iam::444455556666:policy/MyPolicy". + // + // If provided with "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer", must + // match the assertion's "scope" claim. Scope *string // The subject token that represents the identity of the party on whose behalf the @@ -66,6 +84,12 @@ func (v *CreateOAuth2TokenWithTokenExchangeInput) Serialize(s smithy.ShapeSerial } func (v *CreateOAuth2TokenWithTokenExchangeInput) SerializeMembers(s smithy.ShapeSerializer) { + if v.Assertion != nil { + s.WriteString(schemas.CreateOAuth2TokenWithTokenExchangeRequest_assertion, *v.Assertion) + } + if v.ClientId != nil { + s.WriteString(schemas.CreateOAuth2TokenWithTokenExchangeRequest_clientId, *v.ClientId) + } if v.GrantType != nil { s.WriteString(schemas.CreateOAuth2TokenWithTokenExchangeRequest_grantType, *v.GrantType) } @@ -89,18 +113,18 @@ func (in *CreateOAuth2TokenWithTokenExchangeInput) bindEndpointParams(p *Endpoin // Output structure for CreateOAuth2TokenWithTokenExchange operation. // -// Contains the access token, issued token type, token type, and expiration as -// defined in RFC 6749 §5.1 and RFC 8693 §2.2.1. +// Contains the access token, token type, and expiration as defined in RFC 6749 +// §5.1, plus fields specific to the grant type. type CreateOAuth2TokenWithTokenExchangeOutput struct { - // Access token containing principal identity, resource scope, and session + // The access token containing principal identity, resource scope, and session // metadata. // // This member is required. AccessToken *string - // Token lifetime in seconds. Value is the minimum of the subject token's validity - // and 1 hour (3600 seconds). + // The token lifetime in seconds. Value is the minimum of the provided token's + // validity and 1 hour (3600 seconds). // // This member is required. ExpiresIn *int32 @@ -110,10 +134,20 @@ type CreateOAuth2TokenWithTokenExchangeOutput struct { // This member is required. TokenType *string - // The token type of the issued token. Always + // The token type of the issued token. Returned when + // "grant_type=urn:ietf:params:oauth:grant-type:token-exchange". Value is // "urn:ietf:params:oauth:token-type:access_token" as defined in RFC 8693 §2.2.1. IssuedTokenType *string + // The resource the access token is scoped to. Returned when + // "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer". + Resource *string + + // The IAM managed policy ARNs applied as session policies, as a space-delimited + // list. Returned when "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer" and + // the assertion has a scope. + Scope *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -136,6 +170,12 @@ func (v *CreateOAuth2TokenWithTokenExchangeOutput) SerializeMembers(s smithy.Sha if v.IssuedTokenType != nil { s.WriteString(schemas.CreateOAuth2TokenWithTokenExchangeResponse_issuedTokenType, *v.IssuedTokenType) } + if v.Resource != nil { + s.WriteString(schemas.CreateOAuth2TokenWithTokenExchangeResponse_resource, *v.Resource) + } + if v.Scope != nil { + s.WriteString(schemas.CreateOAuth2TokenWithTokenExchangeResponse_scope, *v.Scope) + } if v.TokenType != nil { s.WriteString(schemas.CreateOAuth2TokenWithTokenExchangeResponse_tokenType, *v.TokenType) } @@ -152,6 +192,12 @@ func (v *CreateOAuth2TokenWithTokenExchangeOutput) Deserialize(d smithy.ShapeDes case schemas.CreateOAuth2TokenWithTokenExchangeResponse_issuedTokenType: v.IssuedTokenType = new(string) return d.ReadString(schemas.CreateOAuth2TokenWithTokenExchangeResponse_issuedTokenType, v.IssuedTokenType) + case schemas.CreateOAuth2TokenWithTokenExchangeResponse_resource: + v.Resource = new(string) + return d.ReadString(schemas.CreateOAuth2TokenWithTokenExchangeResponse_resource, v.Resource) + case schemas.CreateOAuth2TokenWithTokenExchangeResponse_scope: + v.Scope = new(string) + return d.ReadString(schemas.CreateOAuth2TokenWithTokenExchangeResponse_scope, v.Scope) case schemas.CreateOAuth2TokenWithTokenExchangeResponse_tokenType: v.TokenType = new(string) return d.ReadString(schemas.CreateOAuth2TokenWithTokenExchangeResponse_tokenType, v.TokenType) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetSession.go new file mode 100644 index 0000000..482a3ad --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_GetSession.go @@ -0,0 +1,263 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/service/signin/schemas" + "github.com/aws/aws-sdk-go-v2/service/signin/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" +) + +// Returns the details of a single sign-in session. The session must belong to the +// identity specified by principalArn, or to the caller if principalArn is omitted. +// A session that belongs to a different identity or account is reported as not +// found. +func (c *Client) GetSession(ctx context.Context, params *GetSessionInput, optFns ...func(*Options)) (*GetSessionOutput, error) { + if params == nil { + params = &GetSessionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSession", params, optFns, c.addOperationGetSessionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSessionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Input for GetSession operation +type GetSessionInput struct { + + // The ARN of the session to retrieve + // + // This member is required. + SessionArn *string + + // The identity that owns the session. Omit to use the caller. Specify + // arn:aws:iam::{account-id}:* to retrieve any session in the account. + PrincipalArn *string + + noSmithyDocumentSerde +} + +func (v *GetSessionInput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.GetSessionInput) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *GetSessionInput) SerializeMembers(s smithy.ShapeSerializer) { + if v.PrincipalArn != nil { + s.WriteString(schemas.GetSessionInput_principalArn, *v.PrincipalArn) + } + if v.SessionArn != nil { + s.WriteString(schemas.GetSessionInput_sessionArn, *v.SessionArn) + } +} +func (in *GetSessionInput) bindEndpointParams(p *EndpointParameters) { + + p.IsControlPlane = ptr.Bool(true) +} + +// Output for GetSession operation +type GetSessionOutput struct { + + // The time the session expires, in Unix epoch seconds + // + // This member is required. + ExpiresAt *int64 + + // The time the session was created, in Unix epoch seconds + // + // This member is required. + IssuedAt *int64 + + // The IAM identity that owns the session + // + // This member is required. + PrincipalArn *string + + // The session ARN + // + // This member is required. + SessionArn *string + + // The OAuth client that created the session + ClientId *string + + // The type of OAuth client that created the session + ClientType types.ClientType + + // The AWS Region where the session was created + IssuedInRegion *string + + // The time the session was last refreshed, in Unix epoch seconds + LastUsedAt *int64 + + // The ARN of the session this session originated from + OriginSessionArn *string + + // The resource that the session's tokens are bound to + Resource *string + + // The IAM role for the session, when the owner is a role + Role *string + + // The session status + Status types.SessionStatus + + // The user agent captured when the session was created or last refreshed + UserAgent *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (v *GetSessionOutput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.GetSessionOutput) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *GetSessionOutput) SerializeMembers(s smithy.ShapeSerializer) { + if v.ClientId != nil { + s.WriteString(schemas.GetSessionOutput_clientId, *v.ClientId) + } + if v.ClientType != "" { + s.WriteString(schemas.GetSessionOutput_clientType, string(v.ClientType)) + } + if v.ExpiresAt != nil { + s.WriteInt64(schemas.GetSessionOutput_expiresAt, *v.ExpiresAt) + } + if v.IssuedAt != nil { + s.WriteInt64(schemas.GetSessionOutput_issuedAt, *v.IssuedAt) + } + if v.IssuedInRegion != nil { + s.WriteString(schemas.GetSessionOutput_issuedInRegion, *v.IssuedInRegion) + } + if v.LastUsedAt != nil { + s.WriteInt64(schemas.GetSessionOutput_lastUsedAt, *v.LastUsedAt) + } + if v.OriginSessionArn != nil { + s.WriteString(schemas.GetSessionOutput_originSessionArn, *v.OriginSessionArn) + } + if v.PrincipalArn != nil { + s.WriteString(schemas.GetSessionOutput_principalArn, *v.PrincipalArn) + } + if v.Resource != nil { + s.WriteString(schemas.GetSessionOutput_resource, *v.Resource) + } + if v.Role != nil { + s.WriteString(schemas.GetSessionOutput_role, *v.Role) + } + if v.SessionArn != nil { + s.WriteString(schemas.GetSessionOutput_sessionArn, *v.SessionArn) + } + if v.Status != "" { + s.WriteString(schemas.GetSessionOutput_status, string(v.Status)) + } + if v.UserAgent != nil { + s.WriteString(schemas.GetSessionOutput_userAgent, *v.UserAgent) + } +} +func (v *GetSessionOutput) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.GetSessionOutput, func(s *smithy.Schema) error { + switch s { + case schemas.GetSessionOutput_clientId: + v.ClientId = new(string) + return d.ReadString(schemas.GetSessionOutput_clientId, v.ClientId) + case schemas.GetSessionOutput_clientType: + var ev string + if err := d.ReadString(schemas.GetSessionOutput_clientType, &ev); err != nil { + return err + } + v.ClientType = types.ClientType(ev) + return nil + case schemas.GetSessionOutput_expiresAt: + v.ExpiresAt = new(int64) + return d.ReadInt64(schemas.GetSessionOutput_expiresAt, v.ExpiresAt) + case schemas.GetSessionOutput_issuedAt: + v.IssuedAt = new(int64) + return d.ReadInt64(schemas.GetSessionOutput_issuedAt, v.IssuedAt) + case schemas.GetSessionOutput_issuedInRegion: + v.IssuedInRegion = new(string) + return d.ReadString(schemas.GetSessionOutput_issuedInRegion, v.IssuedInRegion) + case schemas.GetSessionOutput_lastUsedAt: + v.LastUsedAt = new(int64) + return d.ReadInt64(schemas.GetSessionOutput_lastUsedAt, v.LastUsedAt) + case schemas.GetSessionOutput_originSessionArn: + v.OriginSessionArn = new(string) + return d.ReadString(schemas.GetSessionOutput_originSessionArn, v.OriginSessionArn) + case schemas.GetSessionOutput_principalArn: + v.PrincipalArn = new(string) + return d.ReadString(schemas.GetSessionOutput_principalArn, v.PrincipalArn) + case schemas.GetSessionOutput_resource: + v.Resource = new(string) + return d.ReadString(schemas.GetSessionOutput_resource, v.Resource) + case schemas.GetSessionOutput_role: + v.Role = new(string) + return d.ReadString(schemas.GetSessionOutput_role, v.Role) + case schemas.GetSessionOutput_sessionArn: + v.SessionArn = new(string) + return d.ReadString(schemas.GetSessionOutput_sessionArn, v.SessionArn) + case schemas.GetSessionOutput_status: + var ev string + if err := d.ReadString(schemas.GetSessionOutput_status, &ev); err != nil { + return err + } + v.Status = types.SessionStatus(ev) + return nil + case schemas.GetSessionOutput_userAgent: + v.UserAgent = new(string) + return d.ReadString(schemas.GetSessionOutput_userAgent, v.UserAgent) + } + return nil + }) +} +func (c *Client) addOperationGetSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&serializeRequestMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.GetSession, schemas.GetSessionInput, schemas.GetSessionOutput)}, middleware.After); err != nil { + return err + } + if err := stack.Deserialize.Add(&deserializeResponseMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.GetSession, schemas.GetSessionInput, schemas.GetSessionOutput), output: &GetSessionOutput{}}, middleware.After); err != nil { + return err + } + + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetSessionValidationMiddleware(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListSessions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListSessions.go new file mode 100644 index 0000000..a2a9690 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/api_op_ListSessions.go @@ -0,0 +1,268 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package signin + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/signin/schemas" + "github.com/aws/aws-sdk-go-v2/service/signin/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" +) + +// Lists sign-in sessions for an IAM identity in your account. If you omit +// principalArn, the operation lists the caller's own sessions. Specify a user or +// role ARN to list that identity's sessions, or specify +// arn:aws:iam::{account-id}:* to list all sessions in the account. Filters are +// combined with a logical AND. +func (c *Client) ListSessions(ctx context.Context, params *ListSessionsInput, optFns ...func(*Options)) (*ListSessionsOutput, error) { + if params == nil { + params = &ListSessionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSessions", params, optFns, c.addOperationListSessionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSessionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Input for ListSessions operation +type ListSessionsInput struct { + + // Returns only sessions created by this OAuth client + ClientId *string + + // Returns only sessions created at or after this time, in Unix epoch seconds + IssuedAfter *int64 + + // Returns only sessions created before this time, in Unix epoch seconds + IssuedBefore *int64 + + // Maximum number of results to return + MaxResults *int32 + + // Token for pagination + NextToken *string + + // The identity whose sessions to list. Omit to list the caller's own sessions. + // Specify arn:aws:iam::{account-id}:* to list all sessions in the account. + PrincipalArn *string + + // Returns only sessions with this status + Status types.SessionStatus + + noSmithyDocumentSerde +} + +func (v *ListSessionsInput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.ListSessionsInput) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *ListSessionsInput) SerializeMembers(s smithy.ShapeSerializer) { + if v.ClientId != nil { + s.WriteString(schemas.ListSessionsInput_clientId, *v.ClientId) + } + if v.IssuedAfter != nil { + s.WriteInt64(schemas.ListSessionsInput_issuedAfter, *v.IssuedAfter) + } + if v.IssuedBefore != nil { + s.WriteInt64(schemas.ListSessionsInput_issuedBefore, *v.IssuedBefore) + } + if v.MaxResults != nil { + s.WriteInt32(schemas.ListSessionsInput_maxResults, *v.MaxResults) + } + if v.NextToken != nil { + s.WriteString(schemas.ListSessionsInput_nextToken, *v.NextToken) + } + if v.PrincipalArn != nil { + s.WriteString(schemas.ListSessionsInput_principalArn, *v.PrincipalArn) + } + if v.Status != "" { + s.WriteString(schemas.ListSessionsInput_status, string(v.Status)) + } +} +func (in *ListSessionsInput) bindEndpointParams(p *EndpointParameters) { + + p.IsControlPlane = ptr.Bool(true) +} + +// Output for ListSessions operation +type ListSessionsOutput struct { + + // List of session summaries + // + // This member is required. + Items []types.Session + + // Token for next page of results + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (v *ListSessionsOutput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.ListSessionsOutput) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *ListSessionsOutput) SerializeMembers(s smithy.ShapeSerializer) { + if v.Items != nil { + serializeSessionSummaryList(s, schemas.ListSessionsOutput_items, v.Items) + } + if v.NextToken != nil { + s.WriteString(schemas.ListSessionsOutput_nextToken, *v.NextToken) + } +} +func (v *ListSessionsOutput) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.ListSessionsOutput, func(s *smithy.Schema) error { + switch s { + case schemas.ListSessionsOutput_items: + return deserializeSessionSummaryList(d, schemas.ListSessionsOutput_items, &v.Items) + case schemas.ListSessionsOutput_nextToken: + v.NextToken = new(string) + return d.ReadString(schemas.ListSessionsOutput_nextToken, v.NextToken) + } + return nil + }) +} +func (c *Client) addOperationListSessionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&serializeRequestMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.ListSessions, schemas.ListSessionsInput, schemas.ListSessionsOutput)}, middleware.After); err != nil { + return err + } + if err := stack.Deserialize.Add(&deserializeResponseMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.ListSessions, schemas.ListSessionsInput, schemas.ListSessionsOutput), output: &ListSessionsOutput{}}, middleware.After); err != nil { + return err + } + + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} + +// ListSessionsPaginatorOptions is the paginator options for ListSessions +type ListSessionsPaginatorOptions struct { + // Maximum number of results to return + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListSessionsPaginator is a paginator for ListSessions +type ListSessionsPaginator struct { + options ListSessionsPaginatorOptions + client ListSessionsAPIClient + params *ListSessionsInput + nextToken *string + firstPage bool +} + +// NewListSessionsPaginator returns a new ListSessionsPaginator +func NewListSessionsPaginator(client ListSessionsAPIClient, params *ListSessionsInput, optFns ...func(*ListSessionsPaginatorOptions)) *ListSessionsPaginator { + if params == nil { + params = &ListSessionsInput{} + } + + options := ListSessionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSessionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSessionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSessions page. +func (p *ListSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSessionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListSessions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListSessionsAPIClient is a client that implements the ListSessions operation. +type ListSessionsAPIClient interface { + ListSessions(context.Context, *ListSessionsInput, ...func(*Options)) (*ListSessionsOutput, error) +} + +var _ ListSessionsAPIClient = (*Client)(nil) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/common_serde.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/common_serde.go index e1b44b2..b694ad9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/common_serde.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/common_serde.go @@ -7,6 +7,16 @@ import ( smithy "github.com/aws/smithy-go" ) +func serializeBatchRevokeSessionErrorList(s smithy.ShapeSerializer, schema *smithy.Schema, v []types.BatchRevokeSessionError) { + s.WriteList(schema) + for _, vv := range v { + s.WriteStruct(schema.ListMember()) + vv.SerializeMembers(s) + s.CloseStruct() + } + s.CloseList() +} + func serializeConditionValues(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) { s.WriteList(schema) for _, vv := range v { @@ -43,6 +53,56 @@ func serializePolicyStatements(s smithy.ShapeSerializer, schema *smithy.Schema, s.CloseList() } +func serializeRevokedSessionList(s smithy.ShapeSerializer, schema *smithy.Schema, v []types.RevokedSession) { + s.WriteList(schema) + for _, vv := range v { + s.WriteStruct(schema.ListMember()) + vv.SerializeMembers(s) + s.CloseStruct() + } + s.CloseList() +} + +func serializeSessionArnList(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) { + s.WriteList(schema) + for _, vv := range v { + s.WriteString(schema.ListMember(), string(vv)) + } + s.CloseList() +} + +func serializeSessionSummaryList(s smithy.ShapeSerializer, schema *smithy.Schema, v []types.Session) { + s.WriteList(schema) + for _, vv := range v { + s.WriteStruct(schema.ListMember()) + vv.SerializeMembers(s) + s.CloseStruct() + } + s.CloseList() +} + +func deserializeBatchRevokeSessionErrorList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]types.BatchRevokeSessionError) error { + *v = make([]types.BatchRevokeSessionError, 0) + var vv types.BatchRevokeSessionError + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero types.BatchRevokeSessionError + *v = append(*v, zero) + return nil + } + + vv = types.BatchRevokeSessionError{} + if err := vv.Deserialize(d); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + func deserializeConditionValues(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error { *v = make([]string, 0) var vv string @@ -129,6 +189,71 @@ func deserializePolicyStatements(d smithy.ShapeDeserializer, s *smithy.Schema, v }) } +func deserializeRevokedSessionList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]types.RevokedSession) error { + *v = make([]types.RevokedSession, 0) + var vv types.RevokedSession + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero types.RevokedSession + *v = append(*v, zero) + return nil + } + + vv = types.RevokedSession{} + if err := vv.Deserialize(d); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + +func deserializeSessionArnList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error { + *v = make([]string, 0) + var vv string + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero string + *v = append(*v, zero) + return nil + } + + if err := d.ReadString(s.ListMember(), &vv); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + +func deserializeSessionSummaryList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]types.Session) error { + *v = make([]types.Session, 0) + var vv types.Session + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero types.Session + *v = append(*v, zero) + return nil + } + + vv = types.Session{} + if err := vv.Deserialize(d); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + func serializeCondition(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string][]string) { s.WriteMap(schema) for k, vv := range v { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json index 3ac078e..da01278 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/generated.json @@ -8,6 +8,7 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_BatchRevokeSessions.go", "api_op_CreateBearerToken.go", "api_op_CreateOAuth2Token.go", "api_op_CreateOAuth2TokenWithIAM.go", @@ -16,8 +17,10 @@ "api_op_DeleteResourcePermissionStatement.go", "api_op_GetConsoleAuthorizationConfiguration.go", "api_op_GetResourcePolicy.go", + "api_op_GetSession.go", "api_op_IntrospectOAuth2TokenWithIAM.go", "api_op_ListResourcePermissionStatements.go", + "api_op_ListSessions.go", "api_op_PutConsoleAuthorizationConfiguration.go", "api_op_PutResourcePermissionStatement.go", "api_op_RevokeOAuth2TokenWithIAM.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go index c1042c4..0a48601 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/go_module_metadata.go @@ -3,4 +3,4 @@ package signin // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.1" +const goModuleVersion = "1.14.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/schemas/schemas.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/schemas/schemas.go index ed8e8ff..7e35ef5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/schemas/schemas.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/schemas/schemas.go @@ -8,6 +8,13 @@ import ( smithytraits "github.com/aws/smithy-go/traits" ) +var BatchRevokeSessions = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "BatchRevokeSessions", +}, smithy.ShapeTypeOperation, 0, &smithytraits.HTTP{Method: "POST", + URI: "/batch-revoke-sessions", + Code: 200}) + var CreateBearerToken = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "CreateBearerToken", @@ -64,6 +71,13 @@ var GetResourcePolicy = smithy.NewSchema(smithy.ShapeID{ URI: "/get-resource-policy", Code: 200}) +var GetSession = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "GetSession", +}, smithy.ShapeTypeOperation, 0, &smithytraits.HTTP{Method: "POST", + URI: "/get-session", + Code: 200}) + var IntrospectOAuth2TokenWithIAM = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "IntrospectOAuth2TokenWithIAM", @@ -78,6 +92,13 @@ var ListResourcePermissionStatements = smithy.NewSchema(smithy.ShapeID{ URI: "/list-resource-permission-statements", Code: 200}) +var ListSessions = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "ListSessions", +}, smithy.ShapeTypeOperation, 0, &smithytraits.HTTP{Method: "POST", + URI: "/list-sessions", + Code: 200}) + var PutConsoleAuthorizationConfiguration = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "PutConsoleAuthorizationConfiguration", @@ -129,11 +150,32 @@ var _AccountId = smithy.NewSchema(smithy.ShapeID{ Name: "AccountId", }, smithy.ShapeTypeString, 0) +var _Assertion = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "Assertion", +}, smithy.ShapeTypeString, 0, &smithytraits.Sensitive{}) + var _AuthorizationCode = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "AuthorizationCode", }, smithy.ShapeTypeString, 0) +var BatchRevokeSessionError = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "BatchRevokeSessionError", +}, smithy.ShapeTypeStructure, 3) +var BatchRevokeSessionError_sessionArn *smithy.Schema + +var BatchRevokeSessionError_code *smithy.Schema + +var BatchRevokeSessionError_message *smithy.Schema + +var _BatchRevokeSessionErrorList = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "BatchRevokeSessionErrorList", +}, smithy.ShapeTypeList, 1) +var _BatchRevokeSessionErrorList_member *smithy.Schema + var _BearerTokenExpiresIn = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "BearerTokenExpiresIn", @@ -159,6 +201,14 @@ var _ClientToken = smithy.NewSchema(smithy.ShapeID{ Name: "ClientToken", }, smithy.ShapeTypeString, 0) +var ClientType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "ClientType", +}, smithy.ShapeTypeEnum, 2) +var ClientType_CLI *smithy.Schema + +var ClientType_MCP *smithy.Schema + var _CodeVerifier = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "CodeVerifier", @@ -297,6 +347,11 @@ var _IssuedOAuthAccessTokenType = smithy.NewSchema(smithy.ShapeID{ Name: "IssuedOAuthAccessTokenType", }, smithy.ShapeTypeString, 0) +var _JwtBearerClientId = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "JwtBearerClientId", +}, smithy.ShapeTypeString, 0) + var _NextToken = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "NextToken", @@ -305,7 +360,7 @@ var _NextToken = smithy.NewSchema(smithy.ShapeID{ var OAuth2ErrorCode = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "OAuth2ErrorCode", -}, smithy.ShapeTypeEnum, 16) +}, smithy.ShapeTypeEnum, 17) var OAuth2ErrorCode_TOKEN_EXPIRED *smithy.Schema var OAuth2ErrorCode_USER_CREDENTIALS_CHANGED *smithy.Schema @@ -334,6 +389,8 @@ var OAuth2ErrorCode_OAUTH_INVALID_SCOPE *smithy.Schema var OAuth2ErrorCode_OAUTH_INVALID_TARGET *smithy.Schema +var OAuth2ErrorCode_OAUTH_INVALID_CLIENT *smithy.Schema + var OAuth2ErrorCode_OAUTH_RATE_EXCEEDED *smithy.Schema var OAuth2ErrorCode_OAUTH_SERVICE_UNAVAILABLE *smithy.Schema @@ -391,6 +448,16 @@ var _Principal_key *smithy.Schema var _Principal_value *smithy.Schema +var _PrincipalArn = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "PrincipalArn", +}, smithy.ShapeTypeString, 0) + +var _PrincipalArnFilter = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "PrincipalArnFilter", +}, smithy.ShapeTypeString, 0) + var _RedirectUri = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "RedirectUri", @@ -420,11 +487,28 @@ var ResourceNotFoundException_error *smithy.Schema var ResourceNotFoundException_message *smithy.Schema +var _RevocationReason = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "RevocationReason", +}, smithy.ShapeTypeString, 0) + var _RevocationToken = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "RevocationToken", }, smithy.ShapeTypeString, 0, &smithytraits.Sensitive{}) +var RevokedSession = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "RevokedSession", +}, smithy.ShapeTypeStructure, 1) +var RevokedSession_sessionArn *smithy.Schema + +var _RevokedSessionList = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "RevokedSessionList", +}, smithy.ShapeTypeList, 1) +var _RevokedSessionList_member *smithy.Schema + var _Scope = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "Scope", @@ -448,6 +532,58 @@ var ServiceUnavailableException_error *smithy.Schema var ServiceUnavailableException_message *smithy.Schema +var Session = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "Session", +}, smithy.ShapeTypeStructure, 9) +var Session_sessionArn *smithy.Schema + +var Session_principalArn *smithy.Schema + +var Session_role *smithy.Schema + +var Session_status *smithy.Schema + +var Session_issuedAt *smithy.Schema + +var Session_expiresAt *smithy.Schema + +var Session_clientId *smithy.Schema + +var Session_clientType *smithy.Schema + +var Session_resource *smithy.Schema + +var _SessionArn = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "SessionArn", +}, smithy.ShapeTypeString, 0) + +var _SessionArnList = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "SessionArnList", +}, smithy.ShapeTypeList, 1) +var _SessionArnList_member *smithy.Schema + +var _SessionsMaxResults = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "SessionsMaxResults", +}, smithy.ShapeTypeInteger, 0) + +var SessionStatus = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "SessionStatus", +}, smithy.ShapeTypeEnum, 2) +var SessionStatus_ACTIVE *smithy.Schema + +var SessionStatus_REVOKED *smithy.Schema + +var _SessionSummaryList = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "SessionSummaryList", +}, smithy.ShapeTypeList, 1) +var _SessionSummaryList_member *smithy.Schema + var SigninResourceBasedPolicy = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "SigninResourceBasedPolicy", @@ -539,6 +675,24 @@ var _VpcSourceIp = smithy.NewSchema(smithy.ShapeID{ Name: "VpcSourceIp", }, smithy.ShapeTypeString, 0) +var BatchRevokeSessionsInput = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "BatchRevokeSessionsInput", +}, smithy.ShapeTypeStructure, 3) +var BatchRevokeSessionsInput_principalArn *smithy.Schema + +var BatchRevokeSessionsInput_sessionArns *smithy.Schema + +var BatchRevokeSessionsInput_reason *smithy.Schema + +var BatchRevokeSessionsOutput = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "BatchRevokeSessionsOutput", +}, smithy.ShapeTypeStructure, 2) +var BatchRevokeSessionsOutput_revokedSessions *smithy.Schema + +var BatchRevokeSessionsOutput_errors *smithy.Schema + var CreateBearerTokenRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "CreateBearerTokenRequest", @@ -592,13 +746,17 @@ var CreateOAuth2TokenWithIAMResponse_expiresIn *smithy.Schema var CreateOAuth2TokenWithTokenExchangeRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "CreateOAuth2TokenWithTokenExchangeRequest", -}, smithy.ShapeTypeStructure, 5) +}, smithy.ShapeTypeStructure, 7) var CreateOAuth2TokenWithTokenExchangeRequest_grantType *smithy.Schema var CreateOAuth2TokenWithTokenExchangeRequest_subjectToken *smithy.Schema var CreateOAuth2TokenWithTokenExchangeRequest_subjectTokenType *smithy.Schema +var CreateOAuth2TokenWithTokenExchangeRequest_assertion *smithy.Schema + +var CreateOAuth2TokenWithTokenExchangeRequest_clientId *smithy.Schema + var CreateOAuth2TokenWithTokenExchangeRequest_resource *smithy.Schema var CreateOAuth2TokenWithTokenExchangeRequest_scope *smithy.Schema @@ -606,7 +764,7 @@ var CreateOAuth2TokenWithTokenExchangeRequest_scope *smithy.Schema var CreateOAuth2TokenWithTokenExchangeResponse = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "CreateOAuth2TokenWithTokenExchangeResponse", -}, smithy.ShapeTypeStructure, 4) +}, smithy.ShapeTypeStructure, 6) var CreateOAuth2TokenWithTokenExchangeResponse_accessToken *smithy.Schema var CreateOAuth2TokenWithTokenExchangeResponse_issuedTokenType *smithy.Schema @@ -615,6 +773,10 @@ var CreateOAuth2TokenWithTokenExchangeResponse_tokenType *smithy.Schema var CreateOAuth2TokenWithTokenExchangeResponse_expiresIn *smithy.Schema +var CreateOAuth2TokenWithTokenExchangeResponse_resource *smithy.Schema + +var CreateOAuth2TokenWithTokenExchangeResponse_scope *smithy.Schema + var DeleteConsoleAuthorizationConfigurationInput = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "DeleteConsoleAuthorizationConfigurationInput", @@ -671,6 +833,44 @@ var GetResourcePolicyOutput = smithy.NewSchema(smithy.ShapeID{ }, smithy.ShapeTypeStructure, 1) var GetResourcePolicyOutput_signinResourceBasedPolicy *smithy.Schema +var GetSessionInput = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "GetSessionInput", +}, smithy.ShapeTypeStructure, 2) +var GetSessionInput_sessionArn *smithy.Schema + +var GetSessionInput_principalArn *smithy.Schema + +var GetSessionOutput = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "GetSessionOutput", +}, smithy.ShapeTypeStructure, 13) +var GetSessionOutput_sessionArn *smithy.Schema + +var GetSessionOutput_principalArn *smithy.Schema + +var GetSessionOutput_role *smithy.Schema + +var GetSessionOutput_status *smithy.Schema + +var GetSessionOutput_clientId *smithy.Schema + +var GetSessionOutput_clientType *smithy.Schema + +var GetSessionOutput_resource *smithy.Schema + +var GetSessionOutput_issuedAt *smithy.Schema + +var GetSessionOutput_expiresAt *smithy.Schema + +var GetSessionOutput_lastUsedAt *smithy.Schema + +var GetSessionOutput_issuedInRegion *smithy.Schema + +var GetSessionOutput_originSessionArn *smithy.Schema + +var GetSessionOutput_userAgent *smithy.Schema + var IntrospectOAuth2TokenWithIAMRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "IntrospectOAuth2TokenWithIAMRequest", @@ -727,6 +927,32 @@ var ListResourcePermissionStatementsOutput_permissionStatements *smithy.Schema var ListResourcePermissionStatementsOutput_nextToken *smithy.Schema +var ListSessionsInput = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "ListSessionsInput", +}, smithy.ShapeTypeStructure, 7) +var ListSessionsInput_principalArn *smithy.Schema + +var ListSessionsInput_maxResults *smithy.Schema + +var ListSessionsInput_nextToken *smithy.Schema + +var ListSessionsInput_status *smithy.Schema + +var ListSessionsInput_clientId *smithy.Schema + +var ListSessionsInput_issuedAfter *smithy.Schema + +var ListSessionsInput_issuedBefore *smithy.Schema + +var ListSessionsOutput = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.signin", + Name: "ListSessionsOutput", +}, smithy.ShapeTypeStructure, 2) +var ListSessionsOutput_items *smithy.Schema + +var ListSessionsOutput_nextToken *smithy.Schema + var PutConsoleAuthorizationConfigurationInput = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.signin", Name: "PutConsoleAuthorizationConfigurationInput", @@ -811,6 +1037,8 @@ func init() { OAuth2ErrorCode_OAUTH_INVALID_TARGET = OAuth2ErrorCode.AddMember("OAUTH_INVALID_TARGET", smithyprelude.Unit) + OAuth2ErrorCode_OAUTH_INVALID_CLIENT = OAuth2ErrorCode.AddMember("OAUTH_INVALID_CLIENT", smithyprelude.Unit) + OAuth2ErrorCode_OAUTH_RATE_EXCEEDED = OAuth2ErrorCode.AddMember("OAUTH_RATE_EXCEEDED", smithyprelude.Unit) OAuth2ErrorCode_OAUTH_SERVICE_UNAVAILABLE = OAuth2ErrorCode.AddMember("OAUTH_SERVICE_UNAVAILABLE", smithyprelude.Unit) @@ -825,6 +1053,18 @@ func init() { AccessToken_sessionToken = AccessToken.AddMember("sessionToken", smithyprelude.String, &smithytraits.JSONName{Name: "sessionToken"}) + BatchRevokeSessionError_sessionArn = BatchRevokeSessionError.AddMember("sessionArn", _SessionArn) + + BatchRevokeSessionError_code = BatchRevokeSessionError.AddMember("code", smithyprelude.String) + + BatchRevokeSessionError_message = BatchRevokeSessionError.AddMember("message", smithyprelude.String) + + _BatchRevokeSessionErrorList_member = _BatchRevokeSessionErrorList.AddMember("member", BatchRevokeSessionError) + + ClientType_CLI = ClientType.AddMember("CLI", smithyprelude.Unit) + + ClientType_MCP = ClientType.AddMember("MCP", smithyprelude.Unit) + _ConditionValues_member = _ConditionValues.AddMember("member", smithyprelude.String) _Condition_key = _Condition.AddMember("key", smithyprelude.String) @@ -901,6 +1141,10 @@ func init() { ResourceNotFoundException_message = ResourceNotFoundException.AddMember("message", smithyprelude.String) + RevokedSession_sessionArn = RevokedSession.AddMember("sessionArn", _SessionArn) + + _RevokedSessionList_member = _RevokedSessionList.AddMember("member", RevokedSession) + ServiceQuotaExceededException_error = ServiceQuotaExceededException.AddMember("error", OAuth2ErrorCode) ServiceQuotaExceededException_message = ServiceQuotaExceededException.AddMember("message", smithyprelude.String) @@ -909,6 +1153,32 @@ func init() { ServiceUnavailableException_message = ServiceUnavailableException.AddMember("message", smithyprelude.String) + SessionStatus_ACTIVE = SessionStatus.AddMember("ACTIVE", smithyprelude.Unit) + + SessionStatus_REVOKED = SessionStatus.AddMember("REVOKED", smithyprelude.Unit) + + Session_sessionArn = Session.AddMember("sessionArn", _SessionArn) + + Session_principalArn = Session.AddMember("principalArn", _PrincipalArn) + + Session_role = Session.AddMember("role", _PrincipalArn) + + Session_status = Session.AddMember("status", SessionStatus) + + Session_issuedAt = Session.AddMember("issuedAt", smithyprelude.Long) + + Session_expiresAt = Session.AddMember("expiresAt", smithyprelude.Long) + + Session_clientId = Session.AddMember("clientId", smithyprelude.String) + + Session_clientType = Session.AddMember("clientType", ClientType) + + Session_resource = Session.AddMember("resource", smithyprelude.String) + + _SessionArnList_member = _SessionArnList.AddMember("member", _SessionArn) + + _SessionSummaryList_member = _SessionSummaryList.AddMember("member", Session) + SigninResourceBasedPolicy_version = SigninResourceBasedPolicy.AddMember("version", smithyprelude.String, &smithytraits.JSONName{Name: "Version"}) SigninResourceBasedPolicy_statement = SigninResourceBasedPolicy.AddMember("statement", _PolicyStatements, &smithytraits.JSONName{Name: "Statement"}) @@ -921,6 +1191,16 @@ func init() { ValidationException_message = ValidationException.AddMember("message", smithyprelude.String) + BatchRevokeSessionsInput_principalArn = BatchRevokeSessionsInput.AddMember("principalArn", _PrincipalArnFilter) + + BatchRevokeSessionsInput_sessionArns = BatchRevokeSessionsInput.AddMember("sessionArns", _SessionArnList) + + BatchRevokeSessionsInput_reason = BatchRevokeSessionsInput.AddMember("reason", _RevocationReason) + + BatchRevokeSessionsOutput_revokedSessions = BatchRevokeSessionsOutput.AddMember("revokedSessions", _RevokedSessionList) + + BatchRevokeSessionsOutput_errors = BatchRevokeSessionsOutput.AddMember("errors", _BatchRevokeSessionErrorList) + CreateBearerTokenRequest_grantType = CreateBearerTokenRequest.AddMember("grantType", _ClientCredentialsGrantType, &smithytraits.JSONName{Name: "grant_type"}) CreateBearerTokenRequest_resource = CreateBearerTokenRequest.AddMember("resource", _Resource) @@ -953,6 +1233,10 @@ func init() { CreateOAuth2TokenWithTokenExchangeRequest_subjectTokenType = CreateOAuth2TokenWithTokenExchangeRequest.AddMember("subjectTokenType", _SubjectTokenType, &smithytraits.JSONName{Name: "subject_token_type"}) + CreateOAuth2TokenWithTokenExchangeRequest_assertion = CreateOAuth2TokenWithTokenExchangeRequest.AddMember("assertion", _Assertion) + + CreateOAuth2TokenWithTokenExchangeRequest_clientId = CreateOAuth2TokenWithTokenExchangeRequest.AddMember("clientId", _JwtBearerClientId, &smithytraits.JSONName{Name: "client_id"}) + CreateOAuth2TokenWithTokenExchangeRequest_resource = CreateOAuth2TokenWithTokenExchangeRequest.AddMember("resource", _Resource) CreateOAuth2TokenWithTokenExchangeRequest_scope = CreateOAuth2TokenWithTokenExchangeRequest.AddMember("scope", _Scope) @@ -965,6 +1249,10 @@ func init() { CreateOAuth2TokenWithTokenExchangeResponse_expiresIn = CreateOAuth2TokenWithTokenExchangeResponse.AddMember("expiresIn", _TokenExpiresIn, &smithytraits.JSONName{Name: "expires_in"}) + CreateOAuth2TokenWithTokenExchangeResponse_resource = CreateOAuth2TokenWithTokenExchangeResponse.AddMember("resource", _Resource) + + CreateOAuth2TokenWithTokenExchangeResponse_scope = CreateOAuth2TokenWithTokenExchangeResponse.AddMember("scope", _Scope) + DeleteConsoleAuthorizationConfigurationInput_targetId = DeleteConsoleAuthorizationConfigurationInput.AddMember("targetId", _TargetId) DeleteConsoleAuthorizationConfigurationOutput_targetId = DeleteConsoleAuthorizationConfigurationOutput.AddMember("targetId", _TargetId) @@ -987,6 +1275,36 @@ func init() { GetResourcePolicyOutput_signinResourceBasedPolicy = GetResourcePolicyOutput.AddMember("signinResourceBasedPolicy", SigninResourceBasedPolicy) + GetSessionInput_sessionArn = GetSessionInput.AddMember("sessionArn", _SessionArn) + + GetSessionInput_principalArn = GetSessionInput.AddMember("principalArn", _PrincipalArnFilter) + + GetSessionOutput_sessionArn = GetSessionOutput.AddMember("sessionArn", _SessionArn) + + GetSessionOutput_principalArn = GetSessionOutput.AddMember("principalArn", _PrincipalArn) + + GetSessionOutput_role = GetSessionOutput.AddMember("role", _PrincipalArn) + + GetSessionOutput_status = GetSessionOutput.AddMember("status", SessionStatus) + + GetSessionOutput_clientId = GetSessionOutput.AddMember("clientId", smithyprelude.String) + + GetSessionOutput_clientType = GetSessionOutput.AddMember("clientType", ClientType) + + GetSessionOutput_resource = GetSessionOutput.AddMember("resource", smithyprelude.String) + + GetSessionOutput_issuedAt = GetSessionOutput.AddMember("issuedAt", smithyprelude.Long) + + GetSessionOutput_expiresAt = GetSessionOutput.AddMember("expiresAt", smithyprelude.Long) + + GetSessionOutput_lastUsedAt = GetSessionOutput.AddMember("lastUsedAt", smithyprelude.Long) + + GetSessionOutput_issuedInRegion = GetSessionOutput.AddMember("issuedInRegion", smithyprelude.String) + + GetSessionOutput_originSessionArn = GetSessionOutput.AddMember("originSessionArn", _SessionArn) + + GetSessionOutput_userAgent = GetSessionOutput.AddMember("userAgent", smithyprelude.String) + IntrospectOAuth2TokenWithIAMRequest_token = IntrospectOAuth2TokenWithIAMRequest.AddMember("token", _IntrospectionToken, &smithytraits.JSONName{Name: "token"}) IntrospectOAuth2TokenWithIAMRequest_tokenTypeHint = IntrospectOAuth2TokenWithIAMRequest.AddMember("tokenTypeHint", _TokenTypeHint, &smithytraits.JSONName{Name: "token_type_hint"}) @@ -1027,6 +1345,24 @@ func init() { ListResourcePermissionStatementsOutput_nextToken = ListResourcePermissionStatementsOutput.AddMember("nextToken", _NextToken) + ListSessionsInput_principalArn = ListSessionsInput.AddMember("principalArn", _PrincipalArnFilter) + + ListSessionsInput_maxResults = ListSessionsInput.AddMember("maxResults", _SessionsMaxResults) + + ListSessionsInput_nextToken = ListSessionsInput.AddMember("nextToken", _NextToken) + + ListSessionsInput_status = ListSessionsInput.AddMember("status", SessionStatus) + + ListSessionsInput_clientId = ListSessionsInput.AddMember("clientId", smithyprelude.String) + + ListSessionsInput_issuedAfter = ListSessionsInput.AddMember("issuedAfter", smithyprelude.Long) + + ListSessionsInput_issuedBefore = ListSessionsInput.AddMember("issuedBefore", smithyprelude.Long) + + ListSessionsOutput_items = ListSessionsOutput.AddMember("items", _SessionSummaryList) + + ListSessionsOutput_nextToken = ListSessionsOutput.AddMember("nextToken", _NextToken) + PutConsoleAuthorizationConfigurationInput_targetId = PutConsoleAuthorizationConfigurationInput.AddMember("targetId", _TargetId) PutConsoleAuthorizationConfigurationOutput_targetId = PutConsoleAuthorizationConfigurationOutput.AddMember("targetId", _TargetId) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/common_serde.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/common_serde.go index 2f6c52f..543f07f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/common_serde.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/common_serde.go @@ -6,6 +6,16 @@ import ( smithy "github.com/aws/smithy-go" ) +func serializeBatchRevokeSessionErrorList(s smithy.ShapeSerializer, schema *smithy.Schema, v []BatchRevokeSessionError) { + s.WriteList(schema) + for _, vv := range v { + s.WriteStruct(schema.ListMember()) + vv.SerializeMembers(s) + s.CloseStruct() + } + s.CloseList() +} + func serializeConditionValues(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) { s.WriteList(schema) for _, vv := range v { @@ -42,6 +52,56 @@ func serializePolicyStatements(s smithy.ShapeSerializer, schema *smithy.Schema, s.CloseList() } +func serializeRevokedSessionList(s smithy.ShapeSerializer, schema *smithy.Schema, v []RevokedSession) { + s.WriteList(schema) + for _, vv := range v { + s.WriteStruct(schema.ListMember()) + vv.SerializeMembers(s) + s.CloseStruct() + } + s.CloseList() +} + +func serializeSessionArnList(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) { + s.WriteList(schema) + for _, vv := range v { + s.WriteString(schema.ListMember(), string(vv)) + } + s.CloseList() +} + +func serializeSessionSummaryList(s smithy.ShapeSerializer, schema *smithy.Schema, v []Session) { + s.WriteList(schema) + for _, vv := range v { + s.WriteStruct(schema.ListMember()) + vv.SerializeMembers(s) + s.CloseStruct() + } + s.CloseList() +} + +func deserializeBatchRevokeSessionErrorList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]BatchRevokeSessionError) error { + *v = make([]BatchRevokeSessionError, 0) + var vv BatchRevokeSessionError + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero BatchRevokeSessionError + *v = append(*v, zero) + return nil + } + + vv = BatchRevokeSessionError{} + if err := vv.Deserialize(d); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + func deserializeConditionValues(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error { *v = make([]string, 0) var vv string @@ -128,6 +188,71 @@ func deserializePolicyStatements(d smithy.ShapeDeserializer, s *smithy.Schema, v }) } +func deserializeRevokedSessionList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]RevokedSession) error { + *v = make([]RevokedSession, 0) + var vv RevokedSession + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero RevokedSession + *v = append(*v, zero) + return nil + } + + vv = RevokedSession{} + if err := vv.Deserialize(d); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + +func deserializeSessionArnList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error { + *v = make([]string, 0) + var vv string + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero string + *v = append(*v, zero) + return nil + } + + if err := d.ReadString(s.ListMember(), &vv); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + +func deserializeSessionSummaryList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]Session) error { + *v = make([]Session, 0) + var vv Session + return smithy.ReadList(d, s, func() error { + if isNil, err := d.ReadNil(s.ListMember()); err != nil { + return err + } else if isNil { + var zero Session + *v = append(*v, zero) + return nil + } + + vv = Session{} + if err := vv.Deserialize(d); err != nil { + return err + } + + *v = append(*v, vv) + return nil + }) +} + func serializeCondition(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string][]string) { s.WriteMap(schema) for k, vv := range v { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/enums.go index afac805..99a72b2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/enums.go @@ -2,6 +2,27 @@ package types +type ClientType string + +// Enum values for ClientType +const ( + // The AWS CLI + ClientTypeCli ClientType = "CLI" + // An MCP server + ClientTypeMcp ClientType = "MCP" +) + +// Values returns all known values for ClientType. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ClientType) Values() []ClientType { + return []ClientType{ + "CLI", + "MCP", + } +} + type OAuth2ErrorCode string // Enum values for OAuth2ErrorCode @@ -30,6 +51,7 @@ const ( OAuth2ErrorCodeOauthInvalidGrant OAuth2ErrorCode = "invalid_grant" OAuth2ErrorCodeOauthInvalidScope OAuth2ErrorCode = "invalid_scope" OAuth2ErrorCodeOauthInvalidTarget OAuth2ErrorCode = "invalid_target" + OAuth2ErrorCodeOauthInvalidClient OAuth2ErrorCode = "invalid_client" OAuth2ErrorCodeOauthRateExceeded OAuth2ErrorCode = "rate_exceeded" OAuth2ErrorCodeOauthServiceUnavailable OAuth2ErrorCode = "service_unavailable" ) @@ -54,7 +76,29 @@ func (OAuth2ErrorCode) Values() []OAuth2ErrorCode { "invalid_grant", "invalid_scope", "invalid_target", + "invalid_client", "rate_exceeded", "service_unavailable", } } + +type SessionStatus string + +// Enum values for SessionStatus +const ( + // The session is active + SessionStatusActive SessionStatus = "ACTIVE" + // The session has been revoked + SessionStatusRevoked SessionStatus = "REVOKED" +) + +// Values returns all known values for SessionStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SessionStatus) Values() []SessionStatus { + return []SessionStatus{ + "ACTIVE", + "REVOKED", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/types.go index aded5e5..90b9dc1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/types/types.go @@ -64,6 +64,61 @@ func (v *AccessToken) Deserialize(d smithy.ShapeDeserializer) error { }) } +// A session that could not be revoked +type BatchRevokeSessionError struct { + + // The error code + // + // This member is required. + Code *string + + // The error message + // + // This member is required. + Message *string + + // The session ARN + // + // This member is required. + SessionArn *string + + noSmithyDocumentSerde +} + +func (v *BatchRevokeSessionError) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.BatchRevokeSessionError) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *BatchRevokeSessionError) SerializeMembers(s smithy.ShapeSerializer) { + if v.Code != nil { + s.WriteString(schemas.BatchRevokeSessionError_code, *v.Code) + } + if v.Message != nil { + s.WriteString(schemas.BatchRevokeSessionError_message, *v.Message) + } + if v.SessionArn != nil { + s.WriteString(schemas.BatchRevokeSessionError_sessionArn, *v.SessionArn) + } +} +func (v *BatchRevokeSessionError) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.BatchRevokeSessionError, func(s *smithy.Schema) error { + switch s { + case schemas.BatchRevokeSessionError_code: + v.Code = new(string) + return d.ReadString(schemas.BatchRevokeSessionError_code, v.Code) + case schemas.BatchRevokeSessionError_message: + v.Message = new(string) + return d.ReadString(schemas.BatchRevokeSessionError_message, v.Message) + case schemas.BatchRevokeSessionError_sessionArn: + v.SessionArn = new(string) + return d.ReadString(schemas.BatchRevokeSessionError_sessionArn, v.SessionArn) + } + return nil + }) +} + // The request body for creating an OAuth 2.0 token. Supports both the // authorization code and refresh token flows, selected by the "grant_type" // parameter. @@ -343,6 +398,158 @@ func (v *PolicyStatement) Deserialize(d smithy.ShapeDeserializer) error { }) } +// A session that was revoked +type RevokedSession struct { + + // The revoked session ARN + // + // This member is required. + SessionArn *string + + noSmithyDocumentSerde +} + +func (v *RevokedSession) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.RevokedSession) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *RevokedSession) SerializeMembers(s smithy.ShapeSerializer) { + if v.SessionArn != nil { + s.WriteString(schemas.RevokedSession_sessionArn, *v.SessionArn) + } +} +func (v *RevokedSession) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.RevokedSession, func(s *smithy.Schema) error { + switch s { + case schemas.RevokedSession_sessionArn: + v.SessionArn = new(string) + return d.ReadString(schemas.RevokedSession_sessionArn, v.SessionArn) + } + return nil + }) +} + +// Summary of a sign-in session +type Session struct { + + // The time the session expires, in Unix epoch seconds + // + // This member is required. + ExpiresAt *int64 + + // The time the session was created, in Unix epoch seconds + // + // This member is required. + IssuedAt *int64 + + // The IAM identity that owns the session + // + // This member is required. + PrincipalArn *string + + // The session ARN + // + // This member is required. + SessionArn *string + + // The OAuth client that created the session + ClientId *string + + // The type of OAuth client that created the session + ClientType ClientType + + // The resource that the session's tokens are bound to + Resource *string + + // The IAM role for the session, when the owner is a role + Role *string + + // The session status + Status SessionStatus + + noSmithyDocumentSerde +} + +func (v *Session) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.Session) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *Session) SerializeMembers(s smithy.ShapeSerializer) { + if v.ClientId != nil { + s.WriteString(schemas.Session_clientId, *v.ClientId) + } + if v.ClientType != "" { + s.WriteString(schemas.Session_clientType, string(v.ClientType)) + } + if v.ExpiresAt != nil { + s.WriteInt64(schemas.Session_expiresAt, *v.ExpiresAt) + } + if v.IssuedAt != nil { + s.WriteInt64(schemas.Session_issuedAt, *v.IssuedAt) + } + if v.PrincipalArn != nil { + s.WriteString(schemas.Session_principalArn, *v.PrincipalArn) + } + if v.Resource != nil { + s.WriteString(schemas.Session_resource, *v.Resource) + } + if v.Role != nil { + s.WriteString(schemas.Session_role, *v.Role) + } + if v.SessionArn != nil { + s.WriteString(schemas.Session_sessionArn, *v.SessionArn) + } + if v.Status != "" { + s.WriteString(schemas.Session_status, string(v.Status)) + } +} +func (v *Session) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.Session, func(s *smithy.Schema) error { + switch s { + case schemas.Session_clientId: + v.ClientId = new(string) + return d.ReadString(schemas.Session_clientId, v.ClientId) + case schemas.Session_clientType: + var ev string + if err := d.ReadString(schemas.Session_clientType, &ev); err != nil { + return err + } + v.ClientType = ClientType(ev) + return nil + case schemas.Session_expiresAt: + v.ExpiresAt = new(int64) + return d.ReadInt64(schemas.Session_expiresAt, v.ExpiresAt) + case schemas.Session_issuedAt: + v.IssuedAt = new(int64) + return d.ReadInt64(schemas.Session_issuedAt, v.IssuedAt) + case schemas.Session_principalArn: + v.PrincipalArn = new(string) + return d.ReadString(schemas.Session_principalArn, v.PrincipalArn) + case schemas.Session_resource: + v.Resource = new(string) + return d.ReadString(schemas.Session_resource, v.Resource) + case schemas.Session_role: + v.Role = new(string) + return d.ReadString(schemas.Session_role, v.Role) + case schemas.Session_sessionArn: + v.SessionArn = new(string) + return d.ReadString(schemas.Session_sessionArn, v.SessionArn) + case schemas.Session_status: + var ev string + if err := d.ReadString(schemas.Session_status, &ev); err != nil { + return err + } + v.Status = SessionStatus(ev) + return nil + } + return nil + }) +} + // SignIn resource-based policy document type SigninResourceBasedPolicy struct { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/validators.go index bbd6398..5de5819 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/signin/validators.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/signin/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpBatchRevokeSessions struct { +} + +func (*validateOpBatchRevokeSessions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchRevokeSessions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchRevokeSessionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchRevokeSessionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateBearerToken struct { } @@ -110,6 +130,26 @@ func (m *validateOpDeleteResourcePermissionStatement) HandleInitialize(ctx conte return next.HandleInitialize(ctx, in) } +type validateOpGetSession struct { +} + +func (*validateOpGetSession) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSessionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSessionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpIntrospectOAuth2TokenWithIAM struct { } @@ -150,6 +190,10 @@ func (m *validateOpRevokeOAuth2TokenWithIAM) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +func addOpBatchRevokeSessionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchRevokeSessions{}, middleware.After) +} + func addOpCreateBearerTokenValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateBearerToken{}, middleware.After) } @@ -170,6 +214,10 @@ func addOpDeleteResourcePermissionStatementValidationMiddleware(stack *middlewar return stack.Initialize.Add(&validateOpDeleteResourcePermissionStatement{}, middleware.After) } +func addOpGetSessionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSession{}, middleware.After) +} + func addOpIntrospectOAuth2TokenWithIAMValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpIntrospectOAuth2TokenWithIAM{}, middleware.After) } @@ -196,6 +244,21 @@ func validateCreateOAuth2TokenRequestBody(v *types.CreateOAuth2TokenRequestBody) } } +func validateOpBatchRevokeSessionsInput(v *BatchRevokeSessionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchRevokeSessionsInput"} + if v.SessionArns == nil { + invalidParams.Add(smithy.NewErrParamRequired("SessionArns")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateBearerTokenInput(v *CreateBearerTokenInput) error { if v == nil { return nil @@ -281,6 +344,21 @@ func validateOpDeleteResourcePermissionStatementInput(v *DeleteResourcePermissio } } +func validateOpGetSessionInput(v *GetSessionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSessionInput"} + if v.SessionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("SessionArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpIntrospectOAuth2TokenWithIAMInput(v *IntrospectOAuth2TokenWithIAMInput) error { if v == nil { return nil diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index 45c1638..90a00e0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.53.0 (2026-11-19) + +* **Feature**: AWS STS adds GetScopedCredentials and expands Trusted Identity Propagation (TIP) to IAM federation and IAM Roles Anywhere. GetScopedCredentials reduces an existing session's permissions and duration. TIP carries verified user or workload identity for authorization and CloudTrail auditing. + # v1.52.0 (2026-11-10) * **Feature**: Enable schema-based (de)serialization for this service. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go index 02f12dd..0663121 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go @@ -223,13 +223,6 @@ type AssumeRoleInput struct { // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // // For more information about role session permissions, see [Session policies]. // // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session @@ -245,13 +238,6 @@ type AssumeRoleInput struct { // can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the // Amazon Web Services General Reference. // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's // identity-based policy and the session policies. You can use the role's temporary @@ -317,13 +303,6 @@ type AssumeRoleInput struct { // session tag keys can’t exceed 128 characters, and the values can’t exceed 256 // characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User Guide. // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // // You can pass a session tag with the same key as a tag that is already attached // to the role. When you do, session tags override a role tag with the same key. // @@ -437,10 +416,10 @@ type AssumeRoleOutput struct { // strongly recommend that you make no assumptions about the maximum size. Credentials *types.Credentials - // A percentage value that indicates the packed size of the session policies and - // session tags combined passed in the request. The request fails if the packed - // size is greater than 100 percent, which means the policies and tags exceeded the - // allowed space. + // The percentage (0-100) of the maximum allowed session token size that the + // returned session token consumes. + // + // This field is deprecated. Use SessionTokenUtilization instead. // // Deprecated: Deprecated. Replaced by SessionTokenUtilization. PackedPolicySize *int32 diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go index e8741ff..6360d75 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go @@ -89,13 +89,6 @@ import ( // 128 characters and the values can’t exceed 256 characters. For these and // additional limits, see [IAM and STS Character Limits]in the IAM User Guide. // -// An Amazon Web Services conversion compresses the passed inline session policy, -// managed policy ARNs, and session tags into a packed binary format that has a -// separate limit. Your request can fail for this limit even if your plaintext -// meets the other requirements. The PackedPolicySize response element indicates -// by percentage how close the policies and tags for your request are to the upper -// size limit. -// // You can pass a session tag with the same key as a tag that is attached to the // role. When you do, session tags override the role's tags with the same key. // @@ -229,13 +222,6 @@ type AssumeRoleWithSAMLInput struct { // // For more information about role session permissions, see [Session policies]. // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string @@ -249,13 +235,6 @@ type AssumeRoleWithSAMLInput struct { // can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the // Amazon Web Services General Reference. // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's // identity-based policy and the session policies. You can use the role's temporary @@ -321,6 +300,10 @@ type AssumeRoleWithSAMLOutput struct { Credentials *types.Credentials // The value of the Issuer element of the SAML assertion. + // + // This is not the trusted identity propagation issuer ( aws:OriginIdentity/Issuer + // ). When the session carries trusted identity propagation context, that value is + // returned in TrustedIdentityPropagationContext . Issuer *string // A hash value based on the concatenation of the following: @@ -339,10 +322,10 @@ type AssumeRoleWithSAMLOutput struct { // BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) ) NameQualifier *string - // A percentage value that indicates the packed size of the session policies and - // session tags combined passed in the request. The request fails if the packed - // size is greater than 100 percent, which means the policies and tags exceeded the - // allowed space. + // The percentage (0-100) of the maximum allowed session token size that the + // returned session token consumes. + // + // This field is deprecated. Use SessionTokenUtilization instead. // // Deprecated: Deprecated. Replaced by SessionTokenUtilization. PackedPolicySize *int32 @@ -378,6 +361,10 @@ type AssumeRoleWithSAMLOutput struct { SourceIdentity *string // The value of the NameID element in the Subject element of the SAML assertion. + // + // This is not the trusted identity propagation subject ( aws:OriginIdentity/Subject + // ). When the session carries trusted identity propagation context, that value is + // returned in TrustedIdentityPropagationContext . Subject *string // The format of the name ID, as defined by the Format attribute in the NameID @@ -389,8 +376,34 @@ type AssumeRoleWithSAMLOutput struct { // urn:oasis:names:tc:SAML:2.0:nameid-format:transient is returned as transient . // If the format includes any other prefix, the format is returned with no // modifications. + // + // This is not the trusted identity propagation subject type ( + // aws:OriginIdentity/SubjectType ). When the session carries trusted identity + // propagation context, that value is returned in TrustedIdentityPropagationContext + // . SubjectType *string + // The trusted identity propagation context that Amazon Web Services STS set in + // the session from the SAML assertion, through the context provider attached to + // the SAML identity provider. It is present only when Amazon Web Services STS set + // such context in the session. It contains the aws:OriginIdentity/Subject , + // aws:OriginIdentity/SubjectType , aws:OriginIdentity/Issuer and + // aws:OriginIdentity/FederatedProviderArn keys and the + // aws:TransactionContext/IdentityProvider/* keys that Amazon Web Services STS set + // in the session. Other keys in the session, such as aws:IdentityCenterInstanceArn + // and aws:IdentityStoreArn for an identity provider with an Identity Center + // instance attached, are not returned. + // + // Its OriginIdentity members share the names Subject , SubjectType and Issuer + // with members of this response but carry the trusted identity propagation values, + // which differ from the SAML assertion values. + // + // It is not returned when the SAML assertion is encrypted, even though the + // session carries the context. + // + // This element contains information about the end user. Do not log it. + TrustedIdentityPropagationContext *types.TrustedIdentityPropagationContext + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -441,6 +454,11 @@ func (v *AssumeRoleWithSAMLOutput) SerializeMembers(s smithy.ShapeSerializer) { if v.SubjectType != nil { s.WriteString(schemas.AssumeRoleWithSAMLResponse_SubjectType, *v.SubjectType) } + if v.TrustedIdentityPropagationContext != nil { + s.WriteStruct(schemas.AssumeRoleWithSAMLResponse_TrustedIdentityPropagationContext) + v.TrustedIdentityPropagationContext.SerializeMembers(s) + s.CloseStruct() + } } func (v *AssumeRoleWithSAMLOutput) Deserialize(d smithy.ShapeDeserializer) error { return smithy.ReadStruct(d, schemas.AssumeRoleWithSAMLResponse, func(s *smithy.Schema) error { @@ -478,6 +496,9 @@ func (v *AssumeRoleWithSAMLOutput) Deserialize(d smithy.ShapeDeserializer) error case schemas.AssumeRoleWithSAMLResponse_SubjectType: v.SubjectType = new(string) return d.ReadString(schemas.AssumeRoleWithSAMLResponse_SubjectType, v.SubjectType) + case schemas.AssumeRoleWithSAMLResponse_TrustedIdentityPropagationContext: + v.TrustedIdentityPropagationContext = &types.TrustedIdentityPropagationContext{} + return v.TrustedIdentityPropagationContext.Deserialize(d) } return nil }) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go index 18767ee..5261c29 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go @@ -80,13 +80,6 @@ import ( // 128 characters and the values can’t exceed 256 characters. For these and // additional limits, see [IAM and STS Character Limits]in the IAM User Guide. // -// An Amazon Web Services conversion compresses the passed inline session policy, -// managed policy ARNs, and session tags into a packed binary format that has a -// separate limit. Your request can fail for this limit even if your plaintext -// meets the other requirements. The PackedPolicySize response element indicates -// by percentage how close the policies and tags for your request are to the upper -// size limit. -// // You can pass a session tag with the same key as a tag that is attached to the // role. When you do, the session tag overrides the role tag with the same key. // @@ -249,13 +242,6 @@ type AssumeRoleWithWebIdentityInput struct { // // For more information about role session permissions, see [Session policies]. // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string @@ -269,13 +255,6 @@ type AssumeRoleWithWebIdentityInput struct { // can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the // Amazon Web Services General Reference. // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's // identity-based policy and the session policies. You can use the role's temporary @@ -357,10 +336,10 @@ type AssumeRoleWithWebIdentityOutput struct { // strongly recommend that you make no assumptions about the maximum size. Credentials *types.Credentials - // A percentage value that indicates the packed size of the session policies and - // session tags combined passed in the request. The request fails if the packed - // size is greater than 100 percent, which means the policies and tags exceeded the - // allowed space. + // The percentage (0-100) of the maximum allowed session token size that the + // returned session token consumes. + // + // This field is deprecated. Use SessionTokenUtilization instead. // // Deprecated: Deprecated. Replaced by SessionTokenUtilization. PackedPolicySize *int32 @@ -411,6 +390,20 @@ type AssumeRoleWithWebIdentityOutput struct { // identity provider as the token's sub (Subject) claim. SubjectFromWebIdentityToken *string + // The trusted identity propagation context that Amazon Web Services STS set in + // the session from the web identity token, through the context provider attached + // to the OpenID Connect identity provider. It is present only when Amazon Web + // Services STS set such context in the session. It contains the + // aws:OriginIdentity/Subject , aws:OriginIdentity/SubjectType , + // aws:OriginIdentity/Issuer and aws:OriginIdentity/FederatedProviderArn keys and + // the aws:TransactionContext/IdentityProvider/* keys that Amazon Web Services STS + // set in the session. Other keys in the session, such as + // aws:IdentityCenterInstanceArn and aws:IdentityStoreArn for an identity provider + // with an Identity Center instance attached, are not returned. + // + // This element contains information about the end user. Do not log it. + TrustedIdentityPropagationContext *types.TrustedIdentityPropagationContext + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata @@ -455,6 +448,11 @@ func (v *AssumeRoleWithWebIdentityOutput) SerializeMembers(s smithy.ShapeSeriali if v.SubjectFromWebIdentityToken != nil { s.WriteString(schemas.AssumeRoleWithWebIdentityResponse_SubjectFromWebIdentityToken, *v.SubjectFromWebIdentityToken) } + if v.TrustedIdentityPropagationContext != nil { + s.WriteStruct(schemas.AssumeRoleWithWebIdentityResponse_TrustedIdentityPropagationContext) + v.TrustedIdentityPropagationContext.SerializeMembers(s) + s.CloseStruct() + } } func (v *AssumeRoleWithWebIdentityOutput) Deserialize(d smithy.ShapeDeserializer) error { return smithy.ReadStruct(d, schemas.AssumeRoleWithWebIdentityResponse, func(s *smithy.Schema) error { @@ -486,6 +484,9 @@ func (v *AssumeRoleWithWebIdentityOutput) Deserialize(d smithy.ShapeDeserializer case schemas.AssumeRoleWithWebIdentityResponse_SubjectFromWebIdentityToken: v.SubjectFromWebIdentityToken = new(string) return d.ReadString(schemas.AssumeRoleWithWebIdentityResponse_SubjectFromWebIdentityToken, v.SubjectFromWebIdentityToken) + case schemas.AssumeRoleWithWebIdentityResponse_TrustedIdentityPropagationContext: + v.TrustedIdentityPropagationContext = &types.TrustedIdentityPropagationContext{} + return v.TrustedIdentityPropagationContext.Deserialize(d) } return nil }) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go index 8fa2857..6988131 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetDelegatedAccessToken.go @@ -62,10 +62,7 @@ type GetDelegatedAccessTokenOutput struct { // Amazon Web Services credentials for API authentication. Credentials *types.Credentials - // The percentage of the maximum policy size that is used by the session policy. - // The policy size is calculated as the sum of all the session policies and - // permission boundaries attached to the session. If the packed size exceeds 100%, - // the request fails. + // This field is deprecated. It is not populated for GetDelegatedAccessToken . // // Deprecated: Deprecated. This field is not populated for GetDelegatedAccessToken. PackedPolicySize *int32 diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go index faa5ab4..405ce76 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go @@ -48,7 +48,8 @@ import ( // - You cannot call any IAM operations using the CLI or the Amazon Web Services // API. This limitation does not apply to console sessions. // -// - You cannot call any STS operations except GetCallerIdentity . +// - You cannot call any STS operations except GetCallerIdentity , +// GetScopedCredentials , or GetDelegatedAccessToken . // // You can use temporary credentials for single sign-on (SSO) to the console. // @@ -179,13 +180,6 @@ type GetFederationTokenInput struct { // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // // [session policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session Policy *string @@ -218,13 +212,6 @@ type GetFederationTokenInput struct { // allowed by the policy. These permissions are granted in addition to the // permissions that are granted by the session policies. // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // // [session policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session // [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html @@ -238,13 +225,6 @@ type GetFederationTokenInput struct { // session tag keys can’t exceed 128 characters and the values can’t exceed 256 // characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User Guide. // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // // You can pass a session tag with the same key as a tag that is already attached // to the user you are federating. When you do, session tags override a user tag // with the same key. @@ -307,10 +287,10 @@ type GetFederationTokenOutput struct { // bucket policy. FederatedUser *types.FederatedUser - // A percentage value that indicates the packed size of the session policies and - // session tags combined passed in the request. The request fails if the packed - // size is greater than 100 percent, which means the policies and tags exceeded the - // allowed space. + // The percentage (0-100) of the maximum allowed session token size that the + // returned session token consumes. + // + // This field is deprecated. Use SessionTokenUtilization instead. // // Deprecated: Deprecated. Replaced by SessionTokenUtilization. PackedPolicySize *int32 diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetScopedCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetScopedCredentials.go new file mode 100644 index 0000000..a7b4825 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetScopedCredentials.go @@ -0,0 +1,254 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sts + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/service/sts/schemas" + "github.com/aws/aws-sdk-go-v2/service/sts/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +// Returns a set of temporary security credentials that are scoped down from the +// caller's existing temporary security credentials. GetScopedCredentials +// preserves the caller's identity while narrowing the permissions and optionally +// shortening the session lifetime. +// +// For a comparison of GetScopedCredentials with the other API operations that +// produce temporary security credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. +// +// # Credential requirements +// +// You can only call GetScopedCredentials with temporary security credentials, for +// example, credentials from an assumed role or a federated session. You cannot +// call it with IAM user credentials or root credentials. If you want to scope down +// IAM user credentials, first call GetSessionToken to get temporary security +// credentials, and then call GetScopedCredentials with those credentials. +// +// The GetScopedCredentials API is not available on the STS Global endpoint. +// +// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html +// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html +func (c *Client) GetScopedCredentials(ctx context.Context, params *GetScopedCredentialsInput, optFns ...func(*Options)) (*GetScopedCredentialsOutput, error) { + if params == nil { + params = &GetScopedCredentialsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetScopedCredentials", params, optFns, c.addOperationGetScopedCredentialsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetScopedCredentialsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetScopedCredentialsInput struct { + + // The duration, in seconds, of the resulting scoped down credentials. The value + // can range from 1 second to 129,600 seconds (36 hours). + // + // If you do not specify this value, the scoped down credentials will inherit the + // calling session's expiration time. + DurationSeconds *int32 + + // The minimum size, in bytes, of the session token that STS issues for the + // request. STS increases the session token to at least this size, regardless of + // its actual content. The value must not exceed 4,096 bytes. When set to 0 or not + // specified, the session token size is unchanged. + MinimumSessionTokenSize *int32 + + // An IAM policy in JSON format that you want to use as a scope down policy. + // + // A request must provide at least one of Policy or DurationSeconds . Both + // parameters are optional individually, but you must specify at least one of them. + // + // The resulting session's permissions are the intersection of the calling + // session's existing permissions and this scope down policy. You cannot use this + // scope down policy to grant more permissions than the calling session already + // has. + // + // The plaintext of the scope down policy cannot exceed 2,048 characters. The JSON + // policy characters can be any ASCII character from the space character to the end + // of the valid character list (\u0020 through \u00FF). It can also include the tab + // (\u0009), linefeed (\u000A), and carriage return (\u000D) characters. + // + // An internal conversion compresses the inline scope down policy into a packed + // binary format that has a separate limit. If the packed policy exceeds this + // limit, the request fails with PackedPolicyTooLarge . + // + // If the document is not valid IAM policy JSON, the request fails with + // MalformedPolicyDocument . + Policy *string + + // A caller-supplied description of the scoped session. The value cannot exceed + // 256 characters. This description is logged to CloudTrail for the request, so you + // can use it to record the purpose of the scoped session. + ScopedSessionDescription *string + + noSmithyDocumentSerde +} + +func (v *GetScopedCredentialsInput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.GetScopedCredentialsRequest) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *GetScopedCredentialsInput) SerializeMembers(s smithy.ShapeSerializer) { + if v.DurationSeconds != nil { + s.WriteInt32(schemas.GetScopedCredentialsRequest_DurationSeconds, *v.DurationSeconds) + } + if v.MinimumSessionTokenSize != nil { + s.WriteInt32(schemas.GetScopedCredentialsRequest_MinimumSessionTokenSize, *v.MinimumSessionTokenSize) + } + if v.Policy != nil { + s.WriteString(schemas.GetScopedCredentialsRequest_Policy, *v.Policy) + } + if v.ScopedSessionDescription != nil { + s.WriteString(schemas.GetScopedCredentialsRequest_ScopedSessionDescription, *v.ScopedSessionDescription) + } +} + +// Contains the response to a successful GetScopedCredentials request, including the scoped-down +// temporary Amazon Web Services credentials and metadata about the resulting +// session. +type GetScopedCredentialsOutput struct { + + // The temporary security credentials for the scoped down session, which include + // an access key ID, a secret access key, and a security token. + // + // The size of the security token that STS API operations return is not fixed. We + // strongly recommend that you make no assumptions about the maximum size. + Credentials *types.Credentials + + // GetScopedCredentials can be called recursively and ScopedPoliciesCount + // specifies the number of scope down policies applied to the session. Each + // recursive call adds another scope down policy layer. A maximum of 3 scope down + // policy layers are allowed per session. If a session already has 3 + // GetScopedCredentials scope-down policies, a subsequent GetScopedCredentials + // call that supplies a Policy (attempting to append a fourth scope-down policy) + // is denied. + ScopedPoliciesCount *int32 + + // Metadata about the resulting scoped session, including its identifier and ARN. + // Because the identity does not change, the identifiers reflect the same principal + // and session name as the calling session. + SessionInfo *types.ScopedSession + + // The size, in bytes, of the session token returned in the Credentials for this + // response. + SessionTokenSize *int32 + + // The percentage (0-100) of the maximum allowed session token size that the + // returned session token consumes. + SessionTokenUtilization *int32 + + // The source identity of the calling session, carried forward unchanged. This + // operation never sets or modifies the source identity; it reflects the value + // established when the source identity was first set. For more information, see [Monitor and control actions taken with assumed roles] + // in the IAM User Guide. + // + // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html + SourceIdentity *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (v *GetScopedCredentialsOutput) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.GetScopedCredentialsResponse) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *GetScopedCredentialsOutput) SerializeMembers(s smithy.ShapeSerializer) { + if v.Credentials != nil { + s.WriteStruct(schemas.GetScopedCredentialsResponse_Credentials) + v.Credentials.SerializeMembers(s) + s.CloseStruct() + } + if v.ScopedPoliciesCount != nil { + s.WriteInt32(schemas.GetScopedCredentialsResponse_ScopedPoliciesCount, *v.ScopedPoliciesCount) + } + if v.SessionInfo != nil { + s.WriteStruct(schemas.GetScopedCredentialsResponse_SessionInfo) + v.SessionInfo.SerializeMembers(s) + s.CloseStruct() + } + if v.SessionTokenSize != nil { + s.WriteInt32(schemas.GetScopedCredentialsResponse_SessionTokenSize, *v.SessionTokenSize) + } + if v.SessionTokenUtilization != nil { + s.WriteInt32(schemas.GetScopedCredentialsResponse_SessionTokenUtilization, *v.SessionTokenUtilization) + } + if v.SourceIdentity != nil { + s.WriteString(schemas.GetScopedCredentialsResponse_SourceIdentity, *v.SourceIdentity) + } +} +func (v *GetScopedCredentialsOutput) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.GetScopedCredentialsResponse, func(s *smithy.Schema) error { + switch s { + case schemas.GetScopedCredentialsResponse_Credentials: + v.Credentials = &types.Credentials{} + return v.Credentials.Deserialize(d) + case schemas.GetScopedCredentialsResponse_ScopedPoliciesCount: + v.ScopedPoliciesCount = new(int32) + return d.ReadInt32(schemas.GetScopedCredentialsResponse_ScopedPoliciesCount, v.ScopedPoliciesCount) + case schemas.GetScopedCredentialsResponse_SessionInfo: + v.SessionInfo = &types.ScopedSession{} + return v.SessionInfo.Deserialize(d) + case schemas.GetScopedCredentialsResponse_SessionTokenSize: + v.SessionTokenSize = new(int32) + return d.ReadInt32(schemas.GetScopedCredentialsResponse_SessionTokenSize, v.SessionTokenSize) + case schemas.GetScopedCredentialsResponse_SessionTokenUtilization: + v.SessionTokenUtilization = new(int32) + return d.ReadInt32(schemas.GetScopedCredentialsResponse_SessionTokenUtilization, v.SessionTokenUtilization) + case schemas.GetScopedCredentialsResponse_SourceIdentity: + v.SourceIdentity = new(string) + return d.ReadString(schemas.GetScopedCredentialsResponse_SourceIdentity, v.SourceIdentity) + } + return nil + }) +} +func (c *Client) addOperationGetScopedCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&serializeRequestMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.GetScopedCredentials, schemas.GetScopedCredentialsRequest, schemas.GetScopedCredentialsResponse)}, middleware.After); err != nil { + return err + } + if err := stack.Deserialize.Add(&deserializeResponseMiddleware{options: &options, operationSchema: smithy.NewOperationSchema(schemas.GetScopedCredentials, schemas.GetScopedCredentialsRequest, schemas.GetScopedCredentialsResponse), output: &GetScopedCredentialsOutput{}}, middleware.After); err != nil { + return err + } + + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addInterceptors(stack, options); err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go index 7bd2aef..67868bd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go @@ -46,7 +46,8 @@ import ( // - You cannot call any IAM API operations unless MFA authentication // information is included in the request. // -// - You cannot call any STS API except AssumeRole or GetCallerIdentity . +// - You cannot call any STS API except AssumeRole , GetCallerIdentity , +// GetScopedCredentials , GetWebIdentityToken , or GetDelegatedAccessToken . // // The credentials that GetSessionToken returns are based on permissions // associated with the IAM user whose credentials were used to call the operation. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go index 46e4283..892d13b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetWebIdentityToken.go @@ -12,10 +12,17 @@ import ( ) // Returns a signed JSON Web Token (JWT) that represents the calling Amazon Web -// Services identity. The returned JWT can be used to authenticate with external -// services that support OIDC discovery. The token is signed by Amazon Web Services -// STS and can be publicly verified using the verification keys published at the -// issuer's JWKS endpoint. +// Services identity or, if you set SubjectMode to OriginIdentity , the human user +// or workload on whose behalf the calling session acts. The returned JWT can be +// used to authenticate with external services that support OIDC discovery. The +// token is signed by Amazon Web Services STS and can be publicly verified using +// the verification keys published at the issuer's JWKS endpoint. +// +// The sub (subject) claim contains the identity that SubjectMode selects. +// Whichever subject mode you use, the principal_id claim under the +// https://sts.amazonaws.com/ namespace contains the ARN of the principal that +// requested the token, when that principal has an ARN. For a role session, this is +// the ARN of the role. // // The GetWebIdentityToken API is not available on the STS Global endpoint. func (c *Client) GetWebIdentityToken(ctx context.Context, params *GetWebIdentityTokenInput, optFns ...func(*Options)) (*GetWebIdentityTokenOutput, error) { @@ -57,6 +64,56 @@ type GetWebIdentityTokenInput struct { // exchanged for credentials or short-lived tokens in the external service. DurationSeconds *int32 + // One or more OAuth 2.0 scope values to include in the JSON Web Token (JWT). + // Amazon Web Services STS copies the value exactly as you send it into the + // top-level scope claim of the token. If you don't specify Scope , the token + // doesn't include a scope claim. + // + // Separate multiple values with a single space, as defined in [RFC 6749, section 3.3] on the IETF + // website. Don't begin or end Scope with a space. Each scope value can contain + // printable ASCII characters except spaces, double quotation marks ( " ), commas ( + // , ), and backslashes ( \ ). + // + // You can't repeat a scope value. Scope values are case sensitive. This means + // that read and READ are separate values. + // + // You can specify Scope only when SubjectMode is OriginIdentity and you request + // exactly one audience. To specify Scope , the calling principal must have + // permission for the sts:SetWebIdentityTokenScope action in addition to + // sts:GetWebIdentityToken . You can use the multivalued sts:IdentityTokenScope + // condition key in a policy to control which scope values a principal can request. + // + // [RFC 6749, section 3.3]: https://www.rfc-editor.org/rfc/rfc6749#section-3.3 + Scope *string + + // Specifies which identity STS puts in the sub (subject) claim of the JSON Web + // Token (JWT). Valid values are AWSIdentity and OriginIdentity . If you don't + // specify a value, Amazon Web Services STS uses AWSIdentity . + // + // - AWSIdentity – The sub claim contains the ARN of the calling Amazon Web + // Services principal. + // + // - OriginIdentity – The sub claim contains the value of the + // aws:OriginIdentity/Subject key in the trusted identity propagation context of + // the calling session. For example, this can identify the human user or workload + // on whose behalf the calling session acts. Amazon Web Services STS also adds a + // subject_mode claim to the token. + // + // To use OriginIdentity , the trusted identity propagation context of the calling + // session must contain the aws:OriginIdentity/Subject key and either the + // aws:OriginIdentity/Issuer key or the aws:OriginIdentity/FederatedProviderArn + // key. If it doesn't, or if the subject is blank, Amazon Web Services STS rejects + // the request with a validation error. + // + // Amazon Web Services STS denies the request if the subject begins with the text + // arn: , in any combination of uppercase and lowercase letters. Amazon Web + // Services STS also denies the request if the subject begins or ends with a space, + // or contains a control, format, or separator character other than a space. + // + // You can use the sts:SubjectMode condition key in a policy to control which + // subject modes a principal can request. + SubjectMode types.WebIdentityTokenSubjectModeType + // An optional list of tags to include in the JSON Web Token (JWT). These tags are // added as custom claims to the JWT and can be used by the downstream service for // authorization decisions. @@ -78,9 +135,15 @@ func (v *GetWebIdentityTokenInput) SerializeMembers(s smithy.ShapeSerializer) { if v.DurationSeconds != nil { s.WriteInt32(schemas.GetWebIdentityTokenRequest_DurationSeconds, *v.DurationSeconds) } + if v.Scope != nil { + s.WriteString(schemas.GetWebIdentityTokenRequest_Scope, *v.Scope) + } if v.SigningAlgorithm != nil { s.WriteString(schemas.GetWebIdentityTokenRequest_SigningAlgorithm, *v.SigningAlgorithm) } + if v.SubjectMode != "" { + s.WriteString(schemas.GetWebIdentityTokenRequest_SubjectMode, string(v.SubjectMode)) + } if v.Tags != nil { serializetagListType(s, schemas.GetWebIdentityTokenRequest_Tags, v.Tags) } @@ -94,12 +157,15 @@ type GetWebIdentityTokenOutput struct { Expiration *time.Time // A signed JSON Web Token (JWT) that represents the caller's Amazon Web Services - // identity. The token contains standard JWT claims such as subject, audience, - // expiration time, and additional identity attributes added by STS as custom - // claims. You can also add your own custom claims to the token by passing tags as - // request parameters to the GetWebIdentityToken API. The token is signed using - // the specified signing algorithm and can be verified using the verification keys - // available at the issuer's JWKS endpoint. + // identity or, if you set SubjectMode to OriginIdentity , the human user or + // workload on whose behalf the calling session acts. The token contains standard + // JWT claims such as subject, audience, expiration time, and additional identity + // attributes added by STS as custom claims. These can include the principal_id + // claim, which contains the ARN of the principal that requested the token, + // whichever subject mode you use. You can also add your own custom claims to the + // token by passing tags as request parameters to the GetWebIdentityToken API. The + // token is signed using the specified signing algorithm and can be verified using + // the verification keys available at the issuer's JWKS endpoint. WebIdentityToken *string // Metadata pertaining to the operation's result. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/common_serde.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/common_serde.go index 5f03626..55fc074 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/common_serde.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/common_serde.go @@ -160,3 +160,33 @@ func deserializewebIdentityTokenAudienceListType(d smithy.ShapeDeserializer, s * return nil }) } + +func serializetransactionContextIdentityProviderMapType(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]string) { + s.WriteMap(schema) + for k, vv := range v { + s.WriteKey(schema.MapKey(), k) + s.WriteString(schema.MapValue(), string(vv)) + } + s.CloseMap() +} + +func deserializetransactionContextIdentityProviderMapType(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]string) error { + *v = make(map[string]string) + var vv string + return smithy.ReadMap(d, s, func(k string) error { + if isNil, err := d.ReadNil(s.MapValue()); err != nil { + return err + } else if isNil { + var zero string + (*v)[k] = zero + return nil + } + + if err := d.ReadString(s.MapValue(), &vv); err != nil { + return err + } + + (*v)[k] = vv + return nil + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json index 601d0ed..14f545b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json @@ -20,6 +20,7 @@ "api_op_GetCallerIdentity.go", "api_op_GetDelegatedAccessToken.go", "api_op_GetFederationToken.go", + "api_op_GetScopedCredentials.go", "api_op_GetSessionToken.go", "api_op_GetWebIdentityToken.go", "auth.go", @@ -40,6 +41,7 @@ "sra_operation_order_test.go", "type_registry.go", "types/common_serde.go", + "types/enums.go", "types/errors.go", "types/types.go", "validators.go" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index 1144f4d..3c0a8b2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/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.52.0" +const goModuleVersion = "1.53.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/schemas/schemas.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/schemas/schemas.go index e412bfe..509446e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/schemas/schemas.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/schemas/schemas.go @@ -4,6 +4,7 @@ package schemas import ( smithy "github.com/aws/smithy-go" + smithyprelude "github.com/aws/smithy-go/prelude" smithytraits "github.com/aws/smithy-go/traits" ) @@ -52,6 +53,11 @@ var GetFederationToken = smithy.NewSchema(smithy.ShapeID{ Name: "GetFederationToken", }, smithy.ShapeTypeOperation, 0) +var GetScopedCredentials = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "GetScopedCredentials", +}, smithy.ShapeTypeOperation, 0) + var GetSessionToken = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "GetSessionToken", @@ -223,6 +229,20 @@ var _idpRejectedClaimMessage = smithy.NewSchema(smithy.ShapeID{ Name: "idpRejectedClaimMessage", }, smithy.ShapeTypeString, 0) +var InsufficientSessionLifetimeException = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "InsufficientSessionLifetimeException", +}, smithy.ShapeTypeStructure, 1, &smithytraits.Error{Type: "client"}, + &smithytraits.HTTPError{Code: 400}, + &smithytraits.AWSQueryError{ErrorCode: "InsufficientSessionLifetime", + StatusCode: 400}) +var InsufficientSessionLifetimeException_message *smithy.Schema + +var _insufficientSessionLifetimeMessage = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "insufficientSessionLifetimeMessage", +}, smithy.ShapeTypeString, 0) + var _invalidAuthorizationMessage = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "invalidAuthorizationMessage", @@ -237,6 +257,20 @@ var InvalidAuthorizationMessageException = smithy.NewSchema(smithy.ShapeID{ StatusCode: 400}) var InvalidAuthorizationMessageException_message *smithy.Schema +var InvalidContextAssertionException = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "InvalidContextAssertionException", +}, smithy.ShapeTypeStructure, 1, &smithytraits.Error{Type: "client"}, + &smithytraits.HTTPError{Code: 400}, + &smithytraits.AWSQueryError{ErrorCode: "InvalidContextAssertion", + StatusCode: 400}) +var InvalidContextAssertionException_message *smithy.Schema + +var _InvalidContextAssertionMessage = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "InvalidContextAssertionMessage", +}, smithy.ShapeTypeString, 0) + var InvalidIdentityTokenException = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "InvalidIdentityTokenException", @@ -251,6 +285,20 @@ var _invalidIdentityTokenMessage = smithy.NewSchema(smithy.ShapeID{ Name: "invalidIdentityTokenMessage", }, smithy.ShapeTypeString, 0) +var InvalidSubjectCredentialsException = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "InvalidSubjectCredentialsException", +}, smithy.ShapeTypeStructure, 1, &smithytraits.Error{Type: "client"}, + &smithytraits.HTTPError{Code: 400}, + &smithytraits.AWSQueryError{ErrorCode: "InvalidSubjectCredentials", + StatusCode: 400}) +var InvalidSubjectCredentialsException_message *smithy.Schema + +var _InvalidSubjectCredentialsMessage = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "InvalidSubjectCredentialsMessage", +}, smithy.ShapeTypeString, 0) + var _Issuer = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "Issuer", @@ -304,6 +352,33 @@ var _nonNegativeIntegerType = smithy.NewSchema(smithy.ShapeID{ Name: "nonNegativeIntegerType", }, smithy.ShapeTypeInteger, 0) +var OriginIdentity = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "OriginIdentity", +}, smithy.ShapeTypeStructure, 4) +var OriginIdentity_Subject *smithy.Schema + +var OriginIdentity_SubjectType *smithy.Schema + +var OriginIdentity_Issuer *smithy.Schema + +var OriginIdentity_FederatedProviderArn *smithy.Schema + +var _originIdentityIssuerType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "originIdentityIssuerType", +}, smithy.ShapeTypeString, 0, &smithytraits.Sensitive{}) + +var _originIdentitySubjectType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "originIdentitySubjectType", +}, smithy.ShapeTypeString, 0, &smithytraits.Sensitive{}) + +var _originIdentitySubjectTypeType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "originIdentitySubjectTypeType", +}, smithy.ShapeTypeString, 0, &smithytraits.Sensitive{}) + var OutboundWebIdentityFederationDisabledException = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "OutboundWebIdentityFederationDisabledException", @@ -392,6 +467,34 @@ var _SAMLAssertionType = smithy.NewSchema(smithy.ShapeID{ Name: "SAMLAssertionType", }, smithy.ShapeTypeString, 0, &smithytraits.Sensitive{}) +var _scopedCredentialDurationSecondsType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "scopedCredentialDurationSecondsType", +}, smithy.ShapeTypeInteger, 0) + +var _scopedPoliciesCountType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "scopedPoliciesCountType", +}, smithy.ShapeTypeInteger, 0) + +var ScopedSession = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "ScopedSession", +}, smithy.ShapeTypeStructure, 2) +var ScopedSession_ScopedSessionId *smithy.Schema + +var ScopedSession_Arn *smithy.Schema + +var _scopedSessionDescriptionType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "scopedSessionDescriptionType", +}, smithy.ShapeTypeString, 0) + +var _scopedSessionIdType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "scopedSessionIdType", +}, smithy.ShapeTypeString, 0) + var _serialNumberType = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "serialNumberType", @@ -491,6 +594,38 @@ var _tradeInTokenType = smithy.NewSchema(smithy.ShapeID{ Name: "tradeInTokenType", }, smithy.ShapeTypeString, 0, &smithytraits.Sensitive{}) +var TransactionContext = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "TransactionContext", +}, smithy.ShapeTypeStructure, 1) +var TransactionContext_IdentityProvider *smithy.Schema + +var _transactionContextIdentityProviderMapType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "transactionContextIdentityProviderMapType", +}, smithy.ShapeTypeMap, 2) +var _transactionContextIdentityProviderMapType_key *smithy.Schema + +var _transactionContextIdentityProviderMapType_value *smithy.Schema + +var _transactionContextKeyType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "transactionContextKeyType", +}, smithy.ShapeTypeString, 0) + +var _transactionContextValueType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "transactionContextValueType", +}, smithy.ShapeTypeString, 0, &smithytraits.Sensitive{}) + +var TrustedIdentityPropagationContext = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "TrustedIdentityPropagationContext", +}, smithy.ShapeTypeStructure, 2, &smithytraits.Sensitive{}) +var TrustedIdentityPropagationContext_OriginIdentity *smithy.Schema + +var TrustedIdentityPropagationContext_TransactionContext *smithy.Schema + var _unrestrictedSessionPolicyDocumentType = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "unrestrictedSessionPolicyDocumentType", @@ -532,6 +667,19 @@ var _webIdentityTokenDurationSecondsType = smithy.NewSchema(smithy.ShapeID{ Name: "webIdentityTokenDurationSecondsType", }, smithy.ShapeTypeInteger, 0) +var _webIdentityTokenScopeType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "webIdentityTokenScopeType", +}, smithy.ShapeTypeString, 0) + +var webIdentityTokenSubjectModeType = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "webIdentityTokenSubjectModeType", +}, smithy.ShapeTypeEnum, 2) +var webIdentityTokenSubjectModeType_AWS_IDENTITY *smithy.Schema + +var webIdentityTokenSubjectModeType_ORIGIN_IDENTITY *smithy.Schema + var _webIdentityTokenType = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "webIdentityTokenType", @@ -604,7 +752,7 @@ var AssumeRoleWithSAMLRequest_MinimumSessionTokenSize *smithy.Schema var AssumeRoleWithSAMLResponse = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "AssumeRoleWithSAMLResponse", -}, smithy.ShapeTypeStructure, 11) +}, smithy.ShapeTypeStructure, 12) var AssumeRoleWithSAMLResponse_Credentials *smithy.Schema var AssumeRoleWithSAMLResponse_AssumedRoleUser *smithy.Schema @@ -627,6 +775,8 @@ var AssumeRoleWithSAMLResponse_SessionTokenUtilization *smithy.Schema var AssumeRoleWithSAMLResponse_SessionTokenSize *smithy.Schema +var AssumeRoleWithSAMLResponse_TrustedIdentityPropagationContext *smithy.Schema + var AssumeRoleWithWebIdentityRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "AssumeRoleWithWebIdentityRequest", @@ -650,7 +800,7 @@ var AssumeRoleWithWebIdentityRequest_MinimumSessionTokenSize *smithy.Schema var AssumeRoleWithWebIdentityResponse = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "AssumeRoleWithWebIdentityResponse", -}, smithy.ShapeTypeStructure, 9) +}, smithy.ShapeTypeStructure, 10) var AssumeRoleWithWebIdentityResponse_Credentials *smithy.Schema var AssumeRoleWithWebIdentityResponse_SubjectFromWebIdentityToken *smithy.Schema @@ -669,6 +819,8 @@ var AssumeRoleWithWebIdentityResponse_SessionTokenUtilization *smithy.Schema var AssumeRoleWithWebIdentityResponse_SessionTokenSize *smithy.Schema +var AssumeRoleWithWebIdentityResponse_TrustedIdentityPropagationContext *smithy.Schema + var AssumeRootRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "AssumeRootRequest", @@ -778,6 +930,34 @@ var GetFederationTokenResponse_SessionTokenUtilization *smithy.Schema var GetFederationTokenResponse_SessionTokenSize *smithy.Schema +var GetScopedCredentialsRequest = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "GetScopedCredentialsRequest", +}, smithy.ShapeTypeStructure, 4) +var GetScopedCredentialsRequest_Policy *smithy.Schema + +var GetScopedCredentialsRequest_DurationSeconds *smithy.Schema + +var GetScopedCredentialsRequest_MinimumSessionTokenSize *smithy.Schema + +var GetScopedCredentialsRequest_ScopedSessionDescription *smithy.Schema + +var GetScopedCredentialsResponse = smithy.NewSchema(smithy.ShapeID{ + Namespace: "com.amazonaws.sts", + Name: "GetScopedCredentialsResponse", +}, smithy.ShapeTypeStructure, 6) +var GetScopedCredentialsResponse_Credentials *smithy.Schema + +var GetScopedCredentialsResponse_SessionInfo *smithy.Schema + +var GetScopedCredentialsResponse_SessionTokenUtilization *smithy.Schema + +var GetScopedCredentialsResponse_SessionTokenSize *smithy.Schema + +var GetScopedCredentialsResponse_ScopedPoliciesCount *smithy.Schema + +var GetScopedCredentialsResponse_SourceIdentity *smithy.Schema + var GetSessionTokenRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "GetSessionTokenRequest", @@ -803,13 +983,17 @@ var GetSessionTokenResponse_SessionTokenSize *smithy.Schema var GetWebIdentityTokenRequest = smithy.NewSchema(smithy.ShapeID{ Namespace: "com.amazonaws.sts", Name: "GetWebIdentityTokenRequest", -}, smithy.ShapeTypeStructure, 4) +}, smithy.ShapeTypeStructure, 6) var GetWebIdentityTokenRequest_Audience *smithy.Schema var GetWebIdentityTokenRequest_DurationSeconds *smithy.Schema var GetWebIdentityTokenRequest_SigningAlgorithm *smithy.Schema +var GetWebIdentityTokenRequest_Scope *smithy.Schema + +var GetWebIdentityTokenRequest_SubjectMode *smithy.Schema + var GetWebIdentityTokenRequest_Tags *smithy.Schema var GetWebIdentityTokenResponse = smithy.NewSchema(smithy.ShapeID{ @@ -847,14 +1031,28 @@ func init() { IDPRejectedClaimException_message = IDPRejectedClaimException.AddMember("message", _idpRejectedClaimMessage) + InsufficientSessionLifetimeException_message = InsufficientSessionLifetimeException.AddMember("message", _insufficientSessionLifetimeMessage) + InvalidAuthorizationMessageException_message = InvalidAuthorizationMessageException.AddMember("message", _invalidAuthorizationMessage) + InvalidContextAssertionException_message = InvalidContextAssertionException.AddMember("message", _InvalidContextAssertionMessage) + InvalidIdentityTokenException_message = InvalidIdentityTokenException.AddMember("message", _invalidIdentityTokenMessage) + InvalidSubjectCredentialsException_message = InvalidSubjectCredentialsException.AddMember("message", _InvalidSubjectCredentialsMessage) + JWTPayloadSizeExceededException_message = JWTPayloadSizeExceededException.AddMember("message", _JWTPayloadSizeExceededException2) MalformedPolicyDocumentException_message = MalformedPolicyDocumentException.AddMember("message", _malformedPolicyDocumentMessage) + OriginIdentity_Subject = OriginIdentity.AddMember("Subject", _originIdentitySubjectType) + + OriginIdentity_SubjectType = OriginIdentity.AddMember("SubjectType", _originIdentitySubjectTypeType) + + OriginIdentity_Issuer = OriginIdentity.AddMember("Issuer", _originIdentityIssuerType) + + OriginIdentity_FederatedProviderArn = OriginIdentity.AddMember("FederatedProviderArn", _arnType) + OutboundWebIdentityFederationDisabledException_message = OutboundWebIdentityFederationDisabledException.AddMember("message", _OutboundWebIdentityFederationDisabledException2) PackedPolicyTooLargeException_message = PackedPolicyTooLargeException.AddMember("message", _packedPolicyTooLargeMessage) @@ -871,6 +1069,10 @@ func init() { RegionDisabledException_message = RegionDisabledException.AddMember("message", _regionDisabledMessage) + ScopedSession_ScopedSessionId = ScopedSession.AddMember("ScopedSessionId", _scopedSessionIdType) + + ScopedSession_Arn = ScopedSession.AddMember("Arn", _arnType) + SessionDurationEscalationException_message = SessionDurationEscalationException.AddMember("message", _SessionDurationEscalationException2) Tag_Key = Tag.AddMember("Key", _tagKeyType) @@ -881,8 +1083,22 @@ func init() { _tagListType_member = _tagListType.AddMember("member", Tag) + _transactionContextIdentityProviderMapType_key = _transactionContextIdentityProviderMapType.AddMember("key", _transactionContextKeyType) + + _transactionContextIdentityProviderMapType_value = _transactionContextIdentityProviderMapType.AddMember("value", _transactionContextValueType) + + TransactionContext_IdentityProvider = TransactionContext.AddMember("IdentityProvider", _transactionContextIdentityProviderMapType) + + TrustedIdentityPropagationContext_OriginIdentity = TrustedIdentityPropagationContext.AddMember("OriginIdentity", OriginIdentity) + + TrustedIdentityPropagationContext_TransactionContext = TrustedIdentityPropagationContext.AddMember("TransactionContext", TransactionContext) + _webIdentityTokenAudienceListType_member = _webIdentityTokenAudienceListType.AddMember("member", _webIdentityTokenAudienceStringType) + webIdentityTokenSubjectModeType_AWS_IDENTITY = webIdentityTokenSubjectModeType.AddMember("AWS_IDENTITY", smithyprelude.Unit) + + webIdentityTokenSubjectModeType_ORIGIN_IDENTITY = webIdentityTokenSubjectModeType.AddMember("ORIGIN_IDENTITY", smithyprelude.Unit) + AssumeRoleRequest_RoleArn = AssumeRoleRequest.AddMember("RoleArn", _arnType) AssumeRoleRequest_RoleSessionName = AssumeRoleRequest.AddMember("RoleSessionName", _roleSessionNameType) @@ -957,6 +1173,8 @@ func init() { AssumeRoleWithSAMLResponse_SessionTokenSize = AssumeRoleWithSAMLResponse.AddMember("SessionTokenSize", _sessionTokenSizeType) + AssumeRoleWithSAMLResponse_TrustedIdentityPropagationContext = AssumeRoleWithSAMLResponse.AddMember("TrustedIdentityPropagationContext", TrustedIdentityPropagationContext) + AssumeRoleWithWebIdentityRequest_RoleArn = AssumeRoleWithWebIdentityRequest.AddMember("RoleArn", _arnType) AssumeRoleWithWebIdentityRequest_RoleSessionName = AssumeRoleWithWebIdentityRequest.AddMember("RoleSessionName", _roleSessionNameType) @@ -991,6 +1209,8 @@ func init() { AssumeRoleWithWebIdentityResponse_SessionTokenSize = AssumeRoleWithWebIdentityResponse.AddMember("SessionTokenSize", _sessionTokenSizeType) + AssumeRoleWithWebIdentityResponse_TrustedIdentityPropagationContext = AssumeRoleWithWebIdentityResponse.AddMember("TrustedIdentityPropagationContext", TrustedIdentityPropagationContext) + AssumeRootRequest_TargetPrincipal = AssumeRootRequest.AddMember("TargetPrincipal", _TargetPrincipalType) AssumeRootRequest_TaskPolicyArn = AssumeRootRequest.AddMember("TaskPolicyArn", PolicyDescriptorType) @@ -1051,6 +1271,26 @@ func init() { GetFederationTokenResponse_SessionTokenSize = GetFederationTokenResponse.AddMember("SessionTokenSize", _sessionTokenSizeType) + GetScopedCredentialsRequest_Policy = GetScopedCredentialsRequest.AddMember("Policy", _sessionPolicyDocumentType) + + GetScopedCredentialsRequest_DurationSeconds = GetScopedCredentialsRequest.AddMember("DurationSeconds", _scopedCredentialDurationSecondsType) + + GetScopedCredentialsRequest_MinimumSessionTokenSize = GetScopedCredentialsRequest.AddMember("MinimumSessionTokenSize", _minimumSessionTokenSizeType) + + GetScopedCredentialsRequest_ScopedSessionDescription = GetScopedCredentialsRequest.AddMember("ScopedSessionDescription", _scopedSessionDescriptionType) + + GetScopedCredentialsResponse_Credentials = GetScopedCredentialsResponse.AddMember("Credentials", Credentials) + + GetScopedCredentialsResponse_SessionInfo = GetScopedCredentialsResponse.AddMember("SessionInfo", ScopedSession) + + GetScopedCredentialsResponse_SessionTokenUtilization = GetScopedCredentialsResponse.AddMember("SessionTokenUtilization", _sessionTokenUtilizationType) + + GetScopedCredentialsResponse_SessionTokenSize = GetScopedCredentialsResponse.AddMember("SessionTokenSize", _sessionTokenSizeType) + + GetScopedCredentialsResponse_ScopedPoliciesCount = GetScopedCredentialsResponse.AddMember("ScopedPoliciesCount", _scopedPoliciesCountType) + + GetScopedCredentialsResponse_SourceIdentity = GetScopedCredentialsResponse.AddMember("SourceIdentity", _sourceIdentityType) + GetSessionTokenRequest_DurationSeconds = GetSessionTokenRequest.AddMember("DurationSeconds", _durationSecondsType) GetSessionTokenRequest_SerialNumber = GetSessionTokenRequest.AddMember("SerialNumber", _serialNumberType) @@ -1071,6 +1311,10 @@ func init() { GetWebIdentityTokenRequest_SigningAlgorithm = GetWebIdentityTokenRequest.AddMember("SigningAlgorithm", _jwtAlgorithmType) + GetWebIdentityTokenRequest_Scope = GetWebIdentityTokenRequest.AddMember("Scope", _webIdentityTokenScopeType) + + GetWebIdentityTokenRequest_SubjectMode = GetWebIdentityTokenRequest.AddMember("SubjectMode", webIdentityTokenSubjectModeType) + GetWebIdentityTokenRequest_Tags = GetWebIdentityTokenRequest.AddMember("Tags", _tagListType) GetWebIdentityTokenResponse_WebIdentityToken = GetWebIdentityTokenResponse.AddMember("WebIdentityToken", _webIdentityTokenType) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/type_registry.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/type_registry.go index d7d7873..f8a5c6d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/type_registry.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/type_registry.go @@ -27,14 +27,26 @@ var TypeRegistry = &smithy.TypeRegistry{ Schema: schemas.IDPRejectedClaimException, New: func() any { return &types.IDPRejectedClaimException{} }, }, + "com.amazonaws.sts#InsufficientSessionLifetimeException": { + Schema: schemas.InsufficientSessionLifetimeException, + New: func() any { return &types.InsufficientSessionLifetimeException{} }, + }, "com.amazonaws.sts#InvalidAuthorizationMessageException": { Schema: schemas.InvalidAuthorizationMessageException, New: func() any { return &types.InvalidAuthorizationMessageException{} }, }, + "com.amazonaws.sts#InvalidContextAssertionException": { + Schema: schemas.InvalidContextAssertionException, + New: func() any { return &types.InvalidContextAssertionException{} }, + }, "com.amazonaws.sts#InvalidIdentityTokenException": { Schema: schemas.InvalidIdentityTokenException, New: func() any { return &types.InvalidIdentityTokenException{} }, }, + "com.amazonaws.sts#InvalidSubjectCredentialsException": { + Schema: schemas.InvalidSubjectCredentialsException, + New: func() any { return &types.InvalidSubjectCredentialsException{} }, + }, "com.amazonaws.sts#JWTPayloadSizeExceededException": { Schema: schemas.JWTPayloadSizeExceededException, New: func() any { return &types.JWTPayloadSizeExceededException{} }, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/common_serde.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/common_serde.go index b3c41be..256d315 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/common_serde.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/common_serde.go @@ -159,3 +159,33 @@ func deserializewebIdentityTokenAudienceListType(d smithy.ShapeDeserializer, s * return nil }) } + +func serializetransactionContextIdentityProviderMapType(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]string) { + s.WriteMap(schema) + for k, vv := range v { + s.WriteKey(schema.MapKey(), k) + s.WriteString(schema.MapValue(), string(vv)) + } + s.CloseMap() +} + +func deserializetransactionContextIdentityProviderMapType(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]string) error { + *v = make(map[string]string) + var vv string + return smithy.ReadMap(d, s, func(k string) error { + if isNil, err := d.ReadNil(s.MapValue()); err != nil { + return err + } else if isNil { + var zero string + (*v)[k] = zero + return nil + } + + if err := d.ReadString(s.MapValue(), &vv); err != nil { + return err + } + + (*v)[k] = vv + return nil + }) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/enums.go new file mode 100644 index 0000000..058623e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/enums.go @@ -0,0 +1,23 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type WebIdentityTokenSubjectModeType string + +// Enum values for WebIdentityTokenSubjectModeType +const ( + WebIdentityTokenSubjectModeTypeAwsIdentity WebIdentityTokenSubjectModeType = "AWSIdentity" + WebIdentityTokenSubjectModeTypeOriginIdentity WebIdentityTokenSubjectModeType = "OriginIdentity" +) + +// Values returns all known values for WebIdentityTokenSubjectModeType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (WebIdentityTokenSubjectModeType) Values() []WebIdentityTokenSubjectModeType { + return []WebIdentityTokenSubjectModeType{ + "AWSIdentity", + "OriginIdentity", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go index 1e2b6fd..d17753d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go @@ -206,6 +206,59 @@ func (v *IDPRejectedClaimException) Deserialize(d smithy.ShapeDeserializer) erro }) } +// The request was rejected because the requested DurationSeconds is greater than +// the remaining lifetime of the calling session. GetScopedCredentials cannot +// extend a session beyond its original expiration. Request a duration that is less +// than or equal to the calling session's remaining lifetime, or omit +// DurationSeconds to inherit it. +type InsufficientSessionLifetimeException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InsufficientSessionLifetimeException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InsufficientSessionLifetimeException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InsufficientSessionLifetimeException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InsufficientSessionLifetime" + } + return *e.ErrorCodeOverride +} +func (e *InsufficientSessionLifetimeException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} +func (v *InsufficientSessionLifetimeException) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.InsufficientSessionLifetimeException) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *InsufficientSessionLifetimeException) SerializeMembers(s smithy.ShapeSerializer) { + if v.Message != nil { + s.WriteString(schemas.InsufficientSessionLifetimeException_message, *v.Message) + } +} +func (v *InsufficientSessionLifetimeException) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.InsufficientSessionLifetimeException, func(s *smithy.Schema) error { + switch s { + case schemas.InsufficientSessionLifetimeException_message: + v.Message = new(string) + return d.ReadString(schemas.InsufficientSessionLifetimeException_message, v.Message) + } + return nil + }) +} + // The error returned if the message passed to DecodeAuthorizationMessage was // invalid. This can happen if the token contains invalid characters, such as line // breaks, or if the message has expired. @@ -257,6 +310,56 @@ func (v *InvalidAuthorizationMessageException) Deserialize(d smithy.ShapeDeseria }) } +// The request was rejected because the context assertion that was provided is +// invalid. This can happen if the context assertion supplied in the +// ProvidedContexts parameter is malformed, has expired, or does not match a +// trusted context provider. +type InvalidContextAssertionException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidContextAssertionException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidContextAssertionException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidContextAssertionException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidContextAssertion" + } + return *e.ErrorCodeOverride +} +func (e *InvalidContextAssertionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +func (v *InvalidContextAssertionException) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.InvalidContextAssertionException) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *InvalidContextAssertionException) SerializeMembers(s smithy.ShapeSerializer) { + if v.Message != nil { + s.WriteString(schemas.InvalidContextAssertionException_message, *v.Message) + } +} +func (v *InvalidContextAssertionException) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.InvalidContextAssertionException, func(s *smithy.Schema) error { + switch s { + case schemas.InvalidContextAssertionException_message: + v.Message = new(string) + return d.ReadString(schemas.InvalidContextAssertionException_message, v.Message) + } + return nil + }) +} + // The web identity token that was passed could not be validated by Amazon Web // Services. Get a new identity token from the identity provider and then retry the // request. @@ -306,6 +409,57 @@ func (v *InvalidIdentityTokenException) Deserialize(d smithy.ShapeDeserializer) }) } +// The request was rejected because the session used to call GetScopedCredentials +// is not a valid session. The calling session's credentials could not be validated +// or resolved. +type InvalidSubjectCredentialsException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *InvalidSubjectCredentialsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidSubjectCredentialsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidSubjectCredentialsException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidSubjectCredentials" + } + return *e.ErrorCodeOverride +} +func (e *InvalidSubjectCredentialsException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} +func (v *InvalidSubjectCredentialsException) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.InvalidSubjectCredentialsException) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *InvalidSubjectCredentialsException) SerializeMembers(s smithy.ShapeSerializer) { + if v.Message != nil { + s.WriteString(schemas.InvalidSubjectCredentialsException_message, *v.Message) + } +} +func (v *InvalidSubjectCredentialsException) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.InvalidSubjectCredentialsException, func(s *smithy.Schema) error { + switch s { + case schemas.InvalidSubjectCredentialsException_message: + v.Message = new(string) + return d.ReadString(schemas.InvalidSubjectCredentialsException_message, v.Message) + } + return nil + }) +} + // The requested token payload size exceeds the maximum allowed size. Reduce the // number of request tags included in the GetWebIdentityToken API call to reduce // the token payload size. @@ -454,15 +608,15 @@ func (v *OutboundWebIdentityFederationDisabledException) Deserialize(d smithy.Sh }) } -// The request was rejected because the total packed size of the session policies -// and session tags combined was too large. An Amazon Web Services conversion -// compresses the session policy document, session policy ARNs, and session tags -// into a packed binary format that has a separate limit. The error message -// indicates by percentage how close the policies and tags are to the upper size -// limit. For more information, see [Passing Session Tags in STS]in the IAM User Guide. +// The request was rejected because the session token exceeded the maximum allowed +// size. The error message reports the session token size and the maximum allowed +// size, both in bytes. Session policies and session tags add to the session token +// size. For more information, see [Passing Session Tags in STS]in the IAM User Guide. // -// You could receive this error even though you meet other defined session policy -// and session tag limits. For more information, see [IAM and STS Entity Character Limits]in the IAM User Guide. +// You might receive this error even though you meet the individual session policy +// and session tag limits. Monitor SessionTokenUtilization to track how close the +// session token is to the maximum allowed size. For more information, see [IAM and STS Entity Character Limits]in the +// IAM User Guide. // // [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html // [IAM and STS Entity Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go index cfad32d..8ac27f3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go @@ -176,6 +176,73 @@ func (v *FederatedUser) Deserialize(d smithy.ShapeDeserializer) error { }) } +// The session's aws:OriginIdentity/Subject , aws:OriginIdentity/SubjectType , +// aws:OriginIdentity/Issuer and aws:OriginIdentity/FederatedProviderArn keys. A +// member is absent when the session does not have the key. +type OriginIdentity struct { + + // The value of the aws:OriginIdentity/FederatedProviderArn key: the ARN of the + // IAM identity provider that the request federated through. + FederatedProviderArn *string + + // The value of the aws:OriginIdentity/Issuer key. For AssumeRoleWithWebIdentity , + // this is the iss claim of the token without the https:// prefix. For + // AssumeRoleWithSAML , this is a hash of the key that signed the SAML assertion, + // not the Issuer element of the assertion. + Issuer *string + + // The value of the aws:OriginIdentity/Subject key: the end user's identifier, + // taken from the token claim that the context provider maps as the subject. + Subject *string + + // The value of the aws:OriginIdentity/SubjectType key, which indicates whether + // the end user is a person ( user ) or a non-human caller such as an application + // or service ( workload ). + SubjectType *string + + noSmithyDocumentSerde +} + +func (v *OriginIdentity) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.OriginIdentity) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *OriginIdentity) SerializeMembers(s smithy.ShapeSerializer) { + if v.FederatedProviderArn != nil { + s.WriteString(schemas.OriginIdentity_FederatedProviderArn, *v.FederatedProviderArn) + } + if v.Issuer != nil { + s.WriteString(schemas.OriginIdentity_Issuer, *v.Issuer) + } + if v.Subject != nil { + s.WriteString(schemas.OriginIdentity_Subject, *v.Subject) + } + if v.SubjectType != nil { + s.WriteString(schemas.OriginIdentity_SubjectType, *v.SubjectType) + } +} +func (v *OriginIdentity) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.OriginIdentity, func(s *smithy.Schema) error { + switch s { + case schemas.OriginIdentity_FederatedProviderArn: + v.FederatedProviderArn = new(string) + return d.ReadString(schemas.OriginIdentity_FederatedProviderArn, v.FederatedProviderArn) + case schemas.OriginIdentity_Issuer: + v.Issuer = new(string) + return d.ReadString(schemas.OriginIdentity_Issuer, v.Issuer) + case schemas.OriginIdentity_Subject: + v.Subject = new(string) + return d.ReadString(schemas.OriginIdentity_Subject, v.Subject) + case schemas.OriginIdentity_SubjectType: + v.SubjectType = new(string) + return d.ReadString(schemas.OriginIdentity_SubjectType, v.SubjectType) + } + return nil + }) +} + // A reference to the IAM managed policy that is passed as a session policy for a // role session or a federated user session. type PolicyDescriptorType struct { @@ -256,6 +323,55 @@ func (v *ProvidedContext) Deserialize(d smithy.ShapeDeserializer) error { }) } +// Identifiers for the scoped session that GetScopedCredentials returns. The +// underlying identity and session name do not change from the caller principal. +type ScopedSession struct { + + // The ARN of the scoped session. For more information about ARNs and how to use + // them in policies, see [IAM Identifiers]in the IAM User Guide. + // + // [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html + // + // This member is required. + Arn *string + + // A unique identifier for the scoped session. Because the identity is preserved, + // this identifies the same principal as the calling session. + // + // This member is required. + ScopedSessionId *string + + noSmithyDocumentSerde +} + +func (v *ScopedSession) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.ScopedSession) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *ScopedSession) SerializeMembers(s smithy.ShapeSerializer) { + if v.Arn != nil { + s.WriteString(schemas.ScopedSession_Arn, *v.Arn) + } + if v.ScopedSessionId != nil { + s.WriteString(schemas.ScopedSession_ScopedSessionId, *v.ScopedSessionId) + } +} +func (v *ScopedSession) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.ScopedSession, func(s *smithy.Schema) error { + switch s { + case schemas.ScopedSession_Arn: + v.Arn = new(string) + return d.ReadString(schemas.ScopedSession_Arn, v.Arn) + case schemas.ScopedSession_ScopedSessionId: + v.ScopedSessionId = new(string) + return d.ReadString(schemas.ScopedSession_ScopedSessionId, v.ScopedSessionId) + } + return nil + }) +} + // You can pass custom key-value pair attributes when you assume a role or // federate a user. These are called session tags. You can then use the session // tags to control access to resources. For more information, see [Tagging Amazon Web Services STS Sessions]in the IAM User @@ -317,4 +433,87 @@ func (v *Tag) Deserialize(d smithy.ShapeDeserializer) error { }) } +// The session's aws:TransactionContext/IdentityProvider/* keys. +type TransactionContext struct { + + // The session's aws:TransactionContext/IdentityProvider/* keys, keyed by the part + // of the key name after aws:TransactionContext/IdentityProvider/ . Each value is + // up to 128 characters. + // + // The number of entries is bounded twice. IAM limits how many keys a context + // provider maps when you configure it on the identity provider, and Amazon Web + // Services STS rejects a session whose session token exceeds the maximum size with + // PackedPolicyTooLarge . + IdentityProvider map[string]string + + noSmithyDocumentSerde +} + +func (v *TransactionContext) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.TransactionContext) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *TransactionContext) SerializeMembers(s smithy.ShapeSerializer) { + if v.IdentityProvider != nil { + serializetransactionContextIdentityProviderMapType(s, schemas.TransactionContext_IdentityProvider, v.IdentityProvider) + } +} +func (v *TransactionContext) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.TransactionContext, func(s *smithy.Schema) error { + switch s { + case schemas.TransactionContext_IdentityProvider: + return deserializetransactionContextIdentityProviderMapType(d, schemas.TransactionContext_IdentityProvider, &v.IdentityProvider) + } + return nil + }) +} + +// The trusted identity propagation context that Amazon Web Services STS set in a +// session from the identity provider's token. A member is absent when the session +// has none of its keys. +type TrustedIdentityPropagationContext struct { + + // The identity of the end user on whose behalf the session acts. + OriginIdentity *OriginIdentity + + // Additional claims about the request that the identity provider asserted. + TransactionContext *TransactionContext + + noSmithyDocumentSerde +} + +func (v *TrustedIdentityPropagationContext) Serialize(s smithy.ShapeSerializer) { + s.WriteStruct(schemas.TrustedIdentityPropagationContext) + v.SerializeMembers(s) + s.CloseStruct() +} + +func (v *TrustedIdentityPropagationContext) SerializeMembers(s smithy.ShapeSerializer) { + if v.OriginIdentity != nil { + s.WriteStruct(schemas.TrustedIdentityPropagationContext_OriginIdentity) + v.OriginIdentity.SerializeMembers(s) + s.CloseStruct() + } + if v.TransactionContext != nil { + s.WriteStruct(schemas.TrustedIdentityPropagationContext_TransactionContext) + v.TransactionContext.SerializeMembers(s) + s.CloseStruct() + } +} +func (v *TrustedIdentityPropagationContext) Deserialize(d smithy.ShapeDeserializer) error { + return smithy.ReadStruct(d, schemas.TrustedIdentityPropagationContext, func(s *smithy.Schema) error { + switch s { + case schemas.TrustedIdentityPropagationContext_OriginIdentity: + v.OriginIdentity = &OriginIdentity{} + return v.OriginIdentity.Deserialize(d) + case schemas.TrustedIdentityPropagationContext_TransactionContext: + v.TransactionContext = &TransactionContext{} + return v.TransactionContext.Deserialize(d) + } + return nil + }) +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/modules.txt b/vendor/modules.txt index 2252e5b..d180d18 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -22,11 +22,11 @@ github.com/aws/aws-sdk-go-v2/internal/strings github.com/aws/aws-sdk-go-v2/internal/sync/singleflight github.com/aws/aws-sdk-go-v2/internal/timeconv github.com/aws/aws-sdk-go-v2/internal/timeouts -# github.com/aws/aws-sdk-go-v2/config v1.33.18 +# github.com/aws/aws-sdk-go-v2/config v1.33.21 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/config github.com/aws/aws-sdk-go-v2/config/internal/ini -# github.com/aws/aws-sdk-go-v2/credentials v1.21.0 +# github.com/aws/aws-sdk-go-v2/credentials v1.21.3 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds @@ -57,13 +57,13 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding # github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.12 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url -# github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.50.12 +# github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.51.0 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/secretsmanager github.com/aws/aws-sdk-go-v2/service/secretsmanager/internal/endpoints github.com/aws/aws-sdk-go-v2/service/secretsmanager/schemas github.com/aws/aws-sdk-go-v2/service/secretsmanager/types -# github.com/aws/aws-sdk-go-v2/service/signin v1.13.1 +# github.com/aws/aws-sdk-go-v2/service/signin v1.14.0 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/signin github.com/aws/aws-sdk-go-v2/service/signin/internal/endpoints @@ -81,7 +81,7 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssooidc/schemas github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.52.0 +# github.com/aws/aws-sdk-go-v2/service/sts v1.53.0 ## explicit; go 1.24 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints