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

Sugmanue/sra ia merge 2.20.158 snapshot #4520

Closed
wants to merge 171 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
5db07c8
Module changes for Identity & Auth (#3764)
gosar Feb 17, 2023
ac838e0
Add new Identity interfaces (#3773)
gosar Mar 4, 2023
aa6afee
Minor updates to PR #3773 (#3814)
gosar Mar 9, 2023
53f5cb3
Accept and use the new AWS Credentials interfaces (#3829)
gosar Apr 3, 2023
c0b20ea
Skip avoidable conversion in CredentialsUtils (#3878)
gosar Apr 4, 2023
365bab1
Remove unused methods in DefaultS3CrtClientBuilder (#3879)
gosar Apr 4, 2023
d41c517
Add create() for new AwsCredentials Identity types (#3884)
gosar Apr 6, 2023
bbea89e
Update AwsCredentialsProviderChain for new Identity type (#3883)
gosar Apr 6, 2023
005b39b
Merge branch 'master' into 'feature/master/sra-identity-auth` (#3910)
gosar Apr 14, 2023
9e12b56
Add decision log for SRA Identity changes (#3905)
gosar Apr 14, 2023
53e2ffe
Accept and use the new TokenIdentity interfaces (#3895)
gosar Apr 20, 2023
fd683d8
Use joinLikeSync when resolving identity in sync code (#3953)
gosar Apr 26, 2023
04b6730
Remove identity join in async client for endpoint discovery (#3947)
gosar May 2, 2023
86fb7df
Revert temporary module changes for new modules (#3966)
gosar May 3, 2023
22b30ec
Minor updates to identity-spi (#3989)
gosar May 10, 2023
3d24f09
Add new Signer interfaces (#3967)
gosar May 10, 2023
89b551c
Fixed toString in Default implementations (#3995)
gosar May 11, 2023
0d7b693
Add interface stubs for new signer implementations (#3997)
haydenbaker May 12, 2023
64d5212
Add main auth scheme interfaces (#3999)
gosar May 16, 2023
1f2ac6f
Refactors credential identity with separate implementing classes (#4024)
cenedhryn May 19, 2023
800b41a
Change ResolveIdentityRequest to an interface (#4030)
gosar May 23, 2023
28ddc60
HttpSigner interface changes (#4018)
gosar May 24, 2023
39a22b2
Add initial AuthSchemeProvider codegen (#4025)
gosar May 24, 2023
c456c5b
Configure authSchemeProvider in service client builder (#4032)
gosar May 25, 2023
b6382c5
Add default bearer signer and stubs for other signers (#4003)
haydenbaker May 26, 2023
17b91a2
Revert "Merge branch 'master' into 'feature/master/sra-identity-auth`…
gosar May 30, 2023
9418776
Merge branch 'master' into gosar/sra-ia-merge
gosar May 31, 2023
d8f2a86
Update new modules in branch to 2.20.64-SNAPSHOT
gosar May 31, 2023
36effdc
Fix incorrect import order
gosar May 31, 2023
f9fd91f
Merge remote-tracking branch 'origin/master' into gosar/sra-ia-merge
gosar May 31, 2023
d2b6f88
Update new modules in branch to 2.20.77-SNAPSHOT
gosar May 31, 2023
7ee3bca
Add AuthScheme sub-interfaces (#4041)
gosar Jun 2, 2023
6d2c4e9
Update naming of auth request/response/option classes (#4060)
haydenbaker Jun 8, 2023
0b37b5a
Add auth scheme params based on endpoint params (#4088)
sugmanue Jun 9, 2023
4504f91
Merge branch 'master' into feature/master/sra-identity-auth
cenedhryn Jun 9, 2023
2ba5256
Update version in new modules to 2.20.83-SNAPSHOT after merge (#4097)
gosar Jun 13, 2023
311a5d9
Add IdentityProviderConfiguration implementation (#4100)
gosar Jun 15, 2023
d39a98e
Use Optional.ofNullable instead of null check (#4103)
gosar Jun 15, 2023
5ab8b54
Implement AwsV4HttpSigner (#4059)
haydenbaker Jun 16, 2023
9592819
Make copy of properties map from Builder (#4101)
gosar Jun 16, 2023
5c45f2c
Make ResolveIdentityRequest copyable (#4112)
gosar Jun 16, 2023
ae38e59
Add new modules to test coverage reporting (#4113)
gosar Jun 20, 2023
b024b3f
Prep some services modules for easier diff of upcoming changes (#4090)
gosar Jun 21, 2023
1cf6391
AuthScheme resolution wiring via hand written Interceptor (#4111)
gosar Jun 22, 2023
afae962
Implement default auth scheme provider (#4120)
sugmanue Jun 23, 2023
7bf8436
Remove left behind comment
sugmanue Jun 23, 2023
96abc53
Remove redundant TODOs
gosar Jun 28, 2023
94869c2
Implement AwsV4QueryHttpSigner (#4104)
haydenbaker Jun 28, 2023
d1b55a0
Use IdentityProvider from request override (#4142)
gosar Jun 28, 2023
ecb992b
Remove unnecessary AwsRequestOverrideConfiguration.Builder accessor m…
gosar Jun 28, 2023
8331579
Add support for S3 auth scheme resolution (#4131)
sugmanue Jun 28, 2023
05f6d27
Remove REQUEST_SIGNING_INSTANT from DefaultAcmAuthSchemeProvider (#4147)
gosar Jun 29, 2023
0331e39
Skip signing for smithy.api#noAuth (#4144)
gosar Jun 29, 2023
ba0da26
Auth scheme provider using endpoints (#4141)
sugmanue Jul 6, 2023
71b80b1
Bugfix and other small changes to SRA SigningStage (#4175)
gosar Jul 12, 2023
af9e22a
Allow all endpoint params if enabled and allow list is not defined (#…
sugmanue Jul 17, 2023
7b004dc
Add endpoint based auth scheme customization for s3, eventbridge (#4195)
gosar Jul 17, 2023
6c37e8d
Add codegen for AuthSchemeInterceptor (#4194)
sugmanue Jul 18, 2023
3de786c
Drop internal from the method to get the authscheme provider name
sugmanue Jul 18, 2023
ad6621e
Handle sign/signAsync in AsyncSigningStage (#4176)
gosar Jul 18, 2023
e2a67ca
Move identity resolution out of SigningStage (#4182)
gosar Jul 19, 2023
0f5f5e7
Move identity resolution out of AsyncSigningStage (#4211)
gosar Jul 19, 2023
7c83dd0
Add ToCopyableBuilder to AuthSchemeOption (#4208)
gosar Jul 20, 2023
54b9145
Add test to assert old properties are retained during copy (#4216)
gosar Jul 20, 2023
a39e7a5
Wire up the auth scheme interceptor in the base client builder (#4220)
sugmanue Jul 26, 2023
d6199a4
Fix sigv4a schemeId and javadocs in sigv4a AuthSchemes (#4239)
gosar Jul 31, 2023
55cd34d
Revert changes to acm codecatalyst modules (#4243)
gosar Jul 31, 2023
79084d3
Add support for auth scheme interceptor with endpoint params (#4230)
sugmanue Aug 1, 2023
02652df
Add unit tests for (Async)SigningStage (#4245)
gosar Aug 2, 2023
7ab2f0c
Avoid sonar reported bug related to Optional use (#4261)
gosar Aug 3, 2023
abc122c
Use old SigningStage logic if Signer is overridden (#4264)
gosar Aug 8, 2023
aec935c
Add sigv4a for services that have enabled endpoint based auth params …
sugmanue Aug 8, 2023
2f3b0bf
Implement composable v4 signers (#4181)
haydenbaker Aug 9, 2023
2d2c300
SignAsync returns a future AsyncSignedRequest (#4227)
haydenbaker Aug 9, 2023
b938d7e
Remove SignerOverride related codegen logic (#4280)
gosar Aug 9, 2023
312d4c0
Add support for sigv4a for endpoint based authscheme provider
sugmanue Aug 10, 2023
4f758c6
Revert "Add support for sigv4a for endpoint based authscheme provider"
sugmanue Aug 10, 2023
50b25b7
Remove Signer related codegen logic in Clients (#4286)
gosar Aug 10, 2023
f9c5a60
Set the correct signer properties for v4-unsigned-body (#4285)
sugmanue Aug 10, 2023
d1666af
Merge remote-tracking branch 'upstream/master' into feature/master/sr…
sugmanue Aug 11, 2023
4d19959
Add support for sigv4a for endpoint based authscheme provider (#4287)
sugmanue Aug 14, 2023
7a49392
Set PAYLOAD_SIGNING_ENABLED for the S3 auth type (#4298)
sugmanue Aug 14, 2023
fe75306
Fix used and unused dependencies (#4303)
sugmanue Aug 15, 2023
198a9d3
Add new exclude/include to augment the created service pom (#4309)
sugmanue Aug 16, 2023
180e03b
Merge remote-tracking branch 'upstream/master' into sugmanue/sra-ia-m…
sugmanue Aug 21, 2023
2a9dcf2
Fixed issue where sigv4a was used instead of sigv4 for auth schemes d…
millems Aug 21, 2023
2f6eac1
Refactor DefaultAwsV4HttpSigner and remove V4HttpSigner (#4329)
zoewangg Aug 22, 2023
e5f2c3c
Implement Crt V4a signer (#4304)
haydenbaker Aug 23, 2023
958611c
Promote no-auth to a proper AuthScheme (#4319)
sugmanue Aug 23, 2023
cbc0ebb
Some TODO cleanup and removal (#4335)
gosar Aug 23, 2023
6874696
Remove setting IS_NONE_AUTH_TYPE_REQUEST (#4292)
gosar Aug 23, 2023
f4324fe
Remove legacy endpoint auth scheme logic and add putAuthScheme to AWS…
millems Aug 23, 2023
0e00b1b
Implement chunked encoding (#4269)
haydenbaker Aug 24, 2023
4bf4433
Temporarily disable tests that were broken by a missing metric. (#4342)
millems Aug 24, 2023
e4b3289
Remove dependency on http-auth-aws from codecatalyst. (#4337)
millems Aug 25, 2023
e92d257
Merge remote-tracking branch 'upstream/master' into sugmanue/sra-ia-m…
sugmanue Aug 28, 2023
bbebb72
Add identity fetch metrics for SRA path (#4339)
gosar Aug 28, 2023
6f4d873
Merge branch 'sugmanue/sra-ia-merge-2.20.136-SNAPSHOT' into feature/m…
sugmanue Aug 28, 2023
ce06824
Add checksums module (#4345)
haydenbaker Aug 28, 2023
5037ffa
Configure client with NoAuthAuthScheme by default (#4358)
sugmanue Aug 28, 2023
4e86072
Implement payload signing for aws event-streams (#4270)
haydenbaker Aug 28, 2023
fa21462
Wire up the CRT signer loader (#4352)
sugmanue Aug 28, 2023
3b02a61
Add a marker to identity and auth TODOs (#4362)
sugmanue Aug 28, 2023
82c9696
Fix checkstyle line length issue
gosar Aug 29, 2023
dc14a5c
Fix SignerLoader import, checksum module versions (#4363)
haydenbaker Aug 29, 2023
2aba2a0
Merge AwsChunked/S3 Payload Signer branch into sra-identity-auth (#4361)
haydenbaker Aug 29, 2023
bfa24e7
Remove emptyMap case that would miss additionalAuthSchemes (#4364)
gosar Aug 29, 2023
6f8f150
Set the signing clock property (#4341)
sugmanue Aug 29, 2023
e5d7809
Clean up auth schemes/signers that are no longer needed (#4368)
sugmanue Aug 30, 2023
dc48435
Cleanup event stream specific scheme/signer (#4380)
gosar Aug 31, 2023
4aea043
Add label to SRA identity and auth TODOs (#4381)
gosar Aug 31, 2023
0034c78
Implement v4a aws-chunked payload signer and s3-crt delegation (#4350)
haydenbaker Sep 5, 2023
53c7b3b
Add flexible checksum support for non-streaming cases (#4376)
haydenbaker Sep 6, 2023
9ce63b2
Merge remote-tracking branch 'upstream/master' into sugmanue/sra-ia-m…
sugmanue Sep 6, 2023
3c296d1
Add support for "derived" execution attributes. (#4396)
millems Sep 6, 2023
8f7070b
Add flexible checksum support for chunked-encoding cases (#4383)
haydenbaker Sep 7, 2023
7aa0493
Merge branch 'feature/master/sra-identity-auth' into sugmanue/sra-ia-…
sugmanue Sep 7, 2023
2dc6d83
Merge remote-tracking branch 'upstream/master' into sugmanue/sra-ia-m…
sugmanue Sep 7, 2023
4320a63
AuthSchemeOption changes based on surface review (#4411)
gosar Sep 11, 2023
15c6835
Move NoAuthAuthScheme to http-auth module (#4413)
gosar Sep 11, 2023
8ac715b
Refactor I&A signer modules to reduce API surface (#4403)
haydenbaker Sep 11, 2023
d11e354
Remove Sync from SyncSign(ed)Request (#4412)
gosar Sep 11, 2023
b811e88
Add I&A modules to bom and brazil mapping (#4424)
haydenbaker Sep 12, 2023
8dd837d
Add a test that the selected auth scheme signing clock will not be ov…
sugmanue Sep 13, 2023
fa9dbcc
Move and rename IdentityProviderConfiguration (#4423)
gosar Sep 13, 2023
2eb05c8
[Rebased] Flexible checksums for CRT chunk-encoding (#4431)
haydenbaker Sep 13, 2023
12e3994
Add auth scheme default impl classes (#4416)
gosar Sep 13, 2023
28b6d46
Rename http-auth-aws-event-stream module to http-auth-aws-eventstream…
gosar Sep 14, 2023
9a9315f
Split http-auth* module classes into .scheme and .signer java package…
gosar Sep 15, 2023
78e6ec5
Move signer specific internal sub-packages under internal.signer (#4441)
gosar Sep 18, 2023
3906e80
Allow ServiceClientConfiguration.Builder to read from SdkClientConfig…
sugmanue Sep 19, 2023
aa92108
Resettable Chunked Encoding streams and other TODOs (#4432)
haydenbaker Sep 19, 2023
21b182b
Remove unnecessary <T> from forEach*Property methods (#4449)
gosar Sep 19, 2023
c96a6e4
Make AwsV4FamilyHttpSigner a sub-type of HttpSigner (#4451)
gosar Sep 20, 2023
1552b9d
Make follow up changes from PR 4396 (#4454)
gosar Sep 20, 2023
5635201
Split codegen Builder and Client tests into separate Tests (#4470)
gosar Sep 23, 2023
7fcb28f
Update AwsV4aHttpSigner to use RegionSet (#4437)
haydenbaker Sep 23, 2023
305363d
Add namespacing to signer and identity properties (#4448)
haydenbaker Sep 23, 2023
32390a2
Add checksum execution attribute and checksum signer property mapping…
haydenbaker Sep 23, 2023
e05e4b7
Merge remote-tracking branch 'upstream/master' into sugmanue/sra-ia-m…
sugmanue Sep 25, 2023
7aafe72
Add http-auth-aws-crt test dependency for eventbridge integ test (#4474)
gosar Sep 25, 2023
4285d43
Bring old Signer back (#4471)
gosar Sep 25, 2023
02a74b1
Add SdkPlugin interface and use (#4469)
sugmanue Sep 26, 2023
349a0e6
Add missing properties and polish the codegen path (#4458)
sugmanue Sep 26, 2023
66f79ff
Set TIME_OFFSET attribtue in SRA signin methods (#4483)
zoewangg Sep 26, 2023
8da0410
Add missing dependency for transcribestreaming (#4486)
zoewangg Sep 26, 2023
844ae20
Fix isClientSignerOverridden to check actual value (#4473)
gosar Sep 27, 2023
fc2034b
Validate that SignerProperty and IdentityProperty namespaces/names ar…
millems Sep 27, 2023
9873b81
Add read-after-write S3 integration tests using old S3 clients and ne…
millems Sep 27, 2023
016dd50
Update RegionSet construction, add more tests (#4476)
haydenbaker Sep 27, 2023
8935502
Add useSraAuth to switch codegen for clients (#4491)
gosar Sep 27, 2023
20bd767
Fix order of parameters in exception message (#4472)
gosar Sep 27, 2023
26d88e2
Add useSraAuth=true for SraIdentityResolutionTest (#4497)
gosar Sep 28, 2023
b978c4c
Make s3control work with preSRA codegen (#4495)
gosar Sep 28, 2023
b44d0a6
Make s3 (mostly) work with preSRA (#4496)
gosar Sep 28, 2023
32fb40f
Add additional backwards-compatibility testing for legacy clients. (#…
millems Sep 28, 2023
e5d7262
Add codegen to generate an accessor for ConfigurationUpdater (#4500)
sugmanue Sep 28, 2023
9e3d3e3
Disable S3 payload signing. (#4499)
millems Sep 28, 2023
8de2748
Remove CodeCatalystIntegration test (#4502)
millems Sep 28, 2023
54e6b96
Add dependency on http-auth-aws-crt from auth-crt. (#4504)
millems Sep 28, 2023
0b9f12e
Use HttpChecksumStage for async trailer support (#4503)
zoewangg Sep 28, 2023
43b5b43
Fix Content-Length requirement, header updates in payload signer, htt…
haydenbaker Sep 29, 2023
513f034
Check schemes match for SignerProperties in SRA client (#4505)
gosar Sep 29, 2023
a36401a
Run plugins at client build time (#4506)
sugmanue Sep 29, 2023
62c9498
Update the tests to assert that we get the expected exception (#4510)
sugmanue Sep 29, 2023
1f3f4cd
Temporarily, do not interact with configured credentials providers un…
millems Sep 29, 2023
ae2e551
Make EventBridgeMultiRegionEndpointIntegrationTest reliable on the fi…
millems Sep 29, 2023
f3b5320
Disable SRA in CRT S3 client (#4514)
zoewangg Sep 30, 2023
4772e67
Undeprecate RESOLVED_CHECKSUM_SPECS (#4511)
gosar Oct 1, 2023
cadb6ab
Revert Presigners to pre SRA Identity & Auth (#4515)
gosar Oct 1, 2023
2c8dbed
Merge remote-tracking branch 'upstream/master' into feature/master/sr…
sugmanue Oct 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .brazil.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
"utils": { "packageName": "AwsJavaSdk-Core-Utils" },
"imds": { "packageName": "AwsJavaSdk-Imds" },
"crt-core": { "packageName": "AwsJavaSdk-Core-CrtCore" },
"checksums-spi": { "packageName": "AwsJavaSdk-Core-ChecksumsSpi" },
"checksums": { "packageName": "AwsJavaSdk-Core-Checksums" },
"identity-spi": { "packageName": "AwsJavaSdk-Core-IdentitySpi" },
"http-auth-spi": { "packageName": "AwsJavaSdk-Core-HttpAuthSpi" },
"http-auth": { "packageName": "AwsJavaSdk-Core-HttpAuth" },
"http-auth-aws": { "packageName": "AwsJavaSdk-Core-HttpAuthAws" },
"http-auth-aws-crt": { "packageName": "AwsJavaSdk-Core-HttpAuthAwsCrt" },
"http-auth-aws-eventstream": { "packageName": "AwsJavaSdk-Core-HttpAuthAwsEventStream" },

"dynamodb": { "packageName": "AwsJavaSdk-DynamoDb" },
"waf": { "packageName": "AwsJavaSdk-Waf" },
Expand Down Expand Up @@ -74,6 +82,7 @@
"http-clients": { "skipImport": true },
"metric-publishers": { "skipImport": true },
"module-path-tests": { "skipImport": true },
"old-client-version-compatibility-test": { "skipImport": true },
"protocol-tests": { "skipImport": true },
"protocol-tests-core": { "skipImport": true },
"protocols": { "skipImport": true },
Expand Down
40 changes: 40 additions & 0 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,46 @@
<artifactId>sdk-core</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>checksums-spi</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>checksums</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-auth-spi</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-auth</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-auth-aws</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-auth-aws-crt</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-auth-aws-eventstream</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>identity-spi</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-client-spi</artifactId>
Expand Down
5 changes: 3 additions & 2 deletions build-tools/src/main/resources/messages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@
]]>
</Details>
</BugPattern>
<BugCode abbrev="BM">Bad method call</BugCode>

<BugPattern type="BAD_TO_BUILDER">
<ShortDescription>Bad toBuilder implementation</ShortDescription>
<LongDescription>Bad toBuilder implementation. See the SpotBugs logs for problem details.</LongDescription>
<Details>Bad toBuilder implementation. See the SpotBugs logs for problem details.</Details>
</BugPattern>

<BugCode abbrev="BTB">Bad toBuilder implementation</BugCode>
</MessageCollection>
</MessageCollection>
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@
<Bug pattern="EI_EXPOSE_REP" />
</Match>

<Match>
<Class name="software.amazon.awssdk.http.auth.aws.crt.internal.signer.V4aContext" />
<Method name="getSignature" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>

<Match>
<Class name="software.amazon.awssdk.protocols.json.internal.unmarshall.JsonProtocolUnmarshaller" />
<Method name="unmarshallStructured" />
Expand Down Expand Up @@ -266,4 +272,13 @@
<Method name="fromFile"/>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Match>

<!-- Intentional for backwards-compatibility -->
<Match>
<Or>
<Class name="software.amazon.awssdk.auth.signer.AwsSignerExecutionAttribute"/>
<Class name="software.amazon.awssdk.auth.signer.S3SignerExecutionAttribute"/>
</Or>
<Bug pattern="NP_BOOLEAN_RETURN_NULL"/>
</Match>
</FindBugsFilter>
2 changes: 1 addition & 1 deletion buildspecs/release-javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
commands:
- python ./scripts/doc_crosslinks/generate_cross_link_data.py --apiDefinitionsBasePath ./services/ --apiDefinitionsRelativeFilePath src/main/resources/codegen-resources/service-2.json --templateFilePath ./scripts/doc_crosslinks/crosslink_redirect.html --outputFilePath ./scripts/crosslink_redirect.html
- mvn install -P quick -T1C
- mvn clean install javadoc:aggregate -B -Ppublic-javadoc -Dcheckstyle.skip -Dspotbugs.skip -DskipTests -Ddoclint=none -pl '!:protocol-tests,!:protocol-tests-core,!:codegen-generated-classes-test,!:sdk-benchmarks,!:s3-benchmarks,!:module-path-tests,!:test-utils,!:http-client-tests,!:tests-coverage-reporting,!:sdk-native-image-test,!:ruleset-testing-core'
- mvn clean install javadoc:aggregate -B -Ppublic-javadoc -Dcheckstyle.skip -Dspotbugs.skip -DskipTests -Ddoclint=none -pl '!:protocol-tests,!:protocol-tests-core,!:codegen-generated-classes-test,!:sdk-benchmarks,!:s3-benchmarks,!:module-path-tests,!:test-utils,!:http-client-tests,!:tests-coverage-reporting,!:sdk-native-image-test,!:ruleset-testing-core!:old-client-version-compatibility-testing'
- RELEASE_VERSION=`mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec`
-
- aws s3 sync target/site/apidocs/ $DOC_PATH/$RELEASE_VERSION/
Expand Down
2 changes: 1 addition & 1 deletion buildspecs/release-to-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ phases:
awk 'BEGIN { var=ENVIRON["SDK_SIGNING_GPG_KEYNAME"] } { gsub("\\$SDK_SIGNING_GPG_KEYNAME", var, $0); print }' > \
$SETTINGS_XML

mvn clean deploy -B -s $SETTINGS_XML -Ppublishing -DperformRelease -Dspotbugs.skip -DskipTests -Dcheckstyle.skip -Djapicmp.skip -Ddoclint=none -pl !:protocol-tests,!:protocol-tests-core,!:codegen-generated-classes-test,!:sdk-benchmarks,!:module-path-tests,!:tests-coverage-reporting,!:stability-tests,!:sdk-native-image-test,!:auth-tests,!:s3-benchmarks,!:region-testing -DautoReleaseAfterClose=true -DstagingProgressTimeoutMinutes=30
mvn clean deploy -B -s $SETTINGS_XML -Ppublishing -DperformRelease -Dspotbugs.skip -DskipTests -Dcheckstyle.skip -Djapicmp.skip -Ddoclint=none -pl !:protocol-tests,!:protocol-tests-core,!:codegen-generated-classes-test,!:sdk-benchmarks,!:module-path-tests,!:tests-coverage-reporting,!:stability-tests,!:sdk-native-image-test,!:auth-tests,!:s3-benchmarks,!:region-testing!:old-client-version-compatibility-testing -DautoReleaseAfterClose=true -DstagingProgressTimeoutMinutes=30
else
echo "This version was already released."
fi
20 changes: 20 additions & 0 deletions codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,26 @@
<artifactId>auth</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>identity-spi</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-auth</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-auth-spi</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>http-auth-aws</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>arns</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

package software.amazon.awssdk.codegen;

import java.util.Collections;
import java.util.Optional;
import java.util.stream.Collectors;
import software.amazon.awssdk.codegen.internal.Constant;
import software.amazon.awssdk.codegen.model.config.customization.CustomizationConfig;
import software.amazon.awssdk.codegen.model.intermediate.Metadata;
Expand Down Expand Up @@ -59,6 +62,7 @@ public static Metadata constructMetadata(ServiceModel serviceModel,
.withPaginatorsPackageName(namingStrategy.getPaginatorsPackageName(serviceName))
.withWaitersPackageName(namingStrategy.getWaitersPackageName(serviceName))
.withEndpointRulesPackageName(namingStrategy.getEndpointRulesPackageName(serviceName))
.withAuthSchemePackageName(namingStrategy.getAuthSchemePackageName(serviceName))
.withServiceAbbreviation(serviceMetadata.getServiceAbbreviation())
.withServiceFullName(serviceMetadata.getServiceFullName())
.withServiceName(serviceName)
Expand All @@ -78,7 +82,12 @@ public static Metadata constructMetadata(ServiceModel serviceModel,
.withServiceId(serviceMetadata.getServiceId())
.withSupportsH2(supportsH2(serviceMetadata))
.withJsonVersion(getJsonVersion(metadata, serviceMetadata))
.withAwsQueryCompatible(serviceMetadata.getAwsQueryCompatible());
.withAwsQueryCompatible(serviceMetadata.getAwsQueryCompatible())
.withAuth(Optional.ofNullable(serviceMetadata.getAuth())
.orElseGet(() -> Collections.singletonList(serviceMetadata.getSignatureVersion()))
.stream()
.map(AuthType::fromValue)
.collect(Collectors.toList()));

return metadata;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@

import static software.amazon.awssdk.codegen.internal.Utils.unCapitalize;

import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.stream.Collectors;
import software.amazon.awssdk.codegen.model.intermediate.ExceptionModel;
import software.amazon.awssdk.codegen.model.intermediate.OperationModel;
import software.amazon.awssdk.codegen.model.intermediate.ReturnTypeModel;
Expand Down Expand Up @@ -70,6 +72,9 @@ private static boolean isBlobShape(Shape shape) {
}

/**
* If there is a member in the output shape that is explicitly marked as the payload (with the payload trait) this method
* returns the target shape of that member. Otherwise this method returns null.
*
* @return True if shape is a String type. False otherwise
*/
private static boolean isStringShape(Shape shape) {
Expand All @@ -81,10 +86,8 @@ private static boolean isStringShape(Shape shape) {
* payload trait) this method returns the target shape of that member. Otherwise this method
* returns null.
*
* @param c2jShapes
* All C2J shapes
* @param outputShape
* Output shape of operation that may contain a member designated as the payload
* @param c2jShapes All C2J shapes
* @param outputShape Output shape of operation that may contain a member designated as the payload
*/
public static Shape getPayloadShape(Map<String, Shape> c2jShapes, Shape outputShape) {
if (outputShape.getPayload() == null) {
Expand Down Expand Up @@ -174,6 +177,7 @@ public Map<String, OperationModel> constructOperations() {
operationModel.setHttpChecksum(op.getHttpChecksum());
operationModel.setRequestCompression(op.getRequestCompression());
operationModel.setStaticContextParams(op.getStaticContextParams());
operationModel.setAuth(getAuthFromOperation(op));

Input input = op.getInput();
if (input != null) {
Expand All @@ -183,7 +187,7 @@ public Map<String, OperationModel> constructOperations() {
c2jShapes.get(originalShapeName).getDocumentation();

operationModel.setInput(new VariableModel(unCapitalize(inputShape), inputShape)
.withDocumentation(documentation));
.withDocumentation(documentation));

}

Expand All @@ -195,7 +199,7 @@ public Map<String, OperationModel> constructOperations() {
String documentation = getOperationDocumentation(output, outputShape);

operationModel.setReturnType(
new ReturnTypeModel(responseClassName).withDocumentation(documentation));
new ReturnTypeModel(responseClassName).withDocumentation(documentation));
if (isBlobShape(getPayloadShape(c2jShapes, outputShape))) {
operationModel.setHasBlobMemberAsPayload(true);
}
Expand All @@ -208,8 +212,8 @@ public Map<String, OperationModel> constructOperations() {
for (ErrorMap error : op.getErrors()) {

String documentation =
error.getDocumentation() != null ? error.getDocumentation() :
c2jShapes.get(error.getShape()).getDocumentation();
error.getDocumentation() != null ? error.getDocumentation() :
c2jShapes.get(error.getShape()).getDocumentation();

Integer httpStatusCode = getHttpStatusCode(error, c2jShapes.get(error.getShape()));

Expand All @@ -228,6 +232,22 @@ public Map<String, OperationModel> constructOperations() {
return javaOperationModels;
}

/**
* Returns the list of authTypes defined for an operation. If the new auth member is defined we use it, otherwise we retrofit
* the list with the value of the authType member if present or return an empty list if not.
*/
private List<AuthType> getAuthFromOperation(Operation op) {
List<String> opAuth = op.getAuth();
if (opAuth != null) {
return opAuth.stream().map(AuthType::fromValue).collect(Collectors.toList());
}
AuthType legacyAuthType = op.getAuthtype();
if (legacyAuthType != null) {
return Collections.singletonList(legacyAuthType);
}
return Collections.emptyList();
}

/**
* Get HTTP status code either from error trait on the operation reference or the error trait on the shape.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,13 @@ public String getEndpointRulesInternalResourcesDirectory() {
public String getEndpointRulesTestDirectory() {
return testDirectory + "/" + Utils.packageToDirectory(model.getMetadata().getFullEndpointRulesPackageName());
}

public String getAuthSchemeDirectory() {
return sourceDirectory + "/" + Utils.packageToDirectory(model.getMetadata().getFullAuthSchemePackageName());
}

public String getAuthSchemeInternalDirectory() {
return sourceDirectory + "/" + Utils.packageToDirectory(model.getMetadata().getFullInternalAuthSchemePackageName());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

package software.amazon.awssdk.codegen.emitters.tasks;

import java.util.ArrayList;
import java.util.List;
import software.amazon.awssdk.codegen.emitters.GeneratorTask;
import software.amazon.awssdk.codegen.emitters.GeneratorTaskParams;
import software.amazon.awssdk.codegen.emitters.PoetGeneratorTask;
import software.amazon.awssdk.codegen.poet.auth.scheme.AuthSchemeInterceptorSpec;
import software.amazon.awssdk.codegen.poet.auth.scheme.AuthSchemeParamsSpec;
import software.amazon.awssdk.codegen.poet.auth.scheme.AuthSchemeProviderSpec;
import software.amazon.awssdk.codegen.poet.auth.scheme.AuthSchemeSpecUtils;
import software.amazon.awssdk.codegen.poet.auth.scheme.DefaultAuthSchemeParamsSpec;
import software.amazon.awssdk.codegen.poet.auth.scheme.EndpointBasedAuthSchemeProviderSpec;
import software.amazon.awssdk.codegen.poet.auth.scheme.ModelBasedAuthSchemeProviderSpec;

public final class AuthSchemeGeneratorTasks extends BaseGeneratorTasks {
private final GeneratorTaskParams generatorTaskParams;

public AuthSchemeGeneratorTasks(GeneratorTaskParams dependencies) {
super(dependencies);
this.generatorTaskParams = dependencies;
}

@Override
protected List<GeneratorTask> createTasks() {
AuthSchemeSpecUtils authSchemeSpecUtils = new AuthSchemeSpecUtils(model);
List<GeneratorTask> tasks = new ArrayList<>();
tasks.add(generateParamsInterface());
tasks.add(generateProviderInterface());
tasks.add(generateDefaultParamsImpl());
tasks.add(generateModelBasedProvider());
tasks.add(generateAuthSchemeInterceptor());
if (authSchemeSpecUtils.useEndpointBasedAuthProvider()) {
tasks.add(generateEndpointBasedProvider());
}
return tasks;
}

private GeneratorTask generateParamsInterface() {
return new PoetGeneratorTask(authSchemeDir(), model.getFileHeader(), new AuthSchemeParamsSpec(model));
}

private GeneratorTask generateDefaultParamsImpl() {
return new PoetGeneratorTask(authSchemeInternalDir(), model.getFileHeader(), new DefaultAuthSchemeParamsSpec(model));
}

private GeneratorTask generateProviderInterface() {
return new PoetGeneratorTask(authSchemeDir(), model.getFileHeader(), new AuthSchemeProviderSpec(model));
}

private GeneratorTask generateModelBasedProvider() {
return new PoetGeneratorTask(authSchemeInternalDir(), model.getFileHeader(), new ModelBasedAuthSchemeProviderSpec(model));
}

private GeneratorTask generateEndpointBasedProvider() {
return new PoetGeneratorTask(authSchemeInternalDir(), model.getFileHeader(),
new EndpointBasedAuthSchemeProviderSpec(model));
}

private GeneratorTask generateAuthSchemeInterceptor() {
return new PoetGeneratorTask(authSchemeInternalDir(), model.getFileHeader(), new AuthSchemeInterceptorSpec(model));
}

private String authSchemeDir() {
return generatorTaskParams.getPathProvider().getAuthSchemeDirectory();
}

private String authSchemeInternalDir() {
return generatorTaskParams.getPathProvider().getAuthSchemeInternalDirectory();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public AwsGeneratorTasks(GeneratorTaskParams params) {
new PaginatorsGeneratorTasks(params),
new EventStreamGeneratorTasks(params),
new WaitersGeneratorTasks(params),
new EndpointProviderTasks(params));
new EndpointProviderTasks(params),
new AuthSchemeGeneratorTasks(params));
}
}
Loading
Loading