influxdbr icon indicating copy to clipboard operation
influxdbr copied to clipboard

Support for Requiring Authentication for Ping

Open HalfEatenPie opened this issue 5 years ago • 1 comments

In cases when InfluxDB OSS server configuration requires authentication for ping, influx_connection fails.

Source: https://docs.influxdata.com/influxdb/v1.7/administration/authentication_and_authorization/

[http]
  enabled = true
  auth-enabled = true 
  ping-auth-enabled = true

In R:

> con <- influx_connection(scheme = 'http', host = '<srv>', port = '8086', user = '<user>', pass = '<pass>')
Error: unable to parse authentication credentials

I got around this by modifying influxdb_connection to:

  response <- httr::GET(
    url = "",
    scheme = influxdb_srv$scheme,
    hostname = influxdb_srv$host,
    port = influxdb_srv$port,
    path = paste0(influxdb_srv$path, "ping"),
    config = influxdb_srv$config,
    httr::authenticate(
      influxdb_srv$user, 
      influxdb_srv$pass)
  )

HalfEatenPie avatar Feb 13 '20 22:02 HalfEatenPie

This issue stops me from using influxdbr indeed. A fix would be appreciated.

wollud1969 avatar Apr 04 '21 12:04 wollud1969