Skip to content

Commit e088f17

Browse files
committed
feat(monolith): Core: get-started with admin tokens
1 parent be6d98a commit e088f17

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

content/shared/v3-core-get-started/_index.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,40 @@ For more information about server options, use the CLI help:
219219
influxdb3 serve --help
220220
```
221221

222+
### Authentication and authorization
223+
224+
After you have [started the server](#start-influxdb), you can create and manage tokens using the `influxdb3` CLI or the HTTP API.
225+
{{% product-name %}} uses token-based authentication and authorization which is enabled by default when you start the server.
226+
With authentication enabled, you must provide a token to access server actions.
227+
An {{% product-name %}} instance can have one _admin token_, which grants access to all CLI actions and API endpoints.
228+
229+
When you create a token, InfluxDB 3 returns a token string in clear text
230+
that you use to authenticate CLI commands and API requests.
231+
Securely store your token, as you won't be able to retrieve it later.
232+
233+
To have the `influxdb3` CLI use your admin token automatically, assign it to the
234+
`INFLUXDB3_AUTH_TOKEN` environment variable.
235+
236+
> [!Important]
237+
>
238+
> #### Securely store your tokens
239+
>
240+
> For security, InfluxDB only lets you view tokens when you create them.
241+
> InfluxDB 3 stores a hash of the token in the catalog, so you can't retrieve the token after it is created.
242+
243+
#### Create an admin token
244+
245+
To create an admin token, use the `influxdb3 create token` subcommand and pass the `--admin` flag--for example:
246+
247+
```bash
248+
influxdb3 create token --admin \
249+
--host http://{{< influxdb/host >}}
250+
```
251+
252+
The command returns a token string that you can use to authenticate CLI commands and API requests.
253+
Securely store your token, as you won't be able to retrieve it later.
254+
255+
For more information, see how to [Manage admin tokens](/influxdb3/version/admin/tokens/admin/).
222256
### Data model
223257

224258
The database server contains logical databases, which have tables, which have columns. Compared to previous versions of InfluxDB you can think of a database as a `bucket` in v2 or as a `db/retention_policy` in v1. A `table` is equivalent to a `measurement`, which has columns that can be of type `tag` (a string dictionary), `int64`, `float64`, `uint64`, `bool`, or `string` and finally every table has a `time` column that is a nanosecond precision timestamp.

0 commit comments

Comments
 (0)