-
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-2672 Add OIDC machine workflow spec. #1471
DRIVERS-2672 Add OIDC machine workflow spec. #1471
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.
Initial comments.
f805caf
to
246d124
Compare
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.
Unified test format changes look good. Can you please add tests for authMechanism
similar to the invalid/runOnRequirement-auth-type
test?
@alcaeus Added an invalid test for the type of |
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.
Unified test format changes LGTM.
Co-authored-by: Jeff Yemin <[email protected]>
…ional PR feedback.
(MONGODB-OIDC) | ||
uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:unexisted | ||
- description: should throw an exception custom callback is chosen but no callback is provided (MONGODB-OIDC) | ||
uri: mongodb://localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME:custom |
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.
I suppose "custom" is not allowed value for PROVIDER_NAME. As far as I remember there is only "aws" allowed so far.
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.
You're right, that test is vestigial from an earlier version of the spec. I've removed this test case because it's no longer relevant.
uri: mongodb://localhost/?authMechanism=MONGODB-OIDC | ||
PROVIDER_NAME: aws | ||
- description: should ignore username and password if specified for aws provider (MONGODB-OIDC) | ||
uri: mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=PROVIDER_NAME: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.
PROVIDER_NAME and callbacks are mutual exclusive. Callback parameter probably has to be removed from this 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.
You're correct. The callback
legacy test case parameter was never documented and is not supported by most drivers, so I intended to remove it from all test cases here, but accidentally left that one in. I've updated that test case to assert that providing a password causes a validation error, which matches the spec.
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.
One suggestion for a wording change that I leave to your discretion.
LGTM!
…a fields in prose 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.
LGTM!
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. Check to see if the noted prose test is truly a duplicate of the unified test or not.
|
||
- Create a ``MongoClient`` configured with an OIDC callback and auth mechanism | ||
property ``PROVIDER_NAME:aws``. | ||
- 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.
This prose test is already covered by the unified connection string tests above. Isn't this an unnecessary duplicate?
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.
The updated Auth connection string tests don't support passing an OIDC callback, so I believe this prose test covers a case that the Auth connection string tests can't. The previous Auth connection string OIDC tests did include a "callback" param, but it was not documented in the test format README, was only implemented in 1 or 2 drivers, and was confusing with the updated OIDC callback API, so I decided to replace it with a prose test instead.
DRIVERS-2672
Please complete the following before merging: