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

Enable ssl use for cluster in CassandraIO #29302

Merged
merged 4 commits into from
Nov 4, 2023

Conversation

niv-lac
Copy link
Contributor

@niv-lac niv-lac commented Nov 3, 2023

This PR is to address inability to utilize SSL, as referenced in issue 21223, by surfacing the cluster builder withSSL( SSLOptions sslOptions) method to allow the user to provide SSL configuration. I chose to allow the user to provide SSLOptions to allow different SSL strategies in cases where one user may want client to node encryption and client certificate authentication while another may just want client to node encryption.

Notes:

  • First time creating a PR for a non-work related project. Tried to follow the contribution documentation but please let me know if I need to include anything additional or if there are any processes I missed. Thanks.
  • Since this PR is surfacing builder ssl functionality from the Datastax driver, I didn't include unit tests to test their functionality.
  • Also, I don't believe I would be able to configure SSL on the embedded test cluster.
  • These changes have been tested with poc Dataflow job created via Dataflow classic template where truststore cert (self-signed) and password are retrieved at runtime and used to create an SSLContext which is then used to create SSLOptions. The pipeline reads from SQL Server and writes to a DSE 6.8 Cassandra cluster with SSL (TLS protocol) enabled, hosted in GCP.

Please let me know if you have any questions. Thank you.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

Add properties / methods to facilitate optional ssl use by surfacing datastax driver functionality to programmatically configure ssl options when building Cluster.
Add comments with link to driver documentation for programmatic config of ssl
Copy link
Contributor

github-actions bot commented Nov 3, 2023

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

Copy link
Contributor

github-actions bot commented Nov 3, 2023

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @robertwb for label java.
R: @Abacn for label io.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

@Abacn Abacn merged commit 87ca614 into apache:master Nov 4, 2023
@niv-lac
Copy link
Contributor Author

niv-lac commented Nov 4, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants