-
Notifications
You must be signed in to change notification settings - Fork 65
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
DRIVERS-2416 Add support for a second Azure client #360
Conversation
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 good 👍
.evergreen/auth_oidc/azure/test.py
Outdated
@@ -8,11 +8,13 @@ | |||
_AUTH_MAP["MONGODB-OIDC"] = _authenticate_oidc | |||
|
|||
app_id = os.environ['AZUREOIDC_CLIENTID'] | |||
client_id = os.environ['AZUREOIDC_TOKENCLIENT'] | |||
|
|||
def callback(client_info, server_info): |
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.
Optional: The side effect of setting client_id
on callback
is fairly confusing. Is there any way to encode the new client_id
requirement in the callback
function, or in a callback
creator function?
E.g.
def callback_for(app_id, client_id):
def callback(client_info, server_info):
...
return callback
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 to use a closure.
This infrastructure will be needed to support testing drivers with multiple clients on Azure. I tested it locally by running
create_and_update_vm.sh
and ensuring that the self-test passes.