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

Support for SSL #35

Open
sorvis opened this issue Aug 10, 2021 · 8 comments
Open

Support for SSL #35

sorvis opened this issue Aug 10, 2021 · 8 comments

Comments

@sorvis
Copy link

sorvis commented Aug 10, 2021

Would it be possible to add support for SSL?

@lujiajing1126
Copy link
Owner

Would it be possible to add support for SSL?

I suppose the tls support has been added recently. Does #32 (comment) this comment help?

@sorvis
Copy link
Author

sorvis commented Aug 11, 2021

@lujiajing1126

Thank you for the fast response that was exactly what I was looking for! I just missed it since its not in the readme. Created a PR to fix that for future me :-)

After utilizing the --tls switch I'm finding this error about having issues verifying the certificate. Is there anything that can be done to allow it to pass by that certificate and accept it?

"failed - unable to verify the first certificate"

@lujiajing1126
Copy link
Owner

@lujiajing1126

Thank you for the fast response that was exactly what I was looking for! I just missed it since its not in the readme. Created a PR to fix that for future me :-)

After utilizing the --tls switch I'm finding this error about having issues verifying the certificate. Is there anything that can be done to allow it to pass by that certificate and accept it?

"failed - unable to verify the first certificate"

So I understand you are using a custom TLS certificate?

@sorvis
Copy link
Author

sorvis commented Aug 11, 2021

Yes I believe you are right the custom company certificate is what it is complaining about.

@lujiajing1126
Copy link
Owner

Yes I believe you are right the custom company certificate is what it is complaining about.

I will try to add customized options within this week. Or would you like to contribute this feature?

@sorvis
Copy link
Author

sorvis commented Aug 11, 2021

I took a quick look, but I don't exactly see the how to implement. I did try setting this environment variable and it doesn't crash but it does seem to hang so I'm not sure if that's the right path.

export NODE_TLS_REJECT_UNAUTHORIZED=0 && rdcli -h .......

Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.

@lujiajing1126
Copy link
Owner

I took a quick look, but I don't exactly see the how to implement. I did try setting this environment variable and it doesn't crash but it does seem to hang so I'm not sure if that's the right path.

export NODE_TLS_REJECT_UNAUTHORIZED=0 && rdcli -h .......

Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.

Generally speaking, there may be two ways,

  1. Add option to rdcli to skip TLS cert verification,
  2. Add option to rdcli to allow custom certification.

For rdcli, it just exposes options provided by the underlying redis library.

@sorvis
Copy link
Author

sorvis commented Oct 25, 2021

@lujiajing1126 seems like I'm not going to get around to making the change. I did find another work around is to use sclient then redirect the port something like this:

sclient securedHost:123 localhost:123 &

That redirects the traffic locally to make it appear as an unsecured call so the certificate validation is ignored. Given the work around I'm not sure if you would like to update the tool later or if you'd like I could make a PR to update the read-me to mention the work around.

As you said though allowing custom certificates would be good from a security perspective.

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

No branches or pull requests

2 participants