Closed rebsp closed 5 years ago
Were you able to reproduce this? Otherwise I can provide a repository with my test environment.
Sorry, we haven't had a chance to look into this yet. Can you try to do a trace vmq-admin trace client client-id=<the clientid>
and then connect and check that the username/pwd are what you expect them to be.
Btw. with the above entry you'd need to pass username: test client
, password: ` (empty string) and client_id:
test` when connecting.
Hope this helps
I think I've found the issue. Could it be that the option use_identity_as_username
sets the CN as username but keeps the password as undefined, so that this line:
https://github.com/vernemq/vernemq/blob/45ac0c6a7bb59ab507ac4dcb5f9f62fdf6d0a410/apps/vmq_diversity/priv/auth/postgres_cockroach_commons.lua#L94
evaluates to false whenever I arrive with a client certificate?
Edit: Yep, see https://github.com/vernemq/vernemq/issues/523
Thanks & best regards
Environment
(vernemq.conf)or the changes from the defaultExpected behaviour
Connect to VerneMQ using a client certificate and authorize to topics using PostgreSQL
Actual behaviour
TLS handshake is successful but receiving bad user name or password for authentication. I have tried several combinations like no password, empty password, password same as CN but none seem to be accepted:
[warning] can't authenticate client {[],<<"test">>} from 172.25.0.1:41876 due to invalid_credentials
Steps to reproduce