-
Notifications
You must be signed in to change notification settings - Fork 196
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
Use Identity
instead of Credentials
in signing code
#2913
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
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.
overall I think this is the right change. Personally, though, I'd keep Credentials
on all the private locations and validate very early on that it is indeed credentials inside. We can also have a .credentials
method on the signing params builder that accepts credentials—no reason we can't have both credentials and identity.
aws/rust-runtime/aws-sigv4/src/http_request/canonical_request.rs
Outdated
Show resolved
Hide resolved
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
9eb3bd8
to
f0573aa
Compare
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
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.
Looks good. Just two minor comments.
@@ -52,6 +65,7 @@ enum CanonicalRequestErrorKind { | |||
InvalidHeaderValue { source: InvalidHeaderValue }, | |||
InvalidUtf8InHeaderValue { source: Utf8Error }, | |||
InvalidUri { source: InvalidUri }, | |||
UnsupportedCredentialType, |
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.
Should be called UnsupportedIdentityType
@@ -29,14 +30,11 @@ pub mod event_stream; | |||
pub mod http_request; | |||
|
|||
/// Parameters to use when signing. | |||
// #[derive(Debug)] is safe because `Identity` handles redaction. |
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.
Identity
doesn't handle redaction, but the data inside of it is supposed to.
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.
I'll clarify that.
A new generated diff is ready to view.
A new doc preview is ready to view. |
This PR replaces the access_key, secret_key, and session token fields of signing params with the Orchestrator's
Identity
type.Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.