Skip to content

Deprecate cass_cluster_set_use_hostname_resolution()#523

Merged
absurdfarce merged 3 commits intomasterfrom
CPP-942
Mar 24, 2022
Merged

Deprecate cass_cluster_set_use_hostname_resolution()#523
absurdfarce merged 3 commits intomasterfrom
CPP-942

Conversation

@mpenick
Copy link
Copy Markdown
Contributor

@mpenick mpenick commented Jan 10, 2022

Add documentation that MITM is possible when using
CASS_SSL_VERIFY_PEER_IDENTITY_DNS with
cass_cluster_set_use_hostname_resolution()

Michael Penick added 2 commits January 10, 2022 10:30
Add documentation that MITM is possible when using
`CASS_SSL_VERIFY_PEER_IDENTITY_DNS` with
`cass_cluster_set_use_hostname_resolution()`
Comment thread include/cassandra.h Outdated
* This is useful for authentication (Kerberos) or encryption (SSL) services
* that require a valid hostname for verification.
* @deprecated Do not use. Using reverse DNS lookup to verify the certificate
* does not protect against man-in-the-middle attacks.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps include mention of CPP-942 inline in comments for additional context?

Although it doesn't look like there's much reference to CPP tickets in comments elsewhere in the source so maybe not.

Comment thread include/cassandra.h Outdated
* common name or one of its subject alternative names. This implies the
* certificate is also present. Hostname resolution must also be enabled.
* CASS_SSL_VERIFY_PEER_IDENTITY_DNS - Do not use. The requires the use of
* reverse DNS lookup which in not sufficient to protect against
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/in/is/

Comment thread include/cassandra.h Outdated
* CASS_SSL_VERIFY_PEER_IDENTITY_DNS - Hostname matches the certificate's
* common name or one of its subject alternative names. This implies the
* certificate is also present. Hostname resolution must also be enabled.
* CASS_SSL_VERIFY_PEER_IDENTITY_DNS - Do not use. The requires the use of
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/The/This/ or maybe s/The/This option/

Comment thread topics/security/ssl/README.md Outdated
(reverse DNS) needs to be enabled:

**NOTE:** This is also disabled by default.
**Important:** This section use to suggest using reverse DNS lookup as a way to validate the peer's certificate i.e. using `CASS_SSL_VERIFY_PEER_IDENTITY_DNS` with `cass_cluster_set_use_hostname_resolution(cluster, cass_true)`. This is susceptible to man-in-the-middle (MITM) attacks and is no longer recommended.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/use/used/

Copy link
Copy Markdown
Contributor

@absurdfarce absurdfarce left a comment

Choose a reason for hiding this comment

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

A couple minor typo nits but otherwise this looks pretty good

@absurdfarce
Copy link
Copy Markdown
Contributor

Something else just occurred to me a little bit ago: we probably still need a changelog mention for this even though it isn't actually changing (behaviour in) code, right?

@absurdfarce
Copy link
Copy Markdown
Contributor

Merging this in for now, will address the changelog update separately once we get closer to a release

@absurdfarce absurdfarce merged commit 7169a57 into master Mar 24, 2022
@absurdfarce absurdfarce deleted the CPP-942 branch March 24, 2022 18:50
fsaporito pushed a commit to cloudian/cpp-driver that referenced this pull request May 9, 2023
Deprecate the function and update docs accordingly
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