Add tests for beatsauth extension 1/2#46723
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
cmacknz
left a comment
There was a problem hiding this comment.
I like this tests but I think they are in the wrong place. As is, they could live with the beatsauth extension itself because they don't depend on anything in Beats.
However, the best version of these tests uses the configuration translation in agent to generate the auth extension configuration and the exporter configuration (I think you'd want the client configuration part of the exporter only to verify there are no TLS parameter conflicts that cause problems).
So I think these tests should move to Elastic Agent. Probably all the configuration translation code should be moved to Elastic Agent but you don't need to do that here.
Now that I've read #46428, you can get pretty close to this once that PR is merged into this one, if you were able to use the translation output for the extension and exporter as the base for the collector component configuration in the tests. Also since this says 1/2 in the description I assume there are more tests coming for things like proxies which are as critical as TLS, possibly in a separate PR. |
|
Modified the tests to use translated output here 1f76ec0 |
cmacknz
left a comment
There was a problem hiding this comment.
Let's log the translated configuration we generated in each test, and fix the lint errors, then LGTM.
I ran the tests locally and confirmed removing things from the auth extension config broke things in the expected way, and was a really nice way to see the errors the exporter gives us when there are TLS failures.
|
This pull request is now in conflicts. Could you fix it? 🙏 |
andrzej-stencel
left a comment
There was a problem hiding this comment.
Please make sure to not downgrade the Beats Auth extension - it is v0.3.0 on main.
Good to go when CI is fixed.
Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
|
LGTM, please silence the lint warnings |
|
This pull request is now in conflicts. Could you fix it? 🙏 |
|
/test |
* add beatsauth test for ca_trusted_fingerprint, verification_modes (cherry picked from commit e9bfa88) # Conflicts: # NOTICE.txt # go.mod # go.sum # libbeat/otelbeat/beatconverter/beatconverter_test.go
* add beatsauth test for ca_trusted_fingerprint, verification_modes (cherry picked from commit e9bfa88) # Conflicts: # NOTICE.txt # go.mod # go.sum # libbeat/otelbeat/beatconverter/beatconverter_test.go
Proposed commit message
This PR adds test for translated Elasticsearch exporter configurations works with:
mTLS,ca_trusted_fingerprintandverififcation_modeChecklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Related issues