Skip to content

fix(devtools-connect): give application code for custom OIDC HTTP options precedence #321

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

Merged
merged 1 commit into from
May 15, 2024

Conversation

addaleax
Copy link
Collaborator

Instead of using the application callback first and then potentially transforming the result with options computed by devtools-connect, do the reverse. This gives the application using devtools-connect more flexibility about how exactly to modify OIDC HTTP options.

The goal here is to enable usage of HTTP proxies in conjunction with useSystemCA and explicit tlsCAFile settings; devtools-connect correctly passes the former to the OIDC plugin, but after this change, the application can also pass it to the proxy agent, if it creates one.

None of our team's applications currently make use of the function variant of this options, so this will not affect existing code in any way.

…ions precedence

Instead of using the application callback first and then potentially transforming the
result with options computed by devtools-connect, do the reverse. This gives the
application using devtools-connect more flexibility about how exactly to modify OIDC
HTTP options.

The goal here is to enable usage of HTTP proxies in conjunction with `useSystemCA`
and explicit `tlsCAFile` settings; devtools-connect correctly passes the former
to the OIDC plugin, but after this change, the application can also pass it to
the proxy agent, if it creates one.

None of our team's applications currently make use of the function variant of this
options, so this will not affect existing code in any way.
@@ -76,7 +76,7 @@
"gen-esm-wrapper": "^1.1.0",
"mocha": "^8.4.0",
"mongodb": "^5.8.1 || ^6.0.0",
"mongodb-log-writer": "^1.2.0",
"mongodb-log-writer": "^1.4.2",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't even quite remember why, it must have been part of the SSDLC CodeQL work, but this was lying around in my local git checkout and there didn't really seem a reason not to just do this as a drive-by change, so I just commited it along with the actual change 🤷‍♀️

@addaleax addaleax merged commit e6fbda3 into main May 15, 2024
3 of 5 checks passed
@addaleax addaleax deleted the devtools-connect-oidc-custom-http-preference branch May 15, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants