From 6629a6838844163e21fd1959aa6dd39d94cc2a58 Mon Sep 17 00:00:00 2001 From: Tero Saarni Date: Wed, 4 Aug 2021 21:32:49 +0300 Subject: [PATCH] Update influxdb client * Influxdb v1 client has been split into separate module from main influxdb code base. This changes uses the correct client, which also allows us to get updates and avoids confusing some vuln scanners that flagged previous version incorrectly with vulnerabilities. Fixes #6088. --- changelog/12262.txt | 3 +++ go.mod | 2 +- go.sum | 4 ++-- plugins/database/influxdb/connection_producer.go | 2 +- plugins/database/influxdb/influxdb.go | 2 +- plugins/database/influxdb/influxdb_test.go | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 changelog/12262.txt diff --git a/changelog/12262.txt b/changelog/12262.txt new file mode 100644 index 000000000000..cfd9218de133 --- /dev/null +++ b/changelog/12262.txt @@ -0,0 +1,3 @@ +```release-note:improvement +secrets/database/influxdb: Upgrade influxdb1 client library and import it from new URI +``` diff --git a/go.mod b/go.mod index abc6d597fd43..99a70d0920ea 100644 --- a/go.mod +++ b/go.mod @@ -119,7 +119,7 @@ require ( github.com/hashicorp/vault-testing-stepwise v0.1.1 github.com/hashicorp/vault/api v1.1.1 github.com/hashicorp/vault/sdk v0.2.1 - github.com/influxdata/influxdb v0.0.0-20190411212539-d24b7ba8c4c4 + github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab github.com/jcmturner/gokrb5/v8 v8.0.0 github.com/jefferai/isbadcipher v0.0.0-20190226160619-51d2077c035f github.com/jefferai/jsonx v1.0.0 diff --git a/go.sum b/go.sum index 05c47295b2ca..5d4e4db36cac 100644 --- a/go.sum +++ b/go.sum @@ -764,9 +764,9 @@ github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb v0.0.0-20190411212539-d24b7ba8c4c4 h1:3K3KcD4S6/Y2hevi70EzUTNKOS3cryQyhUnkjE6Tz0w= -github.com/influxdata/influxdb v0.0.0-20190411212539-d24b7ba8c4c4/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab h1:HqW4xhhynfjrtEiiSGcQUd6vrK23iMam1FO8rI7mwig= +github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 h1:vr3AYkKovP8uR8AvSGGUK1IDqRa5lAAvEkZG1LKaCRc= github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= github.com/jackc/pgx v3.3.0+incompatible h1:Wa90/+qsITBAPkAZjiByeIGHFcj3Ztu+VzrrIpHjL90= diff --git a/plugins/database/influxdb/connection_producer.go b/plugins/database/influxdb/connection_producer.go index 7f47f723d00e..ae1bb392d181 100644 --- a/plugins/database/influxdb/connection_producer.go +++ b/plugins/database/influxdb/connection_producer.go @@ -12,7 +12,7 @@ import ( dbplugin "github.com/hashicorp/vault/sdk/database/dbplugin/v5" "github.com/hashicorp/vault/sdk/database/helper/connutil" "github.com/hashicorp/vault/sdk/helper/certutil" - influx "github.com/influxdata/influxdb/client/v2" + influx "github.com/influxdata/influxdb1-client/v2" "github.com/mitchellh/mapstructure" ) diff --git a/plugins/database/influxdb/influxdb.go b/plugins/database/influxdb/influxdb.go index ebbeaf2dd636..4a8225e52b3b 100644 --- a/plugins/database/influxdb/influxdb.go +++ b/plugins/database/influxdb/influxdb.go @@ -10,7 +10,7 @@ import ( dbplugin "github.com/hashicorp/vault/sdk/database/dbplugin/v5" "github.com/hashicorp/vault/sdk/database/helper/dbutil" "github.com/hashicorp/vault/sdk/helper/template" - influx "github.com/influxdata/influxdb/client/v2" + influx "github.com/influxdata/influxdb1-client/v2" ) const ( diff --git a/plugins/database/influxdb/influxdb_test.go b/plugins/database/influxdb/influxdb_test.go index 93530ec94a9b..4ecdac51bcbd 100644 --- a/plugins/database/influxdb/influxdb_test.go +++ b/plugins/database/influxdb/influxdb_test.go @@ -14,7 +14,7 @@ import ( "github.com/hashicorp/vault/helper/testhelpers/docker" dbplugin "github.com/hashicorp/vault/sdk/database/dbplugin/v5" dbtesting "github.com/hashicorp/vault/sdk/database/dbplugin/v5/testing" - influx "github.com/influxdata/influxdb/client/v2" + influx "github.com/influxdata/influxdb1-client/v2" "github.com/stretchr/testify/require" )