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

CASSJAVA-80: Support configuration to disable DNS reverse-lookups for SAN validation #2018

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

aratno
Copy link
Contributor

@aratno aratno commented Feb 12, 2025

No description provided.

@aratno aratno force-pushed the CASSJAVA-80-ssl-dns-san branch 5 times, most recently from 2c6c0f9 to c8e5b56 Compare February 12, 2025 14:47
Copy link

@frankgh frankgh left a comment

Choose a reason for hiding this comment

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

Looks good in general. Do we need to do the same for ProgrammaticSslEngineFactory and SniSslEngineFactory?

@aratno aratno force-pushed the CASSJAVA-80-ssl-dns-san branch from c8e5b56 to 2d83d21 Compare February 13, 2025 22:15
Copy link
Contributor

@adutra adutra left a comment

Choose a reason for hiding this comment

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

LGTM, I vaguely remember a similar issue fixed in b2b9bee, so this change makes sense.

@tolbertam tolbertam self-requested a review February 21, 2025 16:32
@tolbertam
Copy link
Contributor

tolbertam commented Feb 21, 2025

Looks good in general. Do we need to do the same for ProgrammaticSslEngineFactory and SniSslEngineFactory?

Definitely see the value in doing it for the Programmatic one (I see you already covered that, thanks!), for SNI I think there is less utility as you are likely using a DNS name with the IP of the node to target in the SNI, but I think we might as well add it though just in the event that someone is using a literal IP address for the primary endpoint for tunneling through SNI.

Copy link
Contributor

@tolbertam tolbertam left a comment

Choose a reason for hiding this comment

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

👍 looks great; If you don't mind also adding this for the SNI factory for completeness that'd be good, but i'm +1 either way.

this(sslContext, true);
}

public SniSslEngineFactory(SSLContext sslContext, boolean allowDnsReverseLookupSan) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't dawn on me at the time that SniSslEngineFactory does not access DriverContext so we can't make use of it unless programatically (outside of CloudConfigFactory), but I suppose if someone wants to use it separately, they can programmatically and in which case this adds some functionality 👍

Copy link

@frankgh frankgh left a comment

Choose a reason for hiding this comment

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

+1 thanks for the fix

… SAN validation

patch by Abe Ratnofsky; reviewed by Alexandre Dutra, Andy Tolbert, and Francisco Guerrero for CASSJAVA-80
@aratno aratno force-pushed the CASSJAVA-80-ssl-dns-san branch from 5f8fe8a to b3b9cf1 Compare February 21, 2025 17:49
@tolbertam tolbertam merged commit 3bb5b18 into apache:4.x Feb 21, 2025
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.

4 participants