Skip to content

Aws crt dev preview #1777

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

Merged
merged 700 commits into from
Jul 16, 2020
Merged

Conversation

bretambrose
Copy link
Contributor

Add support for an http client based on the AWS Common Runtime.

Description

This PR replaces #1607

This PR adds support for TLS negotiation post-quantum cryptographic suites as offered by Amazon KMS. The AWS Common Runtime provides an http client that uses s2n as its TLS implementation, and s2n in turn supports the necessary post-quantum cipher suites.

https://aws.amazon.com/blogs/security/post-quantum-tls-now-supported-in-aws-kms/

https://aws.amazon.com/blogs/security/round-2-hybrid-post-quantum-tls-benchmarks/

Testing

mvn clean install

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@codecov-io
Copy link

codecov-io commented Apr 14, 2020

Codecov Report

Merging #1777 into master will increase coverage by 0.10%.
The diff coverage is 84.91%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1777      +/-   ##
============================================
+ Coverage     76.29%   76.39%   +0.10%     
  Complexity      182      182              
============================================
  Files          1072     1078       +6     
  Lines         32252    32669     +417     
  Branches       2520     2570      +50     
============================================
+ Hits          24607    24959     +352     
- Misses         6404     6437      +33     
- Partials       1241     1273      +32     
Flag Coverage Δ Complexity Δ
#unittests 76.39% <84.91%> (+0.10%) 182.00 <0.00> (ø)
Impacted Files Coverage Δ Complexity Δ
.../enhanced/dynamodb/model/QueryEnhancedRequest.java 61.64% <64.70%> (+0.24%) 0.00 <0.00> (ø)
...k/enhanced/dynamodb/model/ScanEnhancedRequest.java 61.40% <64.70%> (+0.42%) 0.00 <0.00> (ø)
...http/crt/internal/AwsCrtRequestBodySubscriber.java 78.00% <78.00%> (ø) 0.00 <0.00> (?)
.../amazon/awssdk/http/crt/AwsCrtAsyncHttpClient.java 79.52% <79.52%> (ø) 0.00 <0.00> (?)
...http/crt/internal/AwsCrtResponseBodyPublisher.java 88.46% <88.46%> (ø) 0.00 <0.00> (?)
...etty/internal/http2/Http2ToHttpInboundAdapter.java 71.87% <90.90%> (+8.23%) 0.00 <0.00> (ø)
...ttp/crt/internal/AwsCrtAsyncHttpStreamAdapter.java 93.61% <93.61%> (ø) 0.00 <0.00> (?)
...p/crt/internal/AwsCrtResponseBodySubscription.java 100.00% <100.00%> (ø) 0.00 <0.00> (?)
...wssdk/http/nio/netty/internal/ResponseHandler.java 89.30% <100.00%> (+0.20%) 0.00 <0.00> (ø)
...nal/http2/Http2ConnectionTerminatingException.java 100.00% <100.00%> (ø) 0.00 <0.00> (?)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98fcc4f...98fcc4f. Read the comment docs.

@zoewangg zoewangg self-requested a review April 21, 2020 17:16
Copy link
Contributor

@zoewangg zoewangg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preliminary review, still going through the PR.

Can we add some stability tests for s3 and sqs? The stability tests are used to detect regressions with high concurrent requests. We have the harness, and it should be fairly easy to add new tests with StabilityTestRunner

* @param initialWindowSize The AWS Common Runtime WindowSize
* @return The builder of the method chaining.
*/
Builder initialWindowSize(int initialWindowSize);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be confused with h2 intialWindowSize.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm updating the comment here to better reflect this setting, which actually corresponds to what's described for h1, but will correspond to h2 initialWindowSize for h2 connections. It's not clear what changes will need to be made to fold h2 into the crt client, so for now I'd prefer to leave this be and readdress it (two params? one param with additional per-version comments?) as h2 gets brought in.


@Override
public void onResponseHeaders(HttpStream stream, int responseStatusCode, int blockType, HttpHeader[] nextHeaders) {
initRespBodyPublisherIfNeeded(stream);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why do we need to invoke initRespBodyPublisherIfNeeded in every method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No clue! We might be able to remove some (onResponseHeaders at least), but am not sure beyond that. I can ping Alex on this.

aws-sdk-java-automation and others added 24 commits June 9, 2020 11:06
…618c8e1dfce

Pull request: release <- staging/0b5e2565-d52d-44b6-aea6-e618c8e1dfce
…Integration with AWS Organizations Delegated Administrator feature
…one numbers and to the description for the create subscription action.
…upport for the ArchiveFindings and UnarchiveFindings operations. This release also adds UNKNOWN as an encryption type for S3 bucket metadata.
… Graviton2 processors and ideal for running advanced, compute-intensive workloads; New R6g instances powered by AWS Graviton2 processors and ideal for running memory-intensive workloads.
…LM Lifecycle policy from 500 to 120 characters.
… a list of predefined deployment strategies while starting deployments.
…a9e918952b9

Pull request: release <- staging/a7270fcf-c2b4-433a-bf5c-6a9e918952b9
This commit prevents the Netty client from throwing an exception in cases where
it tries to declare an attribute key and the key already exists. This can happen
when separate instances of the SDK are loaded by different classloaders, but the
Netty classes loaded by a third and shared by the other classloaders.

Fixes aws#1886
Safely declare Netty AttributeKeys
…in AMAZON.KendraSearchIntent that enables integration with Amazon Kendra.
…g a new feature called named shadow, which extends the capability of AWS IoT Device Shadow to support multiple shadows for a single IoT device. With this release, customers can store different device state data into different shadows, and as a result access only the required state data when needed and reduce individual shadow size.
… custom working directory for your build and test workflows. In addition, Image Builder now supports defining tags that are applied to ephemeral resources created by EC2 Image Builder as part of the image creation workflow.
AWS and others added 21 commits July 9, 2020 18:06
…ing set of actions for the EBS direct APIs: 1. StartSnapshot, which creates a new Amazon EBS snapshot. 2. PutSnapshotBlock, which writes a block of data to a snapshot. 3. CompleteSnapshot, which seals and completes a snapshot after blocks of data have been written to it.
…for SMS origination number as an attribute in the MessageAttributes parameter for the SNS Publish API.
…da8d5e9232b

Pull request: release <- staging/eaca728f-2dab-47fb-b1fd-7da8d5e9232b
 - Init test clients with mock credentials provider
 - Account for asynchrony for local stream window size
Return whenComplete's result, so that it's easier to say that "when the execute
future completes, metrics have been published".
Remove SdkMetric#convertValue, and various formatting fixes javadoc fixes
…ve Video Service - a managed live streaming solution that is quick and easy to set up, and ideal for creating interactive video experiences.
…af9bccdaa6a

Pull request: release <- staging/2651492b-f0d6-4f13-9b2b-0af9bccdaa6a
@bretambrose bretambrose changed the base branch from master to aws-crt-dev-preview July 15, 2020 20:49
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 11 Code Smells

80.1% 80.1% Coverage
2.5% 2.5% Duplication

warning The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more here

@zoewangg zoewangg merged commit 28de055 into aws:aws-crt-dev-preview Jul 16, 2020
aws-sdk-java-automation added a commit that referenced this pull request Oct 19, 2021
…dc9350fb4

Pull request: release <- staging/f7fea075-fba9-430b-88e5-c90dc9350fb4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants