Skip to content

feat: enable clockSkew correction by default #459

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 9 commits into from
Nov 26, 2019

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Nov 20, 2019

Issue #, if available:
N/A

Description of changes:
Enables clockSkew correction by default

In v2:

  • The applyClockOffset is called in name HTTP_HEADERS with eventName httpHeaders (code)
  • The code which adds listeners from AWS.EventListeners.Core (and others) to request (code)
  • The function which calls httpHeaders callback (code)
  • The callback is passed to handleRequest in executeSend (code)

How signing works in v3:

  • SignatureV4 sign method uses current Date for signing if one is not passed in options (code)
  • signing happens in signRequest/signString (code)
  • signing-middleware calls signer.sign passing request and no options (code)

In v3 smithy-codegen branch:

  • AwsAuthPlugin does the functionality of signing (code)
  • The auth plugin calls the signingMiddleware (code)
  • signer.sign operation is called in middleware (code)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@codecov-io
Copy link

codecov-io commented Nov 20, 2019

Codecov Report

Merging #459 into smithy-codegen will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@                Coverage Diff                 @@
##           smithy-codegen     #459      +/-   ##
==================================================
+ Coverage           95.13%   95.17%   +0.03%     
==================================================
  Files                  72       72              
  Lines                1378     1389      +11     
  Branches              269      272       +3     
==================================================
+ Hits                 1311     1322      +11     
  Misses                 67       67
Impacted Files Coverage Δ
packages/middleware-signing/src/middleware.ts 85.71% <100%> (+9.24%) ⬆️

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 f4f4f83...7cd7d24. Read the comment docs.

Copy link
Contributor

@AllanZhengYP AllanZhengYP left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just have one minor comment.

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@trivikr trivikr merged commit 735c648 into aws:smithy-codegen Nov 26, 2019
@trivikr trivikr deleted the clock-skew-correction branch November 26, 2019 19:50
@lock
Copy link

lock bot commented Dec 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants