-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-5143 Support auto encryption in unified tests #2488
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
Conversation
This reverts commit f0881db.
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.
LGTM and looks helpful for mongodb/django-mongodb-backend#329
test/asynchronous/unified_format.py
Outdated
@@ -488,6 +515,7 @@ def tearDownClass(cls) -> None: | |||
async def asyncSetUp(self): | |||
# super call creates internal client cls.client | |||
await super().asyncSetUp() | |||
|
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.
Unintended whitespace?
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.
Updated
@@ -118,10 +119,22 @@ | |||
("kmip", KMIP_CREDS), | |||
("kmip:name1", KMIP_CREDS), | |||
]: | |||
# Use the temp aws creds for autoEncryptOpts. |
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.
Can you explain why we do this specifically for AWS?
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.
For clientEncryptionOpts, the tests are using the non-temp credentials, and for autoEncryptOpts they're using the temp credentials. Ideally they'd be the same, but other teams have already implemented.
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.
For every provider? Or only for AWS tests?
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.
AWS is the only provider that has temp credentials as an option
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.
Got it, makes sense.
test/asynchronous/helpers.py
Outdated
"sessionToken": os.environ.get("CSFLE_AWS_TEMP_SESSION_TOKEN", ""), | ||
} | ||
|
||
ALL_KMS_PROVIDERS = dict( |
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.
Do these need to be here where they'll be duplicated by synchro? Or can they go in a shared file in test
?
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.
Are you suggesting we move the rest of the constants as well?
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.
Any constant (or function, value, anything really) that doesn't change based on async/sync should live outside of the synchro'd directories, yeah.
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.
Okay, I'll refactor a bit
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.
Updated, let's see how the tests do
Okay, this is ready for review again |
Uh oh!
There was an error while loading. Please reload this page.