Skip to content

Commit 3b438b2

Browse files
Merge pull request #759 from aws/staging/28b5df1f-0704-4b85-828f-760bebd93e04
Pull request: release <- staging/28b5df1f-0704-4b85-828f-760bebd93e04
2 parents be068f4 + bed2dd0 commit 3b438b2

File tree

269 files changed

+749
-272
lines changed

Some content is hidden

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

269 files changed

+749
-272
lines changed

.changes/2.10.89.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"version": "2.10.89",
3+
"date": "2020-03-18",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "Amazon Personalize",
8+
"description": "[Personalize] Adds support for returning hyperparameter values of the best performing model in a HPO job."
9+
},
10+
{
11+
"type": "feature",
12+
"category": "AWS MediaConnect",
13+
"description": "Feature adds the ability for a flow to have multiple redundant sources that provides resiliency to a source failing. The new APIs added to enable the feature are, AddFlowSources, RemoveFlowSource and UpdateFlow."
14+
},
15+
{
16+
"type": "feature",
17+
"category": "AWS SDK for Java v2",
18+
"description": "Updated service endpoint metadata."
19+
},
20+
{
21+
"type": "feature",
22+
"category": "Amazon Relational Database Service",
23+
"description": "Updated the MaxRecords type in DescribeExportTasks to Integer."
24+
}
25+
]
26+
}

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# __2.10.89__ __2020-03-18__
2+
## __AWS MediaConnect__
3+
- ### Features
4+
- Feature adds the ability for a flow to have multiple redundant sources that provides resiliency to a source failing. The new APIs added to enable the feature are, AddFlowSources, RemoveFlowSource and UpdateFlow.
5+
6+
## __AWS SDK for Java v2__
7+
- ### Features
8+
- Updated service endpoint metadata.
9+
10+
## __Amazon Personalize__
11+
- ### Features
12+
- [Personalize] Adds support for returning hyperparameter values of the best performing model in a HPO job.
13+
14+
## __Amazon Relational Database Service__
15+
- ### Features
16+
- Updated the MaxRecords type in DescribeExportTasks to Integer.
17+
118
# __2.10.88__ __2020-03-17__
219
## __AWS Elemental MediaConvert__
320
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To automatically manage module versions (currently all modules have the same ver
4848
<dependency>
4949
<groupId>software.amazon.awssdk</groupId>
5050
<artifactId>bom</artifactId>
51-
<version>2.10.88</version>
51+
<version>2.10.89</version>
5252
<type>pom</type>
5353
<scope>import</scope>
5454
</dependency>
@@ -82,12 +82,12 @@ Alternatively you can add dependencies for the specific services you use only:
8282
<dependency>
8383
<groupId>software.amazon.awssdk</groupId>
8484
<artifactId>ec2</artifactId>
85-
<version>2.10.88</version>
85+
<version>2.10.89</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>software.amazon.awssdk</groupId>
8989
<artifactId>s3</artifactId>
90-
<version>2.10.88</version>
90+
<version>2.10.89</version>
9191
</dependency>
9292
```
9393

@@ -99,7 +99,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
9999
<dependency>
100100
<groupId>software.amazon.awssdk</groupId>
101101
<artifactId>aws-sdk-java</artifactId>
102-
<version>2.10.88</version>
102+
<version>2.10.89</version>
103103
</dependency>
104104
```
105105

aws-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>software.amazon.awssdk</groupId>
2121
<artifactId>aws-sdk-java-pom</artifactId>
22-
<version>2.10.88</version>
22+
<version>2.10.89</version>
2323
<relativePath>../pom.xml</relativePath>
2424
</parent>
2525
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

Lines changed: 1 addition & 1 deletion
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.10.88</version>
23+
<version>2.10.89</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>software.amazon.awssdk</groupId>
2121
<artifactId>aws-sdk-java-pom</artifactId>
22-
<version>2.10.88</version>
22+
<version>2.10.89</version>
2323
<relativePath>../pom.xml</relativePath>
2424
</parent>
2525
<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.10.88</version>
24+
<version>2.10.89</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
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>aws-sdk-java-pom</artifactId>
25-
<version>2.10.88</version>
25+
<version>2.10.89</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite/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.10.88</version>
24+
<version>2.10.89</version>
2525
</parent>
2626
<artifactId>codegen-lite</artifactId>
2727
<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.10.88</version>
25+
<version>2.10.89</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.10.88</version>
24+
<version>2.10.89</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
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>core</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.88</version>
23+
<version>2.10.89</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/arns/pom.xml

Lines changed: 1 addition & 1 deletion
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.10.88</version>
23+
<version>2.10.89</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/auth/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>core</artifactId>
25-
<version>2.10.88</version>
25+
<version>2.10.89</version>
2626
</parent>
2727

2828
<artifactId>auth</artifactId>

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

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
import java.nio.ByteBuffer;
2121
import java.nio.charset.StandardCharsets;
2222
import java.time.Instant;
23+
import java.util.Arrays;
2324
import java.util.HashMap;
25+
import java.util.Iterator;
2426
import java.util.Map;
2527
import java.util.Optional;
2628
import java.util.TreeMap;
@@ -143,7 +145,6 @@ public ByteBuffer apply(ByteBuffer byteBuffer) {
143145
/**
144146
* Calculate rolling signature
145147
*/
146-
147148
byte[] payload = byteBuffer.array();
148149
byte[] signatureBytes = signEventStream(priorSignature, signingKey, signingInstant, requestParams,
149150
nonSignatureHeaders, payload);
@@ -160,6 +161,13 @@ public ByteBuffer apply(ByteBuffer byteBuffer) {
160161
* Encode signed event to byte
161162
*/
162163
Message signedMessage = new Message(sortHeaders(headers), payload);
164+
165+
if (LOG.isLoggingLevelEnabled("trace")) {
166+
LOG.trace(() -> "Signed message: " + toDebugString(signedMessage, false));
167+
} else {
168+
LOG.debug(() -> "Signed message: " + toDebugString(signedMessage, true));
169+
}
170+
163171
return signedMessage.toByteBuffer();
164172
}
165173
};
@@ -259,4 +267,35 @@ public Optional<Long> contentLength() {
259267
return transformedRequestBody.contentLength();
260268
}
261269
}
270+
271+
static String toDebugString(Message m, boolean truncatePayload) {
272+
StringBuilder sb = new StringBuilder("Message = {headers={");
273+
Map<String, HeaderValue> headers = m.getHeaders();
274+
275+
Iterator<Map.Entry<String, HeaderValue>> headersIter = headers.entrySet().iterator();
276+
277+
while (headersIter.hasNext()) {
278+
Map.Entry<String, HeaderValue> h = headersIter.next();
279+
280+
sb.append(h.getKey()).append("={").append(h.getValue().toString()).append("}");
281+
282+
if (headersIter.hasNext()) {
283+
sb.append(", ");
284+
}
285+
}
286+
287+
sb.append("}, payload=");
288+
289+
byte[] payload = m.getPayload();
290+
291+
byte[] payloadToLog;
292+
if (truncatePayload) {
293+
// Would be nice if BinaryUtils.toHex() could take an array index range instead so we don't need to copy
294+
payloadToLog = Arrays.copyOf(payload, Math.min(32, payload.length));
295+
} else {
296+
payloadToLog = payload;
297+
}
298+
299+
return sb.append(BinaryUtils.toHex(payloadToLog)).append("}").toString();
300+
}
262301
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
* Copyright 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.signer.internal;
17+
18+
import static org.assertj.core.api.Assertions.assertThat;
19+
import java.util.Arrays;
20+
import java.util.LinkedHashMap;
21+
import java.util.Map;
22+
import java.util.Random;
23+
import org.junit.BeforeClass;
24+
import org.junit.Test;
25+
import software.amazon.awssdk.utils.BinaryUtils;
26+
import software.amazon.eventstream.HeaderValue;
27+
import software.amazon.eventstream.Message;
28+
29+
public class BaseEventStreamAsyncAws4SignerTest {
30+
private static Map<String, HeaderValue> headers;
31+
32+
@BeforeClass
33+
public static void setup() {
34+
headers = new LinkedHashMap<>();
35+
headers.put("header1", HeaderValue.fromInteger(42));
36+
headers.put("header2", HeaderValue.fromBoolean(false));
37+
headers.put("header3", HeaderValue.fromString("Hello world"));
38+
}
39+
40+
@Test
41+
public void toDebugString_emptyPayload_generatesCorrectString() {
42+
Message m = new Message(headers, new byte[0]);
43+
44+
assertThat(BaseEventStreamAsyncAws4Signer.toDebugString(m, false))
45+
.isEqualTo("Message = {headers={header1={42}, header2={false}, header3={\"Hello world\"}}, payload=}");
46+
}
47+
48+
@Test
49+
public void toDebugString_noHeaders_emptyPayload_generatesCorrectString() {
50+
Message m = new Message(new LinkedHashMap<>(), new byte[0]);
51+
52+
assertThat(BaseEventStreamAsyncAws4Signer.toDebugString(m, false))
53+
.isEqualTo("Message = {headers={}, payload=}");
54+
}
55+
56+
@Test
57+
public void toDebugString_largePayload_truncate_generatesCorrectString() {
58+
byte[] payload = new byte[128];
59+
new Random().nextBytes(payload);
60+
Message m = new Message(headers, payload);
61+
62+
byte[] first32 = Arrays.copyOf(payload, 32);
63+
String expectedPayloadString = BinaryUtils.toHex(first32);
64+
assertThat(BaseEventStreamAsyncAws4Signer.toDebugString(m, true))
65+
.isEqualTo("Message = {headers={header1={42}, header2={false}, header3={\"Hello world\"}}, payload=" + expectedPayloadString + "}");
66+
}
67+
68+
@Test
69+
public void toDebugString_largePayload_noTruncate_generatesCorrectString() {
70+
byte[] payload = new byte[128];
71+
new Random().nextBytes(payload);
72+
Message m = new Message(headers, payload);
73+
74+
String expectedPayloadString = BinaryUtils.toHex(payload);
75+
assertThat(BaseEventStreamAsyncAws4Signer.toDebugString(m, false))
76+
.isEqualTo("Message = {headers={header1={42}, header2={false}, header3={\"Hello world\"}}, payload=" + expectedPayloadString + "}");
77+
}
78+
}

core/aws-core/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>core</artifactId>
25-
<version>2.10.88</version>
25+
<version>2.10.89</version>
2626
</parent>
2727

2828
<artifactId>aws-core</artifactId>

core/pom.xml

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

2727
<artifactId>core</artifactId>

core/profiles/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>core</artifactId>
25-
<version>2.10.88</version>
25+
<version>2.10.89</version>
2626
</parent>
2727

2828
<artifactId>profiles</artifactId>

core/protocols/aws-cbor-protocol/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>protocols</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.88</version>
23+
<version>2.10.89</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/protocols/aws-ion-protocol/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>protocols</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.88</version>
23+
<version>2.10.89</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/protocols/aws-json-protocol/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>protocols</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.88</version>
23+
<version>2.10.89</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/protocols/aws-query-protocol/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>protocols</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.88</version>
23+
<version>2.10.89</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

core/protocols/aws-xml-protocol/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>protocols</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.10.88</version>
23+
<version>2.10.89</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

0 commit comments

Comments
 (0)