Skip to content

RUST-1529 Use AWS SDK for sigv4 signing #1438

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

Open
wants to merge 43 commits into
base: main
Choose a base branch
from

Conversation

JamieTsai1024
Copy link
Collaborator

@JamieTsai1024 JamieTsai1024 commented Jul 30, 2025

Replace existing implementation for getting sigv4 signing using the AWS SDK.

Testing

Clone https://github.com/isabelatkinson/drivers-evergreen-tools/tree/local-aws and run the following commands:

./.evergreen/run-aws-auth.sh

cd .evergreen/auth_aws
# run this script to reconfigure the type of AWS authentication to use
# copy the block of unset and export commands output by the script and run them in the terminal window you're using to run the driver tests
./aws_setup.sh (regular | env-creds | assume-role | session-creds | web-identity)

cd ~/mongo-rust-driver 
# Run the unset and set export commands printed by `./aws_setup.sh` for environment variables 
cargo nextest run auth_aws --features aws-auth

Previously

  • Used AWS SDK to retrieve credentials in PR #1435

Work to be done for RUST-1529

  • Decide whether to keep AWS SDK behind feature flag or replace original implementation
JamieTsai1024 and others added 30 commits July 23, 2025 12:30
@@ -117,27 +126,34 @@ async fn authenticate_stream_inner(
let creds = get_aws_credentials(credential).await.map_err(|e| {
Error::authentication_error(MECH_NAME, &format!("failed to get creds: {e}"))
})?;
let aws_credential = AwsCredential::from_sdk_creds(creds);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In a previous PR, we introduced from_sdk_creds(...) to convert from aws_credential_types::Credentials to locally defined AwsCredential type. Now that we've converted the rest of the authentication to use the AWS SDK, we no longer need this conversion

@JamieTsai1024 JamieTsai1024 marked this pull request as ready for review August 1, 2025 18:06
@JamieTsai1024 JamieTsai1024 requested a review from a team as a code owner August 1, 2025 18:06
@JamieTsai1024 JamieTsai1024 requested a review from abr-egn August 1, 2025 18:06
@@ -223,7 +223,7 @@ buildvariants:

- name: aws-auth
display_name: "AWS Authentication"
patchable: false
# patchable: false
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will uncomment once PR is approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants