-
Notifications
You must be signed in to change notification settings - Fork 57
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
fix: Proxy and client cert authentication #1068
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.
My concern would be the linting and automated tests.
test-packages/integration-tests/test/auth-flows/auth-flow.spec.ts
Outdated
Show resolved
Hide resolved
@@ -29,10 +29,12 @@ export function getAgentConfig( | |||
const agentType = destination.proxyConfiguration | |||
? AgentType.PROXY | |||
: AgentType.DEFAULT; | |||
// eslint-disable-next-line @typescript-eslint/no-shadow | |||
const certificateOptions = getCertificateOption(destination); |
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 don't see shadow name. Could you please share a bit details?
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.
for me I got a lint error that the variable in the if block below is shadowed - I do not understand that either.
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, with a minor comment.
Linting will be handled in a follow up ticket.
For the failing unit test, if you need further review, just let me know. |
Co-authored-by: Junjie Tang <[email protected]>
I realized while working on BAS that client certificate authentication is not working when also proxies are used.
I adjusted our code that the proxy settings are also passed to the http-agent. Unfortunately also the proxy agent itself does not forward the presented certificates to the target system. So they stay on the proxy and you get a 401.
I checked by locally adjusting the node modules that this PR TooTallNate/proxy-agents#111 fixes the issue, but the repo seems to be not very active. We can merge the code on our side but it will not work until we get an update on the node-https-proxy and this could take a while...