Skip to content

Commit 61d94ed

Browse files
Merge pull request #1575 from aws/staging/94db3824-6397-44c3-a4a3-b44e3fef2bf8
Pull request: release <- staging/94db3824-6397-44c3-a4a3-b44e3fef2bf8
2 parents 77be8cd + f8e452e commit 61d94ed

File tree

338 files changed

+948
-436
lines changed

Some content is hidden

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

338 files changed

+948
-436
lines changed

.changes/2.17.8.json

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"version": "2.17.8",
3+
"date": "2021-07-29",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "AWS IoT",
8+
"contributor": "",
9+
"description": "Increase maximum credential duration of role alias to 12 hours."
10+
},
11+
{
12+
"type": "feature",
13+
"category": "AWS SDK for Java v2",
14+
"contributor": "",
15+
"description": "Updated service endpoint metadata."
16+
},
17+
{
18+
"type": "feature",
19+
"category": "Amazon Elastic Compute Cloud",
20+
"contributor": "",
21+
"description": "This release adds support for G4ad xlarge and 2xlarge instances powered by AMD Radeon Pro V520 GPUs and AMD 2nd Generation EPYC processors"
22+
},
23+
{
24+
"type": "bugfix",
25+
"category": "AWS SDK for Java v2",
26+
"contributor": "",
27+
"description": "Correctly handle multi-value headers in Aws4Signer"
28+
},
29+
{
30+
"type": "feature",
31+
"category": "Amazon Chime",
32+
"contributor": "",
33+
"description": "Adds support for live transcription of meetings with Amazon Transcribe and Amazon Transcribe Medical. The new APIs, StartMeetingTranscription and StopMeetingTranscription, control the generation of user-attributed transcriptions sent to meeting clients via Amazon Chime SDK data messages."
34+
},
35+
{
36+
"type": "feature",
37+
"category": "AWS Savings Plans",
38+
"contributor": "",
39+
"description": "Documentation update for valid Savings Plans offering ID pattern"
40+
},
41+
{
42+
"type": "feature",
43+
"category": "AWS IoT SiteWise",
44+
"contributor": "",
45+
"description": "Added support for AWS IoT SiteWise Edge. You can now create an AWS IoT SiteWise gateway that runs on AWS IoT Greengrass V2. With the gateway, you can collect local server and equipment data, process the data, and export the selected data from the edge to the AWS Cloud."
46+
}
47+
]
48+
}

CHANGELOG.md

+28
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
# __2.17.8__ __2021-07-29__
2+
## __AWS IoT__
3+
- ### Features
4+
- Increase maximum credential duration of role alias to 12 hours.
5+
6+
## __AWS IoT SiteWise__
7+
- ### Features
8+
- Added support for AWS IoT SiteWise Edge. You can now create an AWS IoT SiteWise gateway that runs on AWS IoT Greengrass V2. With the gateway, you can collect local server and equipment data, process the data, and export the selected data from the edge to the AWS Cloud.
9+
10+
## __AWS SDK for Java v2__
11+
- ### Features
12+
- Updated service endpoint metadata.
13+
14+
- ### Bugfixes
15+
- Correctly handle multi-value headers in Aws4Signer
16+
17+
## __AWS Savings Plans__
18+
- ### Features
19+
- Documentation update for valid Savings Plans offering ID pattern
20+
21+
## __Amazon Chime__
22+
- ### Features
23+
- Adds support for live transcription of meetings with Amazon Transcribe and Amazon Transcribe Medical. The new APIs, StartMeetingTranscription and StopMeetingTranscription, control the generation of user-attributed transcriptions sent to meeting clients via Amazon Chime SDK data messages.
24+
25+
## __Amazon Elastic Compute Cloud__
26+
- ### Features
27+
- This release adds support for G4ad xlarge and 2xlarge instances powered by AMD Radeon Pro V520 GPUs and AMD 2nd Generation EPYC processors
28+
129
# __2.17.7__ __2021-07-28__
230
## __AWS CloudFormation__
331
- ### Features

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To automatically manage module versions (currently all modules have the same ver
5252
<dependency>
5353
<groupId>software.amazon.awssdk</groupId>
5454
<artifactId>bom</artifactId>
55-
<version>2.17.7</version>
55+
<version>2.17.8</version>
5656
<type>pom</type>
5757
<scope>import</scope>
5858
</dependency>
@@ -86,12 +86,12 @@ Alternatively you can add dependencies for the specific services you use only:
8686
<dependency>
8787
<groupId>software.amazon.awssdk</groupId>
8888
<artifactId>ec2</artifactId>
89-
<version>2.17.7</version>
89+
<version>2.17.8</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>software.amazon.awssdk</groupId>
9393
<artifactId>s3</artifactId>
94-
<version>2.17.7</version>
94+
<version>2.17.8</version>
9595
</dependency>
9696
```
9797

@@ -103,7 +103,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
103103
<dependency>
104104
<groupId>software.amazon.awssdk</groupId>
105105
<artifactId>aws-sdk-java</artifactId>
106-
<version>2.17.7</version>
106+
<version>2.17.8</version>
107107
</dependency>
108108
```
109109

archetypes/archetype-app-quickstart/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.7</version>
23+
<version>2.17.8</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/archetype-lambda/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.7</version>
23+
<version>2.17.8</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetype-lambda</artifactId>

archetypes/archetype-tools/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.7</version>
23+
<version>2.17.8</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>aws-sdk-java-pom</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.7</version>
23+
<version>2.17.8</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetypes</artifactId>

aws-sdk-java/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<parent>
1818
<groupId>software.amazon.awssdk</groupId>
1919
<artifactId>aws-sdk-java-pom</artifactId>
20-
<version>2.17.7</version>
20+
<version>2.17.8</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>aws-sdk-java-pom</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.7</version>
23+
<version>2.17.8</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

bom/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<parent>
1818
<groupId>software.amazon.awssdk</groupId>
1919
<artifactId>aws-sdk-java-pom</artifactId>
20-
<version>2.17.7</version>
20+
<version>2.17.8</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>bom</artifactId>

bundle/pom.xml

+1-1
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.17.7</version>
24+
<version>2.17.8</version>
2525
</parent>
2626
<artifactId>bundle</artifactId>
2727
<packaging>jar</packaging>

codegen-lite-maven-plugin/pom.xml

+1-1
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.17.7</version>
25+
<version>2.17.8</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite/pom.xml

+1-1
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.17.7</version>
24+
<version>2.17.8</version>
2525
</parent>
2626
<artifactId>codegen-lite</artifactId>
2727
<name>AWS Java SDK :: Code Generator Lite</name>

codegen-maven-plugin/pom.xml

+1-1
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.17.7</version>
25+
<version>2.17.8</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-maven-plugin</artifactId>

codegen/pom.xml

+1-1
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.17.7</version>
24+
<version>2.17.8</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

core/annotations/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>core</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.7</version>
23+
<version>2.17.8</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/arns/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>core</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.7</version>
23+
<version>2.17.8</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/auth/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>core</artifactId>
25-
<version>2.17.7</version>
25+
<version>2.17.8</version>
2626
</parent>
2727

2828
<artifactId>auth</artifactId>

core/auth/src/main/java/software/amazon/awssdk/auth/signer/internal/AbstractAws4Signer.java

+26-20
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.util.List;
2626
import java.util.Map;
2727
import java.util.TreeMap;
28+
import java.util.stream.Collectors;
2829
import software.amazon.awssdk.annotations.SdkInternalApi;
2930
import software.amazon.awssdk.auth.credentials.AwsCredentials;
3031
import software.amazon.awssdk.auth.credentials.AwsSessionCredentials;
@@ -323,46 +324,51 @@ private String getCanonicalizedHeaderString(Map<String, List<String>> canonicali
323324
StringBuilder buffer = new StringBuilder();
324325

325326
canonicalizedHeaders.forEach((headerName, headerValues) -> {
326-
for (String headerValue : headerValues) {
327-
appendCompactedString(buffer, headerName);
328-
buffer.append(":");
329-
if (headerValue != null) {
330-
appendCompactedString(buffer, headerValue);
331-
}
332-
buffer.append("\n");
333-
}
327+
buffer.append(headerName);
328+
buffer.append(":");
329+
buffer.append(String.join(",", trimAll(headerValues)));
330+
buffer.append("\n");
334331
});
335332

336333
return buffer.toString();
337334
}
338335

339336
/**
340-
* This method appends a string to a string builder and collapses contiguous
341-
* white space is a single space.
342-
*
343-
* This is equivalent to:
344-
* destination.append(source.replaceAll("\\s+", " "))
337+
* "The Trimall function removes excess white space before and after values,
338+
* and converts sequential spaces to a single space."
339+
* <p>
340+
* https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
341+
* <p>
342+
* The collapse-whitespace logic is equivalent to:
343+
* <pre>
344+
* value.replaceAll("\\s+", " ")
345+
* </pre>
345346
* but does not create a Pattern object that needs to compile the match
346347
* string; it also prevents us from having to make a Matcher object as well.
347-
*
348348
*/
349-
private void appendCompactedString(final StringBuilder destination, final String source) {
349+
private String trimAll(String value) {
350350
boolean previousIsWhiteSpace = false;
351-
int length = source.length();
351+
StringBuilder sb = new StringBuilder(value.length());
352352

353-
for (int i = 0; i < length; i++) {
354-
char ch = source.charAt(i);
353+
for (int i = 0; i < value.length(); i++) {
354+
char ch = value.charAt(i);
355355
if (isWhiteSpace(ch)) {
356356
if (previousIsWhiteSpace) {
357357
continue;
358358
}
359-
destination.append(' ');
359+
sb.append(' ');
360360
previousIsWhiteSpace = true;
361361
} else {
362-
destination.append(ch);
362+
sb.append(ch);
363363
previousIsWhiteSpace = false;
364364
}
365365
}
366+
367+
return sb.toString().trim();
368+
}
369+
370+
private List<String> trimAll(List<String> values) {
371+
return values.stream().map(this::trimAll).collect(Collectors.toList());
366372
}
367373

368374
/**

core/auth/src/test/java/software/amazon/awssdk/auth/signer/Aws4SignerTest.java

+42
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,48 @@ public void xAmznTraceId_NotSigned() throws Exception {
156156
"Signature=581d0042389009a28d461124138f1fe8eeb8daed87611d2a2b47fd3d68d81d73");
157157
}
158158

159+
/**
160+
* Multi-value headers should be comma separated.
161+
*/
162+
@Test
163+
public void canonicalizedHeaderString_multiValueHeaders_areCommaSeparated() throws Exception {
164+
AwsBasicCredentials credentials = AwsBasicCredentials.create("akid", "skid");
165+
SdkHttpFullRequest.Builder request = generateBasicRequest();
166+
request.appendHeader("foo","bar");
167+
request.appendHeader("foo","baz");
168+
169+
SdkHttpFullRequest actual = SignerTestUtils.signRequest(signer, request.build(), credentials, "demo", signingOverrideClock, "us-east-1");
170+
171+
// We cannot easily test the canonical header string value, but the below signature asserts that it contains:
172+
// foo:bar,baz
173+
assertThat(actual.firstMatchingHeader("Authorization"))
174+
.hasValue("AWS4-HMAC-SHA256 Credential=akid/19810216/us-east-1/demo/aws4_request, "
175+
+ "SignedHeaders=foo;host;x-amz-archive-description;x-amz-date, "
176+
+ "Signature=1253bc1751048ea299e688cbe07a2224292e5cc606a079cb40459ad987793c19");
177+
}
178+
179+
/**
180+
* Canonical headers should remove excess white space before and after values, and convert sequential spaces to a single
181+
* space.
182+
*/
183+
@Test
184+
public void canonicalizedHeaderString_valuesWithExtraWhitespace_areTrimmed() throws Exception {
185+
AwsBasicCredentials credentials = AwsBasicCredentials.create("akid", "skid");
186+
SdkHttpFullRequest.Builder request = generateBasicRequest();
187+
request.putHeader("My-header1"," a b c ");
188+
request.putHeader("My-Header2"," \"a b c\" ");
189+
190+
SdkHttpFullRequest actual = SignerTestUtils.signRequest(signer, request.build(), credentials, "demo", signingOverrideClock, "us-east-1");
191+
192+
// We cannot easily test the canonical header string value, but the below signature asserts that it contains:
193+
// my-header1:a b c
194+
// my-header2:"a b c"
195+
assertThat(actual.firstMatchingHeader("Authorization"))
196+
.hasValue("AWS4-HMAC-SHA256 Credential=akid/19810216/us-east-1/demo/aws4_request, "
197+
+ "SignedHeaders=host;my-header1;my-header2;x-amz-archive-description;x-amz-date, "
198+
+ "Signature=6d3520e3397e7aba593d8ebd8361fc4405e90aed71bc4c7a09dcacb6f72460b9");
199+
}
200+
159201
private SdkHttpFullRequest.Builder generateBasicRequest() {
160202
return SdkHttpFullRequest.builder()
161203
.contentStreamProvider(() -> new ByteArrayInputStream("{\"TableName\": \"foo\"}".getBytes()))

core/aws-core/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>core</artifactId>
25-
<version>2.17.7</version>
25+
<version>2.17.8</version>
2626
</parent>
2727

2828
<artifactId>aws-core</artifactId>

core/json-utils/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>core</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.7</version>
23+
<version>2.17.8</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

0 commit comments

Comments
 (0)