__System info:__
influxdb version: 1.3.5
os: ubuntu / xenial
__Steps to reproduce:__
curl -G "http://localhost:8086/query?u=admin&p=pass" --data-urlencode "q=SHOW DATABASES"
curl -G "http://localhost:8086/query" -u admin:pass --data-urlencode "q=SHOW DATABASES"
__Expected behavior:__ Authenticate and operate with database
__Actual behavior:__ Failed to authenticate with message:
{"error":"error authorizing query: no user provided"}
__Additional info:__ In CLI i first use auth command and then i call show databases. Get same result: ERR: error authorizing query: no user provided
@ricco24 I can't reproduce this.
Are you sure that you have set everything up properly? The order of things should be:
CREATE USER admin WITH PASSWORD 'pass' WITH ALL PRIVILEGES.auth-enabled = true in the [http] section.Then your cURL command should work:
$ curl -G "http://localhost:8086/query?u=admin&p=pass" --data-urlencode "q=SHOW DATABASES"
{"results":[{"statement_id":0,"series":[{"name":"databases","columns":["name"],"values":[["_internal"]]}]}]}
My fault. I have provisioned server via ansible and my admin user hasent got ALL privileges. Everything works fine now.
Wow it solved my problem, thanks for the solution @e-dard
Most helpful comment
@ricco24 I can't reproduce this.
Are you sure that you have set everything up properly? The order of things should be:
CREATE USER admin WITH PASSWORD 'pass' WITH ALL PRIVILEGES.auth-enabled = truein the[http]section.Then your cURL command should work: