Skip to content

Conversation

@mohammad-aburadeh
Copy link
Contributor

Support SSL connection when client verification is not required.

Description

This PR is to support SSL connection without cert files required. This is needed when "require_client_auth" is disabled in Cassandra configurations.

Status

  • done, ready for review

Closes #563 and #543

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@mohammad-aburadeh
Copy link
Contributor Author

Hi @rzvoncek
This is requested by many customers. Can you plz review it ?

Copy link
Contributor

@rzvoncek rzvoncek left a comment

Choose a reason for hiding this comment

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

Hello @mohammad-aburadeh , I'm sorry to send this back to you, but I don't think the change is complete.

if self._cassandra_config.certfile is not None:
if ((self._cassandra_config.ssl is not None and evaluate_boolean(self._cassandra_config.ssl))
or self._cassandra_config.certfile is not None):
ssl_context = SSLContext(PROTOCOL_TLSv1_2)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @mohammad-aburadeh! Sorry for the delay, but I finally managed to find the time to look at this.

And I'm sorry to admit, but I don't quite understand what the proposed change is. If I'm reading this right, the new behaviour is that if the new ssl option is present and set to True, it'll just set the ssl_context variable ... and then do nothing else.
The line 88 is indented under the condition of certfile being present, which is basically the old behaviour.

Please, could you clarify what your intent was?

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.

Support SSL without cert files

2 participants