Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Close #10 Added warning that appears if insecureSkipTlsVerify is true #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

befirst
Copy link
Contributor

@befirst befirst commented Jun 3, 2019

There is a special flag in the config for Openshift Client - insecureSkipTlsVerify. A true value means that if the authenticity of the certificate is not established, then the execution will continue anyway (regardless of the type of certificate, self-signed or not). Also, it depends on process.env.NODE_TLS_REJECT_UNAUTHORIZED. So for enabling insecureSkipTlsVerify process.env.NODE_TLS_REJECT_UNAUTHORIZED must be "0". Also, I've added logger.warn in the Client for insecureSkipTlsVerify true value. @aiwilliams, can you comment this? I think the problem is the wrong value of param. Will you have enough logger.warn call from our side for generating warn in UI? Or maybe we need to call another method?

@aiwilliams aiwilliams self-requested a review June 6, 2019 01:18
@aiwilliams
Copy link
Contributor

I recall that when I first worked on this, I learned of the NODE_TLS_REJECT_UNAUTHORIZED setting to make Node's native request API accept a self-signed cert. That setting was placed in .env for local development, so that it would not be used in a production environment. I see that process.env.NODE_TLS_REJECT_UNAUTHORIZED === '0' is being used to set insecureSkipTlsVerify for the OpenShift client, which translates it to strictSSL, used in the request library as a setting to ignore certificate errors.

I question whether both of these settings really required. Would you please verify that insecureSkipTlsVerify: true can be set without using NODE_TLS_REJECT_UNAUTHORIZED? Then we can avoid having to set that environment variable, which will affect the Node process/other requests beyond the connection to OpenShift?

@aiwilliams, can you comment this? I think the problem is the wrong value of param. Will you have enough logger.warn call from our side for generating warn in UI? Or maybe we need to call another method?

The SDK needs a mechanism added to allow for reporting to the UI. I think what you have is fine for now.

Copy link
Contributor

@aiwilliams aiwilliams left a comment

Choose a reason for hiding this comment

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

Please check about avoiding the use of NODE_TLS_REJECT_UNAUTHORIZED. The .env will need to be changed to use a different environment variable, to avoid changing all Node requests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants