mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to master@31c870e82a48
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
3
vendor/github.com/aws/aws-sdk-go-v2/.gitignore
generated
vendored
3
vendor/github.com/aws/aws-sdk-go-v2/.gitignore
generated
vendored
@ -9,3 +9,6 @@ Gemfile.lock
|
||||
/private/model/cli/gen-api/gen-api
|
||||
.gradle/
|
||||
build/
|
||||
.idea/
|
||||
bin/
|
||||
.vscode/
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/.golangci.toml
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/.golangci.toml
generated
vendored
@ -6,7 +6,7 @@ modules-download-mode = "readonly"
|
||||
allow-parallel-runners = true
|
||||
skip-dirs = ["internal/repotools"]
|
||||
skip-dirs-use-default = true
|
||||
|
||||
skip-files = ["service/transcribestreaming/eventstream_test.go"]
|
||||
[output]
|
||||
format = "github-actions"
|
||||
|
||||
|
4897
vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md
generated
vendored
4897
vendor/github.com/aws/aws-sdk-go-v2/CHANGELOG.md
generated
vendored
File diff suppressed because it is too large
Load Diff
4
vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md
generated
vendored
4
vendor/github.com/aws/aws-sdk-go-v2/CODE_OF_CONDUCT.md
generated
vendored
@ -1,4 +1,4 @@
|
||||
## Code of Conduct
|
||||
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
||||
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
||||
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
||||
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
||||
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
||||
|
35
vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md
generated
vendored
35
vendor/github.com/aws/aws-sdk-go-v2/CONTRIBUTING.md
generated
vendored
@ -14,29 +14,28 @@ Jump To:
|
||||
* [Feature Requests](#feature-requests)
|
||||
* [Code Contributions](#code-contributions)
|
||||
|
||||
|
||||
## How to contribute
|
||||
|
||||
*Before you send us a pull request, please be sure that:*
|
||||
|
||||
1. You're working from the latest source on the master branch.
|
||||
2. You check existing open, and recently closed, pull requests to be sure
|
||||
1. You're working from the latest source on the `main` branch.
|
||||
2. You check existing open, and recently closed, pull requests to be sure
|
||||
that someone else hasn't already addressed the problem.
|
||||
3. You create an issue before working on a contribution that will take a
|
||||
3. You create an issue before working on a contribution that will take a
|
||||
significant amount of your time.
|
||||
|
||||
*Creating a Pull Request*
|
||||
|
||||
1. Fork the repository.
|
||||
2. In your fork, make your change in a branch that's based on this repo's master branch.
|
||||
2. In your fork, make your change in a branch that's based on this repo's `main` branch.
|
||||
3. Commit the change to your fork, using a clear and descriptive commit message.
|
||||
4. Create a pull request, answering any questions in the pull request form.
|
||||
|
||||
For contributions that will take a significant amount of time, open a new
|
||||
issue to pitch your idea before you get started. Explain the problem and
|
||||
describe the content you want to see added to the documentation. Let us know
|
||||
if you'll write it yourself or if you'd like us to help. We'll discuss your
|
||||
proposal with you and let you know whether we're likely to accept it.
|
||||
For contributions that will take a significant amount of time, open a new
|
||||
issue to pitch your idea before you get started. Explain the problem and
|
||||
describe the content you want to see added to the documentation. Let us know
|
||||
if you'll write it yourself or if you'd like us to help. We'll discuss your
|
||||
proposal with you and let you know whether we're likely to accept it.
|
||||
|
||||
## Bug Reports
|
||||
|
||||
@ -74,9 +73,9 @@ guidelines prior to filing a bug report.
|
||||
|
||||
Open an [issue][issues] with the following:
|
||||
|
||||
* A short, descriptive title. Ideally, other community members should be able
|
||||
* A short, descriptive title. Ideally, other community members should be able
|
||||
to get a good idea of the feature just from reading the title.
|
||||
* A detailed description of the the proposed feature.
|
||||
* A detailed description of the the proposed feature.
|
||||
* Why it should be added to the SDK.
|
||||
* If possible, example code to illustrate how it should work.
|
||||
* Use Markdown to make the request easier to read;
|
||||
@ -97,7 +96,7 @@ Please be aware of the following notes prior to opening a pull request:
|
||||
|
||||
3. Wherever possible, pull requests should contain tests as appropriate.
|
||||
Bugfixes should contain tests that exercise the corrected behavior (i.e., the
|
||||
test should fail without the bugfix and pass with it), and new features
|
||||
test should fail without the bugfix and pass with it), and new features
|
||||
should be accompanied by tests exercising the feature.
|
||||
|
||||
4. Pull requests that contain failing tests will not be merged until the test
|
||||
@ -112,7 +111,7 @@ Please be aware of the following notes prior to opening a pull request:
|
||||
|
||||
### Testing
|
||||
|
||||
To run the tests locally, running the `make unit` command will `go get` the
|
||||
To run the tests locally, running the `make unit` command will `go get` the
|
||||
SDK's testing dependencies, and run vet, link and unit tests for the SDK.
|
||||
|
||||
```
|
||||
@ -129,7 +128,7 @@ go test -tags codegen ./private/...
|
||||
|
||||
See the `Makefile` for additional testing tags that can be used in testing.
|
||||
|
||||
To test on multiple platform the SDK includes several DockerFiles under the
|
||||
To test on multiple platform the SDK includes several DockerFiles under the
|
||||
`awstesting/sandbox` folder, and associated make recipes to to execute
|
||||
unit testing within environments configured for specific Go versions.
|
||||
|
||||
@ -170,9 +169,9 @@ This will result in a patch version change.
|
||||
* `SDK Bugs` - For minor changes that resolve an issue. This will result in a
|
||||
patch version change.
|
||||
|
||||
[issues]: https://github.com/aws/aws-sdk-go/issues
|
||||
[pr]: https://github.com/aws/aws-sdk-go/pulls
|
||||
[issues]: https://github.com/aws/aws-sdk-go-v2/issues
|
||||
[pr]: https://github.com/aws/aws-sdk-go-v2/pulls
|
||||
[license]: http://aws.amazon.com/apache2.0/
|
||||
[cla]: http://en.wikipedia.org/wiki/Contributor_License_Agreement
|
||||
[releasenotes]: https://github.com/aws/aws-sdk-go/releases
|
||||
[releasenotes]: https://github.com/aws/aws-sdk-go-v2/releases
|
||||
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/DESIGN.md
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/DESIGN.md
generated
vendored
@ -12,4 +12,4 @@ Past Discussions
|
||||
---
|
||||
The issues listed here are for documentation purposes, and is used to capture issues and their associated discussions.
|
||||
|
||||
[Code of Conduct]: https://github.com/aws/aws-sdk-go-v2/blob/master/CODE_OF_CONDUCT.md
|
||||
[Code of Conduct]: https://github.com/aws/aws-sdk-go-v2/blob/main/CODE_OF_CONDUCT.md
|
||||
|
47
vendor/github.com/aws/aws-sdk-go-v2/Makefile
generated
vendored
47
vendor/github.com/aws/aws-sdk-go-v2/Makefile
generated
vendored
@ -72,22 +72,22 @@ all: generate unit
|
||||
# Code Generation #
|
||||
###################
|
||||
.PHONY: generate smithy-generate smithy-build smithy-build-% smithy-clean smithy-go-publish-local format \
|
||||
gen-config-asserts gen-repo-mod-replace gen-mod-replace-smithy gen-mod-dropreplace-smithy gen-aws-ptrs tidy-modules-% \
|
||||
gen-config-asserts gen-repo-mod-replace gen-mod-replace-smithy gen-mod-dropreplace-smithy-% gen-aws-ptrs tidy-modules-% \
|
||||
add-module-license-files sync-models sync-endpoints-model sync-endpoints.json clone-v1-models gen-internal-codegen \
|
||||
sync-api-models copy-attributevalue-feature min-go-version-% update-requires smithy-annotate-stable \
|
||||
update-module-metadata download-modules-%
|
||||
|
||||
generate: smithy-generate update-requires gen-repo-mod-replace update-module-metadata smithy-annotate-stable \
|
||||
gen-config-asserts gen-internal-codegen copy-attributevalue-feature gen-mod-dropreplace-smithy min-go-version-. \
|
||||
gen-config-asserts gen-internal-codegen copy-attributevalue-feature gen-mod-dropreplace-smithy-. min-go-version-. \
|
||||
tidy-modules-. add-module-license-files gen-aws-ptrs format
|
||||
|
||||
smithy-generate:
|
||||
cd codegen && ./gradlew clean build -Plog-tests && ./gradlew clean
|
||||
|
||||
smithy-build: gen-repo-mod-replace
|
||||
smithy-build:
|
||||
cd codegen && ./gradlew clean build -Plog-tests
|
||||
|
||||
smithy-build-%: gen-repo-mod-replace
|
||||
smithy-build-%:
|
||||
@# smithy-build- command that uses the pattern to define build filter that
|
||||
@# the smithy API model service id starts with. Strips off the
|
||||
@# "smithy-build-".
|
||||
@ -120,19 +120,32 @@ gen-config-asserts:
|
||||
gen-internal-codegen:
|
||||
@echo "Generating internal/codegen"
|
||||
cd internal/codegen \
|
||||
&& go mod tidy \
|
||||
&& go generate
|
||||
|
||||
gen-repo-mod-replace:
|
||||
@echo "Generating go.mod replace for repo modules"
|
||||
go run ${REPOTOOLS_CMD_MAKE_RELATIVE}
|
||||
|
||||
gen-mod-replace-smithy:
|
||||
gen-mod-replace-smithy-%:
|
||||
@# gen-mod-replace-smithy- command that uses the pattern to define build filter that
|
||||
@# for modules to add replace to. Strips off the "gen-mod-replace-smithy-".
|
||||
@#
|
||||
@# SMITHY_GO_SRC environment variable is the path to add replace to
|
||||
@#
|
||||
@# e.g. gen-mod-replace-smithy-service_ssooidc
|
||||
cd ./internal/repotools/cmd/eachmodule \
|
||||
&& go run . "go mod edit -replace github.com/aws/smithy-go=${SMITHY_GO_SRC}"
|
||||
&& go run . -p $(subst _,/,$(subst gen-mod-replace-smithy-,,$@)) ${EACHMODULE_FLAGS} \
|
||||
"go mod edit -replace github.com/aws/smithy-go=${SMITHY_GO_SRC}"
|
||||
|
||||
gen-mod-dropreplace-smithy:
|
||||
gen-mod-dropreplace-smithy-%:
|
||||
@# gen-mod-dropreplace-smithy- command that uses the pattern to define build filter that
|
||||
@# for modules to add replace to. Strips off the "gen-mod-dropreplace-smithy-".
|
||||
@#
|
||||
@# e.g. gen-mod-dropreplace-smithy-service_ssooidc
|
||||
cd ./internal/repotools/cmd/eachmodule \
|
||||
&& go run . "go mod edit -dropreplace github.com/aws/smithy-go"
|
||||
&& go run . -p $(subst _,/,$(subst gen-mod-dropreplace-smithy-,,$@)) ${EACHMODULE_FLAGS} \
|
||||
"go mod edit -dropreplace github.com/aws/smithy-go"
|
||||
|
||||
gen-aws-ptrs:
|
||||
cd aws && go generate
|
||||
@ -233,7 +246,6 @@ unit-race-modules-%:
|
||||
"go test ${BUILD_TAGS} ${RUN_NONE} ./..." \
|
||||
"go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./..."
|
||||
|
||||
|
||||
unit-modules-%:
|
||||
@# unit command that uses the pattern to define the root path that the
|
||||
@# module testing will start from. Strips off the "unit-modules-" and
|
||||
@ -395,7 +407,6 @@ bench-modules-%:
|
||||
&& go run . -p $(subst _,/,$(subst bench-modules-,,$@)) ${EACHMODULE_FLAGS} \
|
||||
"go test -timeout=10m -bench . --benchmem ${BUILD_TAGS} ${RUN_NONE} ./..."
|
||||
|
||||
|
||||
#####################
|
||||
# Release Process #
|
||||
#####################
|
||||
@ -486,14 +497,22 @@ list-deps-%:
|
||||
###################
|
||||
.PHONY: sandbox-tests sandbox-build-% sandbox-run-% sandbox-test-% update-aws-golang-tip
|
||||
|
||||
sandbox-tests: sandbox-test-go1.15 sandbox-test-go1.16 sandbox-test-go1.17 sandbox-test-gotip
|
||||
sandbox-tests: sandbox-test-go1.15 sandbox-test-go1.16 sandbox-test-go1.17 sandbox-test-go1.18 sandbox-test-go1.19 sandbox-test-go1.20 sandbox-test-gotip
|
||||
|
||||
sandbox-build-%:
|
||||
@# sandbox-build-go1.17
|
||||
@# sandbox-build-gotip
|
||||
docker build \
|
||||
-f ./internal/awstesting/sandbox/Dockerfile.test.$(subst sandbox-build-,,$@) \
|
||||
-t "aws-sdk-go-$(subst sandbox-build-,,$@)" .
|
||||
@if [ $@ == sandbox-build-gotip ]; then\
|
||||
docker build \
|
||||
-f ./internal/awstesting/sandbox/Dockerfile.test.gotip \
|
||||
-t "aws-sdk-go-$(subst sandbox-build-,,$@)" . ;\
|
||||
else\
|
||||
docker build \
|
||||
--build-arg GO_VERSION=$(subst sandbox-build-go,,$@) \
|
||||
-f ./internal/awstesting/sandbox/Dockerfile.test.goversion \
|
||||
-t "aws-sdk-go-$(subst sandbox-build-,,$@)" . ;\
|
||||
fi
|
||||
|
||||
sandbox-run-%: sandbox-build-%
|
||||
@# sandbox-run-go1.17
|
||||
@# sandbox-run-gotip
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt
generated
vendored
@ -1,3 +1,3 @@
|
||||
AWS SDK for Go
|
||||
Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
Copyright 2014-2015 Stripe, Inc.
|
||||
|
25
vendor/github.com/aws/aws-sdk-go-v2/README.md
generated
vendored
25
vendor/github.com/aws/aws-sdk-go-v2/README.md
generated
vendored
@ -1,13 +1,12 @@
|
||||
# AWS SDK for Go v2
|
||||
|
||||
[](https://github.com/aws/aws-sdk-go-v2/actions/workflows/go.yml)[](https://github.com/aws/aws-sdk-go-v2/actions/workflows/codegen.yml) [](https://aws.github.io/aws-sdk-go-v2/docs/) [](https://aws.github.io/aws-sdk-go-v2/docs/migrating/) [](https://pkg.go.dev/mod/github.com/aws/aws-sdk-go-v2) [](https://github.com/aws/aws-sdk-go/blob/master/LICENSE.txt)
|
||||
|
||||
[](https://github.com/aws/aws-sdk-go-v2/actions/workflows/go.yml)[](https://github.com/aws/aws-sdk-go-v2/actions/workflows/codegen.yml) [](https://aws.github.io/aws-sdk-go-v2/docs/) [](https://aws.github.io/aws-sdk-go-v2/docs/migrating/) [](https://pkg.go.dev/mod/github.com/aws/aws-sdk-go-v2) [](https://github.com/aws/aws-sdk-go-v2/blob/main/LICENSE.txt)
|
||||
|
||||
`aws-sdk-go-v2` is the v2 AWS SDK for the Go programming language.
|
||||
|
||||
The v2 SDK requires a minimum version of `Go 1.15`.
|
||||
|
||||
Checkout out the [release notes](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md) for information about the latest bug
|
||||
Check out the [release notes](https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md) for information about the latest bug
|
||||
fixes, updates, and features added to the SDK.
|
||||
|
||||
Jump To:
|
||||
@ -87,7 +86,7 @@ func main() {
|
||||
###### Compile and Execute
|
||||
```sh
|
||||
$ go run .
|
||||
Table:
|
||||
Tables:
|
||||
tableOne
|
||||
tableTwo
|
||||
```
|
||||
@ -97,9 +96,9 @@ tableTwo
|
||||
Please use these community resources for getting help. We use the GitHub issues
|
||||
for tracking bugs and feature requests.
|
||||
|
||||
* Ask a question on [StackOverflow](http://stackoverflow.com/) and tag it with the [`aws-sdk-go`](http://stackoverflow.com/questions/tagged/aws-sdk-go) tag.
|
||||
* Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html).
|
||||
* Ask us a [question](https://github.com/aws/aws-sdk-go-v2/discussions/new?category=q-a) or open a [discussion](https://github.com/aws/aws-sdk-go-v2/discussions/new?category=general).
|
||||
* If you think you may have found a bug, please open an [issue](https://github.com/aws/aws-sdk-go-v2/issues/new/choose).
|
||||
* Open a support ticket with [AWS Support](http://docs.aws.amazon.com/awssupport/latest/user/getting-started.html).
|
||||
|
||||
This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the [Amazon Web Services Discussion Forums](https://forums.aws.amazon.com/).
|
||||
|
||||
@ -107,7 +106,7 @@ This SDK implements AWS service APIs. For general issues regarding the AWS servi
|
||||
|
||||
If you encounter a bug with the AWS SDK for Go we would like to hear about it.
|
||||
Search the [existing issues][Issues] and see
|
||||
if others are also experiencing the issue before opening a new issue. Please
|
||||
if others are also experiencing the same issue before opening a new issue. Please
|
||||
include the version of AWS SDK for Go, Go language, and OS you’re using. Please
|
||||
also include reproduction case when appropriate.
|
||||
|
||||
@ -118,7 +117,7 @@ Keeping the list of open issues lean will help us respond in a timely manner.
|
||||
|
||||
## Feedback and contributing
|
||||
|
||||
The v2 SDK will use GitHub [Issues] to track feature requests and issues with the SDK. In addition, we'll use GitHub [Projects] to track large tasks spanning multiple pull requests, such as refactoring the SDK's internal request lifecycle. You can provide feedback to us in several ways.
|
||||
The v2 SDK will use GitHub [Issues] to track feature requests and issues with the SDK. In addition, we'll use GitHub [Projects] to track large tasks spanning multiple pull requests, such as refactoring the SDK's internal request lifecycle. You can provide feedback to us in several ways.
|
||||
|
||||
**GitHub issues**. To provide feedback or report bugs, file GitHub [Issues] on the SDK. This is the preferred mechanism to give feedback so that other users can engage in the conversation, +1 issues, etc. Issues you open will be evaluated, and included in our roadmap for the GA launch.
|
||||
|
||||
@ -129,6 +128,8 @@ The v2 SDK will use GitHub [Issues] to track feature requests and issues with th
|
||||
[SDK Developer Guide](https://aws.github.io/aws-sdk-go-v2/docs/) - Use this document to learn how to get started and
|
||||
use the AWS SDK for Go V2.
|
||||
|
||||
[SDK Migration Guide](https://aws.github.io/aws-sdk-go-v2/docs/migrating/) - Use this document to learn how to migrate to V2 from the AWS SDK for Go.
|
||||
|
||||
[SDK API Reference Documentation](https://pkg.go.dev/mod/github.com/aws/aws-sdk-go-v2) - Use this
|
||||
document to look up all API operation input and output parameters for AWS
|
||||
services supported by the SDK. The API reference also includes documentation of
|
||||
@ -137,8 +138,8 @@ API operation require parameters.
|
||||
|
||||
[Service Documentation](https://aws.amazon.com/documentation/) - Use this
|
||||
documentation to learn how to interface with AWS services. These guides are
|
||||
great for getting started with a service, or when looking for more
|
||||
information about a service. While this document is not required for coding,
|
||||
great for getting started with a service, or when looking for more
|
||||
information about a service. While this document is not required for coding,
|
||||
services may supply helpful samples to look out for.
|
||||
|
||||
[Forum](https://forums.aws.amazon.com/forum.jspa?forumID=293) - Ask questions, get help, and give feedback
|
||||
@ -149,7 +150,7 @@ services may supply helpful samples to look out for.
|
||||
[Dep]: https://github.com/golang/dep
|
||||
[Issues]: https://github.com/aws/aws-sdk-go-v2/issues
|
||||
[Projects]: https://github.com/aws/aws-sdk-go-v2/projects
|
||||
[CHANGELOG]: https://github.com/aws/aws-sdk-go-v2/blob/master/CHANGELOG.md
|
||||
[CHANGELOG]: https://github.com/aws/aws-sdk-go-v2/blob/main/CHANGELOG.md
|
||||
[Amazon DynamoDB]: https://aws.amazon.com/dynamodb/
|
||||
[design]: https://github.com/aws/aws-sdk-go-v2/blob/master/DESIGN.md
|
||||
[design]: https://github.com/aws/aws-sdk-go-v2/blob/main/DESIGN.md
|
||||
[license]: http://aws.amazon.com/apache2.0/
|
||||
|
21
vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
generated
vendored
21
vendor/github.com/aws/aws-sdk-go-v2/aws/config.go
generated
vendored
@ -3,13 +3,14 @@ package aws
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
smithybearer "github.com/aws/smithy-go/auth/bearer"
|
||||
"github.com/aws/smithy-go/logging"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
// HTTPClient provides the interface to provide custom HTTPClients. Generally
|
||||
// *http.Client is sufficient for most use cases. The HTTPClient should not
|
||||
// follow redirects.
|
||||
// follow 301 or 302 redirects.
|
||||
type HTTPClient interface {
|
||||
Do(*http.Request) (*http.Response, error)
|
||||
}
|
||||
@ -25,11 +26,23 @@ type Config struct {
|
||||
// information on AWS regions.
|
||||
Region string
|
||||
|
||||
// The credentials object to use when signing requests. Defaults to a
|
||||
// chain of credential providers to search for credentials in environment
|
||||
// variables, shared credential file, and EC2 Instance Roles.
|
||||
// The credentials object to use when signing requests.
|
||||
// Use the LoadDefaultConfig to load configuration from all the SDK's supported
|
||||
// sources, and resolve credentials using the SDK's default credential chain.
|
||||
Credentials CredentialsProvider
|
||||
|
||||
// The Bearer Authentication token provider to use for authenticating API
|
||||
// operation calls with a Bearer Authentication token. The API clients and
|
||||
// operation must support Bearer Authentication scheme in order for the
|
||||
// token provider to be used. API clients created with NewFromConfig will
|
||||
// automatically be configured with this option, if the API client support
|
||||
// Bearer Authentication.
|
||||
//
|
||||
// The SDK's config.LoadDefaultConfig can automatically populate this
|
||||
// option for external configuration options such as SSO session.
|
||||
// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
|
||||
BearerAuthTokenProvider smithybearer.TokenProvider
|
||||
|
||||
// The HTTP Client the SDK's API clients will use to invoke HTTP requests.
|
||||
// The SDK defaults to a BuildableClient allowing API clients to create
|
||||
// copies of the HTTP Client for service specific customizations.
|
||||
|
20
vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
generated
vendored
20
vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go
generated
vendored
@ -46,14 +46,14 @@ type CredentialsCacheOptions struct {
|
||||
// CredentialsCache will look for optional interfaces on the Provider to adjust
|
||||
// how the credential cache handles credentials caching.
|
||||
//
|
||||
// * HandleFailRefreshCredentialsCacheStrategy - Allows provider to handle
|
||||
// credential refresh failures. This could return an updated Credentials
|
||||
// value, or attempt another means of retrieving credentials.
|
||||
// - HandleFailRefreshCredentialsCacheStrategy - Allows provider to handle
|
||||
// credential refresh failures. This could return an updated Credentials
|
||||
// value, or attempt another means of retrieving credentials.
|
||||
//
|
||||
// * AdjustExpiresByCredentialsCacheStrategy - Allows provider to adjust how
|
||||
// credentials Expires is modified. This could modify how the Credentials
|
||||
// Expires is adjusted based on the CredentialsCache ExpiryWindow option.
|
||||
// Such as providing a floor not to reduce the Expires below.
|
||||
// - AdjustExpiresByCredentialsCacheStrategy - Allows provider to adjust how
|
||||
// credentials Expires is modified. This could modify how the Credentials
|
||||
// Expires is adjusted based on the CredentialsCache ExpiryWindow option.
|
||||
// Such as providing a floor not to reduce the Expires below.
|
||||
type CredentialsCache struct {
|
||||
provider CredentialsProvider
|
||||
|
||||
@ -178,6 +178,12 @@ func (p *CredentialsCache) Invalidate() {
|
||||
p.creds.Store((*Credentials)(nil))
|
||||
}
|
||||
|
||||
// IsCredentialsProvider returns whether credential provider wrapped by CredentialsCache
|
||||
// matches the target provider type.
|
||||
func (p *CredentialsCache) IsCredentialsProvider(target CredentialsProvider) bool {
|
||||
return IsCredentialsProvider(p.provider, target)
|
||||
}
|
||||
|
||||
// HandleFailRefreshCredentialsCacheStrategy is an interface for
|
||||
// CredentialsCache to allow CredentialsProvider how failed to refresh
|
||||
// credentials is handled.
|
||||
|
85
vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
generated
vendored
85
vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go
generated
vendored
@ -3,6 +3,7 @@ package aws
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
@ -23,41 +24,41 @@ import (
|
||||
// The following example demonstrates using the AnonymousCredentials to prevent
|
||||
// SDK's external config loading attempt to resolve credentials.
|
||||
//
|
||||
// cfg, err := config.LoadDefaultConfig(context.TODO(),
|
||||
// config.WithCredentialsProvider(aws.AnonymousCredentials{}),
|
||||
// )
|
||||
// if err != nil {
|
||||
// log.Fatalf("failed to load config, %v", err)
|
||||
// }
|
||||
// cfg, err := config.LoadDefaultConfig(context.TODO(),
|
||||
// config.WithCredentialsProvider(aws.AnonymousCredentials{}),
|
||||
// )
|
||||
// if err != nil {
|
||||
// log.Fatalf("failed to load config, %v", err)
|
||||
// }
|
||||
//
|
||||
// client := s3.NewFromConfig(cfg)
|
||||
// client := s3.NewFromConfig(cfg)
|
||||
//
|
||||
// Alternatively you can leave the API client Option's `Credential` member to
|
||||
// nil. If using the `NewFromConfig` constructor you'll need to explicitly set
|
||||
// the `Credentials` member to nil, if the external config resolved a
|
||||
// credential provider.
|
||||
//
|
||||
// client := s3.New(s3.Options{
|
||||
// // Credentials defaults to a nil value.
|
||||
// })
|
||||
// client := s3.New(s3.Options{
|
||||
// // Credentials defaults to a nil value.
|
||||
// })
|
||||
//
|
||||
// This can also be configured for specific operations calls too.
|
||||
//
|
||||
// cfg, err := config.LoadDefaultConfig(context.TODO())
|
||||
// if err != nil {
|
||||
// log.Fatalf("failed to load config, %v", err)
|
||||
// }
|
||||
// cfg, err := config.LoadDefaultConfig(context.TODO())
|
||||
// if err != nil {
|
||||
// log.Fatalf("failed to load config, %v", err)
|
||||
// }
|
||||
//
|
||||
// client := s3.NewFromConfig(config)
|
||||
// client := s3.NewFromConfig(config)
|
||||
//
|
||||
// result, err := client.GetObject(context.TODO(), s3.GetObject{
|
||||
// Bucket: aws.String("example-bucket"),
|
||||
// Key: aws.String("example-key"),
|
||||
// }, func(o *s3.Options) {
|
||||
// o.Credentials = nil
|
||||
// // Or
|
||||
// o.Credentials = aws.AnonymousCredentials{}
|
||||
// })
|
||||
// result, err := client.GetObject(context.TODO(), s3.GetObject{
|
||||
// Bucket: aws.String("example-bucket"),
|
||||
// Key: aws.String("example-key"),
|
||||
// }, func(o *s3.Options) {
|
||||
// o.Credentials = nil
|
||||
// // Or
|
||||
// o.Credentials = aws.AnonymousCredentials{}
|
||||
// })
|
||||
type AnonymousCredentials struct{}
|
||||
|
||||
// Retrieve implements the CredentialsProvider interface, but will always
|
||||
@ -129,3 +130,41 @@ type CredentialsProviderFunc func(context.Context) (Credentials, error)
|
||||
func (fn CredentialsProviderFunc) Retrieve(ctx context.Context) (Credentials, error) {
|
||||
return fn(ctx)
|
||||
}
|
||||
|
||||
type isCredentialsProvider interface {
|
||||
IsCredentialsProvider(CredentialsProvider) bool
|
||||
}
|
||||
|
||||
// IsCredentialsProvider returns whether the target CredentialProvider is the same type as provider when comparing the
|
||||
// implementation type.
|
||||
//
|
||||
// If provider has a method IsCredentialsProvider(CredentialsProvider) bool it will be responsible for validating
|
||||
// whether target matches the credential provider type.
|
||||
//
|
||||
// When comparing the CredentialProvider implementations provider and target for equality, the following rules are used:
|
||||
//
|
||||
// If provider is of type T and target is of type V, true if type *T is the same as type *V, otherwise false
|
||||
// If provider is of type *T and target is of type V, true if type *T is the same as type *V, otherwise false
|
||||
// If provider is of type T and target is of type *V, true if type *T is the same as type *V, otherwise false
|
||||
// If provider is of type *T and target is of type *V,true if type *T is the same as type *V, otherwise false
|
||||
func IsCredentialsProvider(provider, target CredentialsProvider) bool {
|
||||
if target == nil || provider == nil {
|
||||
return provider == target
|
||||
}
|
||||
|
||||
if x, ok := provider.(isCredentialsProvider); ok {
|
||||
return x.IsCredentialsProvider(target)
|
||||
}
|
||||
|
||||
targetType := reflect.TypeOf(target)
|
||||
if targetType.Kind() != reflect.Ptr {
|
||||
targetType = reflect.PtrTo(targetType)
|
||||
}
|
||||
|
||||
providerType := reflect.TypeOf(provider)
|
||||
if providerType.Kind() != reflect.Ptr {
|
||||
providerType = reflect.PtrTo(providerType)
|
||||
}
|
||||
|
||||
return targetType.AssignableTo(providerType)
|
||||
}
|
||||
|
32
vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go
generated
vendored
32
vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go
generated
vendored
@ -1,7 +1,7 @@
|
||||
// Package aws provides the core SDK's utilities and shared types. Use this package's
|
||||
// utilities to simplify setting and reading API operations parameters.
|
||||
//
|
||||
// Value and Pointer Conversion Utilities
|
||||
// # Value and Pointer Conversion Utilities
|
||||
//
|
||||
// This package includes a helper conversion utility for each scalar type the SDK's
|
||||
// API use. These utilities make getting a pointer of the scalar, and dereferencing
|
||||
@ -16,33 +16,33 @@
|
||||
// to get pointer of a literal string value, because getting the address of a
|
||||
// literal requires assigning the value to a variable first.
|
||||
//
|
||||
// var strPtr *string
|
||||
// var strPtr *string
|
||||
//
|
||||
// // Without the SDK's conversion functions
|
||||
// str := "my string"
|
||||
// strPtr = &str
|
||||
// // Without the SDK's conversion functions
|
||||
// str := "my string"
|
||||
// strPtr = &str
|
||||
//
|
||||
// // With the SDK's conversion functions
|
||||
// strPtr = aws.String("my string")
|
||||
// // With the SDK's conversion functions
|
||||
// strPtr = aws.String("my string")
|
||||
//
|
||||
// // Convert *string to string value
|
||||
// str = aws.ToString(strPtr)
|
||||
// // Convert *string to string value
|
||||
// str = aws.ToString(strPtr)
|
||||
//
|
||||
// In addition to scalars the aws package also includes conversion utilities for
|
||||
// map and slice for commonly types used in API parameters. The map and slice
|
||||
// conversion functions use similar naming pattern as the scalar conversion
|
||||
// functions.
|
||||
//
|
||||
// var strPtrs []*string
|
||||
// var strs []string = []string{"Go", "Gophers", "Go"}
|
||||
// var strPtrs []*string
|
||||
// var strs []string = []string{"Go", "Gophers", "Go"}
|
||||
//
|
||||
// // Convert []string to []*string
|
||||
// strPtrs = aws.StringSlice(strs)
|
||||
// // Convert []string to []*string
|
||||
// strPtrs = aws.StringSlice(strs)
|
||||
//
|
||||
// // Convert []*string to []string
|
||||
// strs = aws.ToStringSlice(strPtrs)
|
||||
// // Convert []*string to []string
|
||||
// strs = aws.ToStringSlice(strPtrs)
|
||||
//
|
||||
// SDK Default HTTP Client
|
||||
// # SDK Default HTTP Client
|
||||
//
|
||||
// The SDK will use the http.DefaultClient if a HTTP client is not provided to
|
||||
// the SDK's Session, or service client constructor. This means that if the
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package aws
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.16.3"
|
||||
const goModuleVersion = "1.17.6"
|
||||
|
6
vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go
generated
vendored
6
vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go
generated
vendored
@ -7,10 +7,12 @@ package aws
|
||||
// The entire 64-bit group is reserved for later expansion by the SDK.
|
||||
//
|
||||
// Example: Setting ClientLogMode to enable logging of retries and requests
|
||||
// clientLogMode := aws.LogRetries | aws.LogRequest
|
||||
//
|
||||
// clientLogMode := aws.LogRetries | aws.LogRequest
|
||||
//
|
||||
// Example: Adding an additional log mode to an existing ClientLogMode value
|
||||
// clientLogMode |= aws.LogResponse
|
||||
//
|
||||
// clientLogMode |= aws.LogResponse
|
||||
type ClientLogMode uint64
|
||||
|
||||
// Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events.
|
||||
|
6
vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
generated
vendored
6
vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go
generated
vendored
@ -68,10 +68,12 @@ type requestUserAgent struct {
|
||||
// request.
|
||||
//
|
||||
// User-Agent example:
|
||||
// aws-sdk-go-v2/1.2.3
|
||||
//
|
||||
// aws-sdk-go-v2/1.2.3
|
||||
//
|
||||
// X-Amz-User-Agent example:
|
||||
// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15
|
||||
//
|
||||
// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15
|
||||
func newRequestUserAgent() *requestUserAgent {
|
||||
userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder()
|
||||
addProductName(userAgent)
|
||||
|
17
vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
generated
vendored
17
vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go
generated
vendored
@ -9,9 +9,9 @@ import (
|
||||
// representation of a list of values of a fixed type. A serialized array might
|
||||
// look like the following:
|
||||
//
|
||||
// ListName.member.1=foo
|
||||
// &ListName.member.2=bar
|
||||
// &Listname.member.3=baz
|
||||
// ListName.member.1=foo
|
||||
// &ListName.member.2=bar
|
||||
// &Listname.member.3=baz
|
||||
type Array struct {
|
||||
// The query values to add the array to.
|
||||
values url.Values
|
||||
@ -36,20 +36,31 @@ type Array struct {
|
||||
memberName string
|
||||
// Elements are stored in values, so we keep track of the list size here.
|
||||
size int32
|
||||
// Empty lists are encoded as "<prefix>=", if we add a value later we will
|
||||
// remove this encoding
|
||||
emptyValue Value
|
||||
}
|
||||
|
||||
func newArray(values url.Values, prefix string, flat bool, memberName string) *Array {
|
||||
emptyValue := newValue(values, prefix, flat)
|
||||
emptyValue.String("")
|
||||
|
||||
return &Array{
|
||||
values: values,
|
||||
prefix: prefix,
|
||||
flat: flat,
|
||||
memberName: memberName,
|
||||
emptyValue: emptyValue,
|
||||
}
|
||||
}
|
||||
|
||||
// Value adds a new element to the Query Array. Returns a Value type used to
|
||||
// encode the array element.
|
||||
func (a *Array) Value() Value {
|
||||
if a.size == 0 {
|
||||
delete(a.values, a.emptyValue.key)
|
||||
}
|
||||
|
||||
// Query lists start a 1, so adjust the size first
|
||||
a.size++
|
||||
prefix := a.prefix
|
||||
|
8
vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go
generated
vendored
8
vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go
generated
vendored
@ -11,10 +11,10 @@ import (
|
||||
// the values must all be of the same type, and that map entries are ordered.
|
||||
// A serialized map might look like the following:
|
||||
//
|
||||
// MapName.entry.1.key=Foo
|
||||
// &MapName.entry.1.value=spam
|
||||
// &MapName.entry.2.key=Bar
|
||||
// &MapName.entry.2.value=eggs
|
||||
// MapName.entry.1.key=Foo
|
||||
// &MapName.entry.1.value=spam
|
||||
// &MapName.entry.2.key=Bar
|
||||
// &MapName.entry.2.value=eggs
|
||||
type Map struct {
|
||||
// The query values to add the map to.
|
||||
values url.Values
|
||||
|
4
vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
generated
vendored
4
vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go
generated
vendored
@ -10,8 +10,8 @@ import (
|
||||
// values where there is a fixed set of keys whose values each have their
|
||||
// own known type. A serialized object might look like the following:
|
||||
//
|
||||
// ObjectName.Foo=value
|
||||
// &ObjectName.Bar=5
|
||||
// ObjectName.Foo=value
|
||||
// &ObjectName.Bar=5
|
||||
type Object struct {
|
||||
// The query values to add the object to.
|
||||
values url.Values
|
||||
|
16
vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go
generated
vendored
16
vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go
generated
vendored
@ -21,26 +21,18 @@ func GetErrorResponseComponents(r io.Reader, noErrorWrapping bool) (ErrorCompone
|
||||
if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF {
|
||||
return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err)
|
||||
}
|
||||
return ErrorComponents{
|
||||
Code: errResponse.Code,
|
||||
Message: errResponse.Message,
|
||||
RequestID: errResponse.RequestID,
|
||||
}, nil
|
||||
return ErrorComponents(errResponse), nil
|
||||
}
|
||||
|
||||
var errResponse wrappedErrorResponse
|
||||
if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF {
|
||||
return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err)
|
||||
}
|
||||
return ErrorComponents{
|
||||
Code: errResponse.Code,
|
||||
Message: errResponse.Message,
|
||||
RequestID: errResponse.RequestID,
|
||||
}, nil
|
||||
return ErrorComponents(errResponse), nil
|
||||
}
|
||||
|
||||
// noWrappedErrorResponse represents the error response body with
|
||||
// no internal <Error></Error wrapping
|
||||
// no internal Error wrapping
|
||||
type noWrappedErrorResponse struct {
|
||||
Code string `xml:"Code"`
|
||||
Message string `xml:"Message"`
|
||||
@ -48,7 +40,7 @@ type noWrappedErrorResponse struct {
|
||||
}
|
||||
|
||||
// wrappedErrorResponse represents the error response body
|
||||
// wrapped within <Error>...</Error>
|
||||
// wrapped within Error
|
||||
type wrappedErrorResponse struct {
|
||||
Code string `xml:"Error>Code"`
|
||||
Message string `xml:"Error>Message"`
|
||||
|
4
vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go
generated
vendored
4
vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go
generated
vendored
@ -30,10 +30,6 @@ func NewTokenRateLimit(tokens uint) *TokenRateLimit {
|
||||
}
|
||||
}
|
||||
|
||||
func isTimeoutError(error) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type canceledError struct {
|
||||
Err error
|
||||
}
|
||||
|
4
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go
generated
vendored
4
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go
generated
vendored
@ -93,7 +93,7 @@ func (a *AdaptiveMode) IsErrorRetryable(err error) bool {
|
||||
}
|
||||
|
||||
// MaxAttempts returns the maximum number of attempts that can be made for
|
||||
// a attempt before failing. A value of 0 implies that the attempt should
|
||||
// an attempt before failing. A value of 0 implies that the attempt should
|
||||
// be retried until it succeeds if the errors are retryable.
|
||||
func (a *AdaptiveMode) MaxAttempts() int {
|
||||
return a.retryer.MaxAttempts()
|
||||
@ -127,7 +127,7 @@ func (a *AdaptiveMode) GetInitialToken() (releaseToken func(error) error) {
|
||||
|
||||
// GetAttemptToken returns the attempt token that can be used to rate limit
|
||||
// attempt calls. Will be used by the SDK's retry package's Attempt
|
||||
// middleware to get a attempt token prior to calling the temp and releasing
|
||||
// middleware to get an attempt token prior to calling the temp and releasing
|
||||
// the attempt token after the attempt has been made.
|
||||
func (a *AdaptiveMode) GetAttemptToken(ctx context.Context) (func(error) error, error) {
|
||||
for {
|
||||
|
84
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go
generated
vendored
84
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go
generated
vendored
@ -1,12 +1,12 @@
|
||||
// Package retry provides interfaces and implementations for SDK request retry behavior.
|
||||
//
|
||||
// Retryer Interface and Implementations
|
||||
// # Retryer Interface and Implementations
|
||||
//
|
||||
// This packages defines Retryer interface that is used to either implement custom retry behavior
|
||||
// or to extend the existing retry implementations provided by the SDK. This packages provides a single
|
||||
// retry implementations: Standard.
|
||||
// This package defines Retryer interface that is used to either implement custom retry behavior
|
||||
// or to extend the existing retry implementations provided by the SDK. This package provides a single
|
||||
// retry implementation: Standard.
|
||||
//
|
||||
// Standard
|
||||
// # Standard
|
||||
//
|
||||
// Standard is the default retryer implementation used by service clients. The standard retryer is a rate limited
|
||||
// retryer that has a configurable max attempts to limit the number of retry attempts when a retryable error occurs.
|
||||
@ -15,66 +15,66 @@
|
||||
//
|
||||
// By default the standard retryer uses the DefaultRetryables slice of IsErrorRetryable types to determine whether
|
||||
// a given error is retryable. By default this list of retryables includes the following:
|
||||
// - Retrying errors that implement the RetryableError method, and return true.
|
||||
// - Connection Errors
|
||||
// - Errors that implement a ConnectionError, Temporary, or Timeout method that return true.
|
||||
// - Connection Reset Errors.
|
||||
// - net.OpErr types that are dialing errors or are temporary.
|
||||
// - HTTP Status Codes: 500, 502, 503, and 504.
|
||||
// - API Error Codes
|
||||
// - RequestTimeout, RequestTimeoutException
|
||||
// - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException,
|
||||
// RequestThrottled, SlowDown, EC2ThrottledException
|
||||
// - ProvisionedThroughputExceededException, RequestLimitExceeded, BandwidthLimitExceeded, LimitExceededException
|
||||
// - TransactionInProgressException, PriorRequestNotComplete
|
||||
// - Retrying errors that implement the RetryableError method, and return true.
|
||||
// - Connection Errors
|
||||
// - Errors that implement a ConnectionError, Temporary, or Timeout method that return true.
|
||||
// - Connection Reset Errors.
|
||||
// - net.OpErr types that are dialing errors or are temporary.
|
||||
// - HTTP Status Codes: 500, 502, 503, and 504.
|
||||
// - API Error Codes
|
||||
// - RequestTimeout, RequestTimeoutException
|
||||
// - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException,
|
||||
// RequestThrottled, SlowDown, EC2ThrottledException
|
||||
// - ProvisionedThroughputExceededException, RequestLimitExceeded, BandwidthLimitExceeded, LimitExceededException
|
||||
// - TransactionInProgressException, PriorRequestNotComplete
|
||||
//
|
||||
// The standard retryer will not retry a request in the event if the context associated with the request
|
||||
// has been cancelled. Applications must handle this case explicitly if they wish to retry with a different context
|
||||
// value.
|
||||
//
|
||||
// You can configure the standard retryer implementation to fit your applications by constructing a standard retryer
|
||||
// using the NewStandard function, and providing one more functional arguments that mutate the StandardOptions
|
||||
// using the NewStandard function, and providing one more functional argument that mutate the StandardOptions
|
||||
// structure. StandardOptions provides the ability to modify the token bucket rate limiter, retryable error conditions,
|
||||
// and the retry delay policy.
|
||||
//
|
||||
// For example to modify the default retry attempts for the standard retryer:
|
||||
//
|
||||
// // configure the custom retryer
|
||||
// customRetry := retry.NewStandard(func(o *retry.StandardOptions) {
|
||||
// o.MaxAttempts = 5
|
||||
// })
|
||||
// // configure the custom retryer
|
||||
// customRetry := retry.NewStandard(func(o *retry.StandardOptions) {
|
||||
// o.MaxAttempts = 5
|
||||
// })
|
||||
//
|
||||
// // create a service client with the retryer
|
||||
// s3.NewFromConfig(cfg, func(o *s3.Options) {
|
||||
// o.Retryer = customRetry
|
||||
// })
|
||||
// // create a service client with the retryer
|
||||
// s3.NewFromConfig(cfg, func(o *s3.Options) {
|
||||
// o.Retryer = customRetry
|
||||
// })
|
||||
//
|
||||
// Utilities
|
||||
// # Utilities
|
||||
//
|
||||
// A number of package functions have been provided to easily wrap retryer implementations in an implementation agnostic
|
||||
// way. These are:
|
||||
//
|
||||
// AddWithErrorCodes - Provides the ability to add additional API error codes that should be considered retryable
|
||||
// in addition to those considered retryable by the provided retryer.
|
||||
// AddWithErrorCodes - Provides the ability to add additional API error codes that should be considered retryable
|
||||
// in addition to those considered retryable by the provided retryer.
|
||||
//
|
||||
// AddWithMaxAttempts - Provides the ability to set the max number of attempts for retrying a request by wrapping
|
||||
// a retryer implementation.
|
||||
// AddWithMaxAttempts - Provides the ability to set the max number of attempts for retrying a request by wrapping
|
||||
// a retryer implementation.
|
||||
//
|
||||
// AddWithMaxBackoffDelay - Provides the ability to set the max back off delay that can occur before retrying a
|
||||
// request by wrapping a retryer implementation.
|
||||
// AddWithMaxBackoffDelay - Provides the ability to set the max back off delay that can occur before retrying a
|
||||
// request by wrapping a retryer implementation.
|
||||
//
|
||||
// The following package functions have been provided to easily satisfy different retry interfaces to further customize
|
||||
// a given retryer's behavior:
|
||||
//
|
||||
// BackoffDelayerFunc - Can be used to wrap a function to satisfy the BackoffDelayer interface. For example,
|
||||
// you can use this method to easily create custom back off policies to be used with the
|
||||
// standard retryer.
|
||||
// BackoffDelayerFunc - Can be used to wrap a function to satisfy the BackoffDelayer interface. For example,
|
||||
// you can use this method to easily create custom back off policies to be used with the
|
||||
// standard retryer.
|
||||
//
|
||||
// IsErrorRetryableFunc - Can be used to wrap a function to satisfy the IsErrorRetryable interface. For example,
|
||||
// this can be used to extend the standard retryer to add additional logic ot determine if a
|
||||
// error should be retried.
|
||||
// IsErrorRetryableFunc - Can be used to wrap a function to satisfy the IsErrorRetryable interface. For example,
|
||||
// this can be used to extend the standard retryer to add additional logic to determine if an
|
||||
// error should be retried.
|
||||
//
|
||||
// IsErrorTimeoutFunc - Can be used to wrap a function to satisfy IsErrorTimeout interface. For example,
|
||||
// this can be used to extend the standard retryer to add additional logic to determine if an
|
||||
// error should be considered a timeout.
|
||||
// IsErrorTimeoutFunc - Can be used to wrap a function to satisfy IsErrorTimeout interface. For example,
|
||||
// this can be used to extend the standard retryer to add additional logic to determine if an
|
||||
// error should be considered a timeout.
|
||||
package retry
|
||||
|
7
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
generated
vendored
7
vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go
generated
vendored
@ -11,7 +11,6 @@ import (
|
||||
awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
"github.com/aws/smithy-go/logging"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithymiddle "github.com/aws/smithy-go/middleware"
|
||||
"github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
@ -90,7 +89,7 @@ func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeIn
|
||||
out, attemptResult, releaseRetryToken, err = r.handleAttempt(attemptCtx, attemptInput, releaseRetryToken, next)
|
||||
attemptClockSkew, _ = awsmiddle.GetAttemptSkew(attemptResult.ResponseMetadata)
|
||||
|
||||
// AttempResult Retried states that the attempt was not successful, and
|
||||
// AttemptResult Retried states that the attempt was not successful, and
|
||||
// should be retried.
|
||||
shouldRetry := attemptResult.Retried
|
||||
|
||||
@ -292,7 +291,7 @@ type retryMetadataKey struct{}
|
||||
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
|
||||
// to clear all stack values.
|
||||
func getRetryMetadata(ctx context.Context) (metadata retryMetadata, ok bool) {
|
||||
metadata, ok = middleware.GetStackValue(ctx, retryMetadataKey{}).(retryMetadata)
|
||||
metadata, ok = smithymiddle.GetStackValue(ctx, retryMetadataKey{}).(retryMetadata)
|
||||
return metadata, ok
|
||||
}
|
||||
|
||||
@ -301,7 +300,7 @@ func getRetryMetadata(ctx context.Context) (metadata retryMetadata, ok bool) {
|
||||
// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues
|
||||
// to clear all stack values.
|
||||
func setRetryMetadata(ctx context.Context, metadata retryMetadata) context.Context {
|
||||
return middleware.WithStackValue(ctx, retryMetadataKey{}, metadata)
|
||||
return smithymiddle.WithStackValue(ctx, retryMetadataKey{}, metadata)
|
||||
}
|
||||
|
||||
// AddRetryMiddlewaresOptions is the set of options that can be passed to
|
||||
|
4
vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go
generated
vendored
4
vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go
generated
vendored
@ -49,7 +49,7 @@ type Retryer interface {
|
||||
IsErrorRetryable(error) bool
|
||||
|
||||
// MaxAttempts returns the maximum number of attempts that can be made for
|
||||
// a attempt before failing. A value of 0 implies that the attempt should
|
||||
// an attempt before failing. A value of 0 implies that the attempt should
|
||||
// be retried until it succeeds if the errors are retryable.
|
||||
MaxAttempts() int
|
||||
|
||||
@ -66,7 +66,7 @@ type Retryer interface {
|
||||
GetInitialToken() (releaseToken func(error) error)
|
||||
}
|
||||
|
||||
// RetryerV2 is an interface to determine if a given error from a attempt
|
||||
// RetryerV2 is an interface to determine if a given error from an attempt
|
||||
// should be retried, and if so what backoff delay to apply. The default
|
||||
// implementation used by most services is the retry package's Standard type.
|
||||
// Which contains basic retry logic using exponential backoff.
|
||||
|
30
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go
generated
vendored
30
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go
generated
vendored
@ -46,19 +46,35 @@ func StripExcessSpaces(str string) string {
|
||||
return string(buf[:m])
|
||||
}
|
||||
|
||||
// GetURIPath returns the escaped URI component from the provided URL
|
||||
// GetURIPath returns the escaped URI component from the provided URL.
|
||||
func GetURIPath(u *url.URL) string {
|
||||
var uri string
|
||||
var uriPath string
|
||||
|
||||
if len(u.Opaque) > 0 {
|
||||
uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/")
|
||||
const schemeSep, pathSep, queryStart = "//", "/", "?"
|
||||
|
||||
opaque := u.Opaque
|
||||
// Cut off the query string if present.
|
||||
if idx := strings.Index(opaque, queryStart); idx >= 0 {
|
||||
opaque = opaque[:idx]
|
||||
}
|
||||
|
||||
// Cutout the scheme separator if present.
|
||||
if strings.Index(opaque, schemeSep) == 0 {
|
||||
opaque = opaque[len(schemeSep):]
|
||||
}
|
||||
|
||||
// capture URI path starting with first path separator.
|
||||
if idx := strings.Index(opaque, pathSep); idx >= 0 {
|
||||
uriPath = opaque[idx:]
|
||||
}
|
||||
} else {
|
||||
uri = u.EscapedPath()
|
||||
uriPath = u.EscapedPath()
|
||||
}
|
||||
|
||||
if len(uri) == 0 {
|
||||
uri = "/"
|
||||
if len(uriPath) == 0 {
|
||||
uriPath = "/"
|
||||
}
|
||||
|
||||
return uri
|
||||
return uriPath
|
||||
}
|
||||
|
9
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
generated
vendored
9
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go
generated
vendored
@ -82,7 +82,7 @@ func (m *dynamicPayloadSigningMiddleware) HandleBuild(
|
||||
}
|
||||
|
||||
// if TLS is enabled, use unsigned payload when supported
|
||||
if strings.EqualFold(req.URL.Scheme, "https") {
|
||||
if req.IsHTTPS() {
|
||||
return (&unsignedPayload{}).HandleBuild(ctx, in, next)
|
||||
}
|
||||
|
||||
@ -371,13 +371,8 @@ func haveCredentialProvider(p aws.CredentialsProvider) bool {
|
||||
if p == nil {
|
||||
return false
|
||||
}
|
||||
switch p.(type) {
|
||||
case aws.AnonymousCredentials,
|
||||
*aws.AnonymousCredentials:
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
return !aws.IsCredentialsProvider(p, (*aws.AnonymousCredentials)(nil))
|
||||
}
|
||||
|
||||
type payloadHashKey struct{}
|
||||
|
30
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
generated
vendored
30
vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go
generated
vendored
@ -3,20 +3,22 @@
|
||||
// Provides request signing for request that need to be signed with
|
||||
// AWS V4 Signatures.
|
||||
//
|
||||
// Standalone Signer
|
||||
// # Standalone Signer
|
||||
//
|
||||
// Generally using the signer outside of the SDK should not require any additional
|
||||
// The signer does this by taking advantage of the URL.EscapedPath method. If your request URI requires
|
||||
//
|
||||
// The signer does this by taking advantage of the URL.EscapedPath method. If your request URI requires
|
||||
//
|
||||
// additional escaping you many need to use the URL.Opaque to define what the raw URI should be sent
|
||||
// to the service as.
|
||||
//
|
||||
// The signer will first check the URL.Opaque field, and use its value if set.
|
||||
// The signer does require the URL.Opaque field to be set in the form of:
|
||||
//
|
||||
// "//<hostname>/<path>"
|
||||
// "//<hostname>/<path>"
|
||||
//
|
||||
// // e.g.
|
||||
// "//example.com/some/path"
|
||||
// // e.g.
|
||||
// "//example.com/some/path"
|
||||
//
|
||||
// The leading "//" and hostname are required or the URL.Opaque escaping will
|
||||
// not work correctly.
|
||||
@ -252,7 +254,7 @@ func buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature
|
||||
// request has no payload you should use the hex encoded SHA-256 of an empty
|
||||
// string as the payloadHash value.
|
||||
//
|
||||
// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
//
|
||||
// Some services such as Amazon S3 accept alternative values for the payload
|
||||
// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be
|
||||
@ -311,7 +313,7 @@ func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *ht
|
||||
// request has no payload you should use the hex encoded SHA-256 of an empty
|
||||
// string as the payloadHash value.
|
||||
//
|
||||
// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
//
|
||||
// Some services such as Amazon S3 accept alternative values for the payload
|
||||
// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be
|
||||
@ -331,10 +333,10 @@ func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *ht
|
||||
// parameter is not used by all AWS services, and is most notable used by
|
||||
// Amazon S3 APIs.
|
||||
//
|
||||
// expires := 20 * time.Minute
|
||||
// query := req.URL.Query()
|
||||
// query.Set("X-Amz-Expires", strconv.FormatInt(int64(expires/time.Second), 10)
|
||||
// req.URL.RawQuery = query.Encode()
|
||||
// expires := 20 * time.Minute
|
||||
// query := req.URL.Query()
|
||||
// query.Set("X-Amz-Expires", strconv.FormatInt(int64(expires/time.Second), 10)
|
||||
// req.URL.RawQuery = query.Encode()
|
||||
//
|
||||
// This method does not modify the provided request.
|
||||
func (s *Signer) PresignHTTP(
|
||||
@ -407,8 +409,8 @@ func (s *httpSigner) buildCanonicalHeaders(host string, rule v4Internal.Rule, he
|
||||
headers = append(headers, hostHeader)
|
||||
signed[hostHeader] = append(signed[hostHeader], host)
|
||||
|
||||
const contentLengthHeader = "content-length"
|
||||
if length > 0 {
|
||||
const contentLengthHeader = "content-length"
|
||||
headers = append(headers, contentLengthHeader)
|
||||
signed[contentLengthHeader] = append(signed[contentLengthHeader], strconv.FormatInt(length, 10))
|
||||
}
|
||||
@ -417,6 +419,10 @@ func (s *httpSigner) buildCanonicalHeaders(host string, rule v4Internal.Rule, he
|
||||
if !rule.IsValid(k) {
|
||||
continue // ignored header
|
||||
}
|
||||
if strings.EqualFold(k, contentLengthHeader) {
|
||||
// prevent signing already handled content-length header.
|
||||
continue
|
||||
}
|
||||
|
||||
lowerCaseKey := strings.ToLower(k)
|
||||
if _, ok := signed[lowerCaseKey]; ok {
|
||||
|
175
vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
generated
vendored
175
vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md
generated
vendored
@ -1,3 +1,178 @@
|
||||
# v1.18.16 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.15 (2023-02-22)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.14 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.13 (2023-02-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.12 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.11 (2023-02-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.10 (2023-01-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.9 (2023-01-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.8 (2023-01-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.7 (2022-12-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.6 (2022-12-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.5 (2022-12-15)
|
||||
|
||||
* **Bug Fix**: Unify logic between shared config and in finding home directory
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.4 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.3 (2022-11-22)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.2 (2022-11-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.1 (2022-11-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.0 (2022-11-11)
|
||||
|
||||
* **Announcement**: When using the SSOTokenProvider, a previous implementation incorrectly compensated for invalid SSOTokenProvider configurations in the shared profile. This has been fixed via PR #1903 and tracked in issue #1846
|
||||
* **Feature**: Adds token refresh support (via SSOTokenProvider) when using the SSOCredentialProvider
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.11 (2022-11-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.10 (2022-10-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.9 (2022-10-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.8 (2022-09-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.7 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.6 (2022-09-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.5 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.4 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.3 (2022-08-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.2 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.1 (2022-08-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.0 (2022-08-14)
|
||||
|
||||
* **Feature**: Add alternative mechanism for determning the users `$HOME` or `%USERPROFILE%` location when the environment variables are not present.
|
||||
|
||||
# v1.16.1 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.0 (2022-08-10)
|
||||
|
||||
* **Feature**: Adds support for the following settings in the `~/.aws/credentials` file: `sso_account_id`, `sso_region`, `sso_role_name`, `sso_start_url`, and `ca_bundle`.
|
||||
|
||||
# v1.15.17 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.16 (2022-08-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.15 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.14 (2022-07-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.13 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.12 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.11 (2022-06-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.10 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.9 (2022-05-26)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.8 (2022-05-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.7 (2022-05-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.6 (2022-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.15.5 (2022-05-09)
|
||||
|
||||
* **Bug Fix**: Fixes a bug in LoadDefaultConfig to correctly assign ConfigSources so all config resolvers have access to the config sources. This fixes the feature/ec2/imds client not having configuration applied via config.LoadOptions such as EC2IMDSClientEnableState. PR [#1682](https://github.com/aws/aws-sdk-go-v2/pull/1682)
|
||||
|
17
vendor/github.com/aws/aws-sdk-go-v2/config/config.go
generated
vendored
17
vendor/github.com/aws/aws-sdk-go-v2/config/config.go
generated
vendored
@ -72,6 +72,10 @@ var defaultAWSConfigResolvers = []awsConfigResolver{
|
||||
// implementations depend on or can be configured with earlier resolved
|
||||
// configuration options.
|
||||
resolveCredentials,
|
||||
|
||||
// Sets the resolved bearer authentication token API clients will use for
|
||||
// httpBearerAuth authentication scheme.
|
||||
resolveBearerAuthToken,
|
||||
}
|
||||
|
||||
// A Config represents a generic configuration value or set of values. This type
|
||||
@ -162,13 +166,12 @@ func (cs configs) ResolveConfig(f func(configs []interface{}) error) error {
|
||||
// The custom configurations must satisfy the respective providers for their data
|
||||
// or the custom data will be ignored by the resolvers and config loaders.
|
||||
//
|
||||
// cfg, err := config.LoadDefaultConfig( context.TODO(),
|
||||
// WithSharedConfigProfile("test-profile"),
|
||||
// )
|
||||
// if err != nil {
|
||||
// panic(fmt.Sprintf("failed loading config, %v", err))
|
||||
// }
|
||||
//
|
||||
// cfg, err := config.LoadDefaultConfig( context.TODO(),
|
||||
// WithSharedConfigProfile("test-profile"),
|
||||
// )
|
||||
// if err != nil {
|
||||
// panic(fmt.Sprintf("failed loading config, %v", err))
|
||||
// }
|
||||
//
|
||||
// The default configuration sources are:
|
||||
// * Environment Variables
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/config/doc.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/config/doc.go
generated
vendored
@ -15,6 +15,6 @@
|
||||
// take precedence over the default environment and shared config sources used by the SDK. If one or more Config sources
|
||||
// implement the same provider interface, priority will be handled by the order in which the sources were passed in.
|
||||
//
|
||||
// A number of helpers (prefixed by ``With``) are provided in this package that implement their respective provider
|
||||
// A number of helpers (prefixed by “With“) are provided in this package that implement their respective provider
|
||||
// interface. These helpers should be used for overriding configuration programmatically at runtime.
|
||||
package config
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package config
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.15.5"
|
||||
const goModuleVersion = "1.18.16"
|
||||
|
79
vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
generated
vendored
79
vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go
generated
vendored
@ -11,6 +11,7 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
|
||||
"github.com/aws/aws-sdk-go-v2/credentials/stscreds"
|
||||
"github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
|
||||
smithybearer "github.com/aws/smithy-go/auth/bearer"
|
||||
"github.com/aws/smithy-go/logging"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
@ -28,6 +29,9 @@ type LoadOptions struct {
|
||||
// Credentials object to use when signing requests.
|
||||
Credentials aws.CredentialsProvider
|
||||
|
||||
// Token provider for authentication operations with bearer authentication.
|
||||
BearerAuthTokenProvider smithybearer.TokenProvider
|
||||
|
||||
// HTTPClient the SDK's API clients will use to invoke HTTP requests.
|
||||
HTTPClient HTTPClient
|
||||
|
||||
@ -128,6 +132,14 @@ type LoadOptions struct {
|
||||
// aws.CredentialsCacheOptions
|
||||
CredentialsCacheOptions func(*aws.CredentialsCacheOptions)
|
||||
|
||||
// BearerAuthTokenCacheOptions is a function for setting the smithy-go
|
||||
// auth/bearer#TokenCacheOptions
|
||||
BearerAuthTokenCacheOptions func(*smithybearer.TokenCacheOptions)
|
||||
|
||||
// SSOTokenProviderOptions is a function for setting the
|
||||
// credentials/ssocreds.SSOTokenProviderOptions
|
||||
SSOTokenProviderOptions func(*ssocreds.SSOTokenProviderOptions)
|
||||
|
||||
// ProcessCredentialOptions is a function for setting
|
||||
// the processcreds.Options
|
||||
ProcessCredentialOptions func(*processcreds.Options)
|
||||
@ -451,6 +463,73 @@ func WithCredentialsCacheOptions(v func(*aws.CredentialsCacheOptions)) LoadOptio
|
||||
}
|
||||
}
|
||||
|
||||
// getBearerAuthTokenProvider returns the credentials value
|
||||
func (o LoadOptions) getBearerAuthTokenProvider(ctx context.Context) (smithybearer.TokenProvider, bool, error) {
|
||||
if o.BearerAuthTokenProvider == nil {
|
||||
return nil, false, nil
|
||||
}
|
||||
|
||||
return o.BearerAuthTokenProvider, true, nil
|
||||
}
|
||||
|
||||
// WithBearerAuthTokenProvider is a helper function to construct functional options
|
||||
// that sets Credential provider value on config's LoadOptions. If credentials
|
||||
// provider is set to nil, the credentials provider value will be ignored.
|
||||
// If multiple WithBearerAuthTokenProvider calls are made, the last call overrides
|
||||
// the previous call values.
|
||||
func WithBearerAuthTokenProvider(v smithybearer.TokenProvider) LoadOptionsFunc {
|
||||
return func(o *LoadOptions) error {
|
||||
o.BearerAuthTokenProvider = v
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// getBearerAuthTokenCacheOptionsProvider returns the wrapped function to set smithybearer.TokenCacheOptions
|
||||
func (o LoadOptions) getBearerAuthTokenCacheOptions(ctx context.Context) (func(*smithybearer.TokenCacheOptions), bool, error) {
|
||||
if o.BearerAuthTokenCacheOptions == nil {
|
||||
return nil, false, nil
|
||||
}
|
||||
|
||||
return o.BearerAuthTokenCacheOptions, true, nil
|
||||
}
|
||||
|
||||
// WithBearerAuthTokenCacheOptions is a helper function to construct functional options
|
||||
// that sets a function to modify the TokenCacheOptions the smithy-go
|
||||
// auth/bearer#TokenCache will be configured with, if the TokenCache is used by
|
||||
// the configuration loader.
|
||||
//
|
||||
// If multiple WithBearerAuthTokenCacheOptions calls are made, the last call overrides
|
||||
// the previous call values.
|
||||
func WithBearerAuthTokenCacheOptions(v func(*smithybearer.TokenCacheOptions)) LoadOptionsFunc {
|
||||
return func(o *LoadOptions) error {
|
||||
o.BearerAuthTokenCacheOptions = v
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// getSSOTokenProviderOptionsProvider returns the wrapped function to set smithybearer.TokenCacheOptions
|
||||
func (o LoadOptions) getSSOTokenProviderOptions(ctx context.Context) (func(*ssocreds.SSOTokenProviderOptions), bool, error) {
|
||||
if o.SSOTokenProviderOptions == nil {
|
||||
return nil, false, nil
|
||||
}
|
||||
|
||||
return o.SSOTokenProviderOptions, true, nil
|
||||
}
|
||||
|
||||
// WithSSOTokenProviderOptions is a helper function to construct functional
|
||||
// options that sets a function to modify the SSOtokenProviderOptions the SDK's
|
||||
// credentials/ssocreds#SSOProvider will be configured with, if the
|
||||
// SSOTokenProvider is used by the configuration loader.
|
||||
//
|
||||
// If multiple WithSSOTokenProviderOptions calls are made, the last call overrides
|
||||
// the previous call values.
|
||||
func WithSSOTokenProviderOptions(v func(*ssocreds.SSOTokenProviderOptions)) LoadOptionsFunc {
|
||||
return func(o *LoadOptions) error {
|
||||
o.SSOTokenProviderOptions = v
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// getProcessCredentialOptions returns the wrapped function to set processcreds.Options
|
||||
func (o LoadOptions) getProcessCredentialOptions(ctx context.Context) (func(*processcreds.Options), bool, error) {
|
||||
if o.ProcessCredentialOptions == nil {
|
||||
|
68
vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
generated
vendored
68
vendor/github.com/aws/aws-sdk-go-v2/config/provider.go
generated
vendored
@ -12,6 +12,7 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
|
||||
"github.com/aws/aws-sdk-go-v2/credentials/stscreds"
|
||||
"github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
|
||||
smithybearer "github.com/aws/smithy-go/auth/bearer"
|
||||
"github.com/aws/smithy-go/logging"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
@ -185,6 +186,73 @@ func getCredentialsCacheOptionsProvider(ctx context.Context, configs configs) (
|
||||
return
|
||||
}
|
||||
|
||||
// bearerAuthTokenProviderProvider provides access to the bearer authentication
|
||||
// token external configuration value.
|
||||
type bearerAuthTokenProviderProvider interface {
|
||||
getBearerAuthTokenProvider(context.Context) (smithybearer.TokenProvider, bool, error)
|
||||
}
|
||||
|
||||
// getBearerAuthTokenProvider searches the config sources for a
|
||||
// bearerAuthTokenProviderProvider and returns the value if found. Returns an
|
||||
// error if a provider fails before a value is found.
|
||||
func getBearerAuthTokenProvider(ctx context.Context, configs configs) (p smithybearer.TokenProvider, found bool, err error) {
|
||||
for _, cfg := range configs {
|
||||
if provider, ok := cfg.(bearerAuthTokenProviderProvider); ok {
|
||||
p, found, err = provider.getBearerAuthTokenProvider(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// bearerAuthTokenCacheOptionsProvider is an interface for retrieving a function for
|
||||
// setting the smithy-go auth/bearer#TokenCacheOptions.
|
||||
type bearerAuthTokenCacheOptionsProvider interface {
|
||||
getBearerAuthTokenCacheOptions(context.Context) (func(*smithybearer.TokenCacheOptions), bool, error)
|
||||
}
|
||||
|
||||
// getBearerAuthTokenCacheOptionsProvider is an interface for retrieving a function for
|
||||
// setting the smithy-go auth/bearer#TokenCacheOptions.
|
||||
func getBearerAuthTokenCacheOptions(ctx context.Context, configs configs) (
|
||||
f func(*smithybearer.TokenCacheOptions), found bool, err error,
|
||||
) {
|
||||
for _, config := range configs {
|
||||
if p, ok := config.(bearerAuthTokenCacheOptionsProvider); ok {
|
||||
f, found, err = p.getBearerAuthTokenCacheOptions(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// ssoTokenProviderOptionsProvider is an interface for retrieving a function for
|
||||
// setting the SDK's credentials/ssocreds#SSOTokenProviderOptions.
|
||||
type ssoTokenProviderOptionsProvider interface {
|
||||
getSSOTokenProviderOptions(context.Context) (func(*ssocreds.SSOTokenProviderOptions), bool, error)
|
||||
}
|
||||
|
||||
// getSSOTokenProviderOptions is an interface for retrieving a function for
|
||||
// setting the SDK's credentials/ssocreds#SSOTokenProviderOptions.
|
||||
func getSSOTokenProviderOptions(ctx context.Context, configs configs) (
|
||||
f func(*ssocreds.SSOTokenProviderOptions), found bool, err error,
|
||||
) {
|
||||
for _, config := range configs {
|
||||
if p, ok := config.(ssoTokenProviderOptionsProvider); ok {
|
||||
f, found, err = p.getSSOTokenProviderOptions(ctx)
|
||||
if err != nil || found {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// ssoTokenProviderOptionsProvider
|
||||
|
||||
// processCredentialOptions is an interface for retrieving a function for setting
|
||||
// the processcreds.Options.
|
||||
type processCredentialOptions interface {
|
||||
|
122
vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go
generated
vendored
Normal file
122
vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go
generated
vendored
Normal file
@ -0,0 +1,122 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/credentials/ssocreds"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssooidc"
|
||||
smithybearer "github.com/aws/smithy-go/auth/bearer"
|
||||
)
|
||||
|
||||
// resolveBearerAuthToken extracts a token provider from the config sources.
|
||||
//
|
||||
// If an explicit bearer authentication token provider is not found the
|
||||
// resolver will fallback to resolving token provider via other config sources
|
||||
// such as SharedConfig.
|
||||
func resolveBearerAuthToken(ctx context.Context, cfg *aws.Config, configs configs) error {
|
||||
found, err := resolveBearerAuthTokenProvider(ctx, cfg, configs)
|
||||
if found || err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return resolveBearerAuthTokenProviderChain(ctx, cfg, configs)
|
||||
}
|
||||
|
||||
// resolveBearerAuthTokenProvider extracts the first instance of
|
||||
// BearerAuthTokenProvider from the config sources.
|
||||
//
|
||||
// The resolved BearerAuthTokenProvider will be wrapped in a cache to ensure
|
||||
// the Token is only refreshed when needed. This also protects the
|
||||
// TokenProvider so it can be used concurrently.
|
||||
//
|
||||
// Config providers used:
|
||||
// * bearerAuthTokenProviderProvider
|
||||
func resolveBearerAuthTokenProvider(ctx context.Context, cfg *aws.Config, configs configs) (bool, error) {
|
||||
tokenProvider, found, err := getBearerAuthTokenProvider(ctx, configs)
|
||||
if !found || err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
cfg.BearerAuthTokenProvider, err = wrapWithBearerAuthTokenCache(
|
||||
ctx, configs, tokenProvider)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func resolveBearerAuthTokenProviderChain(ctx context.Context, cfg *aws.Config, configs configs) (err error) {
|
||||
_, sharedConfig, _ := getAWSConfigSources(configs)
|
||||
|
||||
var provider smithybearer.TokenProvider
|
||||
|
||||
if sharedConfig.SSOSession != nil {
|
||||
provider, err = resolveBearerAuthSSOTokenProvider(
|
||||
ctx, cfg, sharedConfig.SSOSession, configs)
|
||||
}
|
||||
|
||||
if err == nil && provider != nil {
|
||||
cfg.BearerAuthTokenProvider, err = wrapWithBearerAuthTokenCache(
|
||||
ctx, configs, provider)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func resolveBearerAuthSSOTokenProvider(ctx context.Context, cfg *aws.Config, session *SSOSession, configs configs) (*ssocreds.SSOTokenProvider, error) {
|
||||
ssoTokenProviderOptionsFn, found, err := getSSOTokenProviderOptions(ctx, configs)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get SSOTokenProviderOptions from config sources, %w", err)
|
||||
}
|
||||
|
||||
var optFns []func(*ssocreds.SSOTokenProviderOptions)
|
||||
if found {
|
||||
optFns = append(optFns, ssoTokenProviderOptionsFn)
|
||||
}
|
||||
|
||||
cachePath, err := ssocreds.StandardCachedTokenFilepath(session.Name)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get SSOTokenProvider's cache path, %w", err)
|
||||
}
|
||||
|
||||
client := ssooidc.NewFromConfig(*cfg)
|
||||
provider := ssocreds.NewSSOTokenProvider(client, cachePath, optFns...)
|
||||
|
||||
return provider, nil
|
||||
}
|
||||
|
||||
// wrapWithBearerAuthTokenCache will wrap provider with an smithy-go
|
||||
// bearer/auth#TokenCache with the provided options if the provider is not
|
||||
// already a TokenCache.
|
||||
func wrapWithBearerAuthTokenCache(
|
||||
ctx context.Context,
|
||||
cfgs configs,
|
||||
provider smithybearer.TokenProvider,
|
||||
optFns ...func(*smithybearer.TokenCacheOptions),
|
||||
) (smithybearer.TokenProvider, error) {
|
||||
_, ok := provider.(*smithybearer.TokenCache)
|
||||
if ok {
|
||||
return provider, nil
|
||||
}
|
||||
|
||||
tokenCacheConfigOptions, optionsFound, err := getBearerAuthTokenCacheOptions(ctx, cfgs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
opts := make([]func(*smithybearer.TokenCacheOptions), 0, 2+len(optFns))
|
||||
opts = append(opts, func(o *smithybearer.TokenCacheOptions) {
|
||||
o.RefreshBeforeExpires = 5 * time.Minute
|
||||
o.RetrieveBearerTokenTimeout = 30 * time.Second
|
||||
})
|
||||
opts = append(opts, optFns...)
|
||||
if optionsFound {
|
||||
opts = append(opts, tokenCacheConfigOptions)
|
||||
}
|
||||
|
||||
return smithybearer.NewTokenCache(provider, opts...), nil
|
||||
}
|
55
vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go
generated
vendored
55
vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go
generated
vendored
@ -15,6 +15,7 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/credentials/stscreds"
|
||||
"github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sso"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssooidc"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sts"
|
||||
)
|
||||
|
||||
@ -29,25 +30,19 @@ var (
|
||||
ecsContainerEndpoint = "http://169.254.170.2" // not constant to allow for swapping during unit-testing
|
||||
)
|
||||
|
||||
// resolveCredentials extracts a credential provider from slice of config sources.
|
||||
// resolveCredentials extracts a credential provider from slice of config
|
||||
// sources.
|
||||
//
|
||||
// If an explict credential provider is not found the resolver will fallback to resolving
|
||||
// credentials by extracting a credential provider from EnvConfig and SharedConfig.
|
||||
// If an explicit credential provider is not found the resolver will fallback
|
||||
// to resolving credentials by extracting a credential provider from EnvConfig
|
||||
// and SharedConfig.
|
||||
func resolveCredentials(ctx context.Context, cfg *aws.Config, configs configs) error {
|
||||
found, err := resolveCredentialProvider(ctx, cfg, configs)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if found {
|
||||
return nil
|
||||
}
|
||||
|
||||
err = resolveCredentialChain(ctx, cfg, configs)
|
||||
if err != nil {
|
||||
if found || err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return resolveCredentialChain(ctx, cfg, configs)
|
||||
}
|
||||
|
||||
// resolveCredentialProvider extracts the first instance of Credentials from the
|
||||
@ -61,12 +56,9 @@ func resolveCredentials(ctx context.Context, cfg *aws.Config, configs configs) e
|
||||
// * credentialsProviderProvider
|
||||
func resolveCredentialProvider(ctx context.Context, cfg *aws.Config, configs configs) (bool, error) {
|
||||
credProvider, found, err := getCredentialsProvider(ctx, configs)
|
||||
if err != nil {
|
||||
if !found || err != nil {
|
||||
return false, err
|
||||
}
|
||||
if !found {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, credProvider)
|
||||
if err != nil {
|
||||
@ -180,7 +172,30 @@ func resolveSSOCredentials(ctx context.Context, cfg *aws.Config, sharedConfig *S
|
||||
}
|
||||
|
||||
cfgCopy := cfg.Copy()
|
||||
cfgCopy.Region = sharedConfig.SSORegion
|
||||
|
||||
if sharedConfig.SSOSession != nil {
|
||||
ssoTokenProviderOptionsFn, found, err := getSSOTokenProviderOptions(ctx, configs)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get SSOTokenProviderOptions from config sources, %w", err)
|
||||
}
|
||||
var optFns []func(*ssocreds.SSOTokenProviderOptions)
|
||||
if found {
|
||||
optFns = append(optFns, ssoTokenProviderOptionsFn)
|
||||
}
|
||||
cfgCopy.Region = sharedConfig.SSOSession.SSORegion
|
||||
cachedPath, err := ssocreds.StandardCachedTokenFilepath(sharedConfig.SSOSession.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
oidcClient := ssooidc.NewFromConfig(cfgCopy)
|
||||
tokenProvider := ssocreds.NewSSOTokenProvider(oidcClient, cachedPath, optFns...)
|
||||
options = append(options, func(o *ssocreds.Options) {
|
||||
o.SSOTokenProvider = tokenProvider
|
||||
o.CachedTokenFilepath = cachedPath
|
||||
})
|
||||
} else {
|
||||
cfgCopy.Region = sharedConfig.SSORegion
|
||||
}
|
||||
|
||||
cfg.Credentials = ssocreds.New(sso.NewFromConfig(cfgCopy), sharedConfig.SSOAccountID, sharedConfig.SSORoleName, sharedConfig.SSOStartURL, options...)
|
||||
|
||||
@ -454,7 +469,7 @@ func wrapWithCredentialsCache(
|
||||
return provider, nil
|
||||
}
|
||||
|
||||
credCacheOptions, found, err := getCredentialsCacheOptionsProvider(ctx, cfgs)
|
||||
credCacheOptions, optionsFound, err := getCredentialsCacheOptionsProvider(ctx, cfgs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -462,7 +477,7 @@ func wrapWithCredentialsCache(
|
||||
// force allocation of a new slice if the additional options are
|
||||
// needed, to prevent overwriting the passed in slice of options.
|
||||
optFns = optFns[:len(optFns):len(optFns)]
|
||||
if found {
|
||||
if optionsFound {
|
||||
optFns = append(optFns, credCacheOptions)
|
||||
}
|
||||
|
||||
|
289
vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
generated
vendored
289
vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go
generated
vendored
@ -15,13 +15,19 @@ import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/feature/ec2/imds"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/ini"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/shareddefaults"
|
||||
"github.com/aws/smithy-go/logging"
|
||||
)
|
||||
|
||||
const (
|
||||
// Prefix to use for filtering profiles
|
||||
// Prefix to use for filtering profiles. The profile prefix should only
|
||||
// exist in the shared config file, not the credentials file.
|
||||
profilePrefix = `profile `
|
||||
|
||||
// Prefix to be used for SSO sections. These are supposed to only exist in
|
||||
// the shared config file, not the credentials file.
|
||||
ssoSectionPrefix = `sso-session `
|
||||
|
||||
// string equivalent for boolean
|
||||
endpointDiscoveryDisabled = `false`
|
||||
endpointDiscoveryEnabled = `true`
|
||||
@ -42,10 +48,13 @@ const (
|
||||
roleDurationSecondsKey = "duration_seconds" // optional
|
||||
|
||||
// AWS Single Sign-On (AWS SSO) group
|
||||
ssoSessionNameKey = "sso_session"
|
||||
|
||||
ssoRegionKey = "sso_region"
|
||||
ssoStartURLKey = "sso_start_url"
|
||||
|
||||
ssoAccountIDKey = "sso_account_id"
|
||||
ssoRegionKey = "sso_region"
|
||||
ssoRoleNameKey = "sso_role_name"
|
||||
ssoStartURL = "sso_start_url"
|
||||
|
||||
// Additional Config fields
|
||||
regionKey = `region`
|
||||
@ -99,7 +108,7 @@ var defaultSharedConfigProfile = DefaultSharedConfigProfile
|
||||
// - Linux/Unix: $HOME/.aws/credentials
|
||||
// - Windows: %USERPROFILE%\.aws\credentials
|
||||
func DefaultSharedCredentialsFilename() string {
|
||||
return filepath.Join(userHomeDir(), ".aws", "credentials")
|
||||
return filepath.Join(shareddefaults.UserHomeDir(), ".aws", "credentials")
|
||||
}
|
||||
|
||||
// DefaultSharedConfigFilename returns the SDK's default file path for
|
||||
@ -110,7 +119,7 @@ func DefaultSharedCredentialsFilename() string {
|
||||
// - Linux/Unix: $HOME/.aws/config
|
||||
// - Windows: %USERPROFILE%\.aws\config
|
||||
func DefaultSharedConfigFilename() string {
|
||||
return filepath.Join(userHomeDir(), ".aws", "config")
|
||||
return filepath.Join(shareddefaults.UserHomeDir(), ".aws", "config")
|
||||
}
|
||||
|
||||
// DefaultSharedConfigFiles is a slice of the default shared config files that
|
||||
@ -119,12 +128,26 @@ var DefaultSharedConfigFiles = []string{
|
||||
DefaultSharedConfigFilename(),
|
||||
}
|
||||
|
||||
// DefaultSharedCredentialsFiles is a slice of the default shared credentials files that
|
||||
// the will be used in order to load the SharedConfig.
|
||||
// DefaultSharedCredentialsFiles is a slice of the default shared credentials
|
||||
// files that the will be used in order to load the SharedConfig.
|
||||
var DefaultSharedCredentialsFiles = []string{
|
||||
DefaultSharedCredentialsFilename(),
|
||||
}
|
||||
|
||||
// SSOSession provides the shared configuration parameters of the sso-session
|
||||
// section.
|
||||
type SSOSession struct {
|
||||
Name string
|
||||
SSORegion string
|
||||
SSOStartURL string
|
||||
}
|
||||
|
||||
func (s *SSOSession) setFromIniSection(section ini.Section) {
|
||||
updateString(&s.Name, section, ssoSessionNameKey)
|
||||
updateString(&s.SSORegion, section, ssoRegionKey)
|
||||
updateString(&s.SSOStartURL, section, ssoStartURLKey)
|
||||
}
|
||||
|
||||
// SharedConfig represents the configuration fields of the SDK config files.
|
||||
type SharedConfig struct {
|
||||
Profile string
|
||||
@ -144,10 +167,17 @@ type SharedConfig struct {
|
||||
CredentialProcess string
|
||||
WebIdentityTokenFile string
|
||||
|
||||
// SSO session options
|
||||
SSOSessionName string
|
||||
SSOSession *SSOSession
|
||||
|
||||
// Legacy SSO session options
|
||||
SSORegion string
|
||||
SSOStartURL string
|
||||
|
||||
// SSO fields not used
|
||||
SSOAccountID string
|
||||
SSORegion string
|
||||
SSORoleName string
|
||||
SSOStartURL string
|
||||
|
||||
RoleARN string
|
||||
ExternalID string
|
||||
@ -463,7 +493,6 @@ type LoadSharedConfigOptions struct {
|
||||
//
|
||||
// You can read more about shared config and credentials file location at
|
||||
// https://docs.aws.amazon.com/credref/latest/refdocs/file-location.html#file-location
|
||||
//
|
||||
func LoadSharedConfigProfile(ctx context.Context, profile string, optFns ...func(*LoadSharedConfigOptions)) (SharedConfig, error) {
|
||||
var option LoadSharedConfigOptions
|
||||
for _, fn := range optFns {
|
||||
@ -485,7 +514,7 @@ func LoadSharedConfigProfile(ctx context.Context, profile string, optFns ...func
|
||||
}
|
||||
|
||||
// check for profile prefix and drop duplicates or invalid profiles
|
||||
err = processConfigSections(ctx, configSections, option.Logger)
|
||||
err = processConfigSections(ctx, &configSections, option.Logger)
|
||||
if err != nil {
|
||||
return SharedConfig{}, err
|
||||
}
|
||||
@ -497,12 +526,12 @@ func LoadSharedConfigProfile(ctx context.Context, profile string, optFns ...func
|
||||
}
|
||||
|
||||
// check for profile prefix and drop duplicates or invalid profiles
|
||||
err = processCredentialsSections(ctx, credentialsSections, option.Logger)
|
||||
err = processCredentialsSections(ctx, &credentialsSections, option.Logger)
|
||||
if err != nil {
|
||||
return SharedConfig{}, err
|
||||
}
|
||||
|
||||
err = mergeSections(configSections, credentialsSections)
|
||||
err = mergeSections(&configSections, credentialsSections)
|
||||
if err != nil {
|
||||
return SharedConfig{}, err
|
||||
}
|
||||
@ -516,53 +545,73 @@ func LoadSharedConfigProfile(ctx context.Context, profile string, optFns ...func
|
||||
return cfg, nil
|
||||
}
|
||||
|
||||
func processConfigSections(ctx context.Context, sections ini.Sections, logger logging.Logger) error {
|
||||
func processConfigSections(ctx context.Context, sections *ini.Sections, logger logging.Logger) error {
|
||||
skipSections := map[string]struct{}{}
|
||||
|
||||
for _, section := range sections.List() {
|
||||
// drop profiles without prefix for config files
|
||||
if !strings.HasPrefix(section, profilePrefix) && !strings.EqualFold(section, "default") {
|
||||
if _, ok := skipSections[section]; ok {
|
||||
continue
|
||||
}
|
||||
|
||||
// drop sections from config file that do not have expected prefixes.
|
||||
switch {
|
||||
case strings.HasPrefix(section, profilePrefix):
|
||||
// Rename sections to remove "profile " prefixing to match with
|
||||
// credentials file. If default is already present, it will be
|
||||
// dropped.
|
||||
newName, err := renameProfileSection(section, sections, logger)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to rename profile section, %w", err)
|
||||
}
|
||||
skipSections[newName] = struct{}{}
|
||||
|
||||
case strings.HasPrefix(section, ssoSectionPrefix):
|
||||
case strings.EqualFold(section, "default"):
|
||||
default:
|
||||
// drop this section, as invalid profile name
|
||||
sections.DeleteSection(section)
|
||||
|
||||
if logger != nil {
|
||||
logger.Logf(logging.Debug,
|
||||
"A profile defined with name `%v` is ignored. For use within a shared configuration file, "+
|
||||
"a non-default profile must have `profile ` prefixed to the profile name.\n",
|
||||
logger.Logf(logging.Debug, "A profile defined with name `%v` is ignored. "+
|
||||
"For use within a shared configuration file, "+
|
||||
"a non-default profile must have `profile ` "+
|
||||
"prefixed to the profile name.",
|
||||
section,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// rename sections to remove `profile ` prefixing to match with credentials file.
|
||||
// if default is already present, it will be dropped.
|
||||
for _, section := range sections.List() {
|
||||
if strings.HasPrefix(section, profilePrefix) {
|
||||
v, ok := sections.GetSection(section)
|
||||
if !ok {
|
||||
return fmt.Errorf("error processing profiles within the shared configuration files")
|
||||
}
|
||||
|
||||
// delete section with profile as prefix
|
||||
sections.DeleteSection(section)
|
||||
|
||||
// set the value to non-prefixed name in sections.
|
||||
section = strings.TrimPrefix(section, profilePrefix)
|
||||
if sections.HasSection(section) {
|
||||
oldSection, _ := sections.GetSection(section)
|
||||
v.Logs = append(v.Logs,
|
||||
fmt.Sprintf("A default profile prefixed with `profile ` found in %s, "+
|
||||
"overrided non-prefixed default profile from %s", v.SourceFile, oldSection.SourceFile))
|
||||
}
|
||||
|
||||
// assign non-prefixed name to section
|
||||
v.Name = section
|
||||
sections.SetSection(section, v)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func processCredentialsSections(ctx context.Context, sections ini.Sections, logger logging.Logger) error {
|
||||
func renameProfileSection(section string, sections *ini.Sections, logger logging.Logger) (string, error) {
|
||||
v, ok := sections.GetSection(section)
|
||||
if !ok {
|
||||
return "", fmt.Errorf("error processing profiles within the shared configuration files")
|
||||
}
|
||||
|
||||
// delete section with profile as prefix
|
||||
sections.DeleteSection(section)
|
||||
|
||||
// set the value to non-prefixed name in sections.
|
||||
section = strings.TrimPrefix(section, profilePrefix)
|
||||
if sections.HasSection(section) {
|
||||
oldSection, _ := sections.GetSection(section)
|
||||
v.Logs = append(v.Logs,
|
||||
fmt.Sprintf("A non-default profile not prefixed with `profile ` found in %s, "+
|
||||
"overriding non-default profile from %s",
|
||||
v.SourceFile, oldSection.SourceFile))
|
||||
sections.DeleteSection(section)
|
||||
}
|
||||
|
||||
// assign non-prefixed name to section
|
||||
v.Name = section
|
||||
sections.SetSection(section, v)
|
||||
|
||||
return section, nil
|
||||
}
|
||||
|
||||
func processCredentialsSections(ctx context.Context, sections *ini.Sections, logger logging.Logger) error {
|
||||
for _, section := range sections.List() {
|
||||
// drop profiles with prefix for credential files
|
||||
if strings.HasPrefix(section, profilePrefix) {
|
||||
@ -596,7 +645,7 @@ func loadIniFiles(filenames []string) (ini.Sections, error) {
|
||||
}
|
||||
|
||||
// mergeSections into mergedSections
|
||||
err = mergeSections(mergedSections, sections)
|
||||
err = mergeSections(&mergedSections, sections)
|
||||
if err != nil {
|
||||
return ini.Sections{}, SharedConfigLoadError{Filename: filename, Err: err}
|
||||
}
|
||||
@ -606,7 +655,7 @@ func loadIniFiles(filenames []string) (ini.Sections, error) {
|
||||
}
|
||||
|
||||
// mergeSections merges source section properties into destination section properties
|
||||
func mergeSections(dst, src ini.Sections) error {
|
||||
func mergeSections(dst *ini.Sections, src ini.Sections) error {
|
||||
for _, sectionName := range src.List() {
|
||||
srcSection, _ := src.GetSection(sectionName)
|
||||
|
||||
@ -680,6 +729,13 @@ func mergeSections(dst, src ini.Sections) error {
|
||||
useFIPSEndpointKey,
|
||||
defaultsModeKey,
|
||||
retryModeKey,
|
||||
caBundleKey,
|
||||
|
||||
ssoSessionNameKey,
|
||||
ssoAccountIDKey,
|
||||
ssoRegionKey,
|
||||
ssoRoleNameKey,
|
||||
ssoStartURLKey,
|
||||
}
|
||||
for i := range stringKeys {
|
||||
if err := mergeStringKey(&srcSection, &dstSection, sectionName, stringKeys[i]); err != nil {
|
||||
@ -698,7 +754,7 @@ func mergeSections(dst, src ini.Sections) error {
|
||||
}
|
||||
|
||||
// set srcSection on dst srcSection
|
||||
dst = dst.SetSection(sectionName, dstSection)
|
||||
*dst = dst.SetSection(sectionName, dstSection)
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -769,7 +825,7 @@ func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile
|
||||
}
|
||||
}
|
||||
|
||||
// set config from the provided ini section
|
||||
// set config from the provided INI section
|
||||
err := c.setFromIniSection(profile, section)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error fetching config from profile, %v, %w", profile, err)
|
||||
@ -782,9 +838,8 @@ func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile
|
||||
// profile only have credential provider options.
|
||||
c.clearAssumeRoleOptions()
|
||||
} else {
|
||||
// First time a profile has been seen, It must either be a assume role
|
||||
// credentials, or SSO. Assert if the credential type requires a role ARN,
|
||||
// the ARN is also set, or validate that the SSO configuration is complete.
|
||||
// First time a profile has been seen. Assert if the credential type
|
||||
// requires a role ARN, the ARN is also set
|
||||
if err := c.validateCredentialsConfig(profile); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -832,11 +887,26 @@ func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile
|
||||
c.Source = srcCfg
|
||||
}
|
||||
|
||||
// If the profile contains an SSO session parameter, the session MUST exist
|
||||
// as a section in the config file. Load the SSO session using the name
|
||||
// provided. If the session section is not found or incomplete an error
|
||||
// will be returned.
|
||||
if c.hasSSOTokenProviderConfiguration() {
|
||||
section, ok := sections.GetSection(ssoSectionPrefix + strings.TrimSpace(c.SSOSessionName))
|
||||
if !ok {
|
||||
return fmt.Errorf("failed to find SSO session section, %v", c.SSOSessionName)
|
||||
}
|
||||
var ssoSession SSOSession
|
||||
ssoSession.setFromIniSection(section)
|
||||
ssoSession.Name = c.SSOSessionName
|
||||
c.SSOSession = &ssoSession
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// setFromIniSection loads the configuration from the profile section defined in
|
||||
// the provided ini file. A SharedConfig pointer type value is used so that
|
||||
// the provided INI file. A SharedConfig pointer type value is used so that
|
||||
// multiple config file loadings can be chained.
|
||||
//
|
||||
// Only loads complete logically grouped values, and will not set fields in cfg
|
||||
@ -871,10 +941,16 @@ func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) er
|
||||
updateString(&c.Region, section, regionKey)
|
||||
|
||||
// AWS Single Sign-On (AWS SSO)
|
||||
updateString(&c.SSOAccountID, section, ssoAccountIDKey)
|
||||
// SSO session options
|
||||
updateString(&c.SSOSessionName, section, ssoSessionNameKey)
|
||||
|
||||
// Legacy SSO session options
|
||||
updateString(&c.SSORegion, section, ssoRegionKey)
|
||||
updateString(&c.SSOStartURL, section, ssoStartURLKey)
|
||||
|
||||
// SSO fields not used
|
||||
updateString(&c.SSOAccountID, section, ssoAccountIDKey)
|
||||
updateString(&c.SSORoleName, section, ssoRoleNameKey)
|
||||
updateString(&c.SSOStartURL, section, ssoStartURL)
|
||||
|
||||
if section.Has(roleDurationSecondsKey) {
|
||||
d := time.Duration(section.Int(roleDurationSecondsKey)) * time.Second
|
||||
@ -992,32 +1068,47 @@ func (c *SharedConfig) validateCredentialType() error {
|
||||
len(c.CredentialProcess) != 0,
|
||||
len(c.WebIdentityTokenFile) != 0,
|
||||
) {
|
||||
return fmt.Errorf("only one credential type may be specified per profile: source profile, credential source, credential process, web identity token, or sso")
|
||||
return fmt.Errorf("only one credential type may be specified per profile: source profile, credential source, credential process, web identity token")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *SharedConfig) validateSSOConfiguration() error {
|
||||
if !c.hasSSOConfiguration() {
|
||||
if c.hasSSOTokenProviderConfiguration() {
|
||||
err := c.validateSSOTokenProviderConfiguration()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
if c.hasLegacySSOConfiguration() {
|
||||
err := c.validateLegacySSOConfiguration()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *SharedConfig) validateSSOTokenProviderConfiguration() error {
|
||||
var missing []string
|
||||
if len(c.SSOAccountID) == 0 {
|
||||
missing = append(missing, ssoAccountIDKey)
|
||||
|
||||
if len(c.SSOSessionName) == 0 {
|
||||
missing = append(missing, ssoSessionNameKey)
|
||||
}
|
||||
|
||||
if len(c.SSORegion) == 0 {
|
||||
missing = append(missing, ssoRegionKey)
|
||||
}
|
||||
if c.SSOSession == nil {
|
||||
missing = append(missing, ssoSectionPrefix)
|
||||
} else {
|
||||
if len(c.SSOSession.SSORegion) == 0 {
|
||||
missing = append(missing, ssoRegionKey)
|
||||
}
|
||||
|
||||
if len(c.SSORoleName) == 0 {
|
||||
missing = append(missing, ssoRoleNameKey)
|
||||
}
|
||||
|
||||
if len(c.SSOStartURL) == 0 {
|
||||
missing = append(missing, ssoStartURL)
|
||||
if len(c.SSOSession.SSOStartURL) == 0 {
|
||||
missing = append(missing, ssoStartURLKey)
|
||||
}
|
||||
}
|
||||
|
||||
if len(missing) > 0 {
|
||||
@ -1025,6 +1116,40 @@ func (c *SharedConfig) validateSSOConfiguration() error {
|
||||
c.Profile, strings.Join(missing, ", "))
|
||||
}
|
||||
|
||||
if len(c.SSORegion) > 0 && c.SSORegion != c.SSOSession.SSORegion {
|
||||
return fmt.Errorf("%s in profile %q must match %s in %s", ssoRegionKey, c.Profile, ssoRegionKey, ssoSectionPrefix)
|
||||
}
|
||||
|
||||
if len(c.SSOStartURL) > 0 && c.SSOStartURL != c.SSOSession.SSOStartURL {
|
||||
return fmt.Errorf("%s in profile %q must match %s in %s", ssoStartURLKey, c.Profile, ssoStartURLKey, ssoSectionPrefix)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *SharedConfig) validateLegacySSOConfiguration() error {
|
||||
var missing []string
|
||||
|
||||
if len(c.SSORegion) == 0 {
|
||||
missing = append(missing, ssoRegionKey)
|
||||
}
|
||||
|
||||
if len(c.SSOStartURL) == 0 {
|
||||
missing = append(missing, ssoStartURLKey)
|
||||
}
|
||||
|
||||
if len(c.SSOAccountID) == 0 {
|
||||
missing = append(missing, ssoAccountIDKey)
|
||||
}
|
||||
|
||||
if len(c.SSORoleName) == 0 {
|
||||
missing = append(missing, ssoRoleNameKey)
|
||||
}
|
||||
|
||||
if len(missing) > 0 {
|
||||
return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s",
|
||||
c.Profile, strings.Join(missing, ", "))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -1044,15 +1169,15 @@ func (c *SharedConfig) hasCredentials() bool {
|
||||
}
|
||||
|
||||
func (c *SharedConfig) hasSSOConfiguration() bool {
|
||||
switch {
|
||||
case len(c.SSOAccountID) != 0:
|
||||
case len(c.SSORegion) != 0:
|
||||
case len(c.SSORoleName) != 0:
|
||||
case len(c.SSOStartURL) != 0:
|
||||
default:
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return c.hasSSOTokenProviderConfiguration() || c.hasLegacySSOConfiguration()
|
||||
}
|
||||
|
||||
func (c *SharedConfig) hasSSOTokenProviderConfiguration() bool {
|
||||
return len(c.SSOSessionName) > 0
|
||||
}
|
||||
|
||||
func (c *SharedConfig) hasLegacySSOConfiguration() bool {
|
||||
return len(c.SSORegion) > 0 || len(c.SSOAccountID) > 0 || len(c.SSOStartURL) > 0 || len(c.SSORoleName) > 0
|
||||
}
|
||||
|
||||
func (c *SharedConfig) clearAssumeRoleOptions() {
|
||||
@ -1143,12 +1268,6 @@ func (e CredentialRequiresARNError) Error() string {
|
||||
)
|
||||
}
|
||||
|
||||
func userHomeDir() string {
|
||||
// Ignore errors since we only care about Windows and *nix.
|
||||
homedir, _ := os.UserHomeDir()
|
||||
return homedir
|
||||
}
|
||||
|
||||
func oneOrNone(bs ...bool) bool {
|
||||
var count int
|
||||
|
||||
|
166
vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
generated
vendored
166
vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md
generated
vendored
@ -1,3 +1,169 @@
|
||||
# v1.13.16 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.15 (2023-02-22)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.14 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.13 (2023-02-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.12 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.11 (2023-02-01)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.13.10 (2023-01-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.9 (2023-01-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.8 (2023-01-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.7 (2022-12-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.6 (2022-12-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.5 (2022-12-15)
|
||||
|
||||
* **Bug Fix**: Unify logic between shared config and in finding home directory
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.4 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.3 (2022-11-22)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.2 (2022-11-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.1 (2022-11-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.0 (2022-11-11)
|
||||
|
||||
* **Announcement**: When using the SSOTokenProvider, a previous implementation incorrectly compensated for invalid SSOTokenProvider configurations in the shared profile. This has been fixed via PR #1903 and tracked in issue #1846
|
||||
* **Feature**: Adds token refresh support (via SSOTokenProvider) when using the SSOCredentialProvider
|
||||
|
||||
# v1.12.24 (2022-11-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.23 (2022-10-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.22 (2022-10-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.21 (2022-09-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.20 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.19 (2022-09-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.18 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.17 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.16 (2022-08-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.15 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.14 (2022-08-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.13 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.12 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.11 (2022-08-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.10 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.9 (2022-07-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.8 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.7 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.6 (2022-06-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.5 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.4 (2022-05-26)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.3 (2022-05-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.2 (2022-05-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.1 (2022-05-16)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.0 (2022-04-25)
|
||||
|
||||
* **Feature**: Adds Duration and Policy options that can be used when creating stscreds.WebIdentityRoleProvider credentials provider.
|
||||
|
40
vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go
generated
vendored
40
vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go
generated
vendored
@ -1,27 +1,27 @@
|
||||
// Package ec2rolecreds provides the credentials provider implementation for
|
||||
// retrieving AWS credentials from Amazon EC2 Instance Roles via Amazon EC2 IMDS.
|
||||
//
|
||||
// Concurrency and caching
|
||||
// # Concurrency and caching
|
||||
//
|
||||
// The Provider is not safe to be used concurrently, and does not provide any
|
||||
// caching of credentials retrieved. You should wrap the Provider with a
|
||||
// `aws.CredentialsCache` to provide concurrency safety, and caching of
|
||||
// credentials.
|
||||
//
|
||||
// Loading credentials with the SDK's AWS Config
|
||||
// # Loading credentials with the SDK's AWS Config
|
||||
//
|
||||
// The EC2 Instance role credentials provider will automatically be the resolved
|
||||
// credential provider int he credential chain if no other credential provider is
|
||||
// credential provider in the credential chain if no other credential provider is
|
||||
// resolved first.
|
||||
//
|
||||
// To explicitly instruct the SDK's credentials resolving to use the EC2 Instance
|
||||
// role for credentials, you specify a `credentials_source` property in the config
|
||||
// profile the SDK will load.
|
||||
//
|
||||
// [default]
|
||||
// credential_source = Ec2InstanceMetadata
|
||||
// [default]
|
||||
// credential_source = Ec2InstanceMetadata
|
||||
//
|
||||
// Loading credentials with the Provider directly
|
||||
// # Loading credentials with the Provider directly
|
||||
//
|
||||
// Another way to use the EC2 Instance role credentials provider is to create it
|
||||
// directly and assign it as the credentials provider for an API client.
|
||||
@ -30,28 +30,28 @@
|
||||
// it with the CredentialsCache before assigning the provider to the Amazon S3 API
|
||||
// client's Credentials option.
|
||||
//
|
||||
// provider := imds.New(imds.Options{})
|
||||
// provider := imds.New(imds.Options{})
|
||||
//
|
||||
// // Create the service client value configured for credentials.
|
||||
// svc := s3.New(s3.Options{
|
||||
// Credentials: aws.NewCredentialsCache(provider),
|
||||
// })
|
||||
// // Create the service client value configured for credentials.
|
||||
// svc := s3.New(s3.Options{
|
||||
// Credentials: aws.NewCredentialsCache(provider),
|
||||
// })
|
||||
//
|
||||
// If you need more control, you can set the configuration options on the
|
||||
// credentials provider using the imds.Options type to configure the EC2 IMDS
|
||||
// API Client and ExpiryWindow of the retrieved credentials.
|
||||
//
|
||||
// provider := imds.New(imds.Options{
|
||||
// // See imds.Options type's documentation for more options available.
|
||||
// Client: imds.New(Options{
|
||||
// HTTPClient: customHTTPClient,
|
||||
// }),
|
||||
// provider := imds.New(imds.Options{
|
||||
// // See imds.Options type's documentation for more options available.
|
||||
// Client: imds.New(Options{
|
||||
// HTTPClient: customHTTPClient,
|
||||
// }),
|
||||
//
|
||||
// // Modify how soon credentials expire prior to their original expiry time.
|
||||
// ExpiryWindow: 5 * time.Minute,
|
||||
// })
|
||||
// // Modify how soon credentials expire prior to their original expiry time.
|
||||
// ExpiryWindow: 5 * time.Minute,
|
||||
// })
|
||||
//
|
||||
// EC2 IMDS API Client
|
||||
// # EC2 IMDS API Client
|
||||
//
|
||||
// See the github.com/aws/aws-sdk-go-v2/feature/ec2/imds module for more details on
|
||||
// configuring the client, and options available.
|
||||
|
6
vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go
generated
vendored
6
vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go
generated
vendored
@ -33,9 +33,9 @@ type GetMetadataAPIClient interface {
|
||||
//
|
||||
// The New function must be used to create the with a custom EC2 IMDS client.
|
||||
//
|
||||
// p := &ec2rolecreds.New(func(o *ec2rolecreds.Options{
|
||||
// o.Client = imds.New(imds.Options{/* custom options */})
|
||||
// })
|
||||
// p := &ec2rolecreds.New(func(o *ec2rolecreds.Options{
|
||||
// o.Client = imds.New(imds.Options{/* custom options */})
|
||||
// })
|
||||
type Provider struct {
|
||||
options Options
|
||||
}
|
||||
|
31
vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go
generated
vendored
31
vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go
generated
vendored
@ -7,26 +7,29 @@
|
||||
//
|
||||
// Static credentials will never expire once they have been retrieved. The format
|
||||
// of the static credentials response:
|
||||
// {
|
||||
// "AccessKeyId" : "MUA...",
|
||||
// "SecretAccessKey" : "/7PC5om....",
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// "AccessKeyId" : "MUA...",
|
||||
// "SecretAccessKey" : "/7PC5om....",
|
||||
// }
|
||||
//
|
||||
// Refreshable credentials will expire within the "ExpiryWindow" of the Expiration
|
||||
// value in the response. The format of the refreshable credentials response:
|
||||
// {
|
||||
// "AccessKeyId" : "MUA...",
|
||||
// "SecretAccessKey" : "/7PC5om....",
|
||||
// "Token" : "AQoDY....=",
|
||||
// "Expiration" : "2016-02-25T06:03:31Z"
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// "AccessKeyId" : "MUA...",
|
||||
// "SecretAccessKey" : "/7PC5om....",
|
||||
// "Token" : "AQoDY....=",
|
||||
// "Expiration" : "2016-02-25T06:03:31Z"
|
||||
// }
|
||||
//
|
||||
// Errors should be returned in the following format and only returned with 400
|
||||
// or 500 HTTP status codes.
|
||||
// {
|
||||
// "code": "ErrorCode",
|
||||
// "message": "Helpful error message."
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// "code": "ErrorCode",
|
||||
// "message": "Helpful error message."
|
||||
// }
|
||||
package endpointcreds
|
||||
|
||||
import (
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package credentials
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.12.0"
|
||||
const goModuleVersion = "1.13.16"
|
||||
|
80
vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go
generated
vendored
80
vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go
generated
vendored
@ -7,14 +7,14 @@
|
||||
// option, you should make sure that the config file is as locked down as possible
|
||||
// using security best practices for your operating system.
|
||||
//
|
||||
// Concurrency and caching
|
||||
// # Concurrency and caching
|
||||
//
|
||||
// The Provider is not safe to be used concurrently, and does not provide any
|
||||
// caching of credentials retrieved. You should wrap the Provider with a
|
||||
// `aws.CredentialsCache` to provide concurrency safety, and caching of
|
||||
// credentials.
|
||||
//
|
||||
// Loading credentials with the SDKs AWS Config
|
||||
// # Loading credentials with the SDKs AWS Config
|
||||
//
|
||||
// You can use credentials from a AWS shared config `credential_process` in a
|
||||
// variety of ways.
|
||||
@ -24,20 +24,20 @@
|
||||
// called. You also need to set the AWS_SDK_LOAD_CONFIG environment variable
|
||||
// (e.g., `export AWS_SDK_LOAD_CONFIG=1`) to use the shared config file.
|
||||
//
|
||||
// [default]
|
||||
// credential_process = /command/to/call
|
||||
// [default]
|
||||
// credential_process = /command/to/call
|
||||
//
|
||||
// Loading configuration using external will use the credential process to
|
||||
// retrieve credentials. NOTE: If there are credentials in the profile you are
|
||||
// using, the credential process will not be used.
|
||||
//
|
||||
// // Initialize a session to load credentials.
|
||||
// cfg, _ := config.LoadDefaultConfig(context.TODO())
|
||||
// // Initialize a session to load credentials.
|
||||
// cfg, _ := config.LoadDefaultConfig(context.TODO())
|
||||
//
|
||||
// // Create S3 service client to use the credentials.
|
||||
// svc := s3.NewFromConfig(cfg)
|
||||
// // Create S3 service client to use the credentials.
|
||||
// svc := s3.NewFromConfig(cfg)
|
||||
//
|
||||
// Loading credentials with the Provider directly
|
||||
// # Loading credentials with the Provider directly
|
||||
//
|
||||
// Another way to use the credentials process provider is by using the
|
||||
// `NewProvider` constructor to create the provider and providing a it with a
|
||||
@ -47,46 +47,46 @@
|
||||
// it with the CredentialsCache before assigning the provider to the Amazon S3 API
|
||||
// client's Credentials option.
|
||||
//
|
||||
// // Create credentials using the Provider.
|
||||
// provider := processcreds.NewProvider("/path/to/command")
|
||||
// // Create credentials using the Provider.
|
||||
// provider := processcreds.NewProvider("/path/to/command")
|
||||
//
|
||||
// // Create the service client value configured for credentials.
|
||||
// svc := s3.New(s3.Options{
|
||||
// Credentials: aws.NewCredentialsCache(provider),
|
||||
// })
|
||||
// // Create the service client value configured for credentials.
|
||||
// svc := s3.New(s3.Options{
|
||||
// Credentials: aws.NewCredentialsCache(provider),
|
||||
// })
|
||||
//
|
||||
// If you need more control, you can set any configurable options in the
|
||||
// credentials using one or more option functions.
|
||||
//
|
||||
// provider := processcreds.NewProvider("/path/to/command",
|
||||
// func(o *processcreds.Options) {
|
||||
// // Override the provider's default timeout
|
||||
// o.Timeout = 2 * time.Minute
|
||||
// })
|
||||
// provider := processcreds.NewProvider("/path/to/command",
|
||||
// func(o *processcreds.Options) {
|
||||
// // Override the provider's default timeout
|
||||
// o.Timeout = 2 * time.Minute
|
||||
// })
|
||||
//
|
||||
// You can also use your own `exec.Cmd` value by satisfying a value that satisfies
|
||||
// the `NewCommandBuilder` interface and use the `NewProviderCommand` constructor.
|
||||
//
|
||||
// // Create an exec.Cmd
|
||||
// cmdBuilder := processcreds.NewCommandBuilderFunc(
|
||||
// func(ctx context.Context) (*exec.Cmd, error) {
|
||||
// cmd := exec.CommandContext(ctx,
|
||||
// "customCLICommand",
|
||||
// "-a", "argument",
|
||||
// )
|
||||
// cmd.Env = []string{
|
||||
// "ENV_VAR_FOO=value",
|
||||
// "ENV_VAR_BAR=other_value",
|
||||
// }
|
||||
// // Create an exec.Cmd
|
||||
// cmdBuilder := processcreds.NewCommandBuilderFunc(
|
||||
// func(ctx context.Context) (*exec.Cmd, error) {
|
||||
// cmd := exec.CommandContext(ctx,
|
||||
// "customCLICommand",
|
||||
// "-a", "argument",
|
||||
// )
|
||||
// cmd.Env = []string{
|
||||
// "ENV_VAR_FOO=value",
|
||||
// "ENV_VAR_BAR=other_value",
|
||||
// }
|
||||
//
|
||||
// return cmd, nil
|
||||
// },
|
||||
// )
|
||||
// return cmd, nil
|
||||
// },
|
||||
// )
|
||||
//
|
||||
// // Create credentials using your exec.Cmd and custom timeout
|
||||
// provider := processcreds.NewProviderCommand(cmdBuilder,
|
||||
// func(opt *processcreds.Provider) {
|
||||
// // optionally override the provider's default timeout
|
||||
// opt.Timeout = 1 * time.Second
|
||||
// })
|
||||
// // Create credentials using your exec.Cmd and custom timeout
|
||||
// provider := processcreds.NewProviderCommand(cmdBuilder,
|
||||
// func(opt *processcreds.Provider) {
|
||||
// // optionally override the provider's default timeout
|
||||
// opt.Timeout = 1 * time.Second
|
||||
// })
|
||||
package processcreds
|
||||
|
24
vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go
generated
vendored
24
vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go
generated
vendored
@ -149,12 +149,24 @@ func NewProviderCommand(builder NewCommandBuilder, options ...func(*Options)) *P
|
||||
return p
|
||||
}
|
||||
|
||||
type credentialProcessResponse struct {
|
||||
Version int
|
||||
AccessKeyID string `json:"AccessKeyId"`
|
||||
// A CredentialProcessResponse is the AWS credentials format that must be
|
||||
// returned when executing an external credential_process.
|
||||
type CredentialProcessResponse struct {
|
||||
// As of this writing, the Version key must be set to 1. This might
|
||||
// increment over time as the structure evolves.
|
||||
Version int
|
||||
|
||||
// The access key ID that identifies the temporary security credentials.
|
||||
AccessKeyID string `json:"AccessKeyId"`
|
||||
|
||||
// The secret access key that can be used to sign requests.
|
||||
SecretAccessKey string
|
||||
SessionToken string
|
||||
Expiration *time.Time
|
||||
|
||||
// The token that users must pass to the service API to use the temporary credentials.
|
||||
SessionToken string
|
||||
|
||||
// The date on which the current credentials expire.
|
||||
Expiration *time.Time
|
||||
}
|
||||
|
||||
// Retrieve executes the credential process command and returns the
|
||||
@ -166,7 +178,7 @@ func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
|
||||
}
|
||||
|
||||
// Serialize and validate response
|
||||
resp := &credentialProcessResponse{}
|
||||
resp := &CredentialProcessResponse{}
|
||||
if err = json.Unmarshal(out, resp); err != nil {
|
||||
return aws.Credentials{Source: ProviderName}, &ProviderError{
|
||||
Err: fmt.Errorf("parse failed of process output: %s, error: %w", out, err),
|
||||
|
88
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go
generated
vendored
88
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go
generated
vendored
@ -1,63 +1,71 @@
|
||||
// Package ssocreds provides a credential provider for retrieving temporary AWS credentials using an SSO access token.
|
||||
// Package ssocreds provides a credential provider for retrieving temporary AWS
|
||||
// credentials using an SSO access token.
|
||||
//
|
||||
// IMPORTANT: The provider in this package does not initiate or perform the AWS SSO login flow. The SDK provider
|
||||
// expects that you have already performed the SSO login flow using AWS CLI using the "aws sso login" command, or by
|
||||
// some other mechanism. The provider must find a valid non-expired access token for the AWS SSO user portal URL in
|
||||
// ~/.aws/sso/cache. If a cached token is not found, it is expired, or the file is malformed an error will be returned.
|
||||
// IMPORTANT: The provider in this package does not initiate or perform the AWS
|
||||
// SSO login flow. The SDK provider expects that you have already performed the
|
||||
// SSO login flow using AWS CLI using the "aws sso login" command, or by some
|
||||
// other mechanism. The provider must find a valid non-expired access token for
|
||||
// the AWS SSO user portal URL in ~/.aws/sso/cache. If a cached token is not
|
||||
// found, it is expired, or the file is malformed an error will be returned.
|
||||
//
|
||||
// Loading AWS SSO credentials with the AWS shared configuration file
|
||||
// # Loading AWS SSO credentials with the AWS shared configuration file
|
||||
//
|
||||
// You can use configure AWS SSO credentials from the AWS shared configuration file by
|
||||
// providing the specifying the required keys in the profile:
|
||||
//
|
||||
// sso_account_id
|
||||
// sso_region
|
||||
// sso_role_name
|
||||
// sso_start_url
|
||||
// sso_account_id
|
||||
// sso_region
|
||||
// sso_role_name
|
||||
// sso_start_url
|
||||
//
|
||||
// For example, the following defines a profile "devsso" and specifies the AWS SSO parameters that defines the target
|
||||
// account, role, sign-on portal, and the region where the user portal is located. Note: all SSO arguments must be
|
||||
// For example, the following defines a profile "devsso" and specifies the AWS
|
||||
// SSO parameters that defines the target account, role, sign-on portal, and
|
||||
// the region where the user portal is located. Note: all SSO arguments must be
|
||||
// provided, or an error will be returned.
|
||||
//
|
||||
// [profile devsso]
|
||||
// sso_start_url = https://my-sso-portal.awsapps.com/start
|
||||
// sso_role_name = SSOReadOnlyRole
|
||||
// sso_region = us-east-1
|
||||
// sso_account_id = 123456789012
|
||||
// [profile devsso]
|
||||
// sso_start_url = https://my-sso-portal.awsapps.com/start
|
||||
// sso_role_name = SSOReadOnlyRole
|
||||
// sso_region = us-east-1
|
||||
// sso_account_id = 123456789012
|
||||
//
|
||||
// Using the config module, you can load the AWS SDK shared configuration, and specify that this profile be used to
|
||||
// retrieve credentials. For example:
|
||||
// Using the config module, you can load the AWS SDK shared configuration, and
|
||||
// specify that this profile be used to retrieve credentials. For example:
|
||||
//
|
||||
// config, err := config.LoadDefaultConfig(context.TODO(), config.WithSharedConfigProfile("devsso"))
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// config, err := config.LoadDefaultConfig(context.TODO(), config.WithSharedConfigProfile("devsso"))
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
// Programmatically loading AWS SSO credentials directly
|
||||
// # Programmatically loading AWS SSO credentials directly
|
||||
//
|
||||
// You can programmatically construct the AWS SSO Provider in your application, and provide the necessary information
|
||||
// to load and retrieve temporary credentials using an access token from ~/.aws/sso/cache.
|
||||
// You can programmatically construct the AWS SSO Provider in your application,
|
||||
// and provide the necessary information to load and retrieve temporary
|
||||
// credentials using an access token from ~/.aws/sso/cache.
|
||||
//
|
||||
// client := sso.NewFromConfig(cfg)
|
||||
// client := sso.NewFromConfig(cfg)
|
||||
//
|
||||
// var provider aws.CredentialsProvider
|
||||
// provider = ssocreds.New(client, "123456789012", "SSOReadOnlyRole", "us-east-1", "https://my-sso-portal.awsapps.com/start")
|
||||
// var provider aws.CredentialsProvider
|
||||
// provider = ssocreds.New(client, "123456789012", "SSOReadOnlyRole", "us-east-1", "https://my-sso-portal.awsapps.com/start")
|
||||
//
|
||||
// // Wrap the provider with aws.CredentialsCache to cache the credentials until their expire time
|
||||
// provider = aws.NewCredentialsCache(provider)
|
||||
// // Wrap the provider with aws.CredentialsCache to cache the credentials until their expire time
|
||||
// provider = aws.NewCredentialsCache(provider)
|
||||
//
|
||||
// credentials, err := provider.Retrieve(context.TODO())
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// credentials, err := provider.Retrieve(context.TODO())
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
// It is important that you wrap the Provider with aws.CredentialsCache if you are programmatically constructing the
|
||||
// provider directly. This prevents your application from accessing the cached access token and requesting new
|
||||
// It is important that you wrap the Provider with aws.CredentialsCache if you
|
||||
// are programmatically constructing the provider directly. This prevents your
|
||||
// application from accessing the cached access token and requesting new
|
||||
// credentials each time the credentials are used.
|
||||
//
|
||||
// Additional Resources
|
||||
// # Additional Resources
|
||||
//
|
||||
// Configuring the AWS CLI to use AWS Single Sign-On: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
|
||||
// Configuring the AWS CLI to use AWS Single Sign-On:
|
||||
// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
|
||||
//
|
||||
// AWS Single Sign-On User Guide: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html
|
||||
// AWS Single Sign-On User Guide:
|
||||
// https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html
|
||||
package ssocreds
|
||||
|
10
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os.go
generated
vendored
10
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os.go
generated
vendored
@ -1,10 +0,0 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package ssocreds
|
||||
|
||||
import "os"
|
||||
|
||||
func getHomeDirectory() string {
|
||||
return os.Getenv("HOME")
|
||||
}
|
7
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os_windows.go
generated
vendored
7
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/os_windows.go
generated
vendored
@ -1,7 +0,0 @@
|
||||
package ssocreds
|
||||
|
||||
import "os"
|
||||
|
||||
func getHomeDirectory() string {
|
||||
return os.Getenv("USERPROFILE")
|
||||
}
|
184
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/provider.go
generated
vendored
184
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/provider.go
generated
vendored
@ -1,184 +0,0 @@
|
||||
package ssocreds
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/sha1"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sso"
|
||||
)
|
||||
|
||||
// ProviderName is the name of the provider used to specify the source of credentials.
|
||||
const ProviderName = "SSOProvider"
|
||||
|
||||
var defaultCacheLocation func() string
|
||||
|
||||
func defaultCacheLocationImpl() string {
|
||||
return filepath.Join(getHomeDirectory(), ".aws", "sso", "cache")
|
||||
}
|
||||
|
||||
func init() {
|
||||
defaultCacheLocation = defaultCacheLocationImpl
|
||||
}
|
||||
|
||||
// GetRoleCredentialsAPIClient is a API client that implements the GetRoleCredentials operation.
|
||||
type GetRoleCredentialsAPIClient interface {
|
||||
GetRoleCredentials(ctx context.Context, params *sso.GetRoleCredentialsInput, optFns ...func(*sso.Options)) (*sso.GetRoleCredentialsOutput, error)
|
||||
}
|
||||
|
||||
// Options is the Provider options structure.
|
||||
type Options struct {
|
||||
// The Client which is configured for the AWS Region where the AWS SSO user portal is located.
|
||||
Client GetRoleCredentialsAPIClient
|
||||
|
||||
// The AWS account that is assigned to the user.
|
||||
AccountID string
|
||||
|
||||
// The role name that is assigned to the user.
|
||||
RoleName string
|
||||
|
||||
// The URL that points to the organization's AWS Single Sign-On (AWS SSO) user portal.
|
||||
StartURL string
|
||||
}
|
||||
|
||||
// Provider is an AWS credential provider that retrieves temporary AWS credentials by exchanging an SSO login token.
|
||||
type Provider struct {
|
||||
options Options
|
||||
}
|
||||
|
||||
// New returns a new AWS Single Sign-On (AWS SSO) credential provider. The provided client is expected to be configured
|
||||
// for the AWS Region where the AWS SSO user portal is located.
|
||||
func New(client GetRoleCredentialsAPIClient, accountID, roleName, startURL string, optFns ...func(options *Options)) *Provider {
|
||||
options := Options{
|
||||
Client: client,
|
||||
AccountID: accountID,
|
||||
RoleName: roleName,
|
||||
StartURL: startURL,
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &Provider{
|
||||
options: options,
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal
|
||||
// by exchanging the accessToken present in ~/.aws/sso/cache.
|
||||
func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
|
||||
tokenFile, err := loadTokenFile(p.options.StartURL)
|
||||
if err != nil {
|
||||
return aws.Credentials{}, err
|
||||
}
|
||||
|
||||
output, err := p.options.Client.GetRoleCredentials(ctx, &sso.GetRoleCredentialsInput{
|
||||
AccessToken: &tokenFile.AccessToken,
|
||||
AccountId: &p.options.AccountID,
|
||||
RoleName: &p.options.RoleName,
|
||||
})
|
||||
if err != nil {
|
||||
return aws.Credentials{}, err
|
||||
}
|
||||
|
||||
return aws.Credentials{
|
||||
AccessKeyID: aws.ToString(output.RoleCredentials.AccessKeyId),
|
||||
SecretAccessKey: aws.ToString(output.RoleCredentials.SecretAccessKey),
|
||||
SessionToken: aws.ToString(output.RoleCredentials.SessionToken),
|
||||
Expires: time.Unix(0, output.RoleCredentials.Expiration*int64(time.Millisecond)).UTC(),
|
||||
CanExpire: true,
|
||||
Source: ProviderName,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func getCacheFileName(url string) (string, error) {
|
||||
hash := sha1.New()
|
||||
_, err := hash.Write([]byte(url))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json", nil
|
||||
}
|
||||
|
||||
type rfc3339 time.Time
|
||||
|
||||
func (r *rfc3339) UnmarshalJSON(bytes []byte) error {
|
||||
var value string
|
||||
|
||||
if err := json.Unmarshal(bytes, &value); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
parse, err := time.Parse(time.RFC3339, value)
|
||||
if err != nil {
|
||||
return fmt.Errorf("expected RFC3339 timestamp: %w", err)
|
||||
}
|
||||
|
||||
*r = rfc3339(parse)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type token struct {
|
||||
AccessToken string `json:"accessToken"`
|
||||
ExpiresAt rfc3339 `json:"expiresAt"`
|
||||
Region string `json:"region,omitempty"`
|
||||
StartURL string `json:"startUrl,omitempty"`
|
||||
}
|
||||
|
||||
func (t token) Expired() bool {
|
||||
return sdk.NowTime().Round(0).After(time.Time(t.ExpiresAt))
|
||||
}
|
||||
|
||||
// InvalidTokenError is the error type that is returned if loaded token has expired or is otherwise invalid.
|
||||
// To refresh the SSO session run aws sso login with the corresponding profile.
|
||||
type InvalidTokenError struct {
|
||||
Err error
|
||||
}
|
||||
|
||||
func (i *InvalidTokenError) Unwrap() error {
|
||||
return i.Err
|
||||
}
|
||||
|
||||
func (i *InvalidTokenError) Error() string {
|
||||
const msg = "the SSO session has expired or is invalid"
|
||||
if i.Err == nil {
|
||||
return msg
|
||||
}
|
||||
return msg + ": " + i.Err.Error()
|
||||
}
|
||||
|
||||
func loadTokenFile(startURL string) (t token, err error) {
|
||||
key, err := getCacheFileName(startURL)
|
||||
if err != nil {
|
||||
return token{}, &InvalidTokenError{Err: err}
|
||||
}
|
||||
|
||||
fileBytes, err := ioutil.ReadFile(filepath.Join(defaultCacheLocation(), key))
|
||||
if err != nil {
|
||||
return token{}, &InvalidTokenError{Err: err}
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(fileBytes, &t); err != nil {
|
||||
return token{}, &InvalidTokenError{Err: err}
|
||||
}
|
||||
|
||||
if len(t.AccessToken) == 0 {
|
||||
return token{}, &InvalidTokenError{}
|
||||
}
|
||||
|
||||
if t.Expired() {
|
||||
return token{}, &InvalidTokenError{Err: fmt.Errorf("access token is expired")}
|
||||
}
|
||||
|
||||
return t, nil
|
||||
}
|
233
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go
generated
vendored
Normal file
233
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go
generated
vendored
Normal file
@ -0,0 +1,233 @@
|
||||
package ssocreds
|
||||
|
||||
import (
|
||||
"crypto/sha1"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/shareddefaults"
|
||||
)
|
||||
|
||||
var osUserHomeDur = shareddefaults.UserHomeDir
|
||||
|
||||
// StandardCachedTokenFilepath returns the filepath for the cached SSO token file, or
|
||||
// error if unable get derive the path. Key that will be used to compute a SHA1
|
||||
// value that is hex encoded.
|
||||
//
|
||||
// Derives the filepath using the Key as:
|
||||
//
|
||||
// ~/.aws/sso/cache/<sha1-hex-encoded-key>.json
|
||||
func StandardCachedTokenFilepath(key string) (string, error) {
|
||||
homeDir := osUserHomeDur()
|
||||
if len(homeDir) == 0 {
|
||||
return "", fmt.Errorf("unable to get USER's home directory for cached token")
|
||||
}
|
||||
hash := sha1.New()
|
||||
if _, err := hash.Write([]byte(key)); err != nil {
|
||||
return "", fmt.Errorf("unable to compute cached token filepath key SHA1 hash, %w", err)
|
||||
}
|
||||
|
||||
cacheFilename := strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json"
|
||||
|
||||
return filepath.Join(homeDir, ".aws", "sso", "cache", cacheFilename), nil
|
||||
}
|
||||
|
||||
type tokenKnownFields struct {
|
||||
AccessToken string `json:"accessToken,omitempty"`
|
||||
ExpiresAt *rfc3339 `json:"expiresAt,omitempty"`
|
||||
|
||||
RefreshToken string `json:"refreshToken,omitempty"`
|
||||
ClientID string `json:"clientId,omitempty"`
|
||||
ClientSecret string `json:"clientSecret,omitempty"`
|
||||
}
|
||||
|
||||
type token struct {
|
||||
tokenKnownFields
|
||||
UnknownFields map[string]interface{} `json:"-"`
|
||||
}
|
||||
|
||||
func (t token) MarshalJSON() ([]byte, error) {
|
||||
fields := map[string]interface{}{}
|
||||
|
||||
setTokenFieldString(fields, "accessToken", t.AccessToken)
|
||||
setTokenFieldRFC3339(fields, "expiresAt", t.ExpiresAt)
|
||||
|
||||
setTokenFieldString(fields, "refreshToken", t.RefreshToken)
|
||||
setTokenFieldString(fields, "clientId", t.ClientID)
|
||||
setTokenFieldString(fields, "clientSecret", t.ClientSecret)
|
||||
|
||||
for k, v := range t.UnknownFields {
|
||||
if _, ok := fields[k]; ok {
|
||||
return nil, fmt.Errorf("unknown token field %v, duplicates known field", k)
|
||||
}
|
||||
fields[k] = v
|
||||
}
|
||||
|
||||
return json.Marshal(fields)
|
||||
}
|
||||
|
||||
func setTokenFieldString(fields map[string]interface{}, key, value string) {
|
||||
if value == "" {
|
||||
return
|
||||
}
|
||||
fields[key] = value
|
||||
}
|
||||
func setTokenFieldRFC3339(fields map[string]interface{}, key string, value *rfc3339) {
|
||||
if value == nil {
|
||||
return
|
||||
}
|
||||
fields[key] = value
|
||||
}
|
||||
|
||||
func (t *token) UnmarshalJSON(b []byte) error {
|
||||
var fields map[string]interface{}
|
||||
if err := json.Unmarshal(b, &fields); err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
t.UnknownFields = map[string]interface{}{}
|
||||
|
||||
for k, v := range fields {
|
||||
var err error
|
||||
switch k {
|
||||
case "accessToken":
|
||||
err = getTokenFieldString(v, &t.AccessToken)
|
||||
case "expiresAt":
|
||||
err = getTokenFieldRFC3339(v, &t.ExpiresAt)
|
||||
case "refreshToken":
|
||||
err = getTokenFieldString(v, &t.RefreshToken)
|
||||
case "clientId":
|
||||
err = getTokenFieldString(v, &t.ClientID)
|
||||
case "clientSecret":
|
||||
err = getTokenFieldString(v, &t.ClientSecret)
|
||||
default:
|
||||
t.UnknownFields[k] = v
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("field %q, %w", k, err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func getTokenFieldString(v interface{}, value *string) error {
|
||||
var ok bool
|
||||
*value, ok = v.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("expect value to be string, got %T", v)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func getTokenFieldRFC3339(v interface{}, value **rfc3339) error {
|
||||
var stringValue string
|
||||
if err := getTokenFieldString(v, &stringValue); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
timeValue, err := parseRFC3339(stringValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*value = &timeValue
|
||||
return nil
|
||||
}
|
||||
|
||||
func loadCachedToken(filename string) (token, error) {
|
||||
fileBytes, err := ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
return token{}, fmt.Errorf("failed to read cached SSO token file, %w", err)
|
||||
}
|
||||
|
||||
var t token
|
||||
if err := json.Unmarshal(fileBytes, &t); err != nil {
|
||||
return token{}, fmt.Errorf("failed to parse cached SSO token file, %w", err)
|
||||
}
|
||||
|
||||
if len(t.AccessToken) == 0 || t.ExpiresAt == nil || time.Time(*t.ExpiresAt).IsZero() {
|
||||
return token{}, fmt.Errorf(
|
||||
"cached SSO token must contain accessToken and expiresAt fields")
|
||||
}
|
||||
|
||||
return t, nil
|
||||
}
|
||||
|
||||
func storeCachedToken(filename string, t token, fileMode os.FileMode) (err error) {
|
||||
tmpFilename := filename + ".tmp-" + strconv.FormatInt(sdk.NowTime().UnixNano(), 10)
|
||||
if err := writeCacheFile(tmpFilename, fileMode, t); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := os.Rename(tmpFilename, filename); err != nil {
|
||||
return fmt.Errorf("failed to replace old cached SSO token file, %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func writeCacheFile(filename string, fileMode os.FileMode, t token) (err error) {
|
||||
var f *os.File
|
||||
f, err = os.OpenFile(filename, os.O_CREATE|os.O_TRUNC|os.O_RDWR, fileMode)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create cached SSO token file %w", err)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
closeErr := f.Close()
|
||||
if err == nil && closeErr != nil {
|
||||
err = fmt.Errorf("failed to close cached SSO token file, %w", closeErr)
|
||||
}
|
||||
}()
|
||||
|
||||
encoder := json.NewEncoder(f)
|
||||
|
||||
if err = encoder.Encode(t); err != nil {
|
||||
return fmt.Errorf("failed to serialize cached SSO token, %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type rfc3339 time.Time
|
||||
|
||||
func parseRFC3339(v string) (rfc3339, error) {
|
||||
parsed, err := time.Parse(time.RFC3339, v)
|
||||
if err != nil {
|
||||
return rfc3339{}, fmt.Errorf("expected RFC3339 timestamp: %w", err)
|
||||
}
|
||||
|
||||
return rfc3339(parsed), nil
|
||||
}
|
||||
|
||||
func (r *rfc3339) UnmarshalJSON(bytes []byte) (err error) {
|
||||
var value string
|
||||
|
||||
// Use JSON unmarshal to unescape the quoted value making use of JSON's
|
||||
// unquoting rules.
|
||||
if err = json.Unmarshal(bytes, &value); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*r, err = parseRFC3339(value)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *rfc3339) MarshalJSON() ([]byte, error) {
|
||||
value := time.Time(*r).Format(time.RFC3339)
|
||||
|
||||
// Use JSON unmarshal to unescape the quoted value making use of JSON's
|
||||
// quoting rules.
|
||||
return json.Marshal(value)
|
||||
}
|
152
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go
generated
vendored
Normal file
152
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go
generated
vendored
Normal file
@ -0,0 +1,152 @@
|
||||
package ssocreds
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
"github.com/aws/aws-sdk-go-v2/service/sso"
|
||||
)
|
||||
|
||||
// ProviderName is the name of the provider used to specify the source of
|
||||
// credentials.
|
||||
const ProviderName = "SSOProvider"
|
||||
|
||||
// GetRoleCredentialsAPIClient is a API client that implements the
|
||||
// GetRoleCredentials operation.
|
||||
type GetRoleCredentialsAPIClient interface {
|
||||
GetRoleCredentials(context.Context, *sso.GetRoleCredentialsInput, ...func(*sso.Options)) (
|
||||
*sso.GetRoleCredentialsOutput, error,
|
||||
)
|
||||
}
|
||||
|
||||
// Options is the Provider options structure.
|
||||
type Options struct {
|
||||
// The Client which is configured for the AWS Region where the AWS SSO user
|
||||
// portal is located.
|
||||
Client GetRoleCredentialsAPIClient
|
||||
|
||||
// The AWS account that is assigned to the user.
|
||||
AccountID string
|
||||
|
||||
// The role name that is assigned to the user.
|
||||
RoleName string
|
||||
|
||||
// The URL that points to the organization's AWS Single Sign-On (AWS SSO)
|
||||
// user portal.
|
||||
StartURL string
|
||||
|
||||
// The filepath the cached token will be retrieved from. If unset Provider will
|
||||
// use the startURL to determine the filepath at.
|
||||
//
|
||||
// ~/.aws/sso/cache/<sha1-hex-encoded-startURL>.json
|
||||
//
|
||||
// If custom cached token filepath is used, the Provider's startUrl
|
||||
// parameter will be ignored.
|
||||
CachedTokenFilepath string
|
||||
|
||||
// Used by the SSOCredentialProvider if a token configuration
|
||||
// profile is used in the shared config
|
||||
SSOTokenProvider *SSOTokenProvider
|
||||
}
|
||||
|
||||
// Provider is an AWS credential provider that retrieves temporary AWS
|
||||
// credentials by exchanging an SSO login token.
|
||||
type Provider struct {
|
||||
options Options
|
||||
|
||||
cachedTokenFilepath string
|
||||
}
|
||||
|
||||
// New returns a new AWS Single Sign-On (AWS SSO) credential provider. The
|
||||
// provided client is expected to be configured for the AWS Region where the
|
||||
// AWS SSO user portal is located.
|
||||
func New(client GetRoleCredentialsAPIClient, accountID, roleName, startURL string, optFns ...func(options *Options)) *Provider {
|
||||
options := Options{
|
||||
Client: client,
|
||||
AccountID: accountID,
|
||||
RoleName: roleName,
|
||||
StartURL: startURL,
|
||||
}
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
return &Provider{
|
||||
options: options,
|
||||
cachedTokenFilepath: options.CachedTokenFilepath,
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve retrieves temporary AWS credentials from the configured Amazon
|
||||
// Single Sign-On (AWS SSO) user portal by exchanging the accessToken present
|
||||
// in ~/.aws/sso/cache. However, if a token provider configuration exists
|
||||
// in the shared config, then we ought to use the token provider rather then
|
||||
// direct access on the cached token.
|
||||
func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) {
|
||||
var accessToken *string
|
||||
if p.options.SSOTokenProvider != nil {
|
||||
token, err := p.options.SSOTokenProvider.RetrieveBearerToken(ctx)
|
||||
if err != nil {
|
||||
return aws.Credentials{}, err
|
||||
}
|
||||
accessToken = &token.Value
|
||||
} else {
|
||||
if p.cachedTokenFilepath == "" {
|
||||
cachedTokenFilepath, err := StandardCachedTokenFilepath(p.options.StartURL)
|
||||
if err != nil {
|
||||
return aws.Credentials{}, &InvalidTokenError{Err: err}
|
||||
}
|
||||
p.cachedTokenFilepath = cachedTokenFilepath
|
||||
}
|
||||
|
||||
tokenFile, err := loadCachedToken(p.cachedTokenFilepath)
|
||||
if err != nil {
|
||||
return aws.Credentials{}, &InvalidTokenError{Err: err}
|
||||
}
|
||||
|
||||
if tokenFile.ExpiresAt == nil || sdk.NowTime().After(time.Time(*tokenFile.ExpiresAt)) {
|
||||
return aws.Credentials{}, &InvalidTokenError{}
|
||||
}
|
||||
accessToken = &tokenFile.AccessToken
|
||||
}
|
||||
|
||||
output, err := p.options.Client.GetRoleCredentials(ctx, &sso.GetRoleCredentialsInput{
|
||||
AccessToken: accessToken,
|
||||
AccountId: &p.options.AccountID,
|
||||
RoleName: &p.options.RoleName,
|
||||
})
|
||||
if err != nil {
|
||||
return aws.Credentials{}, err
|
||||
}
|
||||
|
||||
return aws.Credentials{
|
||||
AccessKeyID: aws.ToString(output.RoleCredentials.AccessKeyId),
|
||||
SecretAccessKey: aws.ToString(output.RoleCredentials.SecretAccessKey),
|
||||
SessionToken: aws.ToString(output.RoleCredentials.SessionToken),
|
||||
CanExpire: true,
|
||||
Expires: time.Unix(0, output.RoleCredentials.Expiration*int64(time.Millisecond)).UTC(),
|
||||
Source: ProviderName,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// InvalidTokenError is the error type that is returned if loaded token has
|
||||
// expired or is otherwise invalid. To refresh the SSO session run AWS SSO
|
||||
// login with the corresponding profile.
|
||||
type InvalidTokenError struct {
|
||||
Err error
|
||||
}
|
||||
|
||||
func (i *InvalidTokenError) Unwrap() error {
|
||||
return i.Err
|
||||
}
|
||||
|
||||
func (i *InvalidTokenError) Error() string {
|
||||
const msg = "the SSO session has expired or is invalid"
|
||||
if i.Err == nil {
|
||||
return msg
|
||||
}
|
||||
return msg + ": " + i.Err.Error()
|
||||
}
|
147
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go
generated
vendored
Normal file
147
vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go
generated
vendored
Normal file
@ -0,0 +1,147 @@
|
||||
package ssocreds
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/internal/sdk"
|
||||
"github.com/aws/aws-sdk-go-v2/service/ssooidc"
|
||||
"github.com/aws/smithy-go/auth/bearer"
|
||||
)
|
||||
|
||||
// CreateTokenAPIClient provides the interface for the SSOTokenProvider's API
|
||||
// client for calling CreateToken operation to refresh the SSO token.
|
||||
type CreateTokenAPIClient interface {
|
||||
CreateToken(context.Context, *ssooidc.CreateTokenInput, ...func(*ssooidc.Options)) (
|
||||
*ssooidc.CreateTokenOutput, error,
|
||||
)
|
||||
}
|
||||
|
||||
// SSOTokenProviderOptions provides the options for configuring the
|
||||
// SSOTokenProvider.
|
||||
type SSOTokenProviderOptions struct {
|
||||
// Client that can be overridden
|
||||
Client CreateTokenAPIClient
|
||||
|
||||
// The set of API Client options to be applied when invoking the
|
||||
// CreateToken operation.
|
||||
ClientOptions []func(*ssooidc.Options)
|
||||
|
||||
// The path the file containing the cached SSO token will be read from.
|
||||
// Initialized the NewSSOTokenProvider's cachedTokenFilepath parameter.
|
||||
CachedTokenFilepath string
|
||||
}
|
||||
|
||||
// SSOTokenProvider provides an utility for refreshing SSO AccessTokens for
|
||||
// Bearer Authentication. The SSOTokenProvider can only be used to refresh
|
||||
// already cached SSO Tokens. This utility cannot perform the initial SSO
|
||||
// create token.
|
||||
//
|
||||
// The SSOTokenProvider is not safe to use concurrently. It must be wrapped in
|
||||
// a utility such as smithy-go's auth/bearer#TokenCache. The SDK's
|
||||
// config.LoadDefaultConfig will automatically wrap the SSOTokenProvider with
|
||||
// the smithy-go TokenCache, if the external configuration loaded configured
|
||||
// for an SSO session.
|
||||
//
|
||||
// The initial SSO create token should be preformed with the AWS CLI before the
|
||||
// Go application using the SSOTokenProvider will need to retrieve the SSO
|
||||
// token. If the AWS CLI has not created the token cache file, this provider
|
||||
// will return an error when attempting to retrieve the cached token.
|
||||
//
|
||||
// This provider will attempt to refresh the cached SSO token periodically if
|
||||
// needed when RetrieveBearerToken is called.
|
||||
//
|
||||
// A utility such as the AWS CLI must be used to initially create the SSO
|
||||
// session and cached token file.
|
||||
// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
|
||||
type SSOTokenProvider struct {
|
||||
options SSOTokenProviderOptions
|
||||
}
|
||||
|
||||
var _ bearer.TokenProvider = (*SSOTokenProvider)(nil)
|
||||
|
||||
// NewSSOTokenProvider returns an initialized SSOTokenProvider that will
|
||||
// periodically refresh the SSO token cached stored in the cachedTokenFilepath.
|
||||
// The cachedTokenFilepath file's content will be rewritten by the token
|
||||
// provider when the token is refreshed.
|
||||
//
|
||||
// The client must be configured for the AWS region the SSO token was created for.
|
||||
func NewSSOTokenProvider(client CreateTokenAPIClient, cachedTokenFilepath string, optFns ...func(o *SSOTokenProviderOptions)) *SSOTokenProvider {
|
||||
options := SSOTokenProviderOptions{
|
||||
Client: client,
|
||||
CachedTokenFilepath: cachedTokenFilepath,
|
||||
}
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
provider := &SSOTokenProvider{
|
||||
options: options,
|
||||
}
|
||||
|
||||
return provider
|
||||
}
|
||||
|
||||
// RetrieveBearerToken returns the SSO token stored in the cachedTokenFilepath
|
||||
// the SSOTokenProvider was created with. If the token has expired
|
||||
// RetrieveBearerToken will attempt to refresh it. If the token cannot be
|
||||
// refreshed or is not present an error will be returned.
|
||||
//
|
||||
// A utility such as the AWS CLI must be used to initially create the SSO
|
||||
// session and cached token file. https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
|
||||
func (p SSOTokenProvider) RetrieveBearerToken(ctx context.Context) (bearer.Token, error) {
|
||||
cachedToken, err := loadCachedToken(p.options.CachedTokenFilepath)
|
||||
if err != nil {
|
||||
return bearer.Token{}, err
|
||||
}
|
||||
|
||||
if cachedToken.ExpiresAt != nil && sdk.NowTime().After(time.Time(*cachedToken.ExpiresAt)) {
|
||||
cachedToken, err = p.refreshToken(ctx, cachedToken)
|
||||
if err != nil {
|
||||
return bearer.Token{}, fmt.Errorf("refresh cached SSO token failed, %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
expiresAt := aws.ToTime((*time.Time)(cachedToken.ExpiresAt))
|
||||
return bearer.Token{
|
||||
Value: cachedToken.AccessToken,
|
||||
CanExpire: !expiresAt.IsZero(),
|
||||
Expires: expiresAt,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (p SSOTokenProvider) refreshToken(ctx context.Context, cachedToken token) (token, error) {
|
||||
if cachedToken.ClientSecret == "" || cachedToken.ClientID == "" || cachedToken.RefreshToken == "" {
|
||||
return token{}, fmt.Errorf("cached SSO token is expired, or not present, and cannot be refreshed")
|
||||
}
|
||||
|
||||
createResult, err := p.options.Client.CreateToken(ctx, &ssooidc.CreateTokenInput{
|
||||
ClientId: &cachedToken.ClientID,
|
||||
ClientSecret: &cachedToken.ClientSecret,
|
||||
RefreshToken: &cachedToken.RefreshToken,
|
||||
GrantType: aws.String("refresh_token"),
|
||||
}, p.options.ClientOptions...)
|
||||
if err != nil {
|
||||
return token{}, fmt.Errorf("unable to refresh SSO token, %w", err)
|
||||
}
|
||||
|
||||
expiresAt := sdk.NowTime().Add(time.Duration(createResult.ExpiresIn) * time.Second)
|
||||
|
||||
cachedToken.AccessToken = aws.ToString(createResult.AccessToken)
|
||||
cachedToken.ExpiresAt = (*rfc3339)(&expiresAt)
|
||||
cachedToken.RefreshToken = aws.ToString(createResult.RefreshToken)
|
||||
|
||||
fileInfo, err := os.Stat(p.options.CachedTokenFilepath)
|
||||
if err != nil {
|
||||
return token{}, fmt.Errorf("failed to stat cached SSO token file %w", err)
|
||||
}
|
||||
|
||||
if err = storeCachedToken(p.options.CachedTokenFilepath, cachedToken, fileInfo.Mode()); err != nil {
|
||||
return token{}, fmt.Errorf("unable to cache refreshed SSO token, %w", err)
|
||||
}
|
||||
|
||||
return cachedToken, nil
|
||||
}
|
98
vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go
generated
vendored
98
vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go
generated
vendored
@ -8,31 +8,31 @@
|
||||
// ensure synchronous usage of the AssumeRoleProvider if the value is shared
|
||||
// between multiple Credentials or service clients.
|
||||
//
|
||||
// Assume Role
|
||||
// # Assume Role
|
||||
//
|
||||
// To assume an IAM role using STS with the SDK you can create a new Credentials
|
||||
// with the SDKs's stscreds package.
|
||||
//
|
||||
// // Initial credentials loaded from SDK's default credential chain. Such as
|
||||
// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
|
||||
// // Role. These credentials will be used to to make the STS Assume Role API.
|
||||
// cfg, err := config.LoadDefaultConfig(context.TODO())
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
// // Initial credentials loaded from SDK's default credential chain. Such as
|
||||
// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
|
||||
// // Role. These credentials will be used to to make the STS Assume Role API.
|
||||
// cfg, err := config.LoadDefaultConfig(context.TODO())
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
//
|
||||
// // Create the credentials from AssumeRoleProvider to assume the role
|
||||
// // referenced by the "myRoleARN" ARN.
|
||||
// stsSvc := sts.NewFromConfig(cfg)
|
||||
// creds := stscreds.NewAssumeRoleProvider(stsSvc, "myRoleArn")
|
||||
// // Create the credentials from AssumeRoleProvider to assume the role
|
||||
// // referenced by the "myRoleARN" ARN.
|
||||
// stsSvc := sts.NewFromConfig(cfg)
|
||||
// creds := stscreds.NewAssumeRoleProvider(stsSvc, "myRoleArn")
|
||||
//
|
||||
// cfg.Credentials = aws.NewCredentialsCache(creds)
|
||||
// cfg.Credentials = aws.NewCredentialsCache(creds)
|
||||
//
|
||||
// // Create service client value configured for credentials
|
||||
// // from assumed role.
|
||||
// svc := s3.NewFromConfig(cfg)
|
||||
// // Create service client value configured for credentials
|
||||
// // from assumed role.
|
||||
// svc := s3.NewFromConfig(cfg)
|
||||
//
|
||||
// Assume Role with custom MFA Token provider
|
||||
// # Assume Role with custom MFA Token provider
|
||||
//
|
||||
// To assume an IAM role with a MFA token you can either specify a custom MFA
|
||||
// token provider or use the SDK's built in StdinTokenProvider that will prompt
|
||||
@ -43,29 +43,29 @@
|
||||
// With a custom token provider, the provider is responsible for refreshing the
|
||||
// token code when called.
|
||||
//
|
||||
// cfg, err := config.LoadDefaultConfig(context.TODO())
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
// cfg, err := config.LoadDefaultConfig(context.TODO())
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
//
|
||||
// staticTokenProvider := func() (string, error) {
|
||||
// return someTokenCode, nil
|
||||
// }
|
||||
// staticTokenProvider := func() (string, error) {
|
||||
// return someTokenCode, nil
|
||||
// }
|
||||
//
|
||||
// // Create the credentials from AssumeRoleProvider to assume the role
|
||||
// // referenced by the "myRoleARN" ARN using the MFA token code provided.
|
||||
// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
|
||||
// o.SerialNumber = aws.String("myTokenSerialNumber")
|
||||
// o.TokenProvider = staticTokenProvider
|
||||
// })
|
||||
// // Create the credentials from AssumeRoleProvider to assume the role
|
||||
// // referenced by the "myRoleARN" ARN using the MFA token code provided.
|
||||
// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
|
||||
// o.SerialNumber = aws.String("myTokenSerialNumber")
|
||||
// o.TokenProvider = staticTokenProvider
|
||||
// })
|
||||
//
|
||||
// cfg.Credentials = aws.NewCredentialsCache(creds)
|
||||
// cfg.Credentials = aws.NewCredentialsCache(creds)
|
||||
//
|
||||
// // Create service client value configured for credentials
|
||||
// // from assumed role.
|
||||
// svc := s3.NewFromConfig(cfg)
|
||||
// // Create service client value configured for credentials
|
||||
// // from assumed role.
|
||||
// svc := s3.NewFromConfig(cfg)
|
||||
//
|
||||
// Assume Role with MFA Token Provider
|
||||
// # Assume Role with MFA Token Provider
|
||||
//
|
||||
// To assume an IAM role with MFA for longer running tasks where the credentials
|
||||
// may need to be refreshed setting the TokenProvider field of AssumeRoleProvider
|
||||
@ -80,23 +80,23 @@
|
||||
// have undesirable results as the StdinTokenProvider will not be synchronized. A
|
||||
// single Credentials with an AssumeRoleProvider can be shared safely.
|
||||
//
|
||||
// cfg, err := config.LoadDefaultConfig(context.TODO())
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
// cfg, err := config.LoadDefaultConfig(context.TODO())
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
//
|
||||
// // Create the credentials from AssumeRoleProvider to assume the role
|
||||
// // referenced by the "myRoleARN" ARN using the MFA token code provided.
|
||||
// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
|
||||
// o.SerialNumber = aws.String("myTokenSerialNumber")
|
||||
// o.TokenProvider = stscreds.StdinTokenProvider
|
||||
// })
|
||||
// // Create the credentials from AssumeRoleProvider to assume the role
|
||||
// // referenced by the "myRoleARN" ARN using the MFA token code provided.
|
||||
// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) {
|
||||
// o.SerialNumber = aws.String("myTokenSerialNumber")
|
||||
// o.TokenProvider = stscreds.StdinTokenProvider
|
||||
// })
|
||||
//
|
||||
// cfg.Credentials = aws.NewCredentialsCache(creds)
|
||||
// cfg.Credentials = aws.NewCredentialsCache(creds)
|
||||
//
|
||||
// // Create service client value configured for credentials
|
||||
// // from assumed role.
|
||||
// svc := s3.NewFromConfig(cfg)
|
||||
// // Create service client value configured for credentials
|
||||
// // from assumed role.
|
||||
// svc := s3.NewFromConfig(cfg)
|
||||
package stscreds
|
||||
|
||||
import (
|
||||
|
6
vendor/github.com/aws/aws-sdk-go-v2/doc.go
generated
vendored
6
vendor/github.com/aws/aws-sdk-go-v2/doc.go
generated
vendored
@ -2,16 +2,16 @@
|
||||
//
|
||||
// aws-sdk-go-v2 is the the v2 of the AWS SDK for the Go programming language.
|
||||
//
|
||||
// Getting started
|
||||
// # Getting started
|
||||
//
|
||||
// The best way to get started working with the SDK is to use `go get` to add the
|
||||
// SDK and desired service clients to your Go dependencies explicitly.
|
||||
//
|
||||
// go get github.com/aws/aws-sdk-go-v2
|
||||
// go get github.com/aws/aws-sdk-go-v2
|
||||
// go get github.com/aws/aws-sdk-go-v2/config
|
||||
// go get github.com/aws/aws-sdk-go-v2/service/dynamodb
|
||||
//
|
||||
// Hello AWS
|
||||
// # Hello AWS
|
||||
//
|
||||
// This example shows how you can use the v2 SDK to make an API request using the
|
||||
// SDK's Amazon DynamoDB client.
|
||||
|
81
vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
generated
vendored
81
vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md
generated
vendored
@ -1,3 +1,84 @@
|
||||
# v1.12.24 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.23 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.22 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.21 (2022-12-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.20 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.19 (2022-10-24)
|
||||
|
||||
* **Bug Fix**: Fixes an issue that prevented logging of the API request or responses when the respective log modes were enabled.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.18 (2022-10-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.17 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.16 (2022-09-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.15 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.14 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.13 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.12 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.11 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.10 (2022-08-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.9 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.8 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.7 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.6 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.5 (2022-05-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.4 (2022-04-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
6
vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go
generated
vendored
6
vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go
generated
vendored
@ -106,8 +106,10 @@ func New(options Options, optFns ...func(*Options)) *Client {
|
||||
// or adding custom middleware behavior.
|
||||
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
||||
opts := Options{
|
||||
APIOptions: append([]func(*middleware.Stack) error{}, cfg.APIOptions...),
|
||||
HTTPClient: cfg.HTTPClient,
|
||||
APIOptions: append([]func(*middleware.Stack) error{}, cfg.APIOptions...),
|
||||
HTTPClient: cfg.HTTPClient,
|
||||
ClientLogMode: cfg.ClientLogMode,
|
||||
Logger: cfg.Logger,
|
||||
}
|
||||
|
||||
if cfg.Retryer != nil {
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package imds
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.12.4"
|
||||
const goModuleVersion = "1.12.24"
|
||||
|
19
vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go
generated
vendored
19
vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go
generated
vendored
@ -86,6 +86,21 @@ func addRequestMiddleware(stack *middleware.Stack,
|
||||
return err
|
||||
}
|
||||
|
||||
err = stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
|
||||
LogRequest: options.ClientLogMode.IsRequest(),
|
||||
LogRequestWithBody: options.ClientLogMode.IsRequestWithBody(),
|
||||
LogResponse: options.ClientLogMode.IsResponse(),
|
||||
LogResponseWithBody: options.ClientLogMode.IsResponseWithBody(),
|
||||
}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = addSetLoggerMiddleware(stack, options)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Retry support
|
||||
return retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{
|
||||
Retryer: options.Retryer,
|
||||
@ -93,6 +108,10 @@ func addRequestMiddleware(stack *middleware.Stack,
|
||||
})
|
||||
}
|
||||
|
||||
func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
|
||||
return middleware.AddSetLoggerMiddleware(stack, o.Logger)
|
||||
}
|
||||
|
||||
type serializeRequest struct {
|
||||
GetPath func(interface{}) (string, error)
|
||||
Method string
|
||||
|
80
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
generated
vendored
80
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md
generated
vendored
@ -1,3 +1,83 @@
|
||||
# v1.1.30 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.29 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.28 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.27 (2022-12-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.26 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.25 (2022-10-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.24 (2022-10-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.23 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.22 (2022-09-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.21 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.20 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.19 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.18 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.17 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.16 (2022-08-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.15 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.14 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.13 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.12 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.11 (2022-05-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.1.10 (2022-04-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package configsources
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.1.10"
|
||||
const goModuleVersion = "1.1.30"
|
||||
|
80
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
generated
vendored
80
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md
generated
vendored
@ -1,3 +1,83 @@
|
||||
# v2.4.24 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.23 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.22 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.21 (2022-12-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.20 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.19 (2022-10-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.18 (2022-10-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.17 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.16 (2022-09-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.15 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.14 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.13 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.12 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.11 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.10 (2022-08-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.9 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.8 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.7 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.6 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.5 (2022-05-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v2.4.4 (2022-04-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package endpoints
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "2.4.4"
|
||||
const goModuleVersion = "2.4.24"
|
||||
|
81
vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
generated
vendored
81
vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md
generated
vendored
@ -1,3 +1,84 @@
|
||||
# v1.3.31 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.30 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.29 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.28 (2022-12-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.27 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.26 (2022-10-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.25 (2022-10-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.24 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.23 (2022-09-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.22 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.21 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.20 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.19 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.18 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.17 (2022-08-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.16 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.15 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.14 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.13 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.12 (2022-05-17)
|
||||
|
||||
* **Bug Fix**: Removes the fuzz testing files from the module, as they are invalid and not used.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.11 (2022-04-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
45
vendor/github.com/aws/aws-sdk-go-v2/internal/ini/doc.go
generated
vendored
45
vendor/github.com/aws/aws-sdk-go-v2/internal/ini/doc.go
generated
vendored
@ -13,30 +13,31 @@
|
||||
// }
|
||||
//
|
||||
// Below is the BNF that describes this parser
|
||||
// Grammar:
|
||||
// stmt -> section | stmt'
|
||||
// stmt' -> epsilon | expr
|
||||
// expr -> value (stmt)* | equal_expr (stmt)*
|
||||
// equal_expr -> value ( ':' | '=' ) equal_expr'
|
||||
// equal_expr' -> number | string | quoted_string
|
||||
// quoted_string -> " quoted_string'
|
||||
// quoted_string' -> string quoted_string_end
|
||||
// quoted_string_end -> "
|
||||
//
|
||||
// section -> [ section'
|
||||
// section' -> section_value section_close
|
||||
// section_value -> number | string_subset | boolean | quoted_string_subset
|
||||
// quoted_string_subset -> " quoted_string_subset'
|
||||
// quoted_string_subset' -> string_subset quoted_string_end
|
||||
// quoted_string_subset -> "
|
||||
// section_close -> ]
|
||||
// Grammar:
|
||||
// stmt -> section | stmt'
|
||||
// stmt' -> epsilon | expr
|
||||
// expr -> value (stmt)* | equal_expr (stmt)*
|
||||
// equal_expr -> value ( ':' | '=' ) equal_expr'
|
||||
// equal_expr' -> number | string | quoted_string
|
||||
// quoted_string -> " quoted_string'
|
||||
// quoted_string' -> string quoted_string_end
|
||||
// quoted_string_end -> "
|
||||
//
|
||||
// value -> number | string_subset | boolean
|
||||
// string -> ? UTF-8 Code-Points except '\n' (U+000A) and '\r\n' (U+000D U+000A) ?
|
||||
// string_subset -> ? Code-points excepted by <string> grammar except ':' (U+003A), '=' (U+003D), '[' (U+005B), and ']' (U+005D) ?
|
||||
// section -> [ section'
|
||||
// section' -> section_value section_close
|
||||
// section_value -> number | string_subset | boolean | quoted_string_subset
|
||||
// quoted_string_subset -> " quoted_string_subset'
|
||||
// quoted_string_subset' -> string_subset quoted_string_end
|
||||
// quoted_string_subset -> "
|
||||
// section_close -> ]
|
||||
//
|
||||
// SkipState will skip (NL WS)+
|
||||
// value -> number | string_subset | boolean
|
||||
// string -> ? UTF-8 Code-Points except '\n' (U+000A) and '\r\n' (U+000D U+000A) ?
|
||||
// string_subset -> ? Code-points excepted by <string> grammar except ':' (U+003A), '=' (U+003D), '[' (U+005B), and ']' (U+005D) ?
|
||||
//
|
||||
// comment -> # comment' | ; comment'
|
||||
// comment' -> epsilon | value
|
||||
// SkipState will skip (NL WS)+
|
||||
//
|
||||
// comment -> # comment' | ; comment'
|
||||
// comment' -> epsilon | value
|
||||
package ini
|
||||
|
18
vendor/github.com/aws/aws-sdk-go-v2/internal/ini/fuzz.go
generated
vendored
18
vendor/github.com/aws/aws-sdk-go-v2/internal/ini/fuzz.go
generated
vendored
@ -1,18 +0,0 @@
|
||||
//go:build gofuzz
|
||||
// +build gofuzz
|
||||
|
||||
package ini
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
)
|
||||
|
||||
func Fuzz(data []byte) int {
|
||||
b := bytes.NewReader(data)
|
||||
|
||||
if _, err := Parse(b); err != nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
return 1
|
||||
}
|
2
vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package ini
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.3.11"
|
||||
const goModuleVersion = "1.3.31"
|
||||
|
47
vendor/github.com/aws/aws-sdk-go-v2/internal/shareddefaults/shared_config.go
generated
vendored
Normal file
47
vendor/github.com/aws/aws-sdk-go-v2/internal/shareddefaults/shared_config.go
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
package shareddefaults
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// SharedCredentialsFilename returns the SDK's default file path
|
||||
// for the shared credentials file.
|
||||
//
|
||||
// Builds the shared config file path based on the OS's platform.
|
||||
//
|
||||
// - Linux/Unix: $HOME/.aws/credentials
|
||||
// - Windows: %USERPROFILE%\.aws\credentials
|
||||
func SharedCredentialsFilename() string {
|
||||
return filepath.Join(UserHomeDir(), ".aws", "credentials")
|
||||
}
|
||||
|
||||
// SharedConfigFilename returns the SDK's default file path for
|
||||
// the shared config file.
|
||||
//
|
||||
// Builds the shared config file path based on the OS's platform.
|
||||
//
|
||||
// - Linux/Unix: $HOME/.aws/config
|
||||
// - Windows: %USERPROFILE%\.aws\config
|
||||
func SharedConfigFilename() string {
|
||||
return filepath.Join(UserHomeDir(), ".aws", "config")
|
||||
}
|
||||
|
||||
// UserHomeDir returns the home directory for the user the process is
|
||||
// running under.
|
||||
func UserHomeDir() string {
|
||||
// Ignore errors since we only care about Windows and *nix.
|
||||
home, _ := os.UserHomeDir()
|
||||
|
||||
if len(home) > 0 {
|
||||
return home
|
||||
}
|
||||
|
||||
currUser, _ := user.Current()
|
||||
if currUser != nil {
|
||||
home = currUser.HomeDir
|
||||
}
|
||||
|
||||
return home
|
||||
}
|
10
vendor/github.com/aws/aws-sdk-go-v2/modman.toml
generated
vendored
10
vendor/github.com/aws/aws-sdk-go-v2/modman.toml
generated
vendored
@ -1,15 +1,19 @@
|
||||
|
||||
[dependencies]
|
||||
"github.com/aws/smithy-go" = "v1.11.2"
|
||||
"github.com/google/go-cmp" = "v0.5.7"
|
||||
"github.com/aws/aws-sdk-go" = "v1.44.28"
|
||||
"github.com/aws/smithy-go" = "v1.13.5"
|
||||
"github.com/google/go-cmp" = "v0.5.8"
|
||||
"github.com/jmespath/go-jmespath" = "v0.4.0"
|
||||
"golang.org/x/net" = "v0.0.0-20220127200216-cd36cc0744dd"
|
||||
"golang.org/x/net" = "v0.1.0"
|
||||
|
||||
[modules]
|
||||
|
||||
[modules."."]
|
||||
metadata_package = "aws"
|
||||
|
||||
[modules.codegen]
|
||||
no_tag = true
|
||||
|
||||
[modules."example/service/dynamodb/createTable"]
|
||||
no_tag = true
|
||||
|
||||
|
80
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
80
vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md
generated
vendored
@ -1,3 +1,83 @@
|
||||
# v1.9.24 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.23 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.22 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.21 (2022-12-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.20 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.19 (2022-10-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.18 (2022-10-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.17 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.16 (2022-09-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.15 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.14 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.13 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.12 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.11 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.10 (2022-08-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.9 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.8 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.7 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.6 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.5 (2022-05-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.4 (2022-04-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
@ -3,4 +3,4 @@
|
||||
package presignedurl
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.9.4"
|
||||
const goModuleVersion = "1.9.24"
|
||||
|
122
vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
generated
vendored
122
vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md
generated
vendored
@ -1,3 +1,125 @@
|
||||
# v1.12.5 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.4 (2023-02-22)
|
||||
|
||||
* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
|
||||
|
||||
# v1.12.3 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.2 (2023-02-15)
|
||||
|
||||
* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910.
|
||||
* **Bug Fix**: Correct error type parsing for restJson services.
|
||||
|
||||
# v1.12.1 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.0 (2023-01-05)
|
||||
|
||||
* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
|
||||
|
||||
# v1.11.28 (2022-12-20)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.11.27 (2022-12-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.26 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.25 (2022-10-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.24 (2022-10-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.23 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.22 (2022-09-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.21 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.20 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.19 (2022-08-30)
|
||||
|
||||
* **Documentation**: Documentation updates for the AWS IAM Identity Center Portal CLI Reference.
|
||||
|
||||
# v1.11.18 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.17 (2022-08-15)
|
||||
|
||||
* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
|
||||
|
||||
# v1.11.16 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.15 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.14 (2022-08-08)
|
||||
|
||||
* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.13 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.12 (2022-07-11)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.11.11 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.10 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.9 (2022-06-16)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.11.8 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.7 (2022-05-26)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.11.6 (2022-05-25)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.11.5 (2022-05-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.4 (2022-04-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go
generated
vendored
@ -32,7 +32,7 @@ type GetRoleCredentialsInput struct {
|
||||
// The token issued by the CreateToken API call. For more information, see
|
||||
// CreateToken
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
|
||||
// in the AWS SSO OIDC API Reference Guide.
|
||||
// in the IAM Identity Center OIDC API Reference Guide.
|
||||
//
|
||||
// This member is required.
|
||||
AccessToken *string
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go
generated
vendored
@ -32,7 +32,7 @@ type ListAccountRolesInput struct {
|
||||
// The token issued by the CreateToken API call. For more information, see
|
||||
// CreateToken
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
|
||||
// in the AWS SSO OIDC API Reference Guide.
|
||||
// in the IAM Identity Center OIDC API Reference Guide.
|
||||
//
|
||||
// This member is required.
|
||||
AccessToken *string
|
||||
|
5
vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go
generated
vendored
5
vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go
generated
vendored
@ -14,7 +14,8 @@ import (
|
||||
// Lists all AWS accounts assigned to the user. These AWS accounts are assigned by
|
||||
// the administrator of the account. For more information, see Assign User Access
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers)
|
||||
// in the AWS SSO User Guide. This operation returns a paginated response.
|
||||
// in the IAM Identity Center User Guide. This operation returns a paginated
|
||||
// response.
|
||||
func (c *Client) ListAccounts(ctx context.Context, params *ListAccountsInput, optFns ...func(*Options)) (*ListAccountsOutput, error) {
|
||||
if params == nil {
|
||||
params = &ListAccountsInput{}
|
||||
@ -35,7 +36,7 @@ type ListAccountsInput struct {
|
||||
// The token issued by the CreateToken API call. For more information, see
|
||||
// CreateToken
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
|
||||
// in the AWS SSO OIDC API Reference Guide.
|
||||
// in the IAM Identity Center OIDC API Reference Guide.
|
||||
//
|
||||
// This member is required.
|
||||
AccessToken *string
|
||||
|
16
vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go
generated
vendored
16
vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go
generated
vendored
@ -9,7 +9,19 @@ import (
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Removes the client- and server-side session that is associated with the user.
|
||||
// Removes the locally stored SSO tokens from the client-side cache and sends an
|
||||
// API call to the IAM Identity Center service to invalidate the corresponding
|
||||
// server-side IAM Identity Center sign in session. If a user uses IAM Identity
|
||||
// Center to access the AWS CLI, the user’s IAM Identity Center sign in session is
|
||||
// used to obtain an IAM session, as specified in the corresponding IAM Identity
|
||||
// Center permission set. More specifically, IAM Identity Center assumes an IAM
|
||||
// role in the target account on behalf of the user, and the corresponding
|
||||
// temporary AWS credentials are returned to the client. After user logout, any
|
||||
// existing IAM role sessions that were created by using IAM Identity Center
|
||||
// permission sets continue based on the duration configured in the permission set.
|
||||
// For more information, see User authentications
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html) in
|
||||
// the IAM Identity Center User Guide.
|
||||
func (c *Client) Logout(ctx context.Context, params *LogoutInput, optFns ...func(*Options)) (*LogoutOutput, error) {
|
||||
if params == nil {
|
||||
params = &LogoutInput{}
|
||||
@ -30,7 +42,7 @@ type LogoutInput struct {
|
||||
// The token issued by the CreateToken API call. For more information, see
|
||||
// CreateToken
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
|
||||
// in the AWS SSO OIDC API Reference Guide.
|
||||
// in the IAM Identity Center OIDC API Reference Guide.
|
||||
//
|
||||
// This member is required.
|
||||
AccessToken *string
|
||||
|
48
vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go
generated
vendored
48
vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go
generated
vendored
@ -86,9 +86,9 @@ func awsRestjson1_deserializeOpErrorGetRoleCredentials(response *smithyhttp.Resp
|
||||
errorCode := "UnknownError"
|
||||
errorMessage := errorCode
|
||||
|
||||
code := response.Header.Get("X-Amzn-ErrorType")
|
||||
if len(code) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(code)
|
||||
headerCode := response.Header.Get("X-Amzn-ErrorType")
|
||||
if len(headerCode) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(headerCode)
|
||||
}
|
||||
|
||||
var buff [1024]byte
|
||||
@ -97,7 +97,7 @@ func awsRestjson1_deserializeOpErrorGetRoleCredentials(response *smithyhttp.Resp
|
||||
body := io.TeeReader(errorBody, ringBuffer)
|
||||
decoder := json.NewDecoder(body)
|
||||
decoder.UseNumber()
|
||||
code, message, err := restjson.GetErrorInfo(decoder)
|
||||
jsonCode, message, err := restjson.GetErrorInfo(decoder)
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
@ -109,8 +109,8 @@ func awsRestjson1_deserializeOpErrorGetRoleCredentials(response *smithyhttp.Resp
|
||||
}
|
||||
|
||||
errorBody.Seek(0, io.SeekStart)
|
||||
if len(code) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(code)
|
||||
if len(headerCode) == 0 && len(jsonCode) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(jsonCode)
|
||||
}
|
||||
if len(message) != 0 {
|
||||
errorMessage = message
|
||||
@ -242,9 +242,9 @@ func awsRestjson1_deserializeOpErrorListAccountRoles(response *smithyhttp.Respon
|
||||
errorCode := "UnknownError"
|
||||
errorMessage := errorCode
|
||||
|
||||
code := response.Header.Get("X-Amzn-ErrorType")
|
||||
if len(code) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(code)
|
||||
headerCode := response.Header.Get("X-Amzn-ErrorType")
|
||||
if len(headerCode) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(headerCode)
|
||||
}
|
||||
|
||||
var buff [1024]byte
|
||||
@ -253,7 +253,7 @@ func awsRestjson1_deserializeOpErrorListAccountRoles(response *smithyhttp.Respon
|
||||
body := io.TeeReader(errorBody, ringBuffer)
|
||||
decoder := json.NewDecoder(body)
|
||||
decoder.UseNumber()
|
||||
code, message, err := restjson.GetErrorInfo(decoder)
|
||||
jsonCode, message, err := restjson.GetErrorInfo(decoder)
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
@ -265,8 +265,8 @@ func awsRestjson1_deserializeOpErrorListAccountRoles(response *smithyhttp.Respon
|
||||
}
|
||||
|
||||
errorBody.Seek(0, io.SeekStart)
|
||||
if len(code) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(code)
|
||||
if len(headerCode) == 0 && len(jsonCode) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(jsonCode)
|
||||
}
|
||||
if len(message) != 0 {
|
||||
errorMessage = message
|
||||
@ -407,9 +407,9 @@ func awsRestjson1_deserializeOpErrorListAccounts(response *smithyhttp.Response,
|
||||
errorCode := "UnknownError"
|
||||
errorMessage := errorCode
|
||||
|
||||
code := response.Header.Get("X-Amzn-ErrorType")
|
||||
if len(code) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(code)
|
||||
headerCode := response.Header.Get("X-Amzn-ErrorType")
|
||||
if len(headerCode) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(headerCode)
|
||||
}
|
||||
|
||||
var buff [1024]byte
|
||||
@ -418,7 +418,7 @@ func awsRestjson1_deserializeOpErrorListAccounts(response *smithyhttp.Response,
|
||||
body := io.TeeReader(errorBody, ringBuffer)
|
||||
decoder := json.NewDecoder(body)
|
||||
decoder.UseNumber()
|
||||
code, message, err := restjson.GetErrorInfo(decoder)
|
||||
jsonCode, message, err := restjson.GetErrorInfo(decoder)
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
@ -430,8 +430,8 @@ func awsRestjson1_deserializeOpErrorListAccounts(response *smithyhttp.Response,
|
||||
}
|
||||
|
||||
errorBody.Seek(0, io.SeekStart)
|
||||
if len(code) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(code)
|
||||
if len(headerCode) == 0 && len(jsonCode) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(jsonCode)
|
||||
}
|
||||
if len(message) != 0 {
|
||||
errorMessage = message
|
||||
@ -550,9 +550,9 @@ func awsRestjson1_deserializeOpErrorLogout(response *smithyhttp.Response, metada
|
||||
errorCode := "UnknownError"
|
||||
errorMessage := errorCode
|
||||
|
||||
code := response.Header.Get("X-Amzn-ErrorType")
|
||||
if len(code) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(code)
|
||||
headerCode := response.Header.Get("X-Amzn-ErrorType")
|
||||
if len(headerCode) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(headerCode)
|
||||
}
|
||||
|
||||
var buff [1024]byte
|
||||
@ -561,7 +561,7 @@ func awsRestjson1_deserializeOpErrorLogout(response *smithyhttp.Response, metada
|
||||
body := io.TeeReader(errorBody, ringBuffer)
|
||||
decoder := json.NewDecoder(body)
|
||||
decoder.UseNumber()
|
||||
code, message, err := restjson.GetErrorInfo(decoder)
|
||||
jsonCode, message, err := restjson.GetErrorInfo(decoder)
|
||||
if err != nil {
|
||||
var snapshot bytes.Buffer
|
||||
io.Copy(&snapshot, ringBuffer)
|
||||
@ -573,8 +573,8 @@ func awsRestjson1_deserializeOpErrorLogout(response *smithyhttp.Response, metada
|
||||
}
|
||||
|
||||
errorBody.Seek(0, io.SeekStart)
|
||||
if len(code) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(code)
|
||||
if len(headerCode) == 0 && len(jsonCode) != 0 {
|
||||
errorCode = restjson.SanitizeErrorCode(jsonCode)
|
||||
}
|
||||
if len(message) != 0 {
|
||||
errorMessage = message
|
||||
|
26
vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go
generated
vendored
26
vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go
generated
vendored
@ -3,18 +3,20 @@
|
||||
// Package sso provides the API client, operations, and parameter types for AWS
|
||||
// Single Sign-On.
|
||||
//
|
||||
// AWS Single Sign-On Portal is a web service that makes it easy for you to assign
|
||||
// user access to AWS SSO resources such as the user portal. Users can get AWS
|
||||
// account applications and roles assigned to them and get federated into the
|
||||
// application. For general information about AWS SSO, see What is AWS Single
|
||||
// Sign-On?
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) in the
|
||||
// AWS SSO User Guide. This API reference guide describes the AWS SSO Portal
|
||||
// operations that you can call programatically and includes detailed information
|
||||
// on data types and errors. AWS provides SDKs that consist of libraries and sample
|
||||
// code for various programming languages and platforms, such as Java, Ruby, .Net,
|
||||
// iOS, or Android. The SDKs provide a convenient way to create programmatic access
|
||||
// to AWS SSO and other AWS services. For more information about the AWS SDKs,
|
||||
// AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web
|
||||
// service that makes it easy for you to assign user access to IAM Identity Center
|
||||
// resources such as the AWS access portal. Users can get AWS account applications
|
||||
// and roles assigned to them and get federated into the application. Although AWS
|
||||
// Single Sign-On was renamed, the sso and identitystore API namespaces will
|
||||
// continue to retain their original name for backward compatibility purposes. For
|
||||
// more information, see IAM Identity Center rename
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed).
|
||||
// This reference guide describes the IAM Identity Center Portal operations that
|
||||
// you can call programatically and includes detailed information on data types and
|
||||
// errors. AWS provides SDKs that consist of libraries and sample code for various
|
||||
// programming languages and platforms, such as Java, Ruby, .Net, iOS, or Android.
|
||||
// The SDKs provide a convenient way to create programmatic access to IAM Identity
|
||||
// Center and other AWS services. For more information about the AWS SDKs,
|
||||
// including how to download and install them, see Tools for Amazon Web Services
|
||||
// (http://aws.amazon.com/tools/).
|
||||
package sso
|
||||
|
2
vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
generated
vendored
2
vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go
generated
vendored
@ -3,4 +3,4 @@
|
||||
package sso
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.11.4"
|
||||
const goModuleVersion = "1.12.5"
|
||||
|
56
vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go
generated
vendored
56
vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go
generated
vendored
@ -135,6 +135,22 @@ var defaultPartitions = endpoints.Partitions{
|
||||
RegionRegex: partitionRegexp.Aws,
|
||||
IsRegionalized: true,
|
||||
Endpoints: endpoints.Endpoints{
|
||||
endpoints.EndpointKey{
|
||||
Region: "af-south-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "portal.sso.af-south-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "af-south-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-east-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "portal.sso.ap-east-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ap-east-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-northeast-1",
|
||||
}: endpoints.Endpoint{
|
||||
@ -151,6 +167,14 @@ var defaultPartitions = endpoints.Partitions{
|
||||
Region: "ap-northeast-2",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-northeast-3",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "portal.sso.ap-northeast-3.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ap-northeast-3",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-south-1",
|
||||
}: endpoints.Endpoint{
|
||||
@ -175,6 +199,14 @@ var defaultPartitions = endpoints.Partitions{
|
||||
Region: "ap-southeast-2",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-southeast-3",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "portal.sso.ap-southeast-3.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ap-southeast-3",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoints.Endpoint{
|
||||
@ -199,6 +231,14 @@ var defaultPartitions = endpoints.Partitions{
|
||||
Region: "eu-north-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "eu-south-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "portal.sso.eu-south-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "eu-south-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "eu-west-1",
|
||||
}: endpoints.Endpoint{
|
||||
@ -223,6 +263,14 @@ var defaultPartitions = endpoints.Partitions{
|
||||
Region: "eu-west-3",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "me-south-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "portal.sso.me-south-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "me-south-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "sa-east-1",
|
||||
}: endpoints.Endpoint{
|
||||
@ -247,6 +295,14 @@ var defaultPartitions = endpoints.Partitions{
|
||||
Region: "us-east-2",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "us-west-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "portal.sso.us-west-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "us-west-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "us-west-2",
|
||||
}: endpoints.Endpoint{
|
||||
|
36
vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go
generated
vendored
36
vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go
generated
vendored
@ -12,6 +12,8 @@ import (
|
||||
type InvalidRequestException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
@ -24,13 +26,20 @@ func (e *InvalidRequestException) ErrorMessage() string {
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *InvalidRequestException) ErrorCode() string { return "InvalidRequestException" }
|
||||
func (e *InvalidRequestException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "InvalidRequestException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// The specified resource doesn't exist.
|
||||
type ResourceNotFoundException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
@ -43,7 +52,12 @@ func (e *ResourceNotFoundException) ErrorMessage() string {
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" }
|
||||
func (e *ResourceNotFoundException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "ResourceNotFoundException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that the request is being made too frequently and is more than what
|
||||
@ -51,6 +65,8 @@ func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smit
|
||||
type TooManyRequestsException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
@ -63,7 +79,12 @@ func (e *TooManyRequestsException) ErrorMessage() string {
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *TooManyRequestsException) ErrorCode() string { return "TooManyRequestsException" }
|
||||
func (e *TooManyRequestsException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "TooManyRequestsException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that the request is not authorized. This can happen due to an invalid
|
||||
@ -71,6 +92,8 @@ func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smith
|
||||
type UnauthorizedException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
@ -83,5 +106,10 @@ func (e *UnauthorizedException) ErrorMessage() string {
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *UnauthorizedException) ErrorCode() string { return "UnauthorizedException" }
|
||||
func (e *UnauthorizedException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "UnauthorizedException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *UnauthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
217
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
generated
vendored
Normal file
217
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,217 @@
|
||||
# v1.14.5 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.14.4 (2023-02-22)
|
||||
|
||||
* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
|
||||
|
||||
# v1.14.3 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.14.2 (2023-02-15)
|
||||
|
||||
* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910.
|
||||
* **Bug Fix**: Correct error type parsing for restJson services.
|
||||
|
||||
# v1.14.1 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.14.0 (2023-01-05)
|
||||
|
||||
* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
|
||||
|
||||
# v1.13.11 (2022-12-19)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.13.10 (2022-12-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.9 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.8 (2022-10-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.7 (2022-10-21)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.6 (2022-09-30)
|
||||
|
||||
* **Documentation**: Documentation updates for the IAM Identity Center OIDC CLI Reference.
|
||||
|
||||
# v1.13.5 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.4 (2022-09-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.3 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.2 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.1 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.13.0 (2022-08-25)
|
||||
|
||||
* **Feature**: Updated required request parameters on IAM Identity Center's OIDC CreateToken action.
|
||||
|
||||
# v1.12.14 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.13 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.12 (2022-08-08)
|
||||
|
||||
* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On)
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.11 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.10 (2022-07-11)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.12.9 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.8 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.7 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.6 (2022-05-27)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.12.5 (2022-05-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.4 (2022-04-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.3 (2022-03-30)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.2 (2022-03-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.1 (2022-03-23)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.12.0 (2022-03-08)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.11.0 (2022-02-24)
|
||||
|
||||
* **Feature**: API client updated
|
||||
* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.10.0 (2022-01-14)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.9.0 (2022-01-07)
|
||||
|
||||
* **Feature**: API client updated
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.8.2 (2021-12-02)
|
||||
|
||||
* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.8.1 (2021-11-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.8.0 (2021-11-06)
|
||||
|
||||
* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.7.0 (2021-10-21)
|
||||
|
||||
* **Feature**: Updated to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.6.0 (2021-10-11)
|
||||
|
||||
* **Feature**: API client updated
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.5.0 (2021-09-17)
|
||||
|
||||
* **Feature**: Updated API client and endpoints to latest revision.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.4.0 (2021-08-27)
|
||||
|
||||
* **Feature**: Updated API model to latest revision.
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.3 (2021-08-19)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.2 (2021-08-04)
|
||||
|
||||
* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.1 (2021-07-15)
|
||||
|
||||
* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.3.0 (2021-06-25)
|
||||
|
||||
* **Feature**: Updated `github.com/aws/smithy-go` to latest version
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.1 (2021-05-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.2.0 (2021-05-14)
|
||||
|
||||
* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
202
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt
generated
vendored
Normal file
202
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt
generated
vendored
Normal file
@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
433
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
generated
vendored
Normal file
433
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go
generated
vendored
Normal file
@ -0,0 +1,433 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssooidc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/defaults"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/retry"
|
||||
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
|
||||
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
|
||||
internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
|
||||
smithy "github.com/aws/smithy-go"
|
||||
smithydocument "github.com/aws/smithy-go/document"
|
||||
"github.com/aws/smithy-go/logging"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"net"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
const ServiceID = "SSO OIDC"
|
||||
const ServiceAPIVersion = "2019-06-10"
|
||||
|
||||
// Client provides the API client to make operations call for AWS SSO OIDC.
|
||||
type Client struct {
|
||||
options Options
|
||||
}
|
||||
|
||||
// New returns an initialized Client based on the functional options. Provide
|
||||
// additional functional options to further configure the behavior of the client,
|
||||
// such as changing the client's endpoint or adding custom middleware behavior.
|
||||
func New(options Options, optFns ...func(*Options)) *Client {
|
||||
options = options.Copy()
|
||||
|
||||
resolveDefaultLogger(&options)
|
||||
|
||||
setResolvedDefaultsMode(&options)
|
||||
|
||||
resolveRetryer(&options)
|
||||
|
||||
resolveHTTPClient(&options)
|
||||
|
||||
resolveHTTPSignerV4(&options)
|
||||
|
||||
resolveDefaultEndpointConfiguration(&options)
|
||||
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
client := &Client{
|
||||
options: options,
|
||||
}
|
||||
|
||||
return client
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
// Set of options to modify how an operation is invoked. These apply to all
|
||||
// operations invoked for this client. Use functional options on operation call to
|
||||
// modify this list for per operation behavior.
|
||||
APIOptions []func(*middleware.Stack) error
|
||||
|
||||
// Configures the events that will be sent to the configured logger.
|
||||
ClientLogMode aws.ClientLogMode
|
||||
|
||||
// The credentials object to use when signing requests.
|
||||
Credentials aws.CredentialsProvider
|
||||
|
||||
// The configuration DefaultsMode that the SDK should use when constructing the
|
||||
// clients initial default settings.
|
||||
DefaultsMode aws.DefaultsMode
|
||||
|
||||
// The endpoint options to be used when attempting to resolve an endpoint.
|
||||
EndpointOptions EndpointResolverOptions
|
||||
|
||||
// The service endpoint resolver.
|
||||
EndpointResolver EndpointResolver
|
||||
|
||||
// Signature Version 4 (SigV4) Signer
|
||||
HTTPSignerV4 HTTPSignerV4
|
||||
|
||||
// The logger writer interface to write logging messages to.
|
||||
Logger logging.Logger
|
||||
|
||||
// The region to send requests to. (Required)
|
||||
Region string
|
||||
|
||||
// RetryMaxAttempts specifies the maximum number attempts an API client will call
|
||||
// an operation that fails with a retryable error. A value of 0 is ignored, and
|
||||
// will not be used to configure the API client created default retryer, or modify
|
||||
// per operation call's retry max attempts. When creating a new API Clients this
|
||||
// member will only be used if the Retryer Options member is nil. This value will
|
||||
// be ignored if Retryer is not nil. If specified in an operation call's functional
|
||||
// options with a value that is different than the constructed client's Options,
|
||||
// the Client's Retryer will be wrapped to use the operation's specific
|
||||
// RetryMaxAttempts value.
|
||||
RetryMaxAttempts int
|
||||
|
||||
// RetryMode specifies the retry mode the API client will be created with, if
|
||||
// Retryer option is not also specified. When creating a new API Clients this
|
||||
// member will only be used if the Retryer Options member is nil. This value will
|
||||
// be ignored if Retryer is not nil. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
RetryMode aws.RetryMode
|
||||
|
||||
// Retryer guides how HTTP requests should be retried in case of recoverable
|
||||
// failures. When nil the API client will use a default retryer. The kind of
|
||||
// default retry created by the API client can be changed with the RetryMode
|
||||
// option.
|
||||
Retryer aws.Retryer
|
||||
|
||||
// The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
|
||||
// to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You
|
||||
// should not populate this structure programmatically, or rely on the values here
|
||||
// within your applications.
|
||||
RuntimeEnvironment aws.RuntimeEnvironment
|
||||
|
||||
// The initial DefaultsMode used when the client options were constructed. If the
|
||||
// DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
|
||||
// value was at that point in time. Currently does not support per operation call
|
||||
// overrides, may in the future.
|
||||
resolvedDefaultsMode aws.DefaultsMode
|
||||
|
||||
// The HTTP client to invoke API calls with. Defaults to client's default HTTP
|
||||
// implementation if nil.
|
||||
HTTPClient HTTPClient
|
||||
}
|
||||
|
||||
// WithAPIOptions returns a functional option for setting the Client's APIOptions
|
||||
// option.
|
||||
func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
|
||||
return func(o *Options) {
|
||||
o.APIOptions = append(o.APIOptions, optFns...)
|
||||
}
|
||||
}
|
||||
|
||||
// WithEndpointResolver returns a functional option for setting the Client's
|
||||
// EndpointResolver option.
|
||||
func WithEndpointResolver(v EndpointResolver) func(*Options) {
|
||||
return func(o *Options) {
|
||||
o.EndpointResolver = v
|
||||
}
|
||||
}
|
||||
|
||||
type HTTPClient interface {
|
||||
Do(*http.Request) (*http.Response, error)
|
||||
}
|
||||
|
||||
// Copy creates a clone where the APIOptions list is deep copied.
|
||||
func (o Options) Copy() Options {
|
||||
to := o
|
||||
to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
|
||||
copy(to.APIOptions, o.APIOptions)
|
||||
|
||||
return to
|
||||
}
|
||||
func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) {
|
||||
ctx = middleware.ClearStackValues(ctx)
|
||||
stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
|
||||
options := c.options.Copy()
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
|
||||
finalizeRetryMaxAttemptOptions(&options, *c)
|
||||
|
||||
finalizeClientEndpointResolverOptions(&options)
|
||||
|
||||
for _, fn := range stackFns {
|
||||
if err := fn(stack, options); err != nil {
|
||||
return nil, metadata, err
|
||||
}
|
||||
}
|
||||
|
||||
for _, fn := range options.APIOptions {
|
||||
if err := fn(stack); err != nil {
|
||||
return nil, metadata, err
|
||||
}
|
||||
}
|
||||
|
||||
handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
|
||||
result, metadata, err = handler.Handle(ctx, params)
|
||||
if err != nil {
|
||||
err = &smithy.OperationError{
|
||||
ServiceID: ServiceID,
|
||||
OperationName: opID,
|
||||
Err: err,
|
||||
}
|
||||
}
|
||||
return result, metadata, err
|
||||
}
|
||||
|
||||
type noSmithyDocumentSerde = smithydocument.NoSerde
|
||||
|
||||
func resolveDefaultLogger(o *Options) {
|
||||
if o.Logger != nil {
|
||||
return
|
||||
}
|
||||
o.Logger = logging.Nop{}
|
||||
}
|
||||
|
||||
func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
|
||||
return middleware.AddSetLoggerMiddleware(stack, o.Logger)
|
||||
}
|
||||
|
||||
func setResolvedDefaultsMode(o *Options) {
|
||||
if len(o.resolvedDefaultsMode) > 0 {
|
||||
return
|
||||
}
|
||||
|
||||
var mode aws.DefaultsMode
|
||||
mode.SetFromString(string(o.DefaultsMode))
|
||||
|
||||
if mode == aws.DefaultsModeAuto {
|
||||
mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
|
||||
}
|
||||
|
||||
o.resolvedDefaultsMode = mode
|
||||
}
|
||||
|
||||
// NewFromConfig returns a new client from the provided config.
|
||||
func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
|
||||
opts := Options{
|
||||
Region: cfg.Region,
|
||||
DefaultsMode: cfg.DefaultsMode,
|
||||
RuntimeEnvironment: cfg.RuntimeEnvironment,
|
||||
HTTPClient: cfg.HTTPClient,
|
||||
Credentials: cfg.Credentials,
|
||||
APIOptions: cfg.APIOptions,
|
||||
Logger: cfg.Logger,
|
||||
ClientLogMode: cfg.ClientLogMode,
|
||||
}
|
||||
resolveAWSRetryerProvider(cfg, &opts)
|
||||
resolveAWSRetryMaxAttempts(cfg, &opts)
|
||||
resolveAWSRetryMode(cfg, &opts)
|
||||
resolveAWSEndpointResolver(cfg, &opts)
|
||||
resolveUseDualStackEndpoint(cfg, &opts)
|
||||
resolveUseFIPSEndpoint(cfg, &opts)
|
||||
return New(opts, optFns...)
|
||||
}
|
||||
|
||||
func resolveHTTPClient(o *Options) {
|
||||
var buildable *awshttp.BuildableClient
|
||||
|
||||
if o.HTTPClient != nil {
|
||||
var ok bool
|
||||
buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
buildable = awshttp.NewBuildableClient()
|
||||
}
|
||||
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
|
||||
if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
|
||||
dialer.Timeout = dialerTimeout
|
||||
}
|
||||
})
|
||||
|
||||
buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
|
||||
if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
|
||||
transport.TLSHandshakeTimeout = tlsHandshakeTimeout
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
o.HTTPClient = buildable
|
||||
}
|
||||
|
||||
func resolveRetryer(o *Options) {
|
||||
if o.Retryer != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if len(o.RetryMode) == 0 {
|
||||
modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
|
||||
if err == nil {
|
||||
o.RetryMode = modeConfig.RetryMode
|
||||
}
|
||||
}
|
||||
if len(o.RetryMode) == 0 {
|
||||
o.RetryMode = aws.RetryModeStandard
|
||||
}
|
||||
|
||||
var standardOptions []func(*retry.StandardOptions)
|
||||
if v := o.RetryMaxAttempts; v != 0 {
|
||||
standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
|
||||
so.MaxAttempts = v
|
||||
})
|
||||
}
|
||||
|
||||
switch o.RetryMode {
|
||||
case aws.RetryModeAdaptive:
|
||||
var adaptiveOptions []func(*retry.AdaptiveModeOptions)
|
||||
if len(standardOptions) != 0 {
|
||||
adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
|
||||
ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
|
||||
})
|
||||
}
|
||||
o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
|
||||
|
||||
default:
|
||||
o.Retryer = retry.NewStandard(standardOptions...)
|
||||
}
|
||||
}
|
||||
|
||||
func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
|
||||
if cfg.Retryer == nil {
|
||||
return
|
||||
}
|
||||
o.Retryer = cfg.Retryer()
|
||||
}
|
||||
|
||||
func resolveAWSRetryMode(cfg aws.Config, o *Options) {
|
||||
if len(cfg.RetryMode) == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMode = cfg.RetryMode
|
||||
}
|
||||
func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
|
||||
if cfg.RetryMaxAttempts == 0 {
|
||||
return
|
||||
}
|
||||
o.RetryMaxAttempts = cfg.RetryMaxAttempts
|
||||
}
|
||||
|
||||
func finalizeRetryMaxAttemptOptions(o *Options, client Client) {
|
||||
if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
|
||||
return
|
||||
}
|
||||
|
||||
o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
|
||||
}
|
||||
|
||||
func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
|
||||
if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
|
||||
return
|
||||
}
|
||||
o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver())
|
||||
}
|
||||
|
||||
func addClientUserAgent(stack *middleware.Stack) error {
|
||||
return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "ssooidc", goModuleVersion)(stack)
|
||||
}
|
||||
|
||||
func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
|
||||
mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
|
||||
CredentialsProvider: o.Credentials,
|
||||
Signer: o.HTTPSignerV4,
|
||||
LogSigning: o.ClientLogMode.IsSigning(),
|
||||
})
|
||||
return stack.Finalize.Add(mw, middleware.After)
|
||||
}
|
||||
|
||||
type HTTPSignerV4 interface {
|
||||
SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
|
||||
}
|
||||
|
||||
func resolveHTTPSignerV4(o *Options) {
|
||||
if o.HTTPSignerV4 != nil {
|
||||
return
|
||||
}
|
||||
o.HTTPSignerV4 = newDefaultV4Signer(*o)
|
||||
}
|
||||
|
||||
func newDefaultV4Signer(o Options) *v4.Signer {
|
||||
return v4.NewSigner(func(so *v4.SignerOptions) {
|
||||
so.Logger = o.Logger
|
||||
so.LogSigning = o.ClientLogMode.IsSigning()
|
||||
})
|
||||
}
|
||||
|
||||
func addRetryMiddlewares(stack *middleware.Stack, o Options) error {
|
||||
mo := retry.AddRetryMiddlewaresOptions{
|
||||
Retryer: o.Retryer,
|
||||
LogRetryAttempts: o.ClientLogMode.IsRetries(),
|
||||
}
|
||||
return retry.AddRetryMiddlewares(stack, mo)
|
||||
}
|
||||
|
||||
// resolves dual-stack endpoint configuration
|
||||
func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
|
||||
if len(cfg.ConfigSources) == 0 {
|
||||
return nil
|
||||
}
|
||||
value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if found {
|
||||
o.EndpointOptions.UseDualStackEndpoint = value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// resolves FIPS endpoint configuration
|
||||
func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
|
||||
if len(cfg.ConfigSources) == 0 {
|
||||
return nil
|
||||
}
|
||||
value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if found {
|
||||
o.EndpointOptions.UseFIPSEndpoint = value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
|
||||
return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
|
||||
}
|
||||
|
||||
func addResponseErrorMiddleware(stack *middleware.Stack) error {
|
||||
return awshttp.AddResponseErrorMiddleware(stack)
|
||||
}
|
||||
|
||||
func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
|
||||
return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
|
||||
LogRequest: o.ClientLogMode.IsRequest(),
|
||||
LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
|
||||
LogResponse: o.ClientLogMode.IsResponse(),
|
||||
LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
|
||||
}, middleware.After)
|
||||
}
|
179
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
generated
vendored
Normal file
179
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go
generated
vendored
Normal file
@ -0,0 +1,179 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssooidc
|
||||
|
||||
import (
|
||||
"context"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Creates and returns an access token for the authorized client. The access token
|
||||
// issued will be used to fetch short-term credentials for the assigned roles in
|
||||
// the AWS account.
|
||||
func (c *Client) CreateToken(ctx context.Context, params *CreateTokenInput, optFns ...func(*Options)) (*CreateTokenOutput, error) {
|
||||
if params == nil {
|
||||
params = &CreateTokenInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "CreateToken", params, optFns, c.addOperationCreateTokenMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*CreateTokenOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type CreateTokenInput struct {
|
||||
|
||||
// The unique identifier string for each client. This value should come from the
|
||||
// persisted result of the RegisterClient API.
|
||||
//
|
||||
// This member is required.
|
||||
ClientId *string
|
||||
|
||||
// A secret string generated for the client. This value should come from the
|
||||
// persisted result of the RegisterClient API.
|
||||
//
|
||||
// This member is required.
|
||||
ClientSecret *string
|
||||
|
||||
// Supports grant types for the authorization code, refresh token, and device code
|
||||
// request. For device code requests, specify the following value:
|
||||
// urn:ietf:params:oauth:grant-type:device_code For information about how to
|
||||
// obtain the device code, see the StartDeviceAuthorization topic.
|
||||
//
|
||||
// This member is required.
|
||||
GrantType *string
|
||||
|
||||
// The authorization code received from the authorization service. This parameter
|
||||
// is required to perform an authorization grant request to get access to a token.
|
||||
Code *string
|
||||
|
||||
// Used only when calling this API for the device code grant type. This short-term
|
||||
// code is used to identify this authentication attempt. This should come from an
|
||||
// in-memory reference to the result of the StartDeviceAuthorization API.
|
||||
DeviceCode *string
|
||||
|
||||
// The location of the application that will receive the authorization code. Users
|
||||
// authorize the service to send the request to this location.
|
||||
RedirectUri *string
|
||||
|
||||
// Currently, refreshToken is not yet implemented and is not supported. For more
|
||||
// information about the features and limitations of the current IAM Identity
|
||||
// Center OIDC implementation, see Considerations for Using this Guide in the IAM
|
||||
// Identity Center OIDC API Reference
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html).
|
||||
// The token used to obtain an access token in the event that the access token is
|
||||
// invalid or expired.
|
||||
RefreshToken *string
|
||||
|
||||
// The list of scopes that is defined by the client. Upon authorization, this list
|
||||
// is used to restrict permissions when granting an access token.
|
||||
Scope []string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type CreateTokenOutput struct {
|
||||
|
||||
// An opaque token to access IAM Identity Center resources assigned to a user.
|
||||
AccessToken *string
|
||||
|
||||
// Indicates the time in seconds when an access token will expire.
|
||||
ExpiresIn int32
|
||||
|
||||
// Currently, idToken is not yet implemented and is not supported. For more
|
||||
// information about the features and limitations of the current IAM Identity
|
||||
// Center OIDC implementation, see Considerations for Using this Guide in the IAM
|
||||
// Identity Center OIDC API Reference
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html).
|
||||
// The identifier of the user that associated with the access token, if present.
|
||||
IdToken *string
|
||||
|
||||
// Currently, refreshToken is not yet implemented and is not supported. For more
|
||||
// information about the features and limitations of the current IAM Identity
|
||||
// Center OIDC implementation, see Considerations for Using this Guide in the IAM
|
||||
// Identity Center OIDC API Reference
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html).
|
||||
// A token that, if present, can be used to refresh a previously issued access
|
||||
// token that might have expired.
|
||||
RefreshToken *string
|
||||
|
||||
// Used to notify the client that the returned token is an access token. The
|
||||
// supported type is BearerToken.
|
||||
TokenType *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateToken{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateToken{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpCreateTokenValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateToken(options.Region), middleware.Before); 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
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opCreateToken(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "CreateToken",
|
||||
}
|
||||
}
|
141
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
generated
vendored
Normal file
141
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go
generated
vendored
Normal file
@ -0,0 +1,141 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssooidc
|
||||
|
||||
import (
|
||||
"context"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Registers a client with IAM Identity Center. This allows clients to initiate
|
||||
// device authorization. The output should be persisted for reuse through many
|
||||
// authentication requests.
|
||||
func (c *Client) RegisterClient(ctx context.Context, params *RegisterClientInput, optFns ...func(*Options)) (*RegisterClientOutput, error) {
|
||||
if params == nil {
|
||||
params = &RegisterClientInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "RegisterClient", params, optFns, c.addOperationRegisterClientMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*RegisterClientOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type RegisterClientInput struct {
|
||||
|
||||
// The friendly name of the client.
|
||||
//
|
||||
// This member is required.
|
||||
ClientName *string
|
||||
|
||||
// The type of client. The service supports only public as a client type. Anything
|
||||
// other than public will be rejected by the service.
|
||||
//
|
||||
// This member is required.
|
||||
ClientType *string
|
||||
|
||||
// The list of scopes that are defined by the client. Upon authorization, this list
|
||||
// is used to restrict permissions when granting an access token.
|
||||
Scopes []string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type RegisterClientOutput struct {
|
||||
|
||||
// The endpoint where the client can request authorization.
|
||||
AuthorizationEndpoint *string
|
||||
|
||||
// The unique identifier string for each client. This client uses this identifier
|
||||
// to get authenticated by the service in subsequent calls.
|
||||
ClientId *string
|
||||
|
||||
// Indicates the time at which the clientId and clientSecret were issued.
|
||||
ClientIdIssuedAt int64
|
||||
|
||||
// A secret string generated for the client. The client will use this string to get
|
||||
// authenticated by the service in subsequent calls.
|
||||
ClientSecret *string
|
||||
|
||||
// Indicates the time at which the clientId and clientSecret will become invalid.
|
||||
ClientSecretExpiresAt int64
|
||||
|
||||
// The endpoint where the client can get an access token.
|
||||
TokenEndpoint *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterClient{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRegisterClient{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpRegisterClientValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterClient(options.Region), middleware.Before); 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
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opRegisterClient(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "RegisterClient",
|
||||
}
|
||||
}
|
150
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go
generated
vendored
Normal file
150
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go
generated
vendored
Normal file
@ -0,0 +1,150 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssooidc
|
||||
|
||||
import (
|
||||
"context"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
// Initiates device authorization by requesting a pair of verification codes from
|
||||
// the authorization service.
|
||||
func (c *Client) StartDeviceAuthorization(ctx context.Context, params *StartDeviceAuthorizationInput, optFns ...func(*Options)) (*StartDeviceAuthorizationOutput, error) {
|
||||
if params == nil {
|
||||
params = &StartDeviceAuthorizationInput{}
|
||||
}
|
||||
|
||||
result, metadata, err := c.invokeOperation(ctx, "StartDeviceAuthorization", params, optFns, c.addOperationStartDeviceAuthorizationMiddlewares)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*StartDeviceAuthorizationOutput)
|
||||
out.ResultMetadata = metadata
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type StartDeviceAuthorizationInput struct {
|
||||
|
||||
// The unique identifier string for the client that is registered with IAM Identity
|
||||
// Center. This value should come from the persisted result of the RegisterClient
|
||||
// API operation.
|
||||
//
|
||||
// This member is required.
|
||||
ClientId *string
|
||||
|
||||
// A secret string that is generated for the client. This value should come from
|
||||
// the persisted result of the RegisterClient API operation.
|
||||
//
|
||||
// This member is required.
|
||||
ClientSecret *string
|
||||
|
||||
// The URL for the AWS access portal. For more information, see Using the AWS
|
||||
// access portal
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html)
|
||||
// in the IAM Identity Center User Guide.
|
||||
//
|
||||
// This member is required.
|
||||
StartUrl *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
type StartDeviceAuthorizationOutput struct {
|
||||
|
||||
// The short-lived code that is used by the device when polling for a session
|
||||
// token.
|
||||
DeviceCode *string
|
||||
|
||||
// Indicates the number of seconds in which the verification code will become
|
||||
// invalid.
|
||||
ExpiresIn int32
|
||||
|
||||
// Indicates the number of seconds the client must wait between attempts when
|
||||
// polling for a session.
|
||||
Interval int32
|
||||
|
||||
// A one-time user verification code. This is needed to authorize an in-use device.
|
||||
UserCode *string
|
||||
|
||||
// The URI of the verification page that takes the userCode to authorize the
|
||||
// device.
|
||||
VerificationUri *string
|
||||
|
||||
// An alternate URL that the client can use to automatically launch a browser. This
|
||||
// process skips the manual step in which the user visits the verification page and
|
||||
// enters their code.
|
||||
VerificationUriComplete *string
|
||||
|
||||
// Metadata pertaining to the operation's result.
|
||||
ResultMetadata middleware.Metadata
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
|
||||
err = stack.Serialize.Add(&awsRestjson1_serializeOpStartDeviceAuthorization{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartDeviceAuthorization{}, middleware.After)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addSetLoggerMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addResolveEndpointMiddleware(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addRetryMiddlewares(stack, options); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addClientUserAgent(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = addOpStartDeviceAuthorizationValidationMiddleware(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDeviceAuthorization(options.Region), middleware.Before); 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
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func newServiceMetadataMiddleware_opStartDeviceAuthorization(region string) *awsmiddleware.RegisterServiceMetadata {
|
||||
return &awsmiddleware.RegisterServiceMetadata{
|
||||
Region: region,
|
||||
ServiceID: ServiceID,
|
||||
OperationName: "StartDeviceAuthorization",
|
||||
}
|
||||
}
|
1689
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go
generated
vendored
Normal file
1689
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
46
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go
generated
vendored
Normal file
46
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
// Package ssooidc provides the API client, operations, and parameter types for AWS
|
||||
// SSO OIDC.
|
||||
//
|
||||
// AWS IAM Identity Center (successor to AWS Single Sign-On) OpenID Connect (OIDC)
|
||||
// is a web service that enables a client (such as AWS CLI or a native application)
|
||||
// to register with IAM Identity Center. The service also enables the client to
|
||||
// fetch the user’s access token upon successful authentication and authorization
|
||||
// with IAM Identity Center. Although AWS Single Sign-On was renamed, the sso and
|
||||
// identitystore API namespaces will continue to retain their original name for
|
||||
// backward compatibility purposes. For more information, see IAM Identity Center
|
||||
// rename
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed).
|
||||
// Considerations for Using This Guide Before you begin using this guide, we
|
||||
// recommend that you first review the following important information about how
|
||||
// the IAM Identity Center OIDC service works.
|
||||
//
|
||||
// * The IAM Identity Center OIDC
|
||||
// service currently implements only the portions of the OAuth 2.0 Device
|
||||
// Authorization Grant standard (https://tools.ietf.org/html/rfc8628
|
||||
// (https://tools.ietf.org/html/rfc8628)) that are necessary to enable single
|
||||
// sign-on authentication with the AWS CLI. Support for other OIDC flows frequently
|
||||
// needed for native applications, such as Authorization Code Flow (+ PKCE), will
|
||||
// be addressed in future releases.
|
||||
//
|
||||
// * The service emits only OIDC access tokens,
|
||||
// such that obtaining a new token (For example, token refresh) requires explicit
|
||||
// user re-authentication.
|
||||
//
|
||||
// * The access tokens provided by this service grant
|
||||
// access to all AWS account entitlements assigned to an IAM Identity Center user,
|
||||
// not just a particular application.
|
||||
//
|
||||
// * The documentation in this guide does not
|
||||
// describe the mechanism to convert the access token into AWS Auth (“sigv4”)
|
||||
// credentials for use with IAM-protected AWS service endpoints. For more
|
||||
// information, see GetRoleCredentials
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html)
|
||||
// in the IAM Identity Center Portal API Reference Guide.
|
||||
//
|
||||
// For general information
|
||||
// about IAM Identity Center, see What is IAM Identity Center?
|
||||
// (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) in the
|
||||
// IAM Identity Center User Guide.
|
||||
package ssooidc
|
200
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go
generated
vendored
Normal file
200
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go
generated
vendored
Normal file
@ -0,0 +1,200 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssooidc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
|
||||
internalendpoints "github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// EndpointResolverOptions is the service endpoint resolver options
|
||||
type EndpointResolverOptions = internalendpoints.Options
|
||||
|
||||
// EndpointResolver interface for resolving service endpoints.
|
||||
type EndpointResolver interface {
|
||||
ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
|
||||
}
|
||||
|
||||
var _ EndpointResolver = &internalendpoints.Resolver{}
|
||||
|
||||
// NewDefaultEndpointResolver constructs a new service endpoint resolver
|
||||
func NewDefaultEndpointResolver() *internalendpoints.Resolver {
|
||||
return internalendpoints.New()
|
||||
}
|
||||
|
||||
// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
|
||||
// the EndpointResolver interface. This is useful when you want to add additional
|
||||
// endpoint resolving logic, or stub out specific endpoints with custom values.
|
||||
type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
|
||||
|
||||
func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
|
||||
return fn(region, options)
|
||||
}
|
||||
|
||||
func resolveDefaultEndpointConfiguration(o *Options) {
|
||||
if o.EndpointResolver != nil {
|
||||
return
|
||||
}
|
||||
o.EndpointResolver = NewDefaultEndpointResolver()
|
||||
}
|
||||
|
||||
// EndpointResolverFromURL returns an EndpointResolver configured using the
|
||||
// provided endpoint url. By default, the resolved endpoint resolver uses the
|
||||
// client region as signing region, and the endpoint source is set to
|
||||
// EndpointSourceCustom.You can provide functional options to configure endpoint
|
||||
// values for the resolved endpoint.
|
||||
func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
|
||||
e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
|
||||
for _, fn := range optFns {
|
||||
fn(&e)
|
||||
}
|
||||
|
||||
return EndpointResolverFunc(
|
||||
func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
|
||||
if len(e.SigningRegion) == 0 {
|
||||
e.SigningRegion = region
|
||||
}
|
||||
return e, nil
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
type ResolveEndpoint struct {
|
||||
Resolver EndpointResolver
|
||||
Options EndpointResolverOptions
|
||||
}
|
||||
|
||||
func (*ResolveEndpoint) ID() string {
|
||||
return "ResolveEndpoint"
|
||||
}
|
||||
|
||||
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
req, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
|
||||
}
|
||||
|
||||
if m.Resolver == nil {
|
||||
return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
|
||||
}
|
||||
|
||||
eo := m.Options
|
||||
eo.Logger = middleware.GetLogger(ctx)
|
||||
|
||||
var endpoint aws.Endpoint
|
||||
endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
|
||||
if err != nil {
|
||||
return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
|
||||
}
|
||||
|
||||
req.URL, err = url.Parse(endpoint.URL)
|
||||
if err != nil {
|
||||
return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
|
||||
}
|
||||
|
||||
if len(awsmiddleware.GetSigningName(ctx)) == 0 {
|
||||
signingName := endpoint.SigningName
|
||||
if len(signingName) == 0 {
|
||||
signingName = "awsssooidc"
|
||||
}
|
||||
ctx = awsmiddleware.SetSigningName(ctx, signingName)
|
||||
}
|
||||
ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
|
||||
ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
|
||||
ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
|
||||
ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
|
||||
return stack.Serialize.Insert(&ResolveEndpoint{
|
||||
Resolver: o.EndpointResolver,
|
||||
Options: o.EndpointOptions,
|
||||
}, "OperationSerializer", middleware.Before)
|
||||
}
|
||||
|
||||
func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
|
||||
_, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
|
||||
return err
|
||||
}
|
||||
|
||||
type wrappedEndpointResolver struct {
|
||||
awsResolver aws.EndpointResolverWithOptions
|
||||
resolver EndpointResolver
|
||||
}
|
||||
|
||||
func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
|
||||
if w.awsResolver == nil {
|
||||
goto fallback
|
||||
}
|
||||
endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
|
||||
if err == nil {
|
||||
return endpoint, nil
|
||||
}
|
||||
|
||||
if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
|
||||
return endpoint, err
|
||||
}
|
||||
|
||||
fallback:
|
||||
if w.resolver == nil {
|
||||
return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
|
||||
}
|
||||
return w.resolver.ResolveEndpoint(region, options)
|
||||
}
|
||||
|
||||
type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
|
||||
|
||||
func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
|
||||
return a(service, region)
|
||||
}
|
||||
|
||||
var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
|
||||
|
||||
// withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver.
|
||||
// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
|
||||
// fallbackResolver for resolution.
|
||||
//
|
||||
// fallbackResolver must not be nil
|
||||
func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
|
||||
var resolver aws.EndpointResolverWithOptions
|
||||
|
||||
if awsResolverWithOptions != nil {
|
||||
resolver = awsResolverWithOptions
|
||||
} else if awsResolver != nil {
|
||||
resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
|
||||
}
|
||||
|
||||
return &wrappedEndpointResolver{
|
||||
awsResolver: resolver,
|
||||
resolver: fallbackResolver,
|
||||
}
|
||||
}
|
||||
|
||||
func finalizeClientEndpointResolverOptions(options *Options) {
|
||||
options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
|
||||
|
||||
if len(options.EndpointOptions.ResolvedRegion) == 0 {
|
||||
const fipsInfix = "-fips-"
|
||||
const fipsPrefix = "fips-"
|
||||
const fipsSuffix = "-fips"
|
||||
|
||||
if strings.Contains(options.Region, fipsInfix) ||
|
||||
strings.Contains(options.Region, fipsPrefix) ||
|
||||
strings.Contains(options.Region, fipsSuffix) {
|
||||
options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
|
||||
options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
|
||||
options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
|
||||
}
|
||||
}
|
||||
|
||||
}
|
29
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json
generated
vendored
Normal file
29
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"github.com/aws/aws-sdk-go-v2": "v1.4.0",
|
||||
"github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
|
||||
"github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
|
||||
"github.com/aws/smithy-go": "v1.4.0"
|
||||
},
|
||||
"files": [
|
||||
"api_client.go",
|
||||
"api_client_test.go",
|
||||
"api_op_CreateToken.go",
|
||||
"api_op_RegisterClient.go",
|
||||
"api_op_StartDeviceAuthorization.go",
|
||||
"deserializers.go",
|
||||
"doc.go",
|
||||
"endpoints.go",
|
||||
"generated.json",
|
||||
"internal/endpoints/endpoints.go",
|
||||
"internal/endpoints/endpoints_test.go",
|
||||
"protocol_test.go",
|
||||
"serializers.go",
|
||||
"types/errors.go",
|
||||
"types/types.go",
|
||||
"validators.go"
|
||||
],
|
||||
"go": "1.15",
|
||||
"module": "github.com/aws/aws-sdk-go-v2/service/ssooidc",
|
||||
"unstable": false
|
||||
}
|
6
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
generated
vendored
Normal file
6
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
|
||||
|
||||
package ssooidc
|
||||
|
||||
// goModuleVersion is the tagged release for this module
|
||||
const goModuleVersion = "1.14.5"
|
446
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go
generated
vendored
Normal file
446
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go
generated
vendored
Normal file
@ -0,0 +1,446 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package endpoints
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
|
||||
"github.com/aws/smithy-go/logging"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
// Options is the endpoint resolver configuration options
|
||||
type Options struct {
|
||||
// Logger is a logging implementation that log events should be sent to.
|
||||
Logger logging.Logger
|
||||
|
||||
// LogDeprecated indicates that deprecated endpoints should be logged to the
|
||||
// provided logger.
|
||||
LogDeprecated bool
|
||||
|
||||
// ResolvedRegion is used to override the region to be resolved, rather then the
|
||||
// using the value passed to the ResolveEndpoint method. This value is used by the
|
||||
// SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
|
||||
// name. You must not set this value directly in your application.
|
||||
ResolvedRegion string
|
||||
|
||||
// DisableHTTPS informs the resolver to return an endpoint that does not use the
|
||||
// HTTPS scheme.
|
||||
DisableHTTPS bool
|
||||
|
||||
// UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
|
||||
UseDualStackEndpoint aws.DualStackEndpointState
|
||||
|
||||
// UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
|
||||
UseFIPSEndpoint aws.FIPSEndpointState
|
||||
}
|
||||
|
||||
func (o Options) GetResolvedRegion() string {
|
||||
return o.ResolvedRegion
|
||||
}
|
||||
|
||||
func (o Options) GetDisableHTTPS() bool {
|
||||
return o.DisableHTTPS
|
||||
}
|
||||
|
||||
func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
|
||||
return o.UseDualStackEndpoint
|
||||
}
|
||||
|
||||
func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
|
||||
return o.UseFIPSEndpoint
|
||||
}
|
||||
|
||||
func transformToSharedOptions(options Options) endpoints.Options {
|
||||
return endpoints.Options{
|
||||
Logger: options.Logger,
|
||||
LogDeprecated: options.LogDeprecated,
|
||||
ResolvedRegion: options.ResolvedRegion,
|
||||
DisableHTTPS: options.DisableHTTPS,
|
||||
UseDualStackEndpoint: options.UseDualStackEndpoint,
|
||||
UseFIPSEndpoint: options.UseFIPSEndpoint,
|
||||
}
|
||||
}
|
||||
|
||||
// Resolver SSO OIDC endpoint resolver
|
||||
type Resolver struct {
|
||||
partitions endpoints.Partitions
|
||||
}
|
||||
|
||||
// ResolveEndpoint resolves the service endpoint for the given region and options
|
||||
func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
|
||||
if len(region) == 0 {
|
||||
return endpoint, &aws.MissingRegionError{}
|
||||
}
|
||||
|
||||
opt := transformToSharedOptions(options)
|
||||
return r.partitions.ResolveEndpoint(region, opt)
|
||||
}
|
||||
|
||||
// New returns a new Resolver
|
||||
func New() *Resolver {
|
||||
return &Resolver{
|
||||
partitions: defaultPartitions,
|
||||
}
|
||||
}
|
||||
|
||||
var partitionRegexp = struct {
|
||||
Aws *regexp.Regexp
|
||||
AwsCn *regexp.Regexp
|
||||
AwsIso *regexp.Regexp
|
||||
AwsIsoB *regexp.Regexp
|
||||
AwsUsGov *regexp.Regexp
|
||||
}{
|
||||
|
||||
Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"),
|
||||
AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
|
||||
AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
|
||||
AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
|
||||
AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
|
||||
}
|
||||
|
||||
var defaultPartitions = endpoints.Partitions{
|
||||
{
|
||||
ID: "aws",
|
||||
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
|
||||
{
|
||||
Variant: endpoints.DualStackVariant,
|
||||
}: {
|
||||
Hostname: "oidc.{region}.api.aws",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: endpoints.FIPSVariant,
|
||||
}: {
|
||||
Hostname: "oidc-fips.{region}.amazonaws.com",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
|
||||
}: {
|
||||
Hostname: "oidc-fips.{region}.api.aws",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: 0,
|
||||
}: {
|
||||
Hostname: "oidc.{region}.amazonaws.com",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
},
|
||||
RegionRegex: partitionRegexp.Aws,
|
||||
IsRegionalized: true,
|
||||
Endpoints: endpoints.Endpoints{
|
||||
endpoints.EndpointKey{
|
||||
Region: "af-south-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.af-south-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "af-south-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-east-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.ap-east-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ap-east-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-northeast-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.ap-northeast-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ap-northeast-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-northeast-2",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.ap-northeast-2.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ap-northeast-2",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-northeast-3",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.ap-northeast-3.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ap-northeast-3",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-south-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.ap-south-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ap-south-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-southeast-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.ap-southeast-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ap-southeast-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-southeast-2",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.ap-southeast-2.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ap-southeast-2",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ap-southeast-3",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.ap-southeast-3.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ap-southeast-3",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "ca-central-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.ca-central-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "ca-central-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "eu-central-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.eu-central-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "eu-central-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "eu-north-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.eu-north-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "eu-north-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "eu-south-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.eu-south-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "eu-south-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "eu-west-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.eu-west-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "eu-west-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "eu-west-2",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.eu-west-2.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "eu-west-2",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "eu-west-3",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.eu-west-3.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "eu-west-3",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "me-south-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.me-south-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "me-south-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "sa-east-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.sa-east-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "sa-east-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "us-east-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.us-east-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "us-east-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "us-east-2",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.us-east-2.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "us-east-2",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "us-west-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.us-west-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "us-west-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "us-west-2",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.us-west-2.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "us-west-2",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "aws-cn",
|
||||
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
|
||||
{
|
||||
Variant: endpoints.DualStackVariant,
|
||||
}: {
|
||||
Hostname: "oidc.{region}.api.amazonwebservices.com.cn",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: endpoints.FIPSVariant,
|
||||
}: {
|
||||
Hostname: "oidc-fips.{region}.amazonaws.com.cn",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
|
||||
}: {
|
||||
Hostname: "oidc-fips.{region}.api.amazonwebservices.com.cn",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: 0,
|
||||
}: {
|
||||
Hostname: "oidc.{region}.amazonaws.com.cn",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
},
|
||||
RegionRegex: partitionRegexp.AwsCn,
|
||||
IsRegionalized: true,
|
||||
},
|
||||
{
|
||||
ID: "aws-iso",
|
||||
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
|
||||
{
|
||||
Variant: endpoints.FIPSVariant,
|
||||
}: {
|
||||
Hostname: "oidc-fips.{region}.c2s.ic.gov",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: 0,
|
||||
}: {
|
||||
Hostname: "oidc.{region}.c2s.ic.gov",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
},
|
||||
RegionRegex: partitionRegexp.AwsIso,
|
||||
IsRegionalized: true,
|
||||
},
|
||||
{
|
||||
ID: "aws-iso-b",
|
||||
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
|
||||
{
|
||||
Variant: endpoints.FIPSVariant,
|
||||
}: {
|
||||
Hostname: "oidc-fips.{region}.sc2s.sgov.gov",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: 0,
|
||||
}: {
|
||||
Hostname: "oidc.{region}.sc2s.sgov.gov",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
},
|
||||
RegionRegex: partitionRegexp.AwsIsoB,
|
||||
IsRegionalized: true,
|
||||
},
|
||||
{
|
||||
ID: "aws-us-gov",
|
||||
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
|
||||
{
|
||||
Variant: endpoints.DualStackVariant,
|
||||
}: {
|
||||
Hostname: "oidc.{region}.api.aws",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: endpoints.FIPSVariant,
|
||||
}: {
|
||||
Hostname: "oidc-fips.{region}.amazonaws.com",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
|
||||
}: {
|
||||
Hostname: "oidc-fips.{region}.api.aws",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
{
|
||||
Variant: 0,
|
||||
}: {
|
||||
Hostname: "oidc.{region}.amazonaws.com",
|
||||
Protocols: []string{"https"},
|
||||
SignatureVersions: []string{"v4"},
|
||||
},
|
||||
},
|
||||
RegionRegex: partitionRegexp.AwsUsGov,
|
||||
IsRegionalized: true,
|
||||
Endpoints: endpoints.Endpoints{
|
||||
endpoints.EndpointKey{
|
||||
Region: "us-gov-east-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.us-gov-east-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "us-gov-east-1",
|
||||
},
|
||||
},
|
||||
endpoints.EndpointKey{
|
||||
Region: "us-gov-west-1",
|
||||
}: endpoints.Endpoint{
|
||||
Hostname: "oidc.us-gov-west-1.amazonaws.com",
|
||||
CredentialScope: endpoints.CredentialScope{
|
||||
Region: "us-gov-west-1",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
288
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go
generated
vendored
Normal file
288
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go
generated
vendored
Normal file
@ -0,0 +1,288 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssooidc
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
smithy "github.com/aws/smithy-go"
|
||||
"github.com/aws/smithy-go/encoding/httpbinding"
|
||||
smithyjson "github.com/aws/smithy-go/encoding/json"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
smithyhttp "github.com/aws/smithy-go/transport/http"
|
||||
)
|
||||
|
||||
type awsRestjson1_serializeOpCreateToken struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpCreateToken) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpCreateToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*CreateTokenInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/token")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentCreateTokenInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsCreateTokenInput(v *CreateTokenInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentCreateTokenInput(v *CreateTokenInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.ClientId != nil {
|
||||
ok := object.Key("clientId")
|
||||
ok.String(*v.ClientId)
|
||||
}
|
||||
|
||||
if v.ClientSecret != nil {
|
||||
ok := object.Key("clientSecret")
|
||||
ok.String(*v.ClientSecret)
|
||||
}
|
||||
|
||||
if v.Code != nil {
|
||||
ok := object.Key("code")
|
||||
ok.String(*v.Code)
|
||||
}
|
||||
|
||||
if v.DeviceCode != nil {
|
||||
ok := object.Key("deviceCode")
|
||||
ok.String(*v.DeviceCode)
|
||||
}
|
||||
|
||||
if v.GrantType != nil {
|
||||
ok := object.Key("grantType")
|
||||
ok.String(*v.GrantType)
|
||||
}
|
||||
|
||||
if v.RedirectUri != nil {
|
||||
ok := object.Key("redirectUri")
|
||||
ok.String(*v.RedirectUri)
|
||||
}
|
||||
|
||||
if v.RefreshToken != nil {
|
||||
ok := object.Key("refreshToken")
|
||||
ok.String(*v.RefreshToken)
|
||||
}
|
||||
|
||||
if v.Scope != nil {
|
||||
ok := object.Key("scope")
|
||||
if err := awsRestjson1_serializeDocumentScopes(v.Scope, ok); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpRegisterClient struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpRegisterClient) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpRegisterClient) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*RegisterClientInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/client/register")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentRegisterClientInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsRegisterClientInput(v *RegisterClientInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentRegisterClientInput(v *RegisterClientInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.ClientName != nil {
|
||||
ok := object.Key("clientName")
|
||||
ok.String(*v.ClientName)
|
||||
}
|
||||
|
||||
if v.ClientType != nil {
|
||||
ok := object.Key("clientType")
|
||||
ok.String(*v.ClientType)
|
||||
}
|
||||
|
||||
if v.Scopes != nil {
|
||||
ok := object.Key("scopes")
|
||||
if err := awsRestjson1_serializeDocumentScopes(v.Scopes, ok); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type awsRestjson1_serializeOpStartDeviceAuthorization struct {
|
||||
}
|
||||
|
||||
func (*awsRestjson1_serializeOpStartDeviceAuthorization) ID() string {
|
||||
return "OperationSerializer"
|
||||
}
|
||||
|
||||
func (m *awsRestjson1_serializeOpStartDeviceAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
|
||||
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
request, ok := in.Request.(*smithyhttp.Request)
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
|
||||
}
|
||||
|
||||
input, ok := in.Parameters.(*StartDeviceAuthorizationInput)
|
||||
_ = input
|
||||
if !ok {
|
||||
return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
|
||||
}
|
||||
|
||||
opPath, opQuery := httpbinding.SplitURI("/device_authorization")
|
||||
request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath)
|
||||
request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery)
|
||||
request.Method = "POST"
|
||||
restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
|
||||
if err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
restEncoder.SetHeader("Content-Type").String("application/json")
|
||||
|
||||
jsonEncoder := smithyjson.NewEncoder()
|
||||
if err := awsRestjson1_serializeOpDocumentStartDeviceAuthorizationInput(input, jsonEncoder.Value); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
|
||||
if request.Request, err = restEncoder.Encode(request.Request); err != nil {
|
||||
return out, metadata, &smithy.SerializationError{Err: err}
|
||||
}
|
||||
in.Request = request
|
||||
|
||||
return next.HandleSerialize(ctx, in)
|
||||
}
|
||||
func awsRestjson1_serializeOpHttpBindingsStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput, encoder *httpbinding.Encoder) error {
|
||||
if v == nil {
|
||||
return fmt.Errorf("unsupported serialization of nil %T", v)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeOpDocumentStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput, value smithyjson.Value) error {
|
||||
object := value.Object()
|
||||
defer object.Close()
|
||||
|
||||
if v.ClientId != nil {
|
||||
ok := object.Key("clientId")
|
||||
ok.String(*v.ClientId)
|
||||
}
|
||||
|
||||
if v.ClientSecret != nil {
|
||||
ok := object.Key("clientSecret")
|
||||
ok.String(*v.ClientSecret)
|
||||
}
|
||||
|
||||
if v.StartUrl != nil {
|
||||
ok := object.Key("startUrl")
|
||||
ok.String(*v.StartUrl)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func awsRestjson1_serializeDocumentScopes(v []string, value smithyjson.Value) error {
|
||||
array := value.Array()
|
||||
defer array.Close()
|
||||
|
||||
for i := range v {
|
||||
av := array.Value()
|
||||
av.String(v[i])
|
||||
}
|
||||
return nil
|
||||
}
|
366
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go
generated
vendored
Normal file
366
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go
generated
vendored
Normal file
@ -0,0 +1,366 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
smithy "github.com/aws/smithy-go"
|
||||
)
|
||||
|
||||
// You do not have sufficient access to perform this action.
|
||||
type AccessDeniedException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *AccessDeniedException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *AccessDeniedException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *AccessDeniedException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "AccessDeniedException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that a request to authorize a client with an access user session token
|
||||
// is pending.
|
||||
type AuthorizationPendingException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *AuthorizationPendingException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *AuthorizationPendingException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *AuthorizationPendingException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "AuthorizationPendingException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *AuthorizationPendingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that the token issued by the service is expired and is no longer
|
||||
// valid.
|
||||
type ExpiredTokenException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *ExpiredTokenException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *ExpiredTokenException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *ExpiredTokenException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "ExpiredTokenException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *ExpiredTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that an error from the service occurred while trying to process a
|
||||
// request.
|
||||
type InternalServerException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *InternalServerException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *InternalServerException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *InternalServerException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "InternalServerException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
|
||||
|
||||
// Indicates that the clientId or clientSecret in the request is invalid. For
|
||||
// example, this can occur when a client sends an incorrect clientId or an expired
|
||||
// clientSecret.
|
||||
type InvalidClientException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *InvalidClientException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *InvalidClientException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *InvalidClientException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "InvalidClientException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *InvalidClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that the client information sent in the request during registration is
|
||||
// invalid.
|
||||
type InvalidClientMetadataException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *InvalidClientMetadataException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *InvalidClientMetadataException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *InvalidClientMetadataException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "InvalidClientMetadataException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *InvalidClientMetadataException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that a request contains an invalid grant. This can occur if a client
|
||||
// makes a CreateToken request with an invalid grant type.
|
||||
type InvalidGrantException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *InvalidGrantException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *InvalidGrantException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *InvalidGrantException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "InvalidGrantException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *InvalidGrantException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that something is wrong with the input to the request. For example, a
|
||||
// required parameter might be missing or out of range.
|
||||
type InvalidRequestException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *InvalidRequestException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *InvalidRequestException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *InvalidRequestException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "InvalidRequestException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that the scope provided in the request is invalid.
|
||||
type InvalidScopeException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *InvalidScopeException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *InvalidScopeException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *InvalidScopeException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "InvalidScopeException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *InvalidScopeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that the client is making the request too frequently and is more than
|
||||
// the service can handle.
|
||||
type SlowDownException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *SlowDownException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *SlowDownException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *SlowDownException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "SlowDownException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *SlowDownException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that the client is not currently authorized to make the request. This
|
||||
// can happen when a clientId is not issued for a public client.
|
||||
type UnauthorizedClientException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *UnauthorizedClientException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *UnauthorizedClientException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *UnauthorizedClientException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "UnauthorizedClientException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *UnauthorizedClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
||||
|
||||
// Indicates that the grant type in the request is not supported by the service.
|
||||
type UnsupportedGrantTypeException struct {
|
||||
Message *string
|
||||
|
||||
ErrorCodeOverride *string
|
||||
|
||||
Error_ *string
|
||||
Error_description *string
|
||||
|
||||
noSmithyDocumentSerde
|
||||
}
|
||||
|
||||
func (e *UnsupportedGrantTypeException) Error() string {
|
||||
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
|
||||
}
|
||||
func (e *UnsupportedGrantTypeException) ErrorMessage() string {
|
||||
if e.Message == nil {
|
||||
return ""
|
||||
}
|
||||
return *e.Message
|
||||
}
|
||||
func (e *UnsupportedGrantTypeException) ErrorCode() string {
|
||||
if e == nil || e.ErrorCodeOverride == nil {
|
||||
return "UnsupportedGrantTypeException"
|
||||
}
|
||||
return *e.ErrorCodeOverride
|
||||
}
|
||||
func (e *UnsupportedGrantTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
|
9
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go
generated
vendored
Normal file
9
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
smithydocument "github.com/aws/smithy-go/document"
|
||||
)
|
||||
|
||||
type noSmithyDocumentSerde = smithydocument.NoSerde
|
142
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go
generated
vendored
Normal file
142
vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go
generated
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
// Code generated by smithy-go-codegen DO NOT EDIT.
|
||||
|
||||
package ssooidc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
smithy "github.com/aws/smithy-go"
|
||||
"github.com/aws/smithy-go/middleware"
|
||||
)
|
||||
|
||||
type validateOpCreateToken struct {
|
||||
}
|
||||
|
||||
func (*validateOpCreateToken) ID() string {
|
||||
return "OperationInputValidation"
|
||||
}
|
||||
|
||||
func (m *validateOpCreateToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
input, ok := in.Parameters.(*CreateTokenInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
||||
}
|
||||
if err := validateOpCreateTokenInput(input); err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
type validateOpRegisterClient struct {
|
||||
}
|
||||
|
||||
func (*validateOpRegisterClient) ID() string {
|
||||
return "OperationInputValidation"
|
||||
}
|
||||
|
||||
func (m *validateOpRegisterClient) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
input, ok := in.Parameters.(*RegisterClientInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
||||
}
|
||||
if err := validateOpRegisterClientInput(input); err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
type validateOpStartDeviceAuthorization struct {
|
||||
}
|
||||
|
||||
func (*validateOpStartDeviceAuthorization) ID() string {
|
||||
return "OperationInputValidation"
|
||||
}
|
||||
|
||||
func (m *validateOpStartDeviceAuthorization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
|
||||
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
|
||||
) {
|
||||
input, ok := in.Parameters.(*StartDeviceAuthorizationInput)
|
||||
if !ok {
|
||||
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
|
||||
}
|
||||
if err := validateOpStartDeviceAuthorizationInput(input); err != nil {
|
||||
return out, metadata, err
|
||||
}
|
||||
return next.HandleInitialize(ctx, in)
|
||||
}
|
||||
|
||||
func addOpCreateTokenValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpCreateToken{}, middleware.After)
|
||||
}
|
||||
|
||||
func addOpRegisterClientValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpRegisterClient{}, middleware.After)
|
||||
}
|
||||
|
||||
func addOpStartDeviceAuthorizationValidationMiddleware(stack *middleware.Stack) error {
|
||||
return stack.Initialize.Add(&validateOpStartDeviceAuthorization{}, middleware.After)
|
||||
}
|
||||
|
||||
func validateOpCreateTokenInput(v *CreateTokenInput) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
invalidParams := smithy.InvalidParamsError{Context: "CreateTokenInput"}
|
||||
if v.ClientId == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("ClientId"))
|
||||
}
|
||||
if v.ClientSecret == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("ClientSecret"))
|
||||
}
|
||||
if v.GrantType == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("GrantType"))
|
||||
}
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func validateOpRegisterClientInput(v *RegisterClientInput) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
invalidParams := smithy.InvalidParamsError{Context: "RegisterClientInput"}
|
||||
if v.ClientName == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("ClientName"))
|
||||
}
|
||||
if v.ClientType == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("ClientType"))
|
||||
}
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func validateOpStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput) error {
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
invalidParams := smithy.InvalidParamsError{Context: "StartDeviceAuthorizationInput"}
|
||||
if v.ClientId == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("ClientId"))
|
||||
}
|
||||
if v.ClientSecret == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("ClientSecret"))
|
||||
}
|
||||
if v.StartUrl == nil {
|
||||
invalidParams.Add(smithy.NewErrParamRequired("StartUrl"))
|
||||
}
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
122
vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
generated
vendored
122
vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md
generated
vendored
@ -1,3 +1,125 @@
|
||||
# v1.18.6 (2023-03-10)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.5 (2023-02-22)
|
||||
|
||||
* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
|
||||
|
||||
# v1.18.4 (2023-02-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.18.3 (2023-02-03)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
* **Dependency Update**: Upgrade smithy to 1.27.2 and correct empty query list serialization.
|
||||
|
||||
# v1.18.2 (2023-01-25)
|
||||
|
||||
* **Documentation**: Doc only change to update wording in a key topic
|
||||
|
||||
# v1.18.1 (2023-01-23)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.18.0 (2023-01-05)
|
||||
|
||||
* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
|
||||
|
||||
# v1.17.7 (2022-12-15)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.6 (2022-12-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.5 (2022-11-22)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.17.4 (2022-11-17)
|
||||
|
||||
* **Documentation**: Documentation updates for AWS Security Token Service.
|
||||
|
||||
# v1.17.3 (2022-11-16)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.17.2 (2022-11-10)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.17.1 (2022-10-24)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.17.0 (2022-10-21)
|
||||
|
||||
* **Feature**: Add presign functionality for sts:AssumeRole operation
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.19 (2022-09-20)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.18 (2022-09-14)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.17 (2022-09-02)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.16 (2022-08-31)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.15 (2022-08-30)
|
||||
|
||||
* No change notes available for this release.
|
||||
|
||||
# v1.16.14 (2022-08-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.13 (2022-08-11)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.12 (2022-08-09)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.11 (2022-08-08)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.10 (2022-08-01)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.9 (2022-07-05)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.8 (2022-06-29)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.7 (2022-06-07)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.6 (2022-05-17)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
||||
# v1.16.5 (2022-05-16)
|
||||
|
||||
* **Documentation**: Documentation updates for AWS Security Token Service.
|
||||
|
||||
# v1.16.4 (2022-04-25)
|
||||
|
||||
* **Dependency Update**: Updated to the latest SDK module versions
|
||||
|
3
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
generated
vendored
3
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go
generated
vendored
@ -512,6 +512,9 @@ func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, op
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil {
|
||||
return err
|
||||
}
|
||||
// convert request to a GET request
|
||||
err = query.AddAsGetRequestMiddleware(stack)
|
||||
if err != nil {
|
||||
|
122
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
generated
vendored
122
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go
generated
vendored
@ -12,12 +12,11 @@ import (
|
||||
)
|
||||
|
||||
// Returns a set of temporary security credentials that you can use to access
|
||||
// Amazon Web Services resources that you might not normally have access to. These
|
||||
// temporary credentials consist of an access key ID, a secret access key, and a
|
||||
// security token. Typically, you use AssumeRole within your account or for
|
||||
// cross-account access. For a comparison of AssumeRole with other API operations
|
||||
// that produce temporary credentials, see Requesting Temporary Security
|
||||
// Credentials
|
||||
// Amazon Web Services resources. These temporary credentials consist of an access
|
||||
// key ID, a secret access key, and a security token. Typically, you use AssumeRole
|
||||
// within your account or for cross-account access. For a comparison of AssumeRole
|
||||
// with other API operations that produce temporary credentials, see Requesting
|
||||
// Temporary Security Credentials
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
|
||||
// and Comparing the Amazon Web Services STS API operations
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
|
||||
@ -28,16 +27,16 @@ import (
|
||||
// inline or managed session policies
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// to this operation. You can pass a single JSON policy document to use as an
|
||||
// inline session policy. You can also specify up to 10 managed policies to use as
|
||||
// managed session policies. The plaintext that you use for both inline and managed
|
||||
// session policies can't exceed 2,048 characters. 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 credentials in subsequent Amazon Web
|
||||
// Services API calls to access resources in the account that owns the role. You
|
||||
// cannot use session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see Session Policies
|
||||
// inline session policy. You can also specify up to 10 managed policy Amazon
|
||||
// Resource Names (ARNs) to use as managed session policies. The plaintext that you
|
||||
// use for both inline and managed session policies can't exceed 2,048 characters.
|
||||
// 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
|
||||
// credentials in subsequent Amazon Web Services API calls to access resources in
|
||||
// the account that owns the role. You cannot use session policies to grant more
|
||||
// permissions than those allowed by the identity-based policy of the role that is
|
||||
// being assumed. For more information, see Session Policies
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. When you create a role, you create two policies: A role
|
||||
// trust policy that specifies who can assume the role and a permissions policy
|
||||
@ -189,11 +188,11 @@ type AssumeRoleInput struct {
|
||||
// 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 Amazon Web
|
||||
// Services conversion compresses the passed session policies 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.
|
||||
// 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.
|
||||
Policy *string
|
||||
|
||||
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
|
||||
@ -204,18 +203,18 @@ type AssumeRoleInput struct {
|
||||
// Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces
|
||||
// (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
|
||||
// the Amazon Web Services General Reference. An Amazon Web Services conversion
|
||||
// compresses the passed session policies 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 credentials in subsequent Amazon Web Services API calls to
|
||||
// access resources in the account that owns the role. You cannot use session
|
||||
// policies to grant more permissions than those allowed by the identity-based
|
||||
// policy of the role that is being assumed. For more information, see Session
|
||||
// Policies
|
||||
// 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 credentials in subsequent Amazon Web
|
||||
// Services API calls to access resources in the account that owns the role. You
|
||||
// cannot use session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see Session Policies
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide.
|
||||
PolicyArns []types.PolicyDescriptorType
|
||||
@ -257,22 +256,23 @@ type AssumeRoleInput struct {
|
||||
// Character Limits
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide. An Amazon Web Services conversion compresses the passed
|
||||
// session policies 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. Tag key–value pairs are not case sensitive, but case is preserved.
|
||||
// This means that you cannot have separate Department and department tag keys.
|
||||
// Assume that the role has the Department=Marketing tag and you pass the
|
||||
// department=engineering session tag. Department and department are not saved as
|
||||
// separate tags, and the session tag passed in the request takes precedence over
|
||||
// the role tag. Additionally, if you used temporary credentials to perform this
|
||||
// operation, the new session inherits any transitive session tags from the calling
|
||||
// session. If you pass a session tag with the same key as an inherited tag, the
|
||||
// operation fails. To view the inherited tags for a session, see the CloudTrail
|
||||
// logs. For more information, see Viewing Session Tags in CloudTrail
|
||||
// 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. Tag key–value pairs are not case
|
||||
// sensitive, but case is preserved. This means that you cannot have separate
|
||||
// Department and department tag keys. Assume that the role has the
|
||||
// Department=Marketing tag and you pass the department=engineering session tag.
|
||||
// Department and department are not saved as separate tags, and the session tag
|
||||
// passed in the request takes precedence over the role tag. Additionally, if you
|
||||
// used temporary credentials to perform this operation, the new session inherits
|
||||
// any transitive session tags from the calling session. If you pass a session tag
|
||||
// with the same key as an inherited tag, the operation fails. To view the
|
||||
// inherited tags for a session, see the CloudTrail logs. For more information, see
|
||||
// Viewing Session Tags in CloudTrail
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs)
|
||||
// in the IAM User Guide.
|
||||
Tags []types.Tag
|
||||
@ -415,3 +415,27 @@ func newServiceMetadataMiddleware_opAssumeRole(region string) *awsmiddleware.Reg
|
||||
OperationName: "AssumeRole",
|
||||
}
|
||||
}
|
||||
|
||||
// PresignAssumeRole is used to generate a presigned HTTP Request which contains
|
||||
// presigned URL, signed headers and HTTP method used.
|
||||
func (c *PresignClient) PresignAssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) {
|
||||
if params == nil {
|
||||
params = &AssumeRoleInput{}
|
||||
}
|
||||
options := c.options.copy()
|
||||
for _, fn := range optFns {
|
||||
fn(&options)
|
||||
}
|
||||
clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption)
|
||||
|
||||
result, _, err := c.client.invokeOperation(ctx, "AssumeRole", params, clientOptFns,
|
||||
c.client.addOperationAssumeRoleMiddlewares,
|
||||
presignConverter(options).convertToPresignMiddleware,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := result.(*v4.PresignedHTTPRequest)
|
||||
return out, nil
|
||||
}
|
||||
|
74
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
generated
vendored
74
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go
generated
vendored
@ -53,16 +53,16 @@ import (
|
||||
// pass inline or managed session policies
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// to this operation. You can pass a single JSON policy document to use as an
|
||||
// inline session policy. You can also specify up to 10 managed policies to use as
|
||||
// managed session policies. The plaintext that you use for both inline and managed
|
||||
// session policies can't exceed 2,048 characters. 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 credentials in subsequent Amazon Web
|
||||
// Services API calls to access resources in the account that owns the role. You
|
||||
// cannot use session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see Session Policies
|
||||
// inline session policy. You can also specify up to 10 managed policy Amazon
|
||||
// Resource Names (ARNs) to use as managed session policies. The plaintext that you
|
||||
// use for both inline and managed session policies can't exceed 2,048 characters.
|
||||
// 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
|
||||
// credentials in subsequent Amazon Web Services API calls to access resources in
|
||||
// the account that owns the role. You cannot use session policies to grant more
|
||||
// permissions than those allowed by the identity-based policy of the role that is
|
||||
// being assumed. For more information, see Session Policies
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. Calling AssumeRoleWithSAML does not require the use of
|
||||
// Amazon Web Services security credentials. The identity of the caller is
|
||||
@ -82,16 +82,16 @@ import (
|
||||
// these and additional limits, see IAM and STS Character Limits
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide. An Amazon Web Services conversion compresses the passed
|
||||
// session policies 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. An administrator must grant you the permissions necessary to pass
|
||||
// session tags. The administrator can also create granular permissions to allow
|
||||
// you to pass only specific session tags. For more information, see Tutorial:
|
||||
// Using Tags for Attribute-Based Access Control
|
||||
// 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. An administrator must grant you the
|
||||
// permissions necessary to pass session tags. The administrator can also create
|
||||
// granular permissions to allow you to pass only specific session tags. For more
|
||||
// information, see Tutorial: Using Tags for Attribute-Based Access Control
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
|
||||
// in the IAM User Guide. You can set the session tags as transitive. Transitive
|
||||
// tags persist during role chaining. For more information, see Chaining Roles with
|
||||
@ -194,11 +194,11 @@ type AssumeRoleWithSAMLInput struct {
|
||||
// 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 Amazon Web
|
||||
// Services conversion compresses the passed session policies 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.
|
||||
// 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.
|
||||
Policy *string
|
||||
|
||||
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
|
||||
@ -209,18 +209,18 @@ type AssumeRoleWithSAMLInput struct {
|
||||
// Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces
|
||||
// (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
|
||||
// the Amazon Web Services General Reference. An Amazon Web Services conversion
|
||||
// compresses the passed session policies 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 credentials in subsequent Amazon Web Services API calls to
|
||||
// access resources in the account that owns the role. You cannot use session
|
||||
// policies to grant more permissions than those allowed by the identity-based
|
||||
// policy of the role that is being assumed. For more information, see Session
|
||||
// Policies
|
||||
// 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 credentials in subsequent Amazon Web
|
||||
// Services API calls to access resources in the account that owns the role. You
|
||||
// cannot use session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see Session Policies
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide.
|
||||
PolicyArns []types.PolicyDescriptorType
|
||||
|
74
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
generated
vendored
74
vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go
generated
vendored
@ -63,16 +63,16 @@ import (
|
||||
// inline or managed session policies
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// to this operation. You can pass a single JSON policy document to use as an
|
||||
// inline session policy. You can also specify up to 10 managed policies to use as
|
||||
// managed session policies. The plaintext that you use for both inline and managed
|
||||
// session policies can't exceed 2,048 characters. 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 credentials in subsequent Amazon Web
|
||||
// Services API calls to access resources in the account that owns the role. You
|
||||
// cannot use session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see Session Policies
|
||||
// inline session policy. You can also specify up to 10 managed policy Amazon
|
||||
// Resource Names (ARNs) to use as managed session policies. The plaintext that you
|
||||
// use for both inline and managed session policies can't exceed 2,048 characters.
|
||||
// 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
|
||||
// credentials in subsequent Amazon Web Services API calls to access resources in
|
||||
// the account that owns the role. You cannot use session policies to grant more
|
||||
// permissions than those allowed by the identity-based policy of the role that is
|
||||
// being assumed. For more information, see Session Policies
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide. Tags (Optional) You can configure your IdP to pass
|
||||
// attributes into your web identity token as session tags. Each session tag
|
||||
@ -84,16 +84,16 @@ import (
|
||||
// these and additional limits, see IAM and STS Character Limits
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
|
||||
// in the IAM User Guide. An Amazon Web Services conversion compresses the passed
|
||||
// session policies 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. An administrator must grant you the permissions necessary to pass
|
||||
// session tags. The administrator can also create granular permissions to allow
|
||||
// you to pass only specific session tags. For more information, see Tutorial:
|
||||
// Using Tags for Attribute-Based Access Control
|
||||
// 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. An administrator must grant you the
|
||||
// permissions necessary to pass session tags. The administrator can also create
|
||||
// granular permissions to allow you to pass only specific session tags. For more
|
||||
// information, see Tutorial: Using Tags for Attribute-Based Access Control
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
|
||||
// in the IAM User Guide. You can set the session tags as transitive. Transitive
|
||||
// tags persist during role chaining. For more information, see Chaining Roles with
|
||||
@ -215,11 +215,11 @@ type AssumeRoleWithWebIdentityInput struct {
|
||||
// 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 Amazon Web
|
||||
// Services conversion compresses the passed session policies 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.
|
||||
// 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.
|
||||
Policy *string
|
||||
|
||||
// The Amazon Resource Names (ARNs) of the IAM managed policies that you want to
|
||||
@ -230,18 +230,18 @@ type AssumeRoleWithWebIdentityInput struct {
|
||||
// Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces
|
||||
// (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in
|
||||
// the Amazon Web Services General Reference. An Amazon Web Services conversion
|
||||
// compresses the passed session policies 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 credentials in subsequent Amazon Web Services API calls to
|
||||
// access resources in the account that owns the role. You cannot use session
|
||||
// policies to grant more permissions than those allowed by the identity-based
|
||||
// policy of the role that is being assumed. For more information, see Session
|
||||
// Policies
|
||||
// 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 credentials in subsequent Amazon Web
|
||||
// Services API calls to access resources in the account that owns the role. You
|
||||
// cannot use session policies to grant more permissions than those allowed by the
|
||||
// identity-based policy of the role that is being assumed. For more information,
|
||||
// see Session Policies
|
||||
// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
|
||||
// in the IAM User Guide.
|
||||
PolicyArns []types.PolicyDescriptorType
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user