You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/shared/influxdb3-admin/tokens/_index.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@ Manage tokens to authenticate and authorize access to server actions, resources,
3
3
## Provide your token
4
4
5
5
If you start the {{< product-name >}} server with authentication enabled (the default), future server actions (CLI commands and HTTP API requests) require a valid token for authorization.
6
+
6
7
The first admin token you create is the _operator_ token (named `_admin`), which has full administrative privileges.
7
8
You can use the operator token to authenticate your requests and manage additional authorization tokens.
8
9
@@ -15,34 +16,37 @@ The mechanism for providing your token depends on the client you use to interact
15
16
{{% /tabs %}}
16
17
{{% tab-content %}}
17
18
18
-
When using the `influxdb3` CLI, you can use the `--token` option to provide your authorization token.
19
+
When using the `influxdb3` CLI, you can set the `INFLUXDB3_AUTH_TOKEN` environment variable to automatically provide your
20
+
authorization token to all `influxdb3` commands--for example:
19
21
20
22
{{% code-placeholders "YOUR_AUTH_TOKEN" %}}
21
23
```bash
22
-
# Include the --token option in your influxdb3 command
24
+
# Export your token as an environment variable
25
+
export INFLUXDB3_AUTH_TOKEN=YOUR_AUTH_TOKEN
26
+
27
+
# Run an influxdb3 command
23
28
influxdb3 query \
24
-
--token YOUR_AUTH_TOKEN \
25
29
--database DATABASE_NAME \
26
30
"SELECT * FROM 'DATABASE_NAME' WHERE time > now() - INTERVAL '10 minutes'"
27
31
```
28
32
{{% /code-placeholders %}}
29
33
30
-
You can also set the `INFLUXDB3_AUTH_TOKEN` environment variable to automatically provide your
31
-
authorization token to all `influxdb3` commands.
34
+
To specify a token in the command and override the environment variable, pass the `--token` option with your authorization token--for example:
32
35
33
36
{{% code-placeholders "YOUR_AUTH_TOKEN" %}}
34
37
```bash
35
-
# Export your token as an environment variable
36
-
export INFLUXDB3_AUTH_TOKEN=YOUR_AUTH_TOKEN
37
-
38
-
# Run an influxdb3 command without the --token option
38
+
# Include the --token option in your influxdb3 command
39
39
influxdb3 query \
40
+
--token YOUR_AUTH_TOKEN \
40
41
--database DATABASE_NAME \
41
42
"SELECT * FROM 'DATABASE_NAME' WHERE time > now() - INTERVAL '10 minutes'"
42
43
```
43
44
{{% /code-placeholders %}}
44
-
{{% /tab-content %}}
45
45
46
+
You can also set the `INFLUXDB3_AUTH_TOKEN` environment variable to automatically provide your
Copy file name to clipboardExpand all lines: content/shared/influxdb3-admin/tokens/admin/_index.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
<!---->
1
+
<!--
2
+
-->
2
3
Manage {{< product-name omit="Clustered" >}} admin tokens to authorize server actions, `influxdb3` CLI commands, and HTTP API endpoints for your {{< product-name omit="Clustered" >}} instance.
3
4
Administrative (_admin_) tokens provide full system access and management capabilities for your {{< product-name omit="Clustered" >}} instance.
0 commit comments