-
Notifications
You must be signed in to change notification settings - Fork 175
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
Allow for clientId to be passed to postgres GetUser backend password check #328
Comments
A config option to use the clientId instead of the username would also work for me |
I'll add the option but in a general way, not tied to Postgres. |
Scratch that, I'll see if I allow
If there's no issue with simply ignoring the |
I went with the original idea because it was simpler and I don't think this is a commonly needed feature, the second one would involve adding support everywhere and changing the interfaces. If anyone needs finer granularity, they should probably proxy requests or implement custom logic to do so. Here's the PR: #329 |
@CompositeCoding sorry for the time it took, there's something going on with TLS Postgres tests, but it's unrelated to this issue and the PR I opened, so I finally decided to merge and I'll open an issue to address that. It's in main branch now, I'll make an official release after tackling the PG tests issue and #332 that should be pretty easy to add to the release. |
Hi!
Thanks for your work on the plugin. I'm working on a refactor moving away from VerneMQ to Mosquitto for a large fleet of IOT devices. I would like to use the postgres backend, but we authenticate devices by their clientId, not username.
Looking at the GetUser function signature, it seems feasible to pass the clientId as a parameter to the PG call so that it populates
$3
, making it usable in SQL queries.Please let me know what you think.
Thank you!
https://github.com/iegomez/mosquitto-go-auth/blob/master/backends/postgres.go#L186
The text was updated successfully, but these errors were encountered: