Skip to content
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

[console] If using an https agent, set rejectUnauthorized in the agent #11700

Merged
merged 3 commits into from
May 11, 2017

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented May 10, 2017

Currently setting

console.proxyConfig
- ssl.ca: /foo/bar/ca.crt

will result in an error of

"options.agent cannot be set to an Agent at the same time as options.rejectUnauthorized is set"

This probably broke sometime around the hapi or node upgrade, I'm still investigating. Instead of setting both rejectUnauthorized and an agent, this will set rejectUnauthorized on the agent.

@@ -45,6 +45,7 @@ export class ProxyConfig {
};

if (values(sslAgentOpts).filter(Boolean).length) {
sslAgentOpts.rejectUnauthorized = this.verifySsl === undefined ? true : this.verifySsl;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why === undefined and not == null?

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM

@jbudz jbudz requested a review from kobelb May 10, 2017 23:16
Copy link
Contributor

@kobelb kobelb left a comment

Choose a reason for hiding this comment

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

LGTM

@jbudz jbudz merged commit 563157c into elastic:master May 11, 2017
jbudz added a commit to jbudz/kibana that referenced this pull request May 11, 2017
elastic#11700)

* [console] If using an https agent, set rejectUnauthorized in the agent

* [console] Update tests to expect rejectUnauthorized in agent config

* [console] Check for null and undefined when setting rejectUnauthorized
jbudz added a commit to jbudz/kibana that referenced this pull request May 11, 2017
elastic#11700)

* [console] If using an https agent, set rejectUnauthorized in the agent

* [console] Update tests to expect rejectUnauthorized in agent config

* [console] Check for null and undefined when setting rejectUnauthorized
jbudz added a commit that referenced this pull request May 11, 2017
#11700) (#11733)

* [console] If using an https agent, set rejectUnauthorized in the agent

* [console] Update tests to expect rejectUnauthorized in agent config

* [console] Check for null and undefined when setting rejectUnauthorized
jbudz added a commit that referenced this pull request May 11, 2017
#11700) (#11734)

* [console] If using an https agent, set rejectUnauthorized in the agent

* [console] Update tests to expect rejectUnauthorized in agent config

* [console] Check for null and undefined when setting rejectUnauthorized
@jbudz
Copy link
Member Author

jbudz commented May 11, 2017

5.4: 0b56286
5.x/5.5: 96cf8fb

snide pushed a commit to snide/kibana that referenced this pull request May 30, 2017
elastic#11700)

* [console] If using an https agent, set rejectUnauthorized in the agent

* [console] Update tests to expect rejectUnauthorized in agent config

* [console] Check for null and undefined when setting rejectUnauthorized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants