I am trying to implement a MQTT based prototype wherein, I am using a raspberry device as client and Keycloak as the authentication server.
In order to publish/subscribe a message, the client request for access token (via a function in python script directly from Keycloak) and this token is then passed to another function so as to connect to the broker. Note that the access token is passed as as a “username” parameter and password parameter is left blank as suggested here.
In addition to this, I have also configured go-auth plugin to enable Oauth2 and openid in broker.
Consequently, when I run the python script, the log file simple returns the following message:
2022-07-13T13:46:58: New connection from 126.96.36.199:34227 on port 1883.
2022-07-13T13:46:58: Client Publisher disconnected, not authorised.
I would like to know if i am referencing to the wrong endpoint for token validation as the “userinfo” endpoint simply does nothing to authenticate the client!
I am happy to provide more info if needed. Eager to hear some pointers/suggestions from the community.