fangli / fluent-plugin-influxdb

A buffered output plugin for fluentd and InfluxDB
MIT License
111 stars 65 forks source link

Auth options required to support forwarding to Telegraf's influxdb_listener #109

Closed UserNotFound closed 2 years ago

UserNotFound commented 2 years ago

First, the Telegraf InfluxDB Input Plugin only supports basic auth requests, but the Influxdb ruby client defaults to parameter-based authentication, so this fluent-plugin-influxdb library only uses parameter based authentication.

By leveraging a new configuration option, auth_method, this plugin can be configured make basic_auth requests instead.

Second, once you're able to authenticate to the Telegraf influxdb_listener, you need to skip checking whether the destination DB exists. The influxdb_listener accepts /write requests for any database name, so skip_db_check should be set to "true" if that is your destination.


The ability to use basic auth may also be viewed as a security benefit. Since any web proxy (and maybe even InfluxDB's own request logging, I didn't check) will record the username and password parameters in plain text, this plugin may unintentionally leak passwords. I chose to leave the default auth_method as a parameter to avoid making a breaking change, and defer to the maintainers to switch the default if desired.

UserNotFound commented 2 years ago

Closing this since the chances of getting review/merged are low, given no updates in the past 3 years.