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

Allow dynamic credentials / credentials provider #253

Open
ViToni opened this issue Apr 23, 2024 · 1 comment
Open

Allow dynamic credentials / credentials provider #253

ViToni opened this issue Apr 23, 2024 · 1 comment

Comments

@ViToni
Copy link
Contributor

ViToni commented Apr 23, 2024

Is your feature request related to a problem? Please describe.
Currently one can only provide "static" credentials.
When one usees a MQTT broker in a SaaS way one might vant to avoid to pass "regualr" credential validation to the SaaS broker.

Describe the solution you'd like
To allow safe usage of an SaaS one could use short-lived tokens to authenticate and for authorisation.
The SaaS borker would just validate the token instead of the actual credentials.
However using "static" credentials would need to be replaced with a "CredentialsProvider" which would just be responsible to create dynamic credentials (token) or just returns the "static" ones.

Describe alternatives you've considered

Additional context
No additional context.

@MattBrittan
Copy link
Contributor

The ConnectPacketBuilder callback enables this scenario; it's called just before the connect packet is sent and enables the user to make whatever changes they wish (i.e. changing authentication details, adding properties etc). This approach was taken because we cannot really know all potential use-cases and want to provide maximal flexibility whilst keeping the number of options manageable (the V3 client tried to do everything and became over complicated as a result).

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

No branches or pull requests

2 participants