apple / swift-cassandra-client

Cassandra client in Swift
https://swiftpackageindex.com/apple/swift-cassandra-client/main/documentation/cassandraclient
Apache License 2.0
94 stars 21 forks source link

More flexible authentication system #16

Open mattmassicotte opened 1 year ago

mattmassicotte commented 1 year ago

Hello again!

I'm attempting to use this client with AWS Keyspaces. This service has two mechanisms for authentication. Right now, I'm able to use the user/pass versions, and it's working! I'm amazed!

However, the "real" way to do auth with Keyspaces is via AWS SigV4 authentication. Doing this requires building a plugin that uses the lower level auth systems of the C++ driver. These are not currently exposed. I haven't built a system that does this yet, so I'm kind of winging it based on what I see in the Go plugin.

Any thoughts on how to wrap up the driver's API?

tomerd commented 1 year ago

I think adding a plugin system for auth is interesting direction. we would obviously need to expose a new API that allows the client to inject the alternative auth provider. would you like to to propose such?

tomerd commented 1 year ago

cc @yim-lee @rnro

mattmassicotte commented 1 year ago

I did make a little progress. I was using the example here:

https://github.com/datastax/cpp-driver/blob/master/examples/auth/auth.c

However, I was working on this as a side-project, and have been distracted. I like the idea of an API to make this easier, but I don't think I have enough time or context to make a good suggestion.