Login with wrong credentials kills whole cluster

I already had this issue once ([Solved] Duplicate entry 'xx' for key 'name') and have tracked it down now.

Version: 5.4.6 running on Arch
3 node Cluster via RAFT
Users are coming from ldap
mysql on each master node

Reproduction:
user name in ldap: 'John.Tester’
login once with correct credentials so the user gets created, logout
login as: ‘john.tester’
-> login fails and then the whole cluster is dead as the logdb tries to insert the same user again but with lower case which results into "Duplicate entry ‘john.tester’ for key ‘name’"
At this point i need to drop the whole logdb and get all cluster nodes back to the same database backup to get it working again.

This is a severe issue as a user can basically kill the whole OpenNebula cluster with his login.

I have found this issue: https://github.com/OpenNebula/one/issues/602 which pretty much looks like the root cause but that was set to Abandoned and is now closed which does not look promising.

I have created this issue: https://github.com/OpenNebula/one/issues/1761

Yes you are right, being the problem in this case a “case-mismatch” between LDAP and MySQL. We’ll look into this, thanks for reporting, and the detailed description.