instaclustr / cassandra-ldap

LDAP Authenticator for Apache Cassandra
Apache License 2.0
24 stars 16 forks source link

Ability to connect to Cassandra with normal Cassandra users in case LDAP server is down #10

Closed smiklosovic closed 5 years ago

smiklosovic commented 5 years ago

Please answer these questions before submitting your issue. Thanks!

What version of Cassandra are you using?

3.11.4

What version of Cassandra LDAP are you using?

3.11.4.2

What LDAP server you are using? Any specifics?

OpenLDAP

What did you do?

After Cassandra started and connected to LDAP server, I manually killed LDAP server so subsequent authentication has failed and I am not able to login with cassandra:cassandra.

What did you expect to see?

I would like to connect to Cassandra as cassandra user even LDAP server is down. I would like to connect to that server as ordinary user if such login exists and it does not have to be in LDAP nor LDAP needs to be up in order to connect to Cassandra.

What did you see instead?

I was not able to connect because LDAP was down. I should be able to connect with normal users in Cassandra regardless of whether LDAP server is up or not.

The solution could be like

1) Client sends username and password 2) Auth plugin checks system_auth for a matching username that has a password hash. 3) If it has a hash, compare incoming password hash to known hash. Complete authentication. 4) If it has no value for password hash in system_auth, the authenticator proceeds with LDAP.

smiklosovic commented 5 years ago

https://github.com/instaclustr/cassandra-ldap/commit/6acbe10fdb7c4fa03c2d76df8488c42ec9f043d3