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

TLS verify-full fix host #137

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Conversation

sitingren
Copy link
Member

@sitingren sitingren commented Mar 4, 2024

When connect to a remote server with tls_mode = 'verify-full', the client throws an error message Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:abc.example.com.

This is because the nodejs tls module uses 'localhost' as the default host when checking the server's host name against the certificate. This PR takes the user input host (not DNS resolved or load balanced) and pass to the tls_options for verifying the certificate. This doesn't change the host the socket should connect to.

@sitingren
Copy link
Member Author

@DMickens I found this bug and tested this PR within sqltools. You may consider change the tls test/framework in another PR.

@DMickens
Copy link
Collaborator

DMickens commented Mar 5, 2024

@DMickens I found this bug and tested this PR within sqltools. You may consider change the tls test/framework in another PR.

I'm not quite sure what we would do in the tests/framework differently. We don't really have the ability to not run against localhost. It can be tested manually.

Regardless that was a good catch by you. I think most deployments do not have the server running locally, which means we probably don't have many users using verify-full TLS or this would have been reported sooner.

@sitingren sitingren merged commit b502147 into vertica:master Mar 5, 2024
7 checks passed
@sitingren sitingren deleted the tls-hostname branch March 5, 2024 03:52
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