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

Incorrect boolean configuration for TLS and cloudwatch. #7617

Closed
patrick-stephens opened this issue Jun 28, 2023 · 0 comments · Fixed by #7618
Closed

Incorrect boolean configuration for TLS and cloudwatch. #7617

patrick-stephens opened this issue Jun 28, 2023 · 0 comments · Fixed by #7618

Comments

@patrick-stephens
Copy link
Contributor

patrick-stephens commented Jun 28, 2023

Bug Report

Describe the bug

Boolean configuration should be using the standard utility method to handle:

  • yes/no
  • on/off
  • true/false

And all case variants of it.
See:

fluent-bit/src/flb_utils.c

Lines 659 to 673 in bbc520a

int flb_utils_bool(const char *val)
{
if (strcasecmp(val, "true") == 0 ||
strcasecmp(val, "on") == 0 ||
strcasecmp(val, "yes") == 0) {
return FLB_TRUE;
}
else if (strcasecmp(val, "false") == 0 ||
strcasecmp(val, "off") == 0 ||
strcasecmp(val, "no") == 0) {
return FLB_FALSE;
}
return -1;
}

Unfortunately it looks like TLS configuration for input and output, as well as Cloudwatch configuration, does not use this method and rolls it's own that does not support the yes/no values:

This means if someone uses yes/no to configure TLS it will lead to an invalid configuration.

To Reproduce

  • Rubular link if applicable:
  • Example log message if applicable:
{"log":"YOUR LOG MESSAGE HERE","stream":"stdout","time":"2018-06-11T14:37:30.681701731Z"}
  • Steps to reproduce the problem:

Expected behavior

yes/no can be used to confgure TLS and Amazon Cloudwatch.

Screenshots

Your Environment

  • Version used:
  • Configuration:
  • Environment name and version (e.g. Kubernetes? What version?):
  • Server type and version:
  • Operating System and version:
  • Filters and plugins:

Additional context

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

Successfully merging a pull request may close this issue.

1 participant