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

Would it be possible for CQL Proxy to authenticate using the clients credentials? #120

Open
ims-swilkinson opened this issue Oct 10, 2023 · 3 comments

Comments

@ims-swilkinson
Copy link

So when a client connects, could it authenticate a new connection for that client using the client's Astra username and password?
Then use that connection to make all the requests to Astra for that client? This way limitations imposed by the client's Astra role would apply, such as limiting them to only a specific keyspace.

The motivation behind this request is that we'd like to use a single CQL Proxy cluster to access our Astra database, with multiple apps connecting through it that we want to only be able to access their own keyspace.

@absurdfarce
Copy link
Collaborator

Thanks for the question @ims-swilkinson!

At the moment cql-proxy only supports a collection of connections for a single username/password; all client requests are then sent over that channel. cql-proxy could be modified to support a use case like the one you describe but the set of changes required would certainly be non-trivial:

  • The arguments to specify username and password would have to be made optional
  • Connections to Astra are currently indexed by keyspace. These connections would need to be modified by some combination of keyspace, username and credentials
    • You need to include credentials so that proxy users must provide them; you don't want users to assume identities just by knowing the name of the identity
  • Connection logic would need to be changed to defer creation of connections to Astra until a client actually connects
    • This could probably be mitigated by providing the ability to specify username/password combinations that should be pre-allocated

There's almost certainly more than what's outlined above; I'm just musing out loud about what would be necessary. I'm also assuming all the username/password combinations are on the same Astra database. Extending this support to cover multiple Astra databases in addition to multiple username/password combinations would add yet another layer of complexity.

@ims-swilkinson
Copy link
Author

ims-swilkinson commented Oct 16, 2023 via email

@absurdfarce
Copy link
Collaborator

Sounds good and happy to help @ims-swilkinson ! I'll keep this issue open so that we can have this issue in our backlog. I don't have any idea when or if any such fix would be implemented (as mentioned there aren't any plans to do anything like this now) but it's an intriguing idea.

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

No branches or pull requests

2 participants