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

fix(outputs.opensearch): Expose TLS setting correctly #14340

Merged
merged 4 commits into from
Nov 27, 2023

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Nov 24, 2023

resolves #14334

This PR exposes the insecure_skip_verify option correctly by embedding commontls.TLSConfig (instead of the full HTTP option set). By doing so, we also expose all other TLS options reflected by the sample.conf update.

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Nov 24, 2023
@srebhan srebhan added ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. area/elasticsearch labels Nov 24, 2023
Copy link
Contributor

@Hipska Hipska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, otherwise all fine!

plugins/outputs/opensearch/sample.conf Outdated Show resolved Hide resolved
plugins/outputs/opensearch/opensearch.go Outdated Show resolved Hide resolved
@Hipska Hipska removed the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Nov 27, 2023
Co-authored-by: Thomas Casteleyn <[email protected]>
@srebhan srebhan requested a review from Hipska November 27, 2023 10:26
@srebhan srebhan assigned Hipska and unassigned powersj Nov 27, 2023
@@ -43,9 +43,17 @@
# auth_bearer_token = ""

## Optional TLS Config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about including it with {{template "/plugins/common/tls/client.conf"}}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was an issue with it but I don't remember what it was... Will take another look...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be done like that with the http input.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: The issue is that the config contains Golang templates itself e.g. in the documentation of the index_name option. So the suggested replacement will try to fill in those templates as well and will fail to do so.

2023/11/27 15:23:01 Executing template failed: template: sample.conf.in:13:46: executing "sample.conf.in" at <.Tag>: Tag is not a method but has arguments

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, these would need to be escaped then in that case.

@Hipska Hipska removed their assignment Nov 27, 2023
@Hipska Hipska added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Nov 27, 2023
@powersj powersj merged commit 68f787c into influxdata:master Nov 27, 2023
23 checks passed
@github-actions github-actions bot added this to the v1.29.0 milestone Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/elasticsearch fix pr to fix corresponding bug plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

configuration specified the fields ["insecure_skip_verify"], but they weren't used in opensearch output plugin
3 participants