Skip to content

Commit fba1357

Browse files
Merge pull request #480 from aws/staging/473bac6a-b4bb-463b-bec8-9bccd7315a11
Pull request: release <- staging/473bac6a-b4bb-463b-bec8-9bccd7315a11
2 parents 7da5a91 + edb3ba2 commit fba1357

File tree

236 files changed

+5177
-2757
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+5177
-2757
lines changed

.changes/2.5.30.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"date": "2019-04-24",
3+
"version": "2.5.30",
4+
"entries": [
5+
{
6+
"category": "AWS SDK for Java v2",
7+
"type": "feature",
8+
"description": "Support for `credential_source` property in profiles."
9+
},
10+
{
11+
"category": "AWS SDK for Java v2",
12+
"type": "feature",
13+
"description": "Make `BytesWrapper`, parent of `SdkBytes` and `ResponseBytes`, public. Fixes [#1208](https://github.com/aws/aws-sdk-java-v2/issues/1208)."
14+
},
15+
{
16+
"category": "Amazon Relational Database Service",
17+
"type": "feature",
18+
"description": "A new parameter \"feature-name\" is added to the add-role and remove-role db cluster APIs. The value for the parameter is optional for Aurora MySQL compatible database clusters, but mandatory for Aurora PostgresQL. You can find the valid list of values using describe db engine versions API."
19+
},
20+
{
21+
"category": "AWS Storage Gateway",
22+
"type": "feature",
23+
"description": "AWS Storage Gateway now supports Access Control Lists (ACLs) on File Gateway SMB shares, enabling you to apply fine grained access controls for Active Directory users and groups."
24+
},
25+
{
26+
"category": "Amazon Textract",
27+
"type": "feature",
28+
"description": "This release adds support for checkbox also known as SELECTION_ELEMENT in Amazon Textract."
29+
},
30+
{
31+
"category": "Amazon Simple Systems Manager (SSM)",
32+
"type": "feature",
33+
"description": "This release updates AWS Systems Manager APIs to allow customers to configure parameters to use either the standard-parameter tier (the default tier) or the advanced-parameter tier. It allows customers to create parameters with larger values and attach parameter policies to an Advanced Parameter."
34+
},
35+
{
36+
"category": "Amazon Route 53",
37+
"type": "feature",
38+
"description": "Amazon Route 53 now supports the Asia Pacific (Hong Kong) Region (ap-east-1) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region."
39+
},
40+
{
41+
"category": "Alexa For Business",
42+
"type": "feature",
43+
"description": "This release adds support for the Alexa for Business gateway and gateway group APIs."
44+
},
45+
{
46+
"category": "AWS MediaConnect",
47+
"type": "feature",
48+
"description": "Adds support for ListEntitlements pagination."
49+
},
50+
{
51+
"category": "AWS CloudFormation",
52+
"type": "feature",
53+
"description": "Documentation updates for cloudformation"
54+
},
55+
{
56+
"category": "Amazon Elastic Compute Cloud",
57+
"type": "feature",
58+
"description": "You can now launch the new Amazon EC2 general purpose burstable instance types T3a that feature AMD EPYC processors."
59+
},
60+
{
61+
"category": "AWS MediaTailor",
62+
"type": "feature",
63+
"description": "AWS Elemental MediaTailor SDK now includes a new parameter to support origin servers that produce single-period DASH manifests."
64+
},
65+
{
66+
"category": "AWS SDK for Java v2",
67+
"type": "bugfix",
68+
"description": "Fixed a bug in asynchronous clients, where a service closing a connection between when a channel is acquired and handlers are attached could lead to response futures never being completed. Fixes [#1207](https://github.com/aws/aws-sdk-java-v2/issues/1207)."
69+
}
70+
]
71+
}

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
1+
# __2.5.30__ __2019-04-24__
2+
## __AWS CloudFormation__
3+
- ### Features
4+
- Documentation updates for cloudformation
5+
6+
## __AWS MediaConnect__
7+
- ### Features
8+
- Adds support for ListEntitlements pagination.
9+
10+
## __AWS MediaTailor__
11+
- ### Features
12+
- AWS Elemental MediaTailor SDK now includes a new parameter to support origin servers that produce single-period DASH manifests.
13+
14+
## __AWS SDK for Java v2__
15+
- ### Features
16+
- Make `BytesWrapper`, parent of `SdkBytes` and `ResponseBytes`, public. Fixes [#1208](https://github.com/aws/aws-sdk-java-v2/issues/1208).
17+
- Support for `credential_source` property in profiles.
18+
19+
- ### Bugfixes
20+
- Fixed a bug in asynchronous clients, where a service closing a connection between when a channel is acquired and handlers are attached could lead to response futures never being completed. Fixes [#1207](https://github.com/aws/aws-sdk-java-v2/issues/1207).
21+
22+
## __AWS Storage Gateway__
23+
- ### Features
24+
- AWS Storage Gateway now supports Access Control Lists (ACLs) on File Gateway SMB shares, enabling you to apply fine grained access controls for Active Directory users and groups.
25+
26+
## __Alexa For Business__
27+
- ### Features
28+
- This release adds support for the Alexa for Business gateway and gateway group APIs.
29+
30+
## __Amazon Elastic Compute Cloud__
31+
- ### Features
32+
- You can now launch the new Amazon EC2 general purpose burstable instance types T3a that feature AMD EPYC processors.
33+
34+
## __Amazon Relational Database Service__
35+
- ### Features
36+
- A new parameter "feature-name" is added to the add-role and remove-role db cluster APIs. The value for the parameter is optional for Aurora MySQL compatible database clusters, but mandatory for Aurora PostgresQL. You can find the valid list of values using describe db engine versions API.
37+
38+
## __Amazon Route 53__
39+
- ### Features
40+
- Amazon Route 53 now supports the Asia Pacific (Hong Kong) Region (ap-east-1) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region.
41+
42+
## __Amazon Simple Systems Manager (SSM)__
43+
- ### Features
44+
- This release updates AWS Systems Manager APIs to allow customers to configure parameters to use either the standard-parameter tier (the default tier) or the advanced-parameter tier. It allows customers to create parameters with larger values and attach parameter policies to an Advanced Parameter.
45+
46+
## __Amazon Textract__
47+
- ### Features
48+
- This release adds support for checkbox also known as SELECTION_ELEMENT in Amazon Textract.
49+
150
# __2.5.29__ __2019-04-19__
251
## __AWS Resource Groups__
352
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can import the whole SDK into your project (includes all services) as follow
4545
<dependency>
4646
<groupId>software.amazon.awssdk</groupId>
4747
<artifactId>aws-sdk-java</artifactId>
48-
<version>2.5.29</version>
48+
<version>2.5.30</version>
4949
</dependency>
5050
```
5151

@@ -57,12 +57,12 @@ Alternatively you can add dependencies for the specific services you use only:
5757
<dependency>
5858
<groupId>software.amazon.awssdk</groupId>
5959
<artifactId>ec2</artifactId>
60-
<version>2.5.29</version>
60+
<version>2.5.30</version>
6161
</dependency>
6262
<dependency>
6363
<groupId>software.amazon.awssdk</groupId>
6464
<artifactId>s3</artifactId>
65-
<version>2.5.29</version>
65+
<version>2.5.30</version>
6666
</dependency>
6767
```
6868

@@ -76,7 +76,7 @@ To automatically manage module versions (currently all modules have the same ver
7676
<dependency>
7777
<groupId>software.amazon.awssdk</groupId>
7878
<artifactId>bom</artifactId>
79-
<version>2.5.29</version>
79+
<version>2.5.30</version>
8080
<type>pom</type>
8181
<scope>import</scope>
8282
</dependency>

aws-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>software.amazon.awssdk</groupId>
66
<artifactId>aws-sdk-java-pom</artifactId>
7-
<version>2.5.29</version>
7+
<version>2.5.30</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>aws-sdk-java-pom</artifactId>
77
<groupId>software.amazon.awssdk</groupId>
8-
<version>2.5.29</version>
8+
<version>2.5.30</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>software.amazon.awssdk</groupId>
66
<artifactId>aws-sdk-java-pom</artifactId>
7-
<version>2.5.29</version>
7+
<version>2.5.30</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>bom</artifactId>

bundle/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.5.29</version>
24+
<version>2.5.30</version>
2525
</parent>
2626
<artifactId>bundle</artifactId>
2727
<packaging>jar</packaging>

codegen-lite-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>software.amazon.awssdk</groupId>
99
<artifactId>aws-sdk-java-pom</artifactId>
10-
<version>2.5.29</version>
10+
<version>2.5.30</version>
1111
<relativePath>../pom.xml</relativePath>
1212
</parent>
1313
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>software.amazon.awssdk</groupId>
88
<artifactId>aws-sdk-java-pom</artifactId>
9-
<version>2.5.29</version>
9+
<version>2.5.30</version>
1010
</parent>
1111
<artifactId>codegen-lite</artifactId>
1212
<name>AWS Java SDK :: Code Generator Lite</name>

codegen-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>aws-sdk-java-pom</artifactId>
25-
<version>2.5.29</version>
25+
<version>2.5.30</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-maven-plugin</artifactId>

codegen/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.5.29</version>
24+
<version>2.5.30</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

core/annotations/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>core</artifactId>
77
<groupId>software.amazon.awssdk</groupId>
8-
<version>2.5.29</version>
8+
<version>2.5.30</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

core/auth/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>software.amazon.awssdk</groupId>
99
<artifactId>core</artifactId>
10-
<version>2.5.29</version>
10+
<version>2.5.30</version>
1111
</parent>
1212

1313
<artifactId>auth</artifactId>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
package software.amazon.awssdk.auth.credentials.internal;
17+
18+
import software.amazon.awssdk.annotations.SdkInternalApi;
19+
20+
@SdkInternalApi
21+
public enum CredentialSourceType {
22+
EC2_INSTANCE_METADATA,
23+
ECS_CONTAINER,
24+
ENVIRONMENT;
25+
26+
public static CredentialSourceType parse(String value) {
27+
if (value.equalsIgnoreCase("Ec2InstanceMetadata")) {
28+
return EC2_INSTANCE_METADATA;
29+
} else if (value.equalsIgnoreCase("EcsContainer")) {
30+
return ECS_CONTAINER;
31+
} else if (value.equalsIgnoreCase("Environment")) {
32+
return ENVIRONMENT;
33+
}
34+
35+
throw new IllegalArgumentException(String.format("%s is not a valid credential_source", value));
36+
}
37+
}

core/auth/src/main/java/software/amazon/awssdk/auth/credentials/internal/ProfileCredentialsUtils.java

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@
2626
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
2727
import software.amazon.awssdk.auth.credentials.AwsCredentials;
2828
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
29+
import software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain;
2930
import software.amazon.awssdk.auth.credentials.AwsSessionCredentials;
3031
import software.amazon.awssdk.auth.credentials.ChildProfileCredentialsProviderFactory;
32+
import software.amazon.awssdk.auth.credentials.ContainerCredentialsProvider;
33+
import software.amazon.awssdk.auth.credentials.EnvironmentVariableCredentialsProvider;
34+
import software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider;
3135
import software.amazon.awssdk.auth.credentials.ProcessCredentialsProvider;
3236
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
37+
import software.amazon.awssdk.auth.credentials.SystemPropertyCredentialsProvider;
3338
import software.amazon.awssdk.profiles.Profile;
3439
import software.amazon.awssdk.profiles.ProfileProperty;
3540
import software.amazon.awssdk.utils.SdkAutoCloseable;
@@ -88,7 +93,19 @@ public Optional<AwsCredentialsProvider> credentialsProvider() {
8893
*/
8994
private Optional<AwsCredentialsProvider> credentialsProvider(Set<String> children) {
9095
if (properties.containsKey(ProfileProperty.ROLE_ARN)) {
91-
return Optional.ofNullable(roleBasedProfileCredentialsProvider(children));
96+
boolean hasSourceProfile = properties.containsKey(ProfileProperty.SOURCE_PROFILE);
97+
boolean hasCredentialSource = properties.containsKey(ProfileProperty.CREDENTIAL_SOURCE);
98+
Validate.validState(!(hasSourceProfile && hasCredentialSource),
99+
"Invalid profile file: profile has both %s and %s.",
100+
ProfileProperty.SOURCE_PROFILE, ProfileProperty.CREDENTIAL_SOURCE);
101+
102+
if (hasSourceProfile) {
103+
return Optional.ofNullable(roleAndSourceProfileBasedProfileCredentialsProvider(children));
104+
}
105+
106+
if (hasCredentialSource) {
107+
return Optional.ofNullable(roleAndCredentialSourceBasedProfileCredentialsProvider());
108+
}
92109
}
93110

94111
if (properties.containsKey(ProfileProperty.CREDENTIAL_PROCESS)) {
@@ -144,7 +161,7 @@ private AwsCredentialsProvider credentialProcessCredentialsProvider() {
144161
*
145162
* @param children The child profiles that source credentials from this profile.
146163
*/
147-
private AwsCredentialsProvider roleBasedProfileCredentialsProvider(Set<String> children) {
164+
private AwsCredentialsProvider roleAndSourceProfileBasedProfileCredentialsProvider(Set<String> children) {
148165
requireProperties(ProfileProperty.SOURCE_PROFILE);
149166

150167
Validate.validState(!children.contains(name),
@@ -162,6 +179,34 @@ private AwsCredentialsProvider roleBasedProfileCredentialsProvider(Set<String> c
162179
return stsCredentialsProviderFactory().create(sourceCredentialsProvider, profile);
163180
}
164181

182+
/**
183+
* Load an assumed-role credentials provider that has been configured in this profile. This will attempt to locate the STS
184+
* module in order to generate the credentials provider. If it's not available, an illegal state exception will be raised.
185+
*/
186+
private AwsCredentialsProvider roleAndCredentialSourceBasedProfileCredentialsProvider() {
187+
requireProperties(ProfileProperty.CREDENTIAL_SOURCE);
188+
189+
CredentialSourceType credentialSource = CredentialSourceType.parse(properties.get(ProfileProperty.CREDENTIAL_SOURCE));
190+
AwsCredentialsProvider credentialsProvider = credentialSourceCredentialProvider(credentialSource);
191+
return stsCredentialsProviderFactory().create(credentialsProvider, profile);
192+
}
193+
194+
private AwsCredentialsProvider credentialSourceCredentialProvider(CredentialSourceType credentialSource) {
195+
switch (credentialSource) {
196+
case ECS_CONTAINER:
197+
return ContainerCredentialsProvider.builder().build();
198+
case EC2_INSTANCE_METADATA:
199+
return InstanceProfileCredentialsProvider.create();
200+
case ENVIRONMENT:
201+
return AwsCredentialsProviderChain.builder()
202+
.addCredentialsProvider(SystemPropertyCredentialsProvider.create())
203+
.addCredentialsProvider(EnvironmentVariableCredentialsProvider.create())
204+
.build();
205+
default:
206+
throw noSourceCredentialsException();
207+
}
208+
}
209+
165210
/**
166211
* Require that the provided properties are configured in this profile.
167212
*/

0 commit comments

Comments
 (0)