-
Notifications
You must be signed in to change notification settings - Fork 190
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
Port redacting sensitive body to orchestrator #2972
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
rust-runtime/aws-smithy-runtime/src/client/orchestrator/http.rs
Outdated
Show resolved
Hide resolved
rust-runtime/aws-smithy-runtime/src/client/orchestrator/http.rs
Outdated
Show resolved
Hide resolved
...software/amazon/smithy/rust/codegen/client/smithy/customizations/SensitiveOutputDecorator.kt
Show resolved
Hide resolved
Co-authored-by: John DiSanti <[email protected]>
This commit addresses #2972 (comment)
A new generated diff is ready to view.
A new doc preview is ready to view. |
This commit addresses #2972 (comment)
This commit addresses #2972 (comment)
A new generated diff is ready to view.
A new doc preview is ready to view. |
rust-runtime/aws-smithy-runtime/src/client/orchestrator/http.rs
Outdated
Show resolved
Hide resolved
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.
cargo-semver-checks
is saying this is a breaking change, but I don't see it...
@@ -36,7 +36,8 @@ use tracing::{debug, debug_span, instrument, trace, Instrument}; | |||
mod auth; | |||
/// Defines types that implement a trait for endpoint resolution | |||
pub mod endpoints; | |||
mod http; | |||
/// Defines types that work with HTTP types | |||
pub mod http; |
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 like this doesn't need to be pub anymore.
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
Fixes #2926
Description
This PR ports logic implemented in #2603. Thankfully, even though we did not port this at the time of the orchestrator launch, the orchestrator has not logged sensitive bodies because we have never logged response bodies in the orchestrator code.
The code changes in this PR
try_attempt
Now, when credentials providers in
aws_config
need to say "I want to redact a response body" (example) when middleware is gone, they can pass an interceptorSensitiveOutputInterceptor
toConfig
of whatever clients they are using.Testing
Depends on the existing tests.
Without the logic ported over the orchestrator and by logging response bodies unconditionally in
try_attempt
, we got the following failures. After we've ported the logic, they now pass.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.