Skip to content

Conversation

@blink1073
Copy link
Member

Re-do of #440 after an accidental merge and revert.

Copy link
Contributor

@juliusgeo juliusgeo left a comment

Choose a reason for hiding this comment

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

LGTM!

@blink1073 blink1073 merged commit e8fbed9 into mongodb:master Aug 30, 2022
@blink1073 blink1073 deleted the PYTHON-3256 branch August 30, 2022 14:52
import copy

try:
from pymongo_auth_aws.auth import _aws_temp_credentials
Copy link
Member

Choose a reason for hiding this comment

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

Could you open a new ticket to make _aws_temp_credentials a public API?

Copy link
Member Author

Choose a reason for hiding this comment

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

return
if not _HAVE_AUTH_AWS:
raise RuntimeError(
"MONGODB-AWS authentication requires pymongo-auth-aws: "
Copy link
Member

Choose a reason for hiding this comment

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

"MONGODB-AWS authentication" is not relevant here. Should say "on demand aws credentials require..."

Should we add pymongo-auth-aws to pymongo[encryption] too?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a separate function so it can be overridden in unit tests."""
if 'aws' not in kms_providers:
return
if len(kms_providers['aws']):
Copy link
Member

Choose a reason for hiding this comment

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

If we already provided non-empty aws creds to libmongocrypt is this state even possible to reach?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was in preparation for other types of on-demand credentials.

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.

3 participants