Skip to content
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

RUST-1314 Support on-demand AWS credentials for in-use encryption #831

Merged
merged 8 commits into from
Feb 28, 2023

Conversation

abr-egn
Copy link
Contributor

@abr-egn abr-egn commented Feb 15, 2023

RUST-1314

Happily, this turned out to be more straightforward than expected.

Comment on lines +352 to +362
pub(crate) fn access_key(&self) -> &str {
&self.access_key
}

pub(crate) fn secret_key(&self) -> &str {
&self.secret_key
}

pub(crate) fn session_token(&self) -> Option<&str> {
self.session_token.as_deref()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could we just make the fields pub(crate) instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd rather preserve the invariant that this struct can't be directly constructed or mutated.

})
.run()
.await;
assert!(result.is_err());
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a more specific error case/variant we can assert on here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, updated this to check that it's an auth error.

@abr-egn abr-egn merged commit 5d28084 into mongodb:main Feb 28, 2023
abr-egn added a commit to abr-egn/mongo-rust-driver that referenced this pull request Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants