-
Notifications
You must be signed in to change notification settings - Fork 547
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
chore: move expiration under RequestPresigningArguments #1030
chore: move expiration under RequestPresigningArguments #1030
Conversation
Codecov Report
@@ Coverage Diff @@
## smithy-codegen #1030 +/- ##
===============================================
Coverage 91.42% 91.42%
===============================================
Files 145 145
Lines 2857 2858 +1
Branches 506 507 +1
===============================================
+ Hits 2612 2613 +1
Misses 245 245
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
@@ -139,6 +138,7 @@ export class SignatureV4 | |||
|
|||
const { | |||
signingDate = new Date(), | |||
expiration = new Date(Date.now() + 3600 * 1000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this 1 hr expiration come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for applying the change. I have a few comments.
packages/types/src/signature.ts
Outdated
/** | ||
* The time at which the signed request should no longer be honored. | ||
*/ | ||
expiration?: DateInput; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SignatureV4.sign()
also uses RequestSigningArguments
. Adding the parameter here makes signing a request with a useless expiration
parameter, it will confuse the users. Can you use another options name(e.g. RequestPresignArguments
) extending from RequestSigningArguments
with expiration
property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 50a2658
This comment has been minimized.
This comment has been minimized.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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. |
Issue #, if available:
Description of changes:
Move expiration under RequestSigningArguments
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.