Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws/endpoints: STS regional flag Implementation #2779

Merged
merged 20 commits into from Oct 23, 2019
Merged

Conversation

skotambkar
Copy link
Contributor

Implements STS regional flag, with support for legacy and regional options.
Adds test case for regional flags in v3model_test.go

Certain regions specified in aws/endpoints/sts_legacy_regions have legacy support for STS. Resolver resolves the endpoint to the global STS endpoint when the flag is not set to regional(case-insensitive).

By default the value for the regional flag is legacy. The env config declaration for the flag, has precedence over shared config.

@jasdel jasdel added the pr/work-in-progress This PR is a draft and needs further work. label Aug 23, 2019
@skotambkar skotambkar requested a review from jasdel August 23, 2019 20:36
@skotambkar skotambkar self-assigned this Aug 24, 2019
aws/endpoints/endpoints.go Show resolved Hide resolved
aws/endpoints/v3model_test.go Outdated Show resolved Hide resolved
aws/endpoints/v3model_test.go Outdated Show resolved Hide resolved
aws/session/csm_test.go Outdated Show resolved Hide resolved
aws/session/env_config.go Outdated Show resolved Hide resolved
aws/session/env_config_test.go Outdated Show resolved Hide resolved
aws/session/session.go Outdated Show resolved Hide resolved
aws/session/session.go Outdated Show resolved Hide resolved
aws/session/shared_config.go Show resolved Hide resolved
@skotambkar skotambkar requested a review from jasdel August 26, 2019 22:29
@skmcgrail skmcgrail self-requested a review August 26, 2019 23:40
aws/endpoints/endpoints.go Show resolved Hide resolved
Copy link
Contributor

@jasdel jasdel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, couple comments on change log, and naming.

CHANGELOG_PENDING.md Outdated Show resolved Hide resolved
aws/endpoints/v3model_sts_regional_test.go Show resolved Hide resolved
aws/session/shared_config.go Outdated Show resolved Hide resolved
@jasdel jasdel removed the pr/work-in-progress This PR is a draft and needs further work. label Oct 23, 2019
@jasdel jasdel merged commit 84fbd57 into aws:master Oct 23, 2019
aws-sdk-go-automation pushed a commit that referenced this pull request Oct 23, 2019
===

### Service Client Updates
* `service/connect`: Updates service API, documentation, and paginators
* `service/polly`: Updates service API
  * Amazon Polly adds new female voices: US Spanish - Lupe and Brazilian Portuguese - Camila; both voices are available in Standard and Neural engine.
* `service/sts`: Updates service documentation
  * AWS Security Token Service (STS) now supports a regional configuration flag to make the client respect the region without the need for the endpoint parameter.

### SDK Enhancements
* `aws/endpoints`: Adds support for STS Regional Flags ([#2779](#2779))
  * Implements STS regional flag, with support for `legacy` and `regional` options. Defaults to `legacy`. Legacy, will force all regions specified in aws/endpoints/sts_legacy_regions.go to resolve to the STS global endpoint, sts.amazonaws.com. This is the SDK's current behavior.
  * When the flag's value is `regional` the SDK will resolve the endpoint based on the endpoints.json model. This allows STS to update their service's modeled endpoints to be regionalized for all regions. When `regional` turned on use `aws-global` as the region to use the global endpoint.
  * `AWS_STS_REGIONAL_ENDPOINTS=regional` for environment, or `sts_regional_endpoints=regional` in shared config file.
  * The regions the SDK defaults to the STS global endpoint in `legacy` mode are:
    * ap-northeast-1
    * ap-south-1
    * ap-southeast-1
    * ap-southeast-2
    * aws-global
    * ca-central-1
    * eu-central-1
    * eu-north-1
    * eu-west-1
    * eu-west-2
    * eu-west-3
    * sa-east-1
    * us-east-1
    * us-east-2
    * us-west-1
    * us-west-2
aws-sdk-go-automation added a commit that referenced this pull request Oct 23, 2019
Release v1.25.18 (2019-10-23)
===

### Service Client Updates
* `service/connect`: Updates service API, documentation, and paginators
* `service/polly`: Updates service API
  * Amazon Polly adds new female voices: US Spanish - Lupe and Brazilian Portuguese - Camila; both voices are available in Standard and Neural engine.
* `service/sts`: Updates service documentation
  * AWS Security Token Service (STS) now supports a regional configuration flag to make the client respect the region without the need for the endpoint parameter.

### SDK Enhancements
* `aws/endpoints`: Adds support for STS Regional Flags ([#2779](#2779))
  * Implements STS regional flag, with support for `legacy` and `regional` options. Defaults to `legacy`. Legacy, will force all regions specified in aws/endpoints/sts_legacy_regions.go to resolve to the STS global endpoint, sts.amazonaws.com. This is the SDK's current behavior.
  * When the flag's value is `regional` the SDK will resolve the endpoint based on the endpoints.json model. This allows STS to update their service's modeled endpoints to be regionalized for all regions. When `regional` turned on use `aws-global` as the region to use the global endpoint.
  * `AWS_STS_REGIONAL_ENDPOINTS=regional` for environment, or `sts_regional_endpoints=regional` in shared config file.
  * The regions the SDK defaults to the STS global endpoint in `legacy` mode are: 
    * ap-northeast-1
    * ap-south-1
    * ap-southeast-1
    * ap-southeast-2
    * aws-global
    * ca-central-1
    * eu-central-1
    * eu-north-1
    * eu-west-1
    * eu-west-2
    * eu-west-3
    * sa-east-1
    * us-east-1
    * us-east-2
    * us-west-1
    * us-west-2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants