Skip to content
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

'mqtt over ws' with authorization in header #58

Open
Stifael opened this issue Mar 20, 2024 · 0 comments
Open

'mqtt over ws' with authorization in header #58

Stifael opened this issue Mar 20, 2024 · 0 comments

Comments

@Stifael
Copy link

Stifael commented Mar 20, 2024

ENHANCEMENT / Question

For separation of concern and to align with existing authorization implementation, it seems a good idea to allow authorization via an authorization-token (such as jwt) even for mqtt over ws.

Currently, the session-password is set to token if proxy is ws (https://github.com/absmach/mproxy/blob/main/pkg/websockets/websockets.go#L31-L54), and for 'mqtt over ws' the usual mqtt username/password is used. When working with authorization token, one could store the jwt as password when connecting as mqtt. However, by doing so, the http-socket has already been upgraded to ws. In addition, from a client-perspective, it is a more standard way to send a jwt token with the usual header-authorization vs the mqtt-password.

That being said, I haven't found a lot of resources about token-based-authorization for mqtt anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ⛏ Backlog
Development

No branches or pull requests

1 participant