Skip to content

Commit 60a79b3

Browse files
committed
fix(mono): providing tokens using env var or --token, missing core/admin/tokens/admin content
1 parent 5416896 commit 60a79b3

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

content/influxdb3/core/admin/tokens/admin/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ menu:
1111
name: Admin tokens
1212
weight: 101
1313
influxdb3/core/tags: [tokens]
14-
source: /shared/influxdb3-admin/tokens/admin.md
14+
source: /shared/influxdb3-admin/tokens/admin/_index.md
1515
---
1616

1717
<!-- The content for this page is at
18-
// SOURCE content/shared/influxdb3-admin/tokens/admin.md
18+
// SOURCE content/shared/influxdb3-admin/tokens/admin/_index.md
1919
-->

content/shared/influxdb3-admin/tokens/_index.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Manage tokens to authenticate and authorize access to server actions, resources,
33
## Provide your token
44

55
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+
67
The first admin token you create is the _operator_ token (named `_admin`), which has full administrative privileges.
78
You can use the operator token to authenticate your requests and manage additional authorization tokens.
89

@@ -15,34 +16,37 @@ The mechanism for providing your token depends on the client you use to interact
1516
{{% /tabs %}}
1617
{{% tab-content %}}
1718

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:
1921

2022
{{% code-placeholders "YOUR_AUTH_TOKEN" %}}
2123
```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
2328
influxdb3 query \
24-
--token YOUR_AUTH_TOKEN \
2529
--database DATABASE_NAME \
2630
"SELECT * FROM 'DATABASE_NAME' WHERE time > now() - INTERVAL '10 minutes'"
2731
```
2832
{{% /code-placeholders %}}
2933

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:
3235

3336
{{% code-placeholders "YOUR_AUTH_TOKEN" %}}
3437
```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
3939
influxdb3 query \
40+
--token YOUR_AUTH_TOKEN \
4041
--database DATABASE_NAME \
4142
"SELECT * FROM 'DATABASE_NAME' WHERE time > now() - INTERVAL '10 minutes'"
4243
```
4344
{{% /code-placeholders %}}
44-
{{% /tab-content %}}
4545

46+
You can also set the `INFLUXDB3_AUTH_TOKEN` environment variable to automatically provide your
47+
authorization token to all `influxdb3` commands.
48+
49+
{{% /tab-content %}}
4650
{{% tab-content %}}
4751

4852
{{% code-placeholders "YOUR_AUTH_TOKEN" %}}

content/shared/influxdb3-admin/tokens/admin/_index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<!-- -->
1+
<!--
2+
-->
23
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.
34
Administrative (_admin_) tokens provide full system access and management capabilities for your {{< product-name omit="Clustered" >}} instance.
45
{{% show-in "core" %}}

0 commit comments

Comments
 (0)