-
Notifications
You must be signed in to change notification settings - Fork 244
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-2836 OIDC: More Clarification and Test Cleanup #1578
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.
LGTM, implemented in mongodb/mongo-java-driver#1380
source/auth/tests/mongodb-oidc.md
Outdated
- Create an OIDC configured client with auth mechanism properties `{"ENVIRONMENT": "azure", "ALLOWED_HOSTS": []}`. | ||
- Assert it returns a client configuration error. |
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.
- Create an OIDC configured client with auth mechanism properties `{"ENVIRONMENT": "azure", "ALLOWED_HOSTS": []}`. | |
- Assert it returns a client configuration error. | |
- Create an OIDC configured client with auth mechanism properties `{"ENVIRONMENT": "azure", "ALLOWED_HOSTS": []}`. Perform a find, if necessary, to cause the ensuing error. | |
- Assert it returns a client configuration error. |
In Java we validate on use (when the OidcAuthenticator is created). The check can be moved earlier, but it would not be as clean.
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 here and 2.4 as well.
@@ -96,7 +101,7 @@ source the `secrets-export.sh` file and use the associated env variables in your | |||
|
|||
**3.3 Unexpected error code does not clear the cache** | |||
|
|||
- Create a `MongoClient` with a human callback that returns a valid token. | |||
- Create a `MongoClient` with an OIDC callback that returns a valid token. |
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.
There are similar changes required on line 123 and 125.
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.
Done
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
Please complete the following before merging:
clusters, and serverless).