Skip to content

Commit d16def5

Browse files
Merge pull request #2087 from aws/staging/e3055947-7c4a-47e8-af6a-a0432e5dc5d1
Pull request: release <- staging/e3055947-7c4a-47e8-af6a-a0432e5dc5d1
2 parents 77c3ef8 + e67700f commit d16def5

File tree

390 files changed

+972
-397
lines changed

Some content is hidden

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

390 files changed

+972
-397
lines changed

.changes/2.17.228.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "2.17.228",
3+
"date": "2022-07-08",
4+
"entries": [
5+
{
6+
"type": "bugfix",
7+
"category": "AWS SDK for Java v2",
8+
"contributor": "",
9+
"description": "Requests which are defined with AuthType as None should not be signed or authorized by the SDK."
10+
},
11+
{
12+
"type": "feature",
13+
"category": "AWS Backup",
14+
"contributor": "",
15+
"description": "This release adds support for authentication using IAM user identity instead of passed IAM role, identified by excluding the IamRoleArn field in the StartRestoreJob API. This feature applies to only resource clients with a destructive restore nature (e.g. SAP HANA)."
16+
}
17+
]
18+
}

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# __2.17.228__ __2022-07-08__
2+
## __AWS Backup__
3+
- ### Features
4+
- This release adds support for authentication using IAM user identity instead of passed IAM role, identified by excluding the IamRoleArn field in the StartRestoreJob API. This feature applies to only resource clients with a destructive restore nature (e.g. SAP HANA).
5+
6+
## __AWS SDK for Java v2__
7+
- ### Bugfixes
8+
- Requests which are defined with AuthType as None should not be signed or authorized by the SDK.
9+
110
# __2.17.227__ __2022-07-07__
211
## __AWS Database Migration Service__
312
- ### 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.227</version>
55+
<version>2.17.228</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.227</version>
89+
<version>2.17.228</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>software.amazon.awssdk</groupId>
9393
<artifactId>s3</artifactId>
94-
<version>2.17.227</version>
94+
<version>2.17.228</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.227</version>
106+
<version>2.17.228</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.227</version>
23+
<version>2.17.228</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.227</version>
23+
<version>2.17.228</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.227</version>
23+
<version>2.17.228</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.227</version>
23+
<version>2.17.228</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.227</version>
20+
<version>2.17.228</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.227</version>
23+
<version>2.17.228</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.227</version>
20+
<version>2.17.228</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.227</version>
24+
<version>2.17.228</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.227</version>
25+
<version>2.17.228</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.227</version>
24+
<version>2.17.228</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.227</version>
25+
<version>2.17.228</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.227</version>
24+
<version>2.17.228</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

codegen/src/main/java/software/amazon/awssdk/codegen/poet/client/specs/JsonProtocolSpec.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import software.amazon.awssdk.codegen.poet.PoetExtension;
4242
import software.amazon.awssdk.codegen.poet.client.traits.HttpChecksumRequiredTrait;
4343
import software.amazon.awssdk.codegen.poet.client.traits.HttpChecksumTrait;
44+
import software.amazon.awssdk.codegen.poet.client.traits.NoneAuthTypeRequestTrait;
4445
import software.amazon.awssdk.codegen.poet.eventstream.EventStreamUtils;
4546
import software.amazon.awssdk.codegen.poet.model.EventStreamSpecHelper;
4647
import software.amazon.awssdk.core.SdkPojoBuilder;
@@ -177,7 +178,8 @@ public CodeBlock executionHandler(OperationModel opModel) {
177178
.add(".withInput($L)\n", opModel.getInput().getVariableName())
178179
.add(".withMetricCollector(apiCallMetricCollector)")
179180
.add(HttpChecksumRequiredTrait.putHttpChecksumAttribute(opModel))
180-
.add(HttpChecksumTrait.create(opModel));
181+
.add(HttpChecksumTrait.create(opModel))
182+
.add(NoneAuthTypeRequestTrait.create(opModel));
181183

182184
if (opModel.hasStreamingInput()) {
183185
codeBlock.add(".withRequestBody(requestBody)")
@@ -245,6 +247,7 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
245247
.add(asyncRequestBody)
246248
.add(HttpChecksumRequiredTrait.putHttpChecksumAttribute(opModel))
247249
.add(HttpChecksumTrait.create(opModel))
250+
.add(NoneAuthTypeRequestTrait.create(opModel))
248251
.add(".withInput($L)$L);",
249252
opModel.getInput().getVariableName(), asyncResponseTransformerVariable(isStreaming, isRestJson, opModel));
250253

codegen/src/main/java/software/amazon/awssdk/codegen/poet/client/specs/QueryProtocolSpec.java

+7-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import software.amazon.awssdk.codegen.poet.PoetExtension;
3131
import software.amazon.awssdk.codegen.poet.client.traits.HttpChecksumRequiredTrait;
3232
import software.amazon.awssdk.codegen.poet.client.traits.HttpChecksumTrait;
33+
import software.amazon.awssdk.codegen.poet.client.traits.NoneAuthTypeRequestTrait;
3334
import software.amazon.awssdk.core.async.AsyncResponseTransformer;
3435
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
3536
import software.amazon.awssdk.core.http.HttpResponseHandler;
@@ -113,7 +114,9 @@ public CodeBlock executionHandler(OperationModel opModel) {
113114
.add(".withInput($L)", opModel.getInput().getVariableName())
114115
.add(".withMetricCollector(apiCallMetricCollector)")
115116
.add(HttpChecksumRequiredTrait.putHttpChecksumAttribute(opModel))
116-
.add(HttpChecksumTrait.create(opModel));
117+
.add(HttpChecksumTrait.create(opModel))
118+
.add(NoneAuthTypeRequestTrait.create(opModel));
119+
117120

118121
if (opModel.hasStreamingInput()) {
119122
return codeBlock.add(".withRequestBody(requestBody)")
@@ -145,7 +148,9 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
145148
.add(".withErrorResponseHandler(errorResponseHandler)\n")
146149
.add(".withMetricCollector(apiCallMetricCollector)\n")
147150
.add(HttpChecksumRequiredTrait.putHttpChecksumAttribute(opModel))
148-
.add(HttpChecksumTrait.create(opModel));
151+
.add(HttpChecksumTrait.create(opModel))
152+
.add(NoneAuthTypeRequestTrait.create(opModel));
153+
149154

150155
builder.add(hostPrefixExpression(opModel) + asyncRequestBody + ".withInput($L)$L);",
151156
opModel.getInput().getVariableName(),

codegen/src/main/java/software/amazon/awssdk/codegen/poet/client/specs/XmlProtocolSpec.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import software.amazon.awssdk.codegen.poet.PoetExtension;
3737
import software.amazon.awssdk.codegen.poet.client.traits.HttpChecksumRequiredTrait;
3838
import software.amazon.awssdk.codegen.poet.client.traits.HttpChecksumTrait;
39+
import software.amazon.awssdk.codegen.poet.client.traits.NoneAuthTypeRequestTrait;
3940
import software.amazon.awssdk.codegen.poet.eventstream.EventStreamUtils;
4041
import software.amazon.awssdk.codegen.poet.model.EventStreamSpecHelper;
4142
import software.amazon.awssdk.core.SdkPojoBuilder;
@@ -132,7 +133,9 @@ public CodeBlock executionHandler(OperationModel opModel) {
132133
discoveredEndpoint(opModel))
133134
.add(".withInput($L)", opModel.getInput().getVariableName())
134135
.add(HttpChecksumRequiredTrait.putHttpChecksumAttribute(opModel))
135-
.add(HttpChecksumTrait.create(opModel));
136+
.add(HttpChecksumTrait.create(opModel))
137+
.add(NoneAuthTypeRequestTrait.create(opModel));
138+
136139

137140
s3ArnableFields(opModel, model).ifPresent(codeBlock::add);
138141

@@ -207,7 +210,8 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
207210
.add(".withMetricCollector(apiCallMetricCollector)\n")
208211
.add(asyncRequestBody(opModel))
209212
.add(HttpChecksumRequiredTrait.putHttpChecksumAttribute(opModel))
210-
.add(HttpChecksumTrait.create(opModel));
213+
.add(HttpChecksumTrait.create(opModel))
214+
.add(NoneAuthTypeRequestTrait.create(opModel));
211215

212216
s3ArnableFields(opModel, model).ifPresent(builder::add);
213217

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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.codegen.poet.client.traits;
17+
18+
import com.squareup.javapoet.CodeBlock;
19+
import software.amazon.awssdk.annotations.SdkInternalApi;
20+
import software.amazon.awssdk.codegen.model.intermediate.OperationModel;
21+
import software.amazon.awssdk.codegen.model.service.AuthType;
22+
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
23+
import software.amazon.awssdk.core.interceptor.SdkInternalExecutionAttribute;
24+
25+
/**
26+
* Trait which defines if a given request needs to be authenticated.
27+
* A request is not authenticated only if it has "auththpe" trait explicitly marked as "none"
28+
*/
29+
@SdkInternalApi
30+
public class NoneAuthTypeRequestTrait {
31+
32+
private NoneAuthTypeRequestTrait() {
33+
}
34+
35+
/**
36+
* Generate a ".putExecutionAttribute(...)" code-block for the provided operation model. This should be used within the
37+
* context of initializing {@link ClientExecutionParams}. If and only if "authType" trait is explicitly set as "none" the set
38+
* the execution attribute as false.
39+
*/
40+
public static CodeBlock create(OperationModel operationModel) {
41+
42+
if (operationModel.getAuthType() == AuthType.NONE) {
43+
CodeBlock.Builder codeBuilder = CodeBlock.builder();
44+
codeBuilder.add(CodeBlock.of(".putExecutionAttribute($T.IS_NONE_AUTH_TYPE_REQUEST, $L)",
45+
SdkInternalExecutionAttribute.class, operationModel.getAuthType() != AuthType.NONE));
46+
return codeBuilder.build();
47+
} else {
48+
return CodeBlock.of("");
49+
}
50+
}
51+
}

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/c2j/json/service-2.json

+8
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222
},
2323
"httpChecksumRequired": true
2424
},
25+
"OperationWithNoneAuthType": {
26+
"name": "APostOperation",
27+
"http": {
28+
"method": "POST",
29+
"requestUri": "/"
30+
},
31+
"authtype": "none"
32+
},
2533
"APostOperation": {
2634
"name": "APostOperation",
2735
"http": {

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/c2j/query/service-2.json

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
2121
},
2222
"httpChecksumRequired": true
2323
},
24+
"OperationWithNoneAuthType": {
25+
"name": "APostOperation",
26+
"http": {
27+
"method": "POST",
28+
"requestUri": "/"
29+
},
30+
"authtype": "none"
31+
},
2432
"APostOperation": {
2533
"name": "APostOperation",
2634
"http": {

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/c2j/xml/service-2.json

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
2121
},
2222
"httpChecksumRequired": true
2323
},
24+
"OperationWithNoneAuthType": {
25+
"name": "NoneAuthTypeOperation",
26+
"http": {
27+
"method": "POST",
28+
"requestUri": "/"
29+
},
30+
"authtype": "none"
31+
},
2432
"APostOperation": {
2533
"name": "APostOperation",
2634
"http": {

0 commit comments

Comments
 (0)