argo-events
argo-events copied to clipboard
Allow authentication with username and password in mqtt eventsource
Is your feature request related to a problem? Please describe. I was exploring the docs of mqtt eventsource, and at least in the docs appear that is not possible to specify auth in this eventsource. amqp event source has this options, but not mqtt.
Describe the solution you'd like Add mqtt eventsource authentication like in amqp
Message from the maintainers:
Well, is not implemented looking at the code of the event source.
https://github.com/argoproj/argo-events/blob/f43468f45124786c6cc9e82a65565a096ed79724/eventsources/sources/mqtt/start.go#L107
Only implemented for TLS :-(
https://github.com/argoproj/argo-events/blob/f43468f45124786c6cc9e82a65565a096ed79724/eventsources/sources/mqtt/start.go#L108-L114
Is not hard at all, something like this could add the feature
if mqttEventSource.username != nil {
opts.SetUsername(mqttEventSource.username)
if mqttEventSource.password != nil {
opts.SetPassword(mqttEventSource.password)
}
}
@felix-dpg - would you like to submit a PR?
@whynowy thanks, but dont have enought time to submit a PR. Open to whatever that could make this.
This is done https://github.com/argoproj/argo-events/pull/2324/files. Can we close the issue?
Thanks @premadk !
Closed by https://github.com/argoproj/argo-events/pull/2324.