Add authentication to Cassandra module #3487
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This is to add authentication for the Cassandra module. the URL already has the ability to provide a username and password, this just implements it back to the driver. If you Database has authentication enabled, Opensips would not be able to connect to it.
Details
New Feature.
Need to use authentication when connecting to the database.
This is a very small change using existing logic in opensips code.
Uses the current db_url provided username:password structure for other DB types and makes it work for cassandra. Documentation would need to be updated to let others know this is now possible to use.
Solution
Simply implemented the Cassandra API to pass username and password if provided.
Compatibility
It is unknown to me when Cassandra implemented authentication. but I know it has been almost 8 years now.
Closing issues
I put in an issue, with some other questions related to this pull request. And questions for how to best offer support for Scylla DB as it's required librariy is different than cassandra, but the API is the same.
#3486