-
Notifications
You must be signed in to change notification settings - Fork 244
DRIVERS-2836 OIDC: Clarify that TOKEN_RESOURCE must be url-encoded #1569
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
Changes from all commits
a947708
c397684
36c11c5
5a663a0
d176681
518ef62
b5633b0
64c9ea2
3345a20
a754728
a4d0725
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -412,6 +412,50 @@ tests: | |
mechanism_properties: | ||
ENVIRONMENT: azure | ||
TOKEN_RESOURCE: foo | ||
- description: should accept a url-encoded TOKEN_RESOURCE (MONGODB-OIDC) | ||
uri: mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:mongodb%3A%2F%2Ftest-cluster | ||
valid: true | ||
credential: | ||
username: user | ||
password: null | ||
source: $external | ||
mechanism: MONGODB-OIDC | ||
mechanism_properties: | ||
ENVIRONMENT: azure | ||
TOKEN_RESOURCE: 'mongodb://test-cluster' | ||
- description: should accept an un-encoded TOKEN_RESOURCE (MONGODB-OIDC) | ||
uri: mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:mongodb://test-cluster | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this Uri valid? Should we have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This usage is against the advice we give to users in the spec, but I think we should optimistically decode this (like this in Java), rather than failing. Although it is indeed ambiguous, I think we will never put a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, can do the same, just want to double check if we see this as expected behavior. |
||
valid: true | ||
credential: | ||
username: user | ||
password: null | ||
source: $external | ||
mechanism: MONGODB-OIDC | ||
mechanism_properties: | ||
ENVIRONMENT: azure | ||
TOKEN_RESOURCE: 'mongodb://test-cluster' | ||
- description: should handle a complicated url-encoded TOKEN_RESOURCE (MONGODB-OIDC) | ||
uri: mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:abc%2Cd%25ef%3Ag%26hi | ||
valid: true | ||
credential: | ||
username: user | ||
password: null | ||
source: $external | ||
mechanism: MONGODB-OIDC | ||
mechanism_properties: | ||
ENVIRONMENT: azure | ||
TOKEN_RESOURCE: 'abc,d%ef:g&hi' | ||
- description: should url-encode a TOKEN_RESOURCE (MONGODB-OIDC) | ||
uri: mongodb://user@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:a$b | ||
valid: true | ||
credential: | ||
username: user | ||
password: null | ||
source: $external | ||
mechanism: MONGODB-OIDC | ||
mechanism_properties: | ||
ENVIRONMENT: azure | ||
TOKEN_RESOURCE: a$b | ||
- description: should accept a username and throw an error for a password with azure provider (MONGODB-OIDC) | ||
uri: mongodb://user:pass@localhost/?authMechanism=MONGODB-OIDC&authMechanismProperties=ENVIRONMENT:azure,TOKEN_RESOURCE:foo | ||
valid: false | ||
|
Uh oh!
There was an error while loading. Please reload this page.