influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

The admin token cannot be provisioned

Open galdor opened this issue 7 months ago • 1 comments

According to the documentation, one creates an admin token with influxdb3 create token --admin. The token is generated by InfluxDB and printed by the command.

It is not possible to provision a token generated by the user. This is quite annoying even in the simplest Docker Compose setup (e.g. in a development stack): we need to be able to configure a token that is known in advance and will be used for INFLUXDB3_AUTH_TOKEN and for other software expected to connect to InfluxDB.

InfluxDB 2 supported DOCKER_INFLUXDB_INIT_MODE with options to configure initial tokens (DOCKER_INFLUXDB_INIT_ADMIN_TOKEN, DOCKER_INFLUXDB_INIT_USERNAME, DOCKER_INFLUXDB_INIT_PASSWORD…). InfluxDB 3 does not seem to support any of it.

This also create a chicken-and-egg problem with automated setups: one must be able to generate a token independently from InfluxDB and provision it automatically.

The right solution is to allow influxdb3 create token --admin <my-token> (and not just for admin tokens of course).

galdor avatar May 20 '25 10:05 galdor

Thanks @galdor! We've added this to our roadmap.

peterbarnett03 avatar May 23 '25 18:05 peterbarnett03

Any updates on this?

When I first read through https://docs.influxdata.com/influxdb3/core/admin/tokens/ , I thought setting INFLUXDB3_AUTH_TOKEN in the environment before server startup was the right thing to do for this use case.

echedey-ls avatar Aug 17 '25 12:08 echedey-ls

We're looking to have this work completed quite soon. Setting INFLUXDB3_AUTH_TOKEN will stop the need to pass in a --token param with every call.

peterbarnett03 avatar Aug 17 '25 18:08 peterbarnett03

Thank you❣️😇

echedey-ls avatar Aug 26 '25 17:08 echedey-ls