fix(mqtt source): pass client certificates to rumqttc for mTLS#24929
fix(mqtt source): pass client certificates to rumqttc for mTLS#24929mr- wants to merge 3 commits intovectordotdev:masterfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
@vectordotdev/vector when debugging this, I've noticed that all errors are silently ignored. |
|
I have read the CLA Document and I hereby sign the CLA |
src/sources/mqtt/source.rs
Outdated
| Err(e) => { | ||
| tracing::error!("Error = {e:?}"); | ||
| return Ok(()); | ||
| } |
There was a problem hiding this comment.
I don't think this is correct since this will terminate the connection as soon as any error is received instead of continuing
There was a problem hiding this comment.
Agreed. What should the behaviour be for non-recoverable errors? I won't implement this now, but I'd like to get a sense for what the proper solution is supposed to be
There was a problem hiding this comment.
Can we revert the changes to this file? They don't seem related to this PR
There was a problem hiding this comment.
Will do. However, it's been extremely frustrating not being able to see what was going on. From a user perspective the mqtt sink just failed with no indication what might be wrong.
Co-authored-by: Thomas <thomasqueirozb@gmail.com>
Summary
This PR fixes a bug in the MQTT source where user-provided TLS client certificates (crt_file / key_file) were being silently ignored, breaking mTLS connections to strict brokers like AWS IoT Core.
Vector configuration
How did you test this PR?
It was tested manually by providing valid certificates.
Change Type
Is this a breaking change?
Does this PR include user facing changes?
Not sure. Not unless people depended on certificates being ignored.
no-changeloglabel to this PR.References
Notes
@vectordotdev/vectorto reach out to us regarding this PR.pre-pushhook, please see this template.make fmtmake check-clippy(if there are failures it's possible some of them can be fixed withmake clippy-fix)make testgit merge origin masterandgit push.Cargo.lock), pleaserun
make build-licensesto regenerate the license inventory and commit the changes (if any). More details here.