The admin token cannot be provisioned
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).
Thanks @galdor! We've added this to our roadmap.
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.
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.
Thank you❣️😇