diff --git a/api-docs/clustered/ref.yml b/api-docs/clustered/ref.yml index afce34176..e6a4e7aa5 100644 --- a/api-docs/clustered/ref.yml +++ b/api-docs/clustered/ref.yml @@ -1203,7 +1203,7 @@ components: ### Basic authentication scheme Use the `Authorization` header with the `Basic` scheme to authenticate v1 API `/write` and `/query` requests. - When authenticating requests, InfluxDB Clustered checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/clustered/admin/tokens/). + When authenticating requests, InfluxDB Clustered checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/clustered/admin/tokens/#database-tokens). InfluxDB Clustered ignores the `username` part of the decoded credential. ### Syntax @@ -1215,12 +1215,12 @@ components: Replace the following: - **`[USERNAME]`**: an optional string value (ignored by InfluxDB Clustered). - - **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/). + - **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens). - Encode the `[USERNAME]:DATABASE_TOKEN` credential using base64 encoding, and then append the encoded string to the `Authorization: Basic` header. ### Example - The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/clustered/admin/tokens/): + The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/clustered/admin/tokens/#database-tokens): ```sh ####################################### @@ -1239,7 +1239,7 @@ components: Replace the following: - **`DATABASE_NAME`**: your InfluxDB Clustered database - - **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the database + - **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the database scheme: basic type: http QuerystringAuthentication: @@ -1264,7 +1264,7 @@ components: ### Example - The following example shows how to use cURL with query string authentication and a [database token](/influxdb/clustered/admin/tokens/). + The following example shows how to use cURL with query string authentication and a [database token](/influxdb/clustered/admin/tokens/#database-tokens). ```sh ####################################### @@ -1284,7 +1284,7 @@ components: Replace the following: - **`DATABASE_NAME`**: your InfluxDB Clustered database - - **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the database + - **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the database BearerAuthentication: type: http scheme: bearer diff --git a/assets/js/cookies.js b/assets/js/cookies.js index 77abf1d46..4a73ca60f 100644 --- a/assets/js/cookies.js +++ b/assets/js/cookies.js @@ -224,110 +224,3 @@ setNotificationAsRead = (notificationID, notificationType) => { Cookies.set(notificationCookieName, notificationsObj); }; - -/* -//////////////////////////////////////////////////////////////////////////////// -//////////////// Port all old docs cookies to the new structure //////////////// -///////////////// Remove everything below after March 15, 2024 ///////////////// -//////////////////////////////////////////////////////////////////////////////// -*/ - -portOldCookies = () => { - preferenceCookies = [ - 'influx-docs-api-lib', - 'influx-docs-sidebar-state', - 'influx-docs-theme', - 'influxdb_get_started_date', - 'influxdb_pref', - 'influx-iox-show-wayfinding', - ]; - notificationCookies = [ - 'influx-future-of-flux-notification-seen', - 'influx-influxdb-clustered-announcement-notification-seen', - 'influx-serverless-wip-notification-seen', - 'influx-influxdb-3-announcement-notification-seen', - 'influx-signing-key-rotation-notification-seen', - 'influx-iox-doc-fork-notification-seen', - 'influx-tsm-doc-fork-notification-seen', - 'influx-iox-wip-notification-seen', - 'influx-search-disabled-notification-seen', - 'influx-v2-cloud-upgrade-notification-seen', - 'influx-v2-ga-notification-seen', - 'influx-rc1-upgrade-notification-seen', - ]; - calloutCookies = ['influxdb_url_selector_seen']; - urlCookies = [ - 'influxdb_oss_url', - 'influxdb_cloud_url', - 'influxdb_dedicated_url', - 'influxdb_clustered_url', - 'influxdb_prev_oss_url', - 'influxdb_prev_cloud_url', - 'influxdb_prev_dedicated_url', - 'influxdb_prev_clustered_url', - 'influxdb_custom_url', - ]; - - preferenceCookies.forEach(cookie => { - if (cookie.includes('influx-docs-')) { - newCookieName = cookie.replace(/influx-docs-/, '').replace(/-/, '_'); - try { - setPreference( - newCookieName, - Cookies.get(cookie).replace(/-theme|sidebar-/, '') - ); - Cookies.remove(cookie); - } catch {} - } else if (cookie === 'influxdb_get_started_date') { - newCookieName = 'sample_get_started_date'; - try { - setPreference(newCookieName, Cookies.get(cookie)); - Cookies.remove(cookie); - } catch {} - } else if (cookie === 'influx-iox-show-wayfinding') { - newCookieName = 'v3_wayfinding_show'; - try { - setPreference(newCookieName, Cookies.get(cookie)); - Cookies.remove(cookie); - } catch {} - } else if (cookie === 'influxdb_pref') { - newCookieName = 'influxdb_url'; - try { - setPreference(newCookieName, Cookies.get(cookie)); - Cookies.remove(cookie); - } catch {} - } - }); - - notificationCookies.forEach(cookie => { - notificationName = cookie.replace( - /(^influx-)(.*)(-notification-seen$)/, - '$2' - ); - - if (Cookies.get(cookie) !== undefined) { - setNotificationAsRead(notificationName, 'message'); - Cookies.remove(cookie); - } - }); - - calloutCookies.forEach(cookie => Cookies.remove(cookie)); - - urlCookies.forEach(cookie => { - newUrlKey = cookie.replace(/(^influxdb_)(.*)(_url)/, '$2'); - - try { - urlObj = {}; - urlObj[newUrlKey] = Cookies.get(cookie); - setInfluxDBUrls(urlObj); - Cookies.remove(cookie); - } catch {} - }); -}; - -if (Cookies.get('influxdata_docs_ported') === undefined) { - portOldCookies(); - Cookies.set('influxdata_docs_ported', true, { - expires: new Date('2024-03-15T00:00:00Z'), - }); -} diff --git a/assets/styles/layouts/article/_children.scss b/assets/styles/layouts/article/_children.scss index 3d9a6f960..81442b021 100644 --- a/assets/styles/layouts/article/_children.scss +++ b/assets/styles/layouts/article/_children.scss @@ -18,3 +18,7 @@ } & > hr:last-child {display: none} } + +ul.children-list + ul { + margin-top: -1.25rem; +} diff --git a/content/influxdb/cloud-dedicated/admin/tables/list.md b/content/influxdb/cloud-dedicated/admin/tables/list.md index cc9c76453..87130ca42 100644 --- a/content/influxdb/cloud-dedicated/admin/tables/list.md +++ b/content/influxdb/cloud-dedicated/admin/tables/list.md @@ -56,7 +56,7 @@ The `influxctl query` command only supports SQL queries; not InfluxQL. Provide the following with your command: -- **Database token**: [Database token](/influxdb/cloud-dedicated/admin/tokens/) +- **Database token**: [Database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with read permissions on the queried database. Uses the `token` setting from the [`influxctl` connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) or the `--token` command flag. diff --git a/content/influxdb/cloud-dedicated/admin/tokens/_index.md b/content/influxdb/cloud-dedicated/admin/tokens/_index.md index 369e85926..35c272b6c 100644 --- a/content/influxdb/cloud-dedicated/admin/tokens/_index.md +++ b/content/influxdb/cloud-dedicated/admin/tokens/_index.md @@ -14,14 +14,27 @@ aliases: - /influxdb/cloud-dedicated/security/tokens/ --- -InfluxDB uses token authentication to authorize access to data in your InfluxDB -Cloud Dedicated cluster. Each token grants read and write permissions to one or -more databases and allows for actions like writing and querying data. +InfluxDB uses token authentication to authorize access to data in your +{{< product-name omit=" Clustered" >}} cluster. +There are two types of tokens: -All read and write actions performed against time series data in your InfluxDB -Cloud Dedicated cluster must be authorized using a token. Administrative actions -such as managing tokens and databases are authorized using **management tokens** -issued by **Auth0**. Management tokens allow clients, such as the `influxctl` CLI, +- [Database tokens](#database-tokens) +- [Management tokens](#management-tokens) + +#### Database tokens + +Database tokens grant read and write permissions to one or more databases +and allows for actions like writing and querying data. + +All read and write actions performed against time series data in your +{{< product-name omit=" Clustered" >}} cluster must be authorized using a database token. + +#### Management tokens + +Management tokens grant permission to perform administrative actions such as +managing users, databases, and database tokens. +Management tokens allow clients, such as the +[`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/), to perform administrative actions. {{% note %}} diff --git a/content/influxdb/cloud-dedicated/admin/tokens/database/_index.md b/content/influxdb/cloud-dedicated/admin/tokens/database/_index.md new file mode 100644 index 000000000..d87081502 --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/tokens/database/_index.md @@ -0,0 +1,19 @@ +--- +title: Manage database tokens +seotitle: Manage database tokens in InfluxDB Cloud Dedicated +description: > + Manage database tokens in your InfluxDB Cloud Dedicated cluster. + Database tokens grant read and write permissions to one or more databases and + allow for actions like writing and querying data. +menu: + influxdb_cloud_dedicated: + parent: Manage tokens + name: Database tokens +weight: 101 +influxdb/cloud-dedicated/tags: [tokens] +--- + +{{< product-name >}} database tokens grant read and write permissions to one or +more databases and allow for actions like writing and querying data. + +{{< children >}} diff --git a/content/influxdb/cloud-dedicated/admin/tokens/create.md b/content/influxdb/cloud-dedicated/admin/tokens/database/create.md similarity index 97% rename from content/influxdb/cloud-dedicated/admin/tokens/create.md rename to content/influxdb/cloud-dedicated/admin/tokens/database/create.md index 2aa7fdf5c..3e22dc61e 100644 --- a/content/influxdb/cloud-dedicated/admin/tokens/create.md +++ b/content/influxdb/cloud-dedicated/admin/tokens/database/create.md @@ -1,12 +1,12 @@ --- -title: Create a token +title: Create a database token description: > Use the [`influxctl token create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/create/) to create a database token for reading and writing data in your InfluxDB Cloud Dedicated cluster. Provide a token description and permissions for databases. menu: influxdb_cloud_dedicated: - parent: Manage tokens + parent: Database tokens weight: 201 list_code_example: | ```sh @@ -16,6 +16,8 @@ list_code_example: | --write-database DATABASE2_NAME \ "Read-only on DATABASE1_NAME, Read/write on DATABASE2_NAME" ``` +aliases: + - /influxdb/cloud-dedicated/admin/tokens/create/ alt_links: cloud-serverless: /influxdb/cloud-serverless/admin/tokens/create-token/ --- diff --git a/content/influxdb/cloud-dedicated/admin/tokens/delete.md b/content/influxdb/cloud-dedicated/admin/tokens/database/delete.md similarity index 93% rename from content/influxdb/cloud-dedicated/admin/tokens/delete.md rename to content/influxdb/cloud-dedicated/admin/tokens/database/delete.md index 4e3312414..d9abf7445 100644 --- a/content/influxdb/cloud-dedicated/admin/tokens/delete.md +++ b/content/influxdb/cloud-dedicated/admin/tokens/database/delete.md @@ -1,5 +1,5 @@ --- -title: Delete a token +title: Delete a database token description: > Use the [`influxctl token delete` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/delete/) to delete a token from your InfluxDB Cloud Dedicated cluster and revoke all @@ -7,12 +7,14 @@ description: > Provide the ID of the token you want to delete. menu: influxdb_cloud_dedicated: - parent: Manage tokens + parent: Database tokens weight: 203 list_code_example: | ```sh influxctl token delete ``` +aliases: + - /influxdb/cloud-dedicated/admin/tokens/delete/ --- Use the [`influxctl token delete` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/delete/) diff --git a/content/influxdb/cloud-dedicated/admin/tokens/list.md b/content/influxdb/cloud-dedicated/admin/tokens/database/list.md similarity index 95% rename from content/influxdb/cloud-dedicated/admin/tokens/list.md rename to content/influxdb/cloud-dedicated/admin/tokens/database/list.md index 3eee4a647..9bd41632b 100644 --- a/content/influxdb/cloud-dedicated/admin/tokens/list.md +++ b/content/influxdb/cloud-dedicated/admin/tokens/database/list.md @@ -1,16 +1,18 @@ --- -title: List tokens +title: List database tokens description: > Use the [`influxctl token list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/list/) to list tokens in your InfluxDB Cloud Dedicated cluster. menu: influxdb_cloud_dedicated: - parent: Manage tokens + parent: Database tokens weight: 202 list_code_example: | ```sh influxctl token list ``` +aliases: + - /influxdb/cloud-dedicated/admin/tokens/list/ --- Use the [`influxctl token list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/list/) diff --git a/content/influxdb/cloud-dedicated/admin/tokens/update.md b/content/influxdb/cloud-dedicated/admin/tokens/database/update.md similarity index 96% rename from content/influxdb/cloud-dedicated/admin/tokens/update.md rename to content/influxdb/cloud-dedicated/admin/tokens/database/update.md index 2cea0cd31..d519df8f8 100644 --- a/content/influxdb/cloud-dedicated/admin/tokens/update.md +++ b/content/influxdb/cloud-dedicated/admin/tokens/database/update.md @@ -1,11 +1,11 @@ --- -title: Update a token +title: Update a database token description: > Use the [`influxctl token update` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/update/) to update a database token's permissions in your InfluxDB Cloud Dedicated cluster. menu: influxdb_cloud_dedicated: - parent: Manage tokens + parent: Database tokens weight: 201 list_code_example: | ```sh @@ -15,6 +15,8 @@ list_code_example: | --write-database \ ``` +aliases: + - /influxdb/cloud-dedicated/admin/tokens/update/ alt_links: serverless: /influxdb/cloud-serverless/admin/tokens/update-tokens/ --- diff --git a/content/influxdb/cloud-dedicated/admin/tokens/management/_index.md b/content/influxdb/cloud-dedicated/admin/tokens/management/_index.md new file mode 100644 index 000000000..be24443b1 --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/tokens/management/_index.md @@ -0,0 +1,81 @@ +--- +title: Manage management tokens +seotitle: Manage management tokens in InfluxDB Cloud Dedicated +description: > + Manage management tokens in your InfluxDB Cloud Dedicated cluster. + Management tokens grant permission to perform administrative actions such as + managing users, databases, and database tokens. +menu: + influxdb_cloud_dedicated: + parent: Manage tokens + name: Management tokens +weight: 101 +influxdb/cloud-dedicated/tags: [tokens] +--- + +Management tokens grant permission to perform administrative actions such as +managing users, databases, and database tokens in your +{{< product-name omit=" Clustered">}} cluster. + +{{% note %}} +Management tokens do _not_ grant permissions to write or query time series data +in your {{< product-name omit=" Clustered">}} cluster. + +To grant write or query permissions, use management tokens to create [database tokens](/influxdb/cloud-dedicated/admin/tokens/database/). +{{% /note %}} + +By default, management tokens are short-lived tokens issued by an OAuth2 identity +provider that grant a specific user administrative access to your +{{< product-name omit=" Clustered">}} cluster. +However, for automation purposes, you can manually create management tokens that +authenticate directly with your InfluxDB Cluster and do not require human +interaction with your identity provider. + +{{% warn %}} +#### For automation use cases only + +The tools outlined below are meant for automation use cases and should not be +used to circumvent your identity provider. **Take great care when manually creating +and using management tokens**. + +{{< product-name >}} requires at least one user associated with your cluster +and authorized through your OAuth2 identity provider to manually create a +management token. +{{% /warn %}} + +{{< children type="anchored-list" >}} +- [Use a management token](#use-a-management-token) + +{{< children readmore=true hlevel="h2" hr=true >}} + +--- + +## Use a management token + +Use management tokens to automate authorization for the +[`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/): + +1. [Create a management token](#create-a-management-token) and securely store the output token value. You'll use it in the next step. +2. On the machine where the `influxctl` CLI is to be automated, update your + [`influxctl` connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) + by assigning the `mgmt_token` setting to the token string from the preceding step. + +{{% code-placeholders "(ACCOUNT|CLUSTER|MANAGEMENT)_(ID|TOKEN)" %}} +```toml +[[profile]] + name = "default" + product = "dedicated" + account_id = "ACCOUNT_ID" + cluster_id = "CLUSTER_ID" + mgmt_token = "MANAGEMENT_TOKEN" +``` +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`ACCOUNT_ID`{{% /code-placeholder-key %}}: + {{< product-name >}} account ID +- {{% code-placeholder-key %}}`CLUSTER_ID`{{% /code-placeholder-key %}}: + {{< product-name >}} cluster ID +- {{% code-placeholder-key %}}`MANAGEMENT_TOKEN`{{% /code-placeholder-key %}}: + Management token string diff --git a/content/influxdb/cloud-dedicated/admin/tokens/management/create.md b/content/influxdb/cloud-dedicated/admin/tokens/management/create.md new file mode 100644 index 000000000..c7e36f559 --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/tokens/management/create.md @@ -0,0 +1,74 @@ +--- +title: Create a management token +description: > + Use the [`influxctl management create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/create) + to manually create a management token. +menu: + influxdb_cloud_dedicated: + parent: Management tokens +weight: 201 +influxdb/cloud-dedicated/tags: [tokens] +related: + - /influxdb/cloud-dedicated/admin/tokens/management/#use-a-management-token, Use a management token + - /influxdb/cloud-dedicated/reference/cli/influxctl/management/create/ +list_code_example: | + ```sh + influxctl management create \ + --expires-at $(date -v+1d -Iseconds) \ + --description "Example token description" + ``` +--- + +By default, management tokens are short-lived tokens issued by an OAuth2 identity +provider that grant a specific user administrative access to your +{{< product-name omit=" Clustered">}} cluster. +However, for automation purposes, you can manually create management tokens that +authenticate directly with your InfluxDB cluster and do not require human +interaction with your identity provider. + +{{% warn %}} +#### For automation use cases only + +The tools outlined below are meant for automation use cases and should not be +used to circumvent your identity provider. **Take great care when manually creating +and using management tokens**. + +{{< product-name >}} requires that at least one user associated with your cluster +and authorized through your OAuth2 identity provider to manually create a +management token. +{{% /warn %}} + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl). +2. Use the [`influxctl management create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/create/) + to manually create a management token. Provide the following: + + - _Optional_: the `--expires-at` flag with an RFC3339 date string that defines the + token expiration date and time--for example, `{{< datetime/current-date offset=1 >}}`. + If an expiration isn't set, the token does not expire until revoked. + - _Optional_: the `--description` flag with a description for the management token. + +{{% code-placeholders "RFC3339_EXPIRATION|TOKEN_DESCRIPTION" %}} +```sh +influxctl management create \ + --expire-at RFC3339_EXPIRATION \ + --description TOKEN_DESCRIPTION +``` +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`RFC3339_EXPIRATION`{{% /code-placeholder-key %}}: + An RFC3339 date string to expire the token at--for example, + `{{< datetime/current-date offset=1 >}}`. +- {{% code-placeholder-key %}}`TOKEN_DESCRIPTION`{{% /code-placeholder-key %}}: + Management token description. + +Once created, the command returns the management token string. + +{{% note %}} +#### Store secure tokens in a secret store + +Management token strings are returned _only_ on token creation. +We recommend storing database tokens in a **secure secret store**. +For example, see how to [authenticate Telegraf using tokens in your OS secret store](https://github.com/influxdata/telegraf/tree/master/plugins/secretstores/os). +{{% /note %}} diff --git a/content/influxdb/cloud-dedicated/admin/tokens/management/list.md b/content/influxdb/cloud-dedicated/admin/tokens/management/list.md new file mode 100644 index 000000000..553d13f4d --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/tokens/management/list.md @@ -0,0 +1,126 @@ +--- +title: List management tokens +description: > + Use the [`influxctl management list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/list/) + to list manually-created management tokens. +menu: + influxdb_cloud_dedicated: + parent: Management tokens +weight: 201 +influxdb/cloud-dedicated/tags: [tokens] +related: + - /influxdb/cloud-dedicated/admin/tokens/management/#use-a-management-token, Use a management token + - /influxdb/cloud-dedicated/reference/cli/influxctl/management/list/ +list_code_example: | + ```sh + influxctl management list --format json + ``` +--- + +Use the [`influxctl management list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/list) +to list manually-created management tokens. + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl). +2. Run `influxctl management list` with the following: + + - _Optional_: [Output format](#output-formats) + +```sh +influxctl management list --format json +``` + +{{% note %}} +#### Management token strings are not retrievable + +The actual management token string is not printed and is only returned when +creating the token. + +#### Revoked tokens are included in output + +Revoked tokens still appear when listing management tokens, but they are no +longer valid for any operations. +{{% /note %}} + +### Output formats + +The `influxctl management list` command supports two output formats: `table` and `json`. +By default, the command outputs the list of tokens formatted as a table. +For easier programmatic access to the command output, include `--format json` +with your command to format the token list as JSON. + +#### Example output + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[table](#) +[json](#) +{{% /code-tabs %}} +{{% code-tab-content %}} + +```sh ++--------------------------------------+-------------------------------+-----------+----------------------+----------------------+----------------------+ +| ID | DESCRIPTION | PREFIX | CREATED AT | EXPIRES AT | REVOKED AT | ++--------------------------------------+-------------------------------+-----------+----------------------+----------------------+----------------------+ +| 000x0000-000x-0000-X0x0-X0X00000x000 | Client1 token | M.V1.+5Jk | 2024-03-12T19:58:47Z | 1970-01-01T00:00:00Z | 2024-03-12T20:03:29Z | +| 000x000X-Xx0X-0000-0x0X-000xX000xx00 | Client2 token | M.V1.ynmf | 2024-03-12T20:04:42Z | 1970-01-01T00:00:00Z | 2024-03-12T20:08:27Z | +| 00XXxXxx-000X-000X-x0Xx-00000xx00x00 | Client3 token | M.V1.Eij4 | 2024-03-12T20:05:59Z | 1970-01-01T00:00:00Z | 2024-03-12T20:08:27Z | +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```json +[ + { + "id": "000x0000-000x-0000-X0x0-X0X00000x000", + "account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X", + "token_prefix": "M.V1.+5Jk", + "revoked_at": { + "seconds": 1710273809, + "nanos": 948178000 + }, + "created_at": { + "seconds": 1710273527, + "nanos": 622095000 + }, + "description": "Client1 token", + "created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000" + }, + { + "id": "00XXxXxx-000X-000X-x0Xx-00000xx00x00", + "account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X", + "token_prefix": "M.V1.ynmf", + "revoked_at": { + "seconds": 1710274107, + "nanos": 467542000 + }, + "created_at": { + "seconds": 1710273882, + "nanos": 819785000 + }, + "description": "Client2 token", + "created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000" + }, + { + "id": "000x000X-Xx0X-0000-0x0X-000xX000xx00", + "account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X", + "token_prefix": "M.V1.nAHw", + "expires_at": { + "seconds": 1719491696 + }, + "revoked_at": { + "seconds": 1710274650, + "nanos": 63389000 + }, + "created_at": { + "seconds": 1710274420, + "nanos": 436126000 + }, + "description": "Client3 token", + "created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000" + } +] +``` + +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} diff --git a/content/influxdb/cloud-dedicated/admin/tokens/management/revoke.md b/content/influxdb/cloud-dedicated/admin/tokens/management/revoke.md new file mode 100644 index 000000000..e772d40c5 --- /dev/null +++ b/content/influxdb/cloud-dedicated/admin/tokens/management/revoke.md @@ -0,0 +1,52 @@ +--- +title: Revoke a management token +description: > + Use the [`influxctl management revoke` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/revoke/) + to revoke a management token and remove all access associated with the token. + Provide the ID of the management token you want to revoke. +menu: + influxdb_cloud_dedicated: + parent: Management tokens +weight: 203 +related: + - /influxdb/cloud-dedicated/reference/cli/influxctl/management/revoke/ +list_code_example: | + ```sh + influxctl management revoke + ``` +--- + +Use the [`influxctl management revoke` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/revoke/) +to revoke a management token and remove all access associated with the token. + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl). +2. Run the [`influxctl management list` command](/influxdb/cloud-dedicated/reference/cli/influxctl/management/list) + to output tokens with their IDs. + Copy the **ID** of the token you want to delete. + + ```sh + influxctl management list + ``` + +3. Run the `influxctl management revoke` command and provide the following: + + - _Optional_: `--force` flag to skip command confirmation + - Token ID to delete + +4. Confirm that you want to delete the token. + +{{% code-placeholders "TOKEN_ID" %}} +```sh +influxctl management revoke --force TOKEN_ID +``` +{{% /code-placeholders %}} + +Replace {{% code-placeholder-key %}}`TOKEN_ID`{{% /code-placeholder-key %}} with +the ID of the token you want to revoke. + +{{% note %}} +#### Revoked tokens are included when listing management tokens + +Revoked tokens still appear when listing management tokens, but they are no +longer valid for any operations. +{{% /note %}} diff --git a/content/influxdb/cloud-dedicated/get-started/query.md b/content/influxdb/cloud-dedicated/get-started/query.md index 834975538..b1f8dde0b 100644 --- a/content/influxdb/cloud-dedicated/get-started/query.md +++ b/content/influxdb/cloud-dedicated/get-started/query.md @@ -300,8 +300,8 @@ _If your project's virtual environment is already running, skip to step 3._ Replace the following: - - **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with - read access to the **get-started** database + - **`DATABASE_TOKEN`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read access to the **get-started** database - **`ORG_ID`**: any non-empty string (InfluxDB ignores this parameter, but the client requires it) 5. Enter the `influx3 sql` command and your SQL query statement. @@ -446,8 +446,8 @@ _If your project's virtual environment is already running, skip to step 3._ 2. Calls the `InfluxDBClient3()` constructor method with credentials to instantiate an InfluxDB `client` with the following credentials: - **`host`**: {{% product-name omit=" Clustered" %}} cluster URL (without `https://` protocol or trailing slash) - - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with - read access to the specified database. + - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ - **`database`**: the name of the {{% product-name %}} database to query @@ -610,7 +610,8 @@ _If your project's virtual environment is already running, skip to step 3._ - **`Host`**: your {{% product-name omit=" Clustered" %}} cluster URL - **`Database`**: The name of your {{% product-name %}} database - - **`Token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permission on the specified database. + - **`Token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read permission on the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 2. Defines a deferred function to close the client after execution. @@ -721,7 +722,8 @@ _This tutorial assumes you installed Node.js and npm, and created an `influxdb_j with InfluxDB credentials. - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL - - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permission on the database you want to query. + - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read permission on the database you want to query. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 3. Defines a string variable (`sql`) for the SQL query. @@ -846,7 +848,8 @@ _This tutorial assumes you installed Node.js and npm, and created an `influxdb_j - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL. - **`database`**: the name of the {{% product-name %}} database to query - - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permission on the specified database. + - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read permission on the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 2. Defines a string variable for the SQL query. 3. Calls the `InfluxDBClient.Query()` method to send the query request with the SQL string. @@ -974,7 +977,8 @@ _This tutorial assumes using Maven version 3.9, Java version >= 15, and an `infl - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL - **`database`**: the name of the {{% product-name %}} database to write to - - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permission on the specified database. + - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read permission on the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 2. Defines a string variable (`sql`) for the SQL query. 3. Defines a Markdown table format layout for headings and data rows. diff --git a/content/influxdb/cloud-dedicated/get-started/write.md b/content/influxdb/cloud-dedicated/get-started/write.md index 14c862ed0..e5302d825 100644 --- a/content/influxdb/cloud-dedicated/get-started/write.md +++ b/content/influxdb/cloud-dedicated/get-started/write.md @@ -431,7 +431,9 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200 Replace the following: -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-token) + with sufficient permissions to the specified database If successful, the output is an HTTP `204 No Content` status code. @@ -513,7 +515,9 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200 Replace the following: -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with sufficient permissions to the specified database If successful, the output is an HTTP `204 No Content` status code. @@ -639,7 +643,8 @@ dependencies to your current project. - **`host`**: {{% product-name omit=" Clustered" %}} cluster hostname (URL without protocol or trailing slash) - **`org`**: an empty or arbitrary string (InfluxDB ignores this parameter) - - **`token`**: a [token](/influxdb/cloud-dedicated/admin/tokens/) with write access to the specified database. + - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with write access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ - **`database`**: the name of the {{% product-name %}} database to write to @@ -795,7 +800,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu 1. To instantiate the client, calls the `influxdb3.New(influxdb3.ClientConfig)` function and passes the following: - **`Host`**: the {{% product-name omit=" Clustered" %}} cluster URL - **`Database`**: The name of your {{% product-name %}} database - - **`Token`**: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database. + - **`Token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ - **`WriteOptions`**: `influxdb3.WriteOptions` options for writing to InfluxDB. @@ -958,7 +964,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu with InfluxDB credentials. - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL - - **`token`**: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database. + - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 3. Defines a list of line protocol strings where each string represents a data record. @@ -1123,7 +1130,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL - **`database`**: the name of the {{% product-name %}} database to write to - - **`token`**: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database. + - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ _Instantiating the client with the `using` statement ensures that the client is disposed of when it's no longer needed._ @@ -1321,7 +1329,8 @@ _The tutorial assumes using Maven version 3.9 and Java version >= 15._ - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL - **`database`**: the name of the {{% product-name %}} database to write to - - **`token`**: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database. + - **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 2. Defines a list of line protocol strings where each string represents a data record. diff --git a/content/influxdb/cloud-dedicated/guides/api-compatibility/v1/_index.md b/content/influxdb/cloud-dedicated/guides/api-compatibility/v1/_index.md index ed3596a16..d654d00a4 100644 --- a/content/influxdb/cloud-dedicated/guides/api-compatibility/v1/_index.md +++ b/content/influxdb/cloud-dedicated/guides/api-compatibility/v1/_index.md @@ -63,7 +63,7 @@ Learn how to authenticate requests, adjust request parameters for existing v1 wo ## Authenticate API requests {{% product-name %}} requires each API request to be authenticated with a -[database token](/influxdb/cloud-dedicated/admin/tokens/). +[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens). With the InfluxDB v1 API, you can use database tokens in InfluxDB 1.x username and password schemes, in the InfluxDB v2 `Authorization: Token` scheme, or in the OAuth `Authorization: Bearer` scheme. @@ -73,8 +73,9 @@ schemes, in the InfluxDB v2 `Authorization: Token` scheme, or in the OAuth `Auth ### Authenticate with a username and password scheme With the InfluxDB v1 API, you can use the InfluxDB 1.x convention of -username and password to authenticate database reads and writes by passing a [database token](/influxdb/cloud-dedicated/admin/tokens/) as the `password` credential. -When authenticating requests to the v1 API `/write` and `/query` endpoints, {{% product-name %}} checks that the `password` (`p`) value is an authorized [database token](/influxdb/cloud-dedicated/admin/tokens/). +username and password to authenticate database reads and writes by passing a +[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) as the `password` credential. +When authenticating requests to the v1 API `/write` and `/query` endpoints, {{% product-name %}} checks that the `password` (`p`) value is an authorized [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens). {{% product-name %}} ignores the `username` (`u`) parameter in the request. Use one of the following authentication schemes with clients that support Basic authentication or query parameters (that don't support [token authentication](#authenticate-with-a-token)): @@ -85,7 +86,7 @@ Use one of the following authentication schemes with clients that support Basic #### Basic authentication Use the `Authorization` header with the `Basic` scheme to authenticate v1 API `/write` and `/query` requests. -When authenticating requests, {{% product-name %}} checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/cloud-dedicated/admin/tokens/). +When authenticating requests, {{% product-name %}} checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens). {{% product-name %}} ignores the `username` part of the decoded credential. ##### Syntax @@ -100,7 +101,8 @@ Encode the `[USERNAME]:DATABASE_TOKEN` credential using base64 encoding, and the ##### Example -The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/cloud-dedicated/admin/tokens/): +The following example shows how to use cURL with the `Basic` authentication +scheme and a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens): {{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} ```sh @@ -111,7 +113,9 @@ The following example shows how to use cURL with the `Basic` authentication sche Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with sufficient permissions to the specified database #### Query string authentication @@ -127,7 +131,8 @@ https://{{< influxdb/host >}}/write/?[u=any]&p=DATABASE_TOKEN ##### Example -The following example shows how to use cURL with query string authentication and [database token](/influxdb/cloud-dedicated/admin/tokens/). +The following example shows how to use cURL with query string authentication and +[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens). {{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} ```sh @@ -138,12 +143,15 @@ The following example shows how to use cURL with query string authentication and Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with sufficient permissions to the specified database ### Authenticate with a token scheme -Use the `Authorization: Bearer` or the `Authorization: Token` scheme to pass a [database token](/influxdb/cloud-dedicated/admin/tokens/) for authenticating -v1 API `/write` and `/query` requests. +Use the `Authorization: Bearer` or the `Authorization: Token` scheme to pass a +[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) for +authenticating v1 API `/write` and `/query` requests. `Bearer` and `Token` are equivalent in {{% product-name %}}. The `Token` scheme is used in the InfluxDB 2.x API. @@ -181,7 +189,9 @@ Use `Token` to authenticate a write request: Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: +a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with +sufficient permissions to the specified database ## Responses @@ -283,7 +293,7 @@ Parameter | Ignored | Value `database` | Honored | Database name `retention_policy` | Honored, but discouraged | [Duration](/influxdb/cloud-dedicated/reference/glossary/#duration) `username` | Ignored | String or empty -`password` | Honored | [Database token](/influxdb/cloud-dedicated/admin/tokens/) with permission to write to the database +`password` | Honored | [Database token](/influxdb/cloud-dedicated/administration/tokens/#database-tokens) with permission to write to the database `content_encoding` | Honored | `gzip` (compressed data) or `identity` (uncompressed) `skip_database_creation` | Ignored | N/A (see how to [create a database](/influxdb/cloud-dedicated/admin/databases/create/)) @@ -305,7 +315,9 @@ To configure the v1.x output plugin for writing to {{% product-name %}}, add the Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with sufficient permissions to the specified database ##### Other Telegraf configuration options @@ -321,7 +333,8 @@ Include the following in your request: - A `db` query string parameter with the name of the database to write to. - A request body that contains a string of data in [line protocol](/influxdb/cloud-dedicated/reference/syntax/line-protocol/) syntax. -- A [database token](/influxdb/cloud-dedicated/admin/tokens/) in one of the following authentication schemes: [Basic authentication](#basic-authentication), [query string authentication](#query-string-authentication), or [token authentication](#authenticate-with-a-token). +- A [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) in + one of the following authentication schemes: [Basic authentication](#basic-authentication), [query string authentication](#query-string-authentication), or [token authentication](#authenticate-with-a-token). - Optional [parameters](#v1-api-write-parameters). The following example shows how to use the **cURL** command line tool and the {{% product-name %}} v1 API to write line protocol data to a database: @@ -340,7 +353,9 @@ curl -i 'https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s' \ Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with sufficient permissions to the specified database ##### v1 CLI (not supported) @@ -410,7 +425,9 @@ client = InfluxDBClient( Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with sufficient permissions to the specified database ## Query data diff --git a/content/influxdb/cloud-dedicated/guides/api-compatibility/v2/_index.md b/content/influxdb/cloud-dedicated/guides/api-compatibility/v2/_index.md index f48bef1bf..123a0302b 100644 --- a/content/influxdb/cloud-dedicated/guides/api-compatibility/v2/_index.md +++ b/content/influxdb/cloud-dedicated/guides/api-compatibility/v2/_index.md @@ -51,11 +51,14 @@ For help finding the best workflow for your situation, [contact Support](mailto: ## Authenticate API requests -InfluxDB API endpoints require each request to be authenticated with a [database token](/influxdb/cloud-dedicated/admin/tokens/). +InfluxDB API endpoints require each request to be authenticated with a +[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens). ### Authenticate with a token -Use the `Authorization: Bearer` scheme or the `Authorization: Token` scheme to pass a [database token](/influxdb/cloud-dedicated/admin/tokens/) that has the necessary permissions for the operation. +Use the `Authorization: Bearer` scheme or the `Authorization: Token` scheme to +pass a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) +that has the necessary permissions for the operation. `Bearer` and `Token` are equivalent in InfluxDB Cloud Dedicated. The `Token` scheme is used in the InfluxDB 2.x API. @@ -93,7 +96,9 @@ Use `Token` to authenticate a write request: Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with sufficient permissions to the specified database ## Responses diff --git a/content/influxdb/cloud-dedicated/guides/migrate-data/migrate-1x-to-cloud-dedicated.md b/content/influxdb/cloud-dedicated/guides/migrate-data/migrate-1x-to-cloud-dedicated.md index 846e9fe1d..3f6c1e49f 100644 --- a/content/influxdb/cloud-dedicated/guides/migrate-data/migrate-1x-to-cloud-dedicated.md +++ b/content/influxdb/cloud-dedicated/guides/migrate-data/migrate-1x-to-cloud-dedicated.md @@ -337,8 +337,8 @@ You would create the following InfluxDB {{< current-version >}} databases: 3. **Create a database token for writing to your InfluxDB Cloud Dedicated database.** - Use the [`influxctl token create` command](/influxdb/cloud-dedicated/admin/tokens/create/) - to [create a database token](/influxdb/cloud-dedicated/admin/tokens/create/) with + Use the [`influxctl token create` command](/influxdb/cloud-dedicated/reference/cli/influxctl/token/create/) + to [create a database token](/influxdb/cloud-dedicated/admin/tokens/database/create/) with _write_ permission to your database. Provide the following: diff --git a/content/influxdb/cloud-dedicated/guides/migrate-data/migrate-tsm-to-cloud-dedicated.md b/content/influxdb/cloud-dedicated/guides/migrate-data/migrate-tsm-to-cloud-dedicated.md index ac479b434..897026189 100644 --- a/content/influxdb/cloud-dedicated/guides/migrate-data/migrate-tsm-to-cloud-dedicated.md +++ b/content/influxdb/cloud-dedicated/guides/migrate-data/migrate-tsm-to-cloud-dedicated.md @@ -169,7 +169,7 @@ to complete the migration. 1. [Create a database](/influxdb/cloud-dedicated/admin/databases/create/) **to migrate data to**. - 2. [Create a token](/influxdb/cloud-dedicated/admin/tokens/create/) + 2. [Create a database token](/influxdb/cloud-dedicated/admin/tokens/database/create/) with **write access** to the database you want to migrate to. 2. **In the InfluxDB Cloud (TSM) organization you're migrating data _from_**: diff --git a/content/influxdb/cloud-dedicated/process-data/downsample.md b/content/influxdb/cloud-dedicated/process-data/downsample.md index 94d98a37d..213438cfa 100644 --- a/content/influxdb/cloud-dedicated/process-data/downsample.md +++ b/content/influxdb/cloud-dedicated/process-data/downsample.md @@ -71,7 +71,7 @@ instantiate two InfluxDB clients: Provide the following credentials for each client: - **host**: {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_ -- **token**: [InfluxDB database token](/influxdb/cloud-dedicated/admin/tokens/) +- **token**: [InfluxDB database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with read and write permissions on the databases you want to query and write to. - **database**: InfluxDB database name diff --git a/content/influxdb/cloud-dedicated/process-data/send-alerts.md b/content/influxdb/cloud-dedicated/process-data/send-alerts.md index 69ce01976..61135dfeb 100644 --- a/content/influxdb/cloud-dedicated/process-data/send-alerts.md +++ b/content/influxdb/cloud-dedicated/process-data/send-alerts.md @@ -67,7 +67,7 @@ Provide the following credentials: - **host**: {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_ - **org**: InfluxDB organization name -- **token**: [InfluxDB database token](/influxdb/cloud-dedicated/admin/tokens/) +- **token**: [InfluxDB database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) read permissions on the database you want to query - **database**: InfluxDB database name diff --git a/content/influxdb/cloud-dedicated/process-data/tools/pandas.md b/content/influxdb/cloud-dedicated/process-data/tools/pandas.md index 110bdc478..cefbb6ba2 100644 --- a/content/influxdb/cloud-dedicated/process-data/tools/pandas.md +++ b/content/influxdb/cloud-dedicated/process-data/tools/pandas.md @@ -105,7 +105,9 @@ print(dataframe) 2. Replace the following configuration values: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ permission on the specified database + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _read_ permission on the specified database 3. In your terminal, use the Python interpreter to run the file: @@ -211,7 +213,9 @@ print(dataframe.to_markdown()) Replace the following configuration values: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query. -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/cloud-dedicated/admin/tokens/) with read permission on the specified database. +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + An InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read permission on the specified database. ### Downsample time series diff --git a/content/influxdb/cloud-dedicated/process-data/tools/pyarrow.md b/content/influxdb/cloud-dedicated/process-data/tools/pyarrow.md index 60720840c..92ef29050 100644 --- a/content/influxdb/cloud-dedicated/process-data/tools/pyarrow.md +++ b/content/influxdb/cloud-dedicated/process-data/tools/pyarrow.md @@ -95,7 +95,9 @@ print(querySQL()) 2. Replace the following configuration values: - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/cloud-dedicated/admin/tokens/) with read permissions on the databases you want to query. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + An InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read permissions on the databases you want to query. - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query. 3. In your terminal, use the Python interpreter to run the file: @@ -153,8 +155,11 @@ print(table.group_by('room').aggregate([('temp', 'mean')])) Replace the following: -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/cloud-dedicated/admin/tokens/) with read permissions on the databases you want to query. -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/tokens/) to query. +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + An InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read permissions on the databases you want to query. +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: + The name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query. {{< expand-wrapper >}} {{% expand "View example results" %}} diff --git a/content/influxdb/cloud-dedicated/process-data/visualize/chronograf.md b/content/influxdb/cloud-dedicated/process-data/visualize/chronograf.md index d623d153e..3fbbcbdd8 100644 --- a/content/influxdb/cloud-dedicated/process-data/visualize/chronograf.md +++ b/content/influxdb/cloud-dedicated/process-data/visualize/chronograf.md @@ -38,7 +38,7 @@ If you haven't already, [download and install Chronograf](/chronograf/v1/introdu - **Connection Name:** Name to uniquely identify this connection configuration - **Username:** Arbitrary string _(ignored, but cannot be empty)_ - - **Password:** InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/) + - **Password:** InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with read permissions on the database you want to query - **Telegraf Database Name:** InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) Chronograf uses to populate parts of the application, including the Host List page (default is `telegraf`) diff --git a/content/influxdb/cloud-dedicated/process-data/visualize/grafana.md b/content/influxdb/cloud-dedicated/process-data/visualize/grafana.md index 51e138ead..36e24d077 100644 --- a/content/influxdb/cloud-dedicated/process-data/visualize/grafana.md +++ b/content/influxdb/cloud-dedicated/process-data/visualize/grafana.md @@ -92,7 +92,7 @@ When creating an InfluxDB data source that uses SQL to query data: 2. Under **InfluxDB Details**: - **Database**: Provide a default database name to query. - - **Token**: Provide an [API token](/influxdb/cloud-dedicated/admin/tokens/) + - **Token**: Provide a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with read access to the databases you want to query. 3. Click **Save & test**. @@ -120,7 +120,7 @@ When creating an InfluxDB data source that uses InfluxQL to query data: - **Database**: Provide a default database name to query. - **User**: Provide an arbitrary string. _This credential is ignored when querying {{% product-name %}}, but it cannot be empty._ - - **Password**: Provide an [API token](/influxdb/cloud-dedicated/admin/tokens/) + - **Password**: Provide a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with read access to the databases you want to query. - **HTTP Method**: Choose one of the available HTTP request methods to use when querying data: diff --git a/content/influxdb/cloud-dedicated/process-data/visualize/tableau.md b/content/influxdb/cloud-dedicated/process-data/visualize/tableau.md index 1dbf5138d..0a4b4b07e 100644 --- a/content/influxdb/cloud-dedicated/process-data/visualize/tableau.md +++ b/content/influxdb/cloud-dedicated/process-data/visualize/tableau.md @@ -85,9 +85,9 @@ Setting `useSystemTrustStore=false` is only necessary on macOS and doesn't actua _See an [example connection URL](#example-connection-url)._ - - **Dialect**: PostreSQL + - **Dialect**: PostgreSQL - **Username**: _Leave empty_ - - **Password**: [Database token](/influxdb/cloud-dedicated/admin/tokens/) + - **Password**: [Database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with read access to the specified database - **Properties File**: _Leave empty_ diff --git a/content/influxdb/cloud-dedicated/query-data/execute-queries/client-libraries/go.md b/content/influxdb/cloud-dedicated/query-data/execute-queries/client-libraries/go.md index 175144557..8a273244a 100644 --- a/content/influxdb/cloud-dedicated/query-data/execute-queries/client-libraries/go.md +++ b/content/influxdb/cloud-dedicated/query-data/execute-queries/client-libraries/go.md @@ -111,7 +111,9 @@ In your `influxdb_go_client` module directory, create a file named `query.go` an Replace the following configuration values in the sample code: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ permission on the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _read_ permission on the specified database {{% tabs-wrapper %}} {{% tabs %}} diff --git a/content/influxdb/cloud-dedicated/query-data/execute-queries/client-libraries/python.md b/content/influxdb/cloud-dedicated/query-data/execute-queries/client-libraries/python.md index 06441637e..9074d10f1 100644 --- a/content/influxdb/cloud-dedicated/query-data/execute-queries/client-libraries/python.md +++ b/content/influxdb/cloud-dedicated/query-data/execute-queries/client-libraries/python.md @@ -67,7 +67,7 @@ Execute queries and retrieve data over the Flight+gRPC protocol, and then proces This guide assumes the following prerequisites: - an {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/) with data to query -- a [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ access to the database +- a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _read_ access to the database To learn how to set up InfluxDB and write data, see the [Setup instructions](/influxdb/cloud-dedicated/get-started/setup/) in the Get Started tutorial. @@ -290,7 +290,8 @@ For more information, see [`influxdb_client_3` query exceptions](/influxdb/cloud Replace the following configuration values: - **`database`**: the name of the [{{% product-name %}} database](/influxdb/cloud-dedicated/admin/databases/) to query -- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ access to the specified database. +- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _read_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ ### Execute a query @@ -408,7 +409,8 @@ print(table.group_by('room').aggregate([('temp', 'mean')])) Replace the following configuration values: - **`database`**: the name of the [{{% product-name %}} database](/influxdb/cloud-dedicated/admin/databases/) to query -- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ access to the specified database. +- **`token`**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _read_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ Next, learn how to use Python tools to work with time series data: diff --git a/content/influxdb/cloud-dedicated/query-data/execute-queries/influxctl-cli.md b/content/influxdb/cloud-dedicated/query-data/execute-queries/influxctl-cli.md index 9200af133..0c2fe86c9 100644 --- a/content/influxdb/cloud-dedicated/query-data/execute-queries/influxctl-cli.md +++ b/content/influxdb/cloud-dedicated/query-data/execute-queries/influxctl-cli.md @@ -33,7 +33,7 @@ The `influxctl query` command only supports SQL queries; not InfluxQL. Provide the following with your command: -- **Database token**: [Database token](/influxdb/cloud-dedicated/admin/tokens/) +- **Database token**: [Database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with read permissions on the queried database. Uses the `token` setting from the [`influxctl` connection profile](/influxdb/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) or the `--token` command flag. diff --git a/content/influxdb/cloud-dedicated/query-data/execute-queries/influxdb-v1-api.md b/content/influxdb/cloud-dedicated/query-data/execute-queries/influxdb-v1-api.md index aaca5df41..908fef3db 100644 --- a/content/influxdb/cloud-dedicated/query-data/execute-queries/influxdb-v1-api.md +++ b/content/influxdb/cloud-dedicated/query-data/execute-queries/influxdb-v1-api.md @@ -67,7 +67,8 @@ Replace the following configuration values: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to query. - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ access to the specified database. + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _read_ access to the specified database. {{% note %}} #### Authenticate with username and password @@ -76,7 +77,8 @@ If using basic authentication or query string authentication (username and passw to interact with the v1 HTTP query API, provide the following credentials: - **username**: an arbitrary string _({{< product-name >}} ignores the username)_ -- **password**: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ access to the specified database. +- **password**: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _read_ access to the specified database. {{< code-tabs-wrapper >}} {{% code-tabs %}} diff --git a/content/influxdb/cloud-dedicated/query-data/troubleshoot-and-optimize/analyze-query-plan.md b/content/influxdb/cloud-dedicated/query-data/troubleshoot-and-optimize/analyze-query-plan.md index e829faa3a..587155789 100644 --- a/content/influxdb/cloud-dedicated/query-data/troubleshoot-and-optimize/analyze-query-plan.md +++ b/content/influxdb/cloud-dedicated/query-data/troubleshoot-and-optimize/analyze-query-plan.md @@ -92,7 +92,9 @@ assert 'logical_plan' in df.plan_type.values, "Expect logical_plan" Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with sufficient permissions to the specified database {{% /expand %}} {{% /expand-wrapper %}} diff --git a/content/influxdb/cloud-dedicated/query-data/troubleshoot-and-optimize/trace.md b/content/influxdb/cloud-dedicated/query-data/troubleshoot-and-optimize/trace.md index f520b4ab3..62ab37af6 100644 --- a/content/influxdb/cloud-dedicated/query-data/troubleshoot-and-optimize/trace.md +++ b/content/influxdb/cloud-dedicated/query-data/troubleshoot-and-optimize/trace.md @@ -231,7 +231,9 @@ use_middleware_trace_header() Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with sufficient permissions to the specified database {{% note %}} Store or log your query trace ID to ensure you can provide it to InfluxData Support for troubleshooting. diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/_index.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/_index.md index 726574828..6046d2989 100644 --- a/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/_index.md +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/_index.md @@ -7,6 +7,8 @@ menu: influxdb_cloud_dedicated: parent: influxctl weight: 201 +related: + - /influxdb/cloud-dedicated/admin/tokens/management/ --- The `influxctl management` command and its subcommands manage management tokens diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/create.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/create.md index fc404d890..923c2c381 100644 --- a/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/create.md +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/create.md @@ -7,6 +7,8 @@ menu: influxdb_cloud_dedicated: parent: influxctl management weight: 301 +related: + - /influxdb/cloud-dedicated/admin/tokens/management/create/ --- The `influxctl management create` command creates a management token to be used diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/list.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/list.md index 1d07954de..8125c702d 100644 --- a/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/list.md +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/list.md @@ -7,6 +7,8 @@ menu: influxdb_cloud_dedicated: parent: influxctl management weight: 301 +related: + - /influxdb/cloud-dedicated/admin/tokens/management/list/ --- The `influxctl management list` command lists all management tokens used to diff --git a/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/revoke.md b/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/revoke.md index b13c37c76..897f48072 100644 --- a/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/revoke.md +++ b/content/influxdb/cloud-dedicated/reference/cli/influxctl/management/revoke.md @@ -7,6 +7,8 @@ menu: influxdb_cloud_dedicated: parent: influxctl management weight: 301 +related: + - /influxdb/cloud-dedicated/admin/tokens/management/revoke/ --- The `influxctl management revoke` command revokes management token access diff --git a/content/influxdb/cloud-dedicated/reference/client-libraries/flight/python-flight.md b/content/influxdb/cloud-dedicated/reference/client-libraries/flight/python-flight.md index 4a9024d5d..23a0823c8 100644 --- a/content/influxdb/cloud-dedicated/reference/client-libraries/flight/python-flight.md +++ b/content/influxdb/cloud-dedicated/reference/client-libraries/flight/python-flight.md @@ -151,6 +151,8 @@ print(data_frame.to_markdown()) Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with sufficient permissions to the specified database {{% /code-tabs-wrapper %}} diff --git a/content/influxdb/cloud-dedicated/reference/client-libraries/flight/python-flightsql-dbapi.md b/content/influxdb/cloud-dedicated/reference/client-libraries/flight/python-flightsql-dbapi.md index 7216e3630..1236a884d 100644 --- a/content/influxdb/cloud-dedicated/reference/client-libraries/flight/python-flightsql-dbapi.md +++ b/content/influxdb/cloud-dedicated/reference/client-libraries/flight/python-flightsql-dbapi.md @@ -94,7 +94,9 @@ client = FlightSQLClient(host='{{< influxdb/host >}}', Replace the following: -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permissions on the databases you want to query +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an + {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read permissions on the databases you want to query - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/) ### Instance methods diff --git a/content/influxdb/cloud-dedicated/reference/client-libraries/v2/go.md b/content/influxdb/cloud-dedicated/reference/client-libraries/v2/go.md index f4246d2d2..ec9f44e4e 100644 --- a/content/influxdb/cloud-dedicated/reference/client-libraries/v2/go.md +++ b/content/influxdb/cloud-dedicated/reference/client-libraries/v2/go.md @@ -57,7 +57,7 @@ Use the Go library to write and query data from InfluxDB. ) ``` -2. Define variables for your InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) (bucket), organization (required, but ignored), and [token](/influxdb/cloud-dedicated/admin/tokens/). +2. Define variables for your InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) (bucket), organization (required, but ignored), and [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens). ```go bucket := "DATABASE_NAME" diff --git a/content/influxdb/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/install.md b/content/influxdb/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/install.md index e632adca7..8026aa552 100644 --- a/content/influxdb/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/install.md +++ b/content/influxdb/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/install.md @@ -82,7 +82,7 @@ It only works with InfluxDB v2 management APIs. The client examples include an [`env`](https://github.com/influxdata/influxdb-client-js/blob/master/examples/env.js) module for accessing your InfluxDB properties from environment variables or from `env.js`. The examples use these properties to interact with the InfluxDB API. -Set environment variables or update `env.js` with your InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/), organization (required, but ignored), [token](/influxdb/cloud-dedicated/admin/tokens/), and cluster URL. +Set environment variables or update `env.js` with your InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/), organization (required, but ignored), [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens), and cluster URL. ```sh export INFLUX_URL=https://{{< influxdb/host >}} diff --git a/content/influxdb/cloud-dedicated/reference/client-libraries/v2/python.md b/content/influxdb/cloud-dedicated/reference/client-libraries/v2/python.md index 6c0b6c859..8d1ddbc36 100644 --- a/content/influxdb/cloud-dedicated/reference/client-libraries/v2/python.md +++ b/content/influxdb/cloud-dedicated/reference/client-libraries/v2/python.md @@ -48,7 +48,8 @@ You'll need the following prerequisites: https://{{< influxdb/host >}} ``` 3. Name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write to. -4. InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/) with permission to write to the database. +4. InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with permission to write to the database. _For security reasons, we recommend setting an environment variable to store your token and avoid exposing the raw token value in your script._ ## Write data to InfluxDB with Python @@ -64,7 +65,7 @@ Follow the steps to write [line protocol](/influxdb/cloud-dedicated/reference/sy import os ``` -3. Define variables for your [database name](/influxdb/cloud-dedicated/admin/databases/), organization (required, but ignored), and [token](/influxdb/cloud-dedicated/admin/tokens/). +3. Define variables for your [database name](/influxdb/cloud-dedicated/admin/databases/), organization (required, but ignored), and [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens). ```python database = "DATABASE_NAME" diff --git a/content/influxdb/cloud-dedicated/reference/client-libraries/v3/go.md b/content/influxdb/cloud-dedicated/reference/client-libraries/v3/go.md index 655ae8264..13d6077f5 100644 --- a/content/influxdb/cloud-dedicated/reference/client-libraries/v3/go.md +++ b/content/influxdb/cloud-dedicated/reference/client-libraries/v3/go.md @@ -102,7 +102,9 @@ func main() { Replace the following configuration values: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/cloud-dedicated/admin/databases/) to query -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/) with _read_ permission on the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an InfluxDB [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _read_ permission on the specified database ## Class influxdb3.Client diff --git a/content/influxdb/cloud-dedicated/reference/client-libraries/v3/python.md b/content/influxdb/cloud-dedicated/reference/client-libraries/v3/python.md index 8e698393b..e2123e729 100644 --- a/content/influxdb/cloud-dedicated/reference/client-libraries/v3/python.md +++ b/content/influxdb/cloud-dedicated/reference/client-libraries/v3/python.md @@ -222,7 +222,9 @@ client = InfluxDBClient3(token="DATABASE_TOKEN", Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/) -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permissions on the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read permissions on the specified database ##### Initialize a client for batch writing @@ -270,7 +272,9 @@ invokes the callback function, if specified, for the response status (success, e Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/cloud-dedicated/admin/databases/) -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/) with read permissions on the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with read permissions on the specified database ### InfluxDBClient3 instance methods diff --git a/content/influxdb/cloud-dedicated/reference/sample-data.md b/content/influxdb/cloud-dedicated/reference/sample-data.md index 9d823a30f..df6c3588c 100644 --- a/content/influxdb/cloud-dedicated/reference/sample-data.md +++ b/content/influxdb/cloud-dedicated/reference/sample-data.md @@ -156,7 +156,7 @@ Replace the following in the sample script: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your InfluxDB Cloud Dedicated database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/cloud-dedicated/admin/tokens/) + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ permission to the database {{% /expand %}} @@ -263,7 +263,7 @@ Replace the following in the sample script: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your InfluxDB Cloud Dedicated database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/cloud-dedicated/admin/tokens/) + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ permission to the database {{% /expand %}} @@ -342,7 +342,7 @@ Replace the following in the sample script: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your InfluxDB Cloud Dedicated database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/cloud-dedicated/admin/tokens/) + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with sufficient permissions to the specified database {{% /expand %}} @@ -425,7 +425,7 @@ Replace the following in the sample script: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your InfluxDB Cloud Dedicated database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/cloud-dedicated/admin/tokens/) + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with sufficient permissions to the specified database {{% /expand %}} @@ -496,7 +496,7 @@ Replace the following in the sample script: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your InfluxDB Cloud Dedicated database - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/cloud-dedicated/admin/tokens/) + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with sufficient permissions to the specified database {{% /expand %}} diff --git a/content/influxdb/cloud-dedicated/write-data/best-practices/optimize-writes.md b/content/influxdb/cloud-dedicated/write-data/best-practices/optimize-writes.md index 115611479..53a55cf5c 100644 --- a/content/influxdb/cloud-dedicated/write-data/best-practices/optimize-writes.md +++ b/content/influxdb/cloud-dedicated/write-data/best-practices/optimize-writes.md @@ -136,7 +136,9 @@ curl --request POST "https://{{< influxdb/host >}}/api/v2/write?org=ignored&buck Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database. +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ {{% /tab-content %}} @@ -201,7 +203,7 @@ EOF Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [databse token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 2. To test the input and processor, enter the following command: @@ -297,7 +299,7 @@ curl -s "https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precisi Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 3. To test the input and processor, enter the following command: @@ -385,7 +387,7 @@ The following example creates sample data for two series (the combination of mea Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 3. To test the input and aggregator, enter the following command: @@ -474,7 +476,7 @@ The following example shows how to use Telegraf to remove points that repeat fie Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 3. To test the input and processor, enter the following command: @@ -699,7 +701,7 @@ The Go `multiplier.go` sample code does the following: Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/cloud-dedicated/admin/databases/) to write data to - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ access to the specified database. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 5. To test the input and processor, enter the following command: diff --git a/content/influxdb/cloud-dedicated/write-data/line-protocol/client-libraries.md b/content/influxdb/cloud-dedicated/write-data/line-protocol/client-libraries.md index 6325f332b..74af5cdda 100644 --- a/content/influxdb/cloud-dedicated/write-data/line-protocol/client-libraries.md +++ b/content/influxdb/cloud-dedicated/write-data/line-protocol/client-libraries.md @@ -52,7 +52,7 @@ After setting up InfluxDB and your project, you should have the following: - {{< product-name >}} credentials: - [Database](/influxdb/cloud-dedicated/admin/databases/) - - [Token](/influxdb/cloud-dedicated/admin/tokens/) + - [Database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) - Cluster hostname - A directory for your project. diff --git a/content/influxdb/cloud-dedicated/write-data/line-protocol/influxctl-cli.md b/content/influxdb/cloud-dedicated/write-data/line-protocol/influxctl-cli.md index f190f021e..b2a348071 100644 --- a/content/influxdb/cloud-dedicated/write-data/line-protocol/influxctl-cli.md +++ b/content/influxdb/cloud-dedicated/write-data/line-protocol/influxctl-cli.md @@ -67,8 +67,8 @@ to write the [home sensor sample data](#home-sensor-data-line-protocol) to your Provide the following: - Database name using the `--database` flag -- [Database token](/influxdb/cloud-dedicated/admin/tokens/) (with write permissions - on the target database) using the `--token` flag +- [Database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) + (with write permissions on the target database) using the `--token` flag - Timestamp precision as seconds (`s`) using the `--precision` flag - [Line protocol](#construct-line-protocol). Pass the line protocol in one of the following ways: diff --git a/content/influxdb/cloud-dedicated/write-data/use-telegraf/configure/_index.md b/content/influxdb/cloud-dedicated/write-data/use-telegraf/configure/_index.md index 25b124684..aad43a656 100644 --- a/content/influxdb/cloud-dedicated/write-data/use-telegraf/configure/_index.md +++ b/content/influxdb/cloud-dedicated/write-data/use-telegraf/configure/_index.md @@ -100,9 +100,12 @@ To write to {{% product-name %}}, include your {{% product-name omit=" Clustered ##### `token` -Your {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/) with _write_ permission to the database. +Your {{% product-name %}} [database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) +with _write_ permission to the database. -In the examples, **`INFLUX_TOKEN`** is an environment variable assigned to a [database token](/influxdb/cloud-dedicated/admin/tokens/) that has _write_ permission to the database. +In the examples, **`INFLUX_TOKEN`** is an environment variable assigned to a +[database token](/influxdb/cloud-dedicated/admin/tokens/#database-tokens) that +has _write_ permission to the database. ##### `organization` diff --git a/content/influxdb/cloud/admin/tokens/create-token.md b/content/influxdb/cloud/admin/tokens/create-token.md index 86f1bd091..0f9cc8f0a 100644 --- a/content/influxdb/cloud/admin/tokens/create-token.md +++ b/content/influxdb/cloud/admin/tokens/create-token.md @@ -11,8 +11,8 @@ aliases: - /influxdb/cloud/security/tokens/create-token/ alt_links: cloud-serverless: /influxdb/cloud-serverless/admin/tokens/create-token - cloud-dedicated: /influxdb/cloud-dedicated/admin/tokens/create - clustered: /influxdb/clustered/admin/tokens/create + cloud-dedicated: /influxdb/cloud-dedicated/admin/tokens/database/create + clustered: /influxdb/clustered/admin/tokens/database/create --- {{< duplicate-oss >}} diff --git a/content/influxdb/clustered/admin/tables/list.md b/content/influxdb/clustered/admin/tables/list.md index 3ed840fb1..dc3a4258f 100644 --- a/content/influxdb/clustered/admin/tables/list.md +++ b/content/influxdb/clustered/admin/tables/list.md @@ -56,7 +56,7 @@ The `influxctl query` command only supports SQL queries; not InfluxQL. Provide the following with your command: -- **Database token**: [Database token](/influxdb/clustered/admin/tokens/) +- **Database token**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permissions on the queried database. Uses the `token` setting from the [`influxctl` connection profile](/influxdb/clustered/reference/cli/influxctl/#configure-connection-profiles) or the `--token` command flag. diff --git a/content/influxdb/clustered/admin/tokens/_index.md b/content/influxdb/clustered/admin/tokens/_index.md index d310c4d1b..6234f3471 100644 --- a/content/influxdb/clustered/admin/tokens/_index.md +++ b/content/influxdb/clustered/admin/tokens/_index.md @@ -12,14 +12,27 @@ weight: 101 influxdb/clustered/tags: [tokens] --- -InfluxDB uses token authentication to authorize access to data in your InfluxDB -cluster. Each token grants read and write permissions to one or -more databases and allows for actions like writing and querying data. +InfluxDB uses token authentication to authorize access to data in your +{{< product-name omit=" Clustered" >}} cluster. +There are two types of tokens: -All read and write actions performed against time series data in your InfluxDB -cluster must be authorized using a token. Administrative actions -such as managing tokens and databases are authorized using **management tokens** -issued by **Auth0**. Management tokens allow clients, such as the `influxctl` CLI, +- [Database tokens](#database-tokens) +- [Management tokens](#management-tokens) + +#### Database tokens + +Database tokens grant read and write permissions to one or more databases +and allows for actions like writing and querying data. + +All read and write actions performed against time series data in your +{{< product-name omit=" Clustered" >}} cluster must be authorized using a token. + +#### Management tokens + +Management tokens grant permission to perform administrative actions such as +managing users, databases, and database tokens. +Management tokens allow clients, such as the +[`influxctl` CLI](/influxdb/cloud-dedicated/reference/cli/influxctl/), to perform administrative actions. {{% note %}} diff --git a/content/influxdb/clustered/admin/tokens/database/_index.md b/content/influxdb/clustered/admin/tokens/database/_index.md new file mode 100644 index 000000000..05ff24f11 --- /dev/null +++ b/content/influxdb/clustered/admin/tokens/database/_index.md @@ -0,0 +1,19 @@ +--- +title: Manage database tokens +seotitle: Manage database tokens in InfluxDB Clustered +description: > + Manage database tokens in your InfluxDB cluster. + Database tokens grant read and write permissions to one or more databases and + allow for actions like writing and querying data. +menu: + influxdb_clustered: + parent: Manage tokens + name: Database tokens +weight: 101 +influxdb/clustered/tags: [tokens] +--- + +{{< product-name >}} database tokens grant read and write permissions to one or +more databases and allow for actions like writing and querying data. + +{{< children >}} \ No newline at end of file diff --git a/content/influxdb/clustered/admin/tokens/create.md b/content/influxdb/clustered/admin/tokens/database/create.md similarity index 97% rename from content/influxdb/clustered/admin/tokens/create.md rename to content/influxdb/clustered/admin/tokens/database/create.md index a4d323597..02554a6de 100644 --- a/content/influxdb/clustered/admin/tokens/create.md +++ b/content/influxdb/clustered/admin/tokens/database/create.md @@ -1,12 +1,12 @@ --- -title: Create a token +title: Create a database token description: > Use the [`influxctl token create` command](/influxdb/clustered/reference/cli/influxctl/token/create/) to create a database token for reading and writing data in your InfluxDB cluster. Provide a token description and permissions for databases. menu: influxdb_clustered: - parent: Manage tokens + parent: Database tokens weight: 201 list_code_example: | ```sh @@ -16,6 +16,8 @@ list_code_example: | --write-database DATABASE2_NAME \ "Read-only on DATABASE1_NAME, Read/write on DATABASE2_NAME" ``` +aliases: + - /influxdb/clustered/admin/tokens/create/ alt_links: cloud: /influxdb/cloud/admin/tokens/create-token/ cloud-serverless: /influxdb/cloud-serverless/admin/tokens/create-token/ diff --git a/content/influxdb/clustered/admin/tokens/delete.md b/content/influxdb/clustered/admin/tokens/database/delete.md similarity index 93% rename from content/influxdb/clustered/admin/tokens/delete.md rename to content/influxdb/clustered/admin/tokens/database/delete.md index 030fefac6..026803a64 100644 --- a/content/influxdb/clustered/admin/tokens/delete.md +++ b/content/influxdb/clustered/admin/tokens/database/delete.md @@ -1,5 +1,5 @@ --- -title: Delete a token +title: Delete a database token description: > Use the [`influxctl token delete` command](/influxdb/clustered/reference/cli/influxctl/token/delete/) to delete a token from your InfluxDB cluster and revoke all @@ -7,12 +7,14 @@ description: > Provide the ID of the token you want to delete. menu: influxdb_clustered: - parent: Manage tokens + parent: Database tokens weight: 203 list_code_example: | ```sh influxctl token delete ``` +aliases: + - /influxdb/clustered/admin/tokens/delete/ --- Use the [`influxctl token delete` command](/influxdb/clustered/reference/cli/influxctl/token/delete/) diff --git a/content/influxdb/clustered/admin/tokens/list.md b/content/influxdb/clustered/admin/tokens/database/list.md similarity index 95% rename from content/influxdb/clustered/admin/tokens/list.md rename to content/influxdb/clustered/admin/tokens/database/list.md index bbe57a979..ccfd345d1 100644 --- a/content/influxdb/clustered/admin/tokens/list.md +++ b/content/influxdb/clustered/admin/tokens/database/list.md @@ -1,16 +1,18 @@ --- -title: List tokens +title: List database tokens description: > Use the [`influxctl token list` command](/influxdb/clustered/reference/cli/influxctl/token/list/) to list tokens in your InfluxDB cluster. menu: influxdb_clustered: - parent: Manage tokens + parent: Manage database tokens weight: 202 list_code_example: | ```sh influxctl token list ``` +aliases: + - /influxdb/clustered/admin/tokens/list/ --- Use the [`influxctl token list` command](/influxdb/clustered/reference/cli/influxctl/token/list/) diff --git a/content/influxdb/clustered/admin/tokens/update.md b/content/influxdb/clustered/admin/tokens/database/update.md similarity index 96% rename from content/influxdb/clustered/admin/tokens/update.md rename to content/influxdb/clustered/admin/tokens/database/update.md index b424aca84..a5991307b 100644 --- a/content/influxdb/clustered/admin/tokens/update.md +++ b/content/influxdb/clustered/admin/tokens/database/update.md @@ -1,11 +1,11 @@ --- -title: Update a token +title: Update a database token description: > Use the [`influxctl token update` command](/influxdb/clustered/reference/cli/influxctl/token/update/) to update a database token's permissions in your InfluxDB cluster. menu: influxdb_clustered: - parent: Manage tokens + parent: Manage database tokens weight: 201 list_code_example: | ```sh @@ -15,6 +15,8 @@ list_code_example: | --write-database \ ``` +aliases: + - /influxdb/clustered/admin/tokens/update/ alt_links: cloud-serverless: /influxdb/cloud-serverless/admin/tokens/update-tokens/ --- diff --git a/content/influxdb/clustered/admin/tokens/management/_index.md b/content/influxdb/clustered/admin/tokens/management/_index.md new file mode 100644 index 000000000..47a7bd394 --- /dev/null +++ b/content/influxdb/clustered/admin/tokens/management/_index.md @@ -0,0 +1,78 @@ +--- +title: Manage management tokens +seotitle: Manage management tokens in InfluxDB Clustered +description: > + Manage management tokens in your InfluxDB cluster. + Management tokens grant permission to perform administrative actions such as + managing users, databases, and database tokens. +menu: + influxdb_clustered: + parent: Manage tokens + name: Management tokens +weight: 101 +influxdb/clustered/tags: [tokens] +--- + +Management tokens grant permission to perform administrative actions such as +managing users, databases, and database tokens in your +{{< product-name omit=" Clustered">}} cluster. + +{{% note %}} +Management tokens do _not_ grant permissions to write or query time series data +in your {{< product-name omit=" Clustered">}} cluster. + +To grant write or query permissions, use management tokens to create [database tokens](/influxdb/clustered/admin/tokens/database/). +{{% /note %}} + +By default, management tokens are short-lived tokens issued by an OAuth +provider that grant a specific user administrative access to your +{{< product-name omit=" Clustered">}} cluster. +However, for automation purposes, you can manually create management tokens that +authenticate directly with your InfluxDB Cluster and do not require human +interaction with your OAuth provider. + +{{% warn %}} +#### For automation use cases only + +The tools outlined below are meant for automation use cases and should not be +used to circumvent your OAuth provider. **Take great care when manually creating +and using management tokens**. + +{{< product-name >}} requires at least one user associated with your cluster +and authorized through OAuth to manually create a management token. +{{% /warn %}} + +{{< children type="anchored-list" >}} +- [Use a management token](#use-a-management-token) + +{{< children readmore=true hlevel="h2" hr=true >}} + +--- + +## Use a management token + +Use management tokens to automate authorization for the +[`influxctl` CLI](/influxdb/clustered/reference/cli/influxctl/): + +1. [Create a management token](#create-a-management-token) and securely store the output token value. You'll use it in the next step. +2. On the machine where the `influxctl` CLI is to be automated, update your + [`influxctl` connection profile](/influxdb/clustered/reference/cli/influxctl/#configure-connection-profiles) + by assigning the `mgmt_token` setting to the token string from the preceding step. + +{{% code-placeholders "(INFLUXDB|MANAGEMENT)_(PORT|TOKEN)" %}} +```toml +[[profile]] + name = "default" + product = "clustered" + host = "{{< influxdb/host >}}" + port = "INFLUXDB_PORT" + mgmt_token = "MANAGEMENT_TOKEN" +``` +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`INFLUXDB_PORT`{{% /code-placeholder-key %}}: + {{< product-name >}} InfluxDB cluster port +- {{% code-placeholder-key %}}`MANAGEMENT_TOKEN`{{% /code-placeholder-key %}}: + Management token string diff --git a/content/influxdb/clustered/admin/tokens/management/create.md b/content/influxdb/clustered/admin/tokens/management/create.md new file mode 100644 index 000000000..47da1aa6c --- /dev/null +++ b/content/influxdb/clustered/admin/tokens/management/create.md @@ -0,0 +1,73 @@ +--- +title: Create a management token +description: > + Use the [`influxctl management create` command](/influxdb/clustered/reference/cli/influxctl/management/create) + to manually create a management token. +menu: + influxdb_clustered: + parent: Management tokens +weight: 201 +influxdb/clustered/tags: [tokens] +related: + - /influxdb/clustered/admin/tokens/management/#use-a-management-token, Use a management token + - /influxdb/clustered/reference/cli/influxctl/management/create/ +list_code_example: | + ```sh + influxctl management create \ + --expires-at $(date -v+1d -Iseconds) \ + --description "Example token description" + ``` +--- + +By default, management tokens are short-lived tokens issued by an OAuth +provider that grant a specific user administrative access to your +{{< product-name omit=" Clustered">}} cluster. +However, for automation purposes, you can manually create management tokens that +authenticate directly with your InfluxDB cluster and do not require human +interaction with your OAuth provider. + +{{% warn %}} +#### For automation use cases only + +The tools outlined below are meant for automation use cases and should not be +used to circumvent your OAuth provider. **Take great care when manually creating +and using management tokens**. + +{{< product-name >}} requires at least one user associated with your cluster +and authorized through OAuth to manually create a management token. +{{% /warn %}} + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/clustered/reference/cli/influxctl/#download-and-install-influxctl). +2. Use the [`influxctl management create` command](/influxdb/clustered/reference/cli/influxctl/management/create/) + to manually create a management token. Provide the following: + + - _Optional_: the `--expires-at` flag with an RFC3339 date string that defines the + token expiration date and time--for example, `{{< datetime/current-date offset=1 >}}`. + If expiration isn't set, the token does not expire until revoked. + - _Optional_: the `--description` flag with a description for the management token. + +{{% code-placeholders "RFC3339_EXPIRATION|TOKEN_DESCRIPTION" %}} +```sh +influxctl management create \ + --expire-at RFC3339_EXPIRATION \ + --description TOKEN_DESCRIPTION +``` +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`RFC3339_EXPIRATION`{{% /code-placeholder-key %}}: + An RFC3339 date string to expire the token at--for example, + `{{< datetime/current-date offset=1 >}}`. +- {{% code-placeholder-key %}}`TOKEN_DESCRIPTION`{{% /code-placeholder-key %}}: + Management token description. + +The output contains the management token string. + +{{% note %}} +#### Store secure tokens in a secret store + +Management token strings are returned _only_ on token creation. +We recommend storing database tokens in a **secure secret store**. +For example, see how to [authenticate Telegraf using tokens in your OS secret store](https://github.com/influxdata/telegraf/tree/master/plugins/secretstores/os). +{{% /note %}} diff --git a/content/influxdb/clustered/admin/tokens/management/list.md b/content/influxdb/clustered/admin/tokens/management/list.md new file mode 100644 index 000000000..72497e008 --- /dev/null +++ b/content/influxdb/clustered/admin/tokens/management/list.md @@ -0,0 +1,126 @@ +--- +title: List management tokens +description: > + Use the [`influxctl management list` command](/influxdb/clustered/reference/cli/influxctl/management/list/) + to list manually-created management tokens. +menu: + influxdb_clustered: + parent: Management tokens +weight: 201 +influxdb/clustered/tags: [tokens] +related: + - /influxdb/clustered/admin/tokens/management/#use-a-management-token, Use a management token + - /influxdb/clustered/reference/cli/influxctl/management/list/ +list_code_example: | + ```sh + influxctl management list --format json + ``` +--- + +Use the [`influxctl management list` command](/influxdb/clustered/reference/cli/influxctl/management/list) +to list manually-created management tokens. + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/clustered/reference/cli/influxctl/#download-and-install-influxctl). +2. Run `influxctl management list` with the following: + + - _Optional_: [Output format](#output-formats) + +```sh +influxctl management list --format json +``` + +{{% note %}} +#### Management token strings are not retrievable + +The actual management token string is not printed and is only returned when +creating the token. + +#### Revoked tokens are included in output + +Revoked tokens still appear when listing management tokens, but they are no +longer valid for any operations. +{{% /note %}} + +### Output formats + +The `influxctl management list` command supports two output formats: `table` and `json`. +By default, the command outputs the list of tokens formatted as a table. +For easier programmatic access to the command output, include `--format json` +with your command to format the token list as JSON. + +#### Example output + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[table](#) +[json](#) +{{% /code-tabs %}} +{{% code-tab-content %}} + +```sh ++--------------------------------------+-------------------------------+-----------+----------------------+----------------------+----------------------+ +| ID | DESCRIPTION | PREFIX | CREATED AT | EXPIRES AT | REVOKED AT | ++--------------------------------------+-------------------------------+-----------+----------------------+----------------------+----------------------+ +| 000x0000-000x-0000-X0x0-X0X00000x000 | Client1 token | M.V1.+5Jk | 2024-03-12T19:58:47Z | 1970-01-01T00:00:00Z | 2024-03-12T20:03:29Z | +| 000x000X-Xx0X-0000-0x0X-000xX000xx00 | Client2 token | M.V1.ynmf | 2024-03-12T20:04:42Z | 1970-01-01T00:00:00Z | 2024-03-12T20:08:27Z | +| 00XXxXxx-000X-000X-x0Xx-00000xx00x00 | Client3 token | M.V1.Eij4 | 2024-03-12T20:05:59Z | 1970-01-01T00:00:00Z | 2024-03-12T20:08:27Z | +``` + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```json +[ + { + "id": "000x0000-000x-0000-X0x0-X0X00000x000", + "account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X", + "token_prefix": "M.V1.+5Jk", + "revoked_at": { + "seconds": 1710273809, + "nanos": 948178000 + }, + "created_at": { + "seconds": 1710273527, + "nanos": 622095000 + }, + "description": "Client1 token", + "created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000" + }, + { + "id": "00XXxXxx-000X-000X-x0Xx-00000xx00x00", + "account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X", + "token_prefix": "M.V1.ynmf", + "revoked_at": { + "seconds": 1710274107, + "nanos": 467542000 + }, + "created_at": { + "seconds": 1710273882, + "nanos": 819785000 + }, + "description": "Client2 token", + "created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000" + }, + { + "id": "000x000X-Xx0X-0000-0x0X-000xX000xx00", + "account_id": "0x0x0x00-0Xx0-00x0-x0X0-00x00XX0Xx0X", + "token_prefix": "M.V1.nAHw", + "expires_at": { + "seconds": 1719491696 + }, + "revoked_at": { + "seconds": 1710274650, + "nanos": 63389000 + }, + "created_at": { + "seconds": 1710274420, + "nanos": 436126000 + }, + "description": "Client3 token", + "created_by": "X0x0xxx0-0XXx-000x-00x0-0X000Xx00000" + } +] +``` + +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} diff --git a/content/influxdb/clustered/admin/tokens/management/revoke.md b/content/influxdb/clustered/admin/tokens/management/revoke.md new file mode 100644 index 000000000..eb46d4f97 --- /dev/null +++ b/content/influxdb/clustered/admin/tokens/management/revoke.md @@ -0,0 +1,52 @@ +--- +title: Revoke a management token +description: > + Use the [`influxctl management revoke` command](/influxdb/clustered/reference/cli/influxctl/management/revoke/) + to revoke a management token and remove all access associated with the token. + Provide the ID of the management token you want to revoke. +menu: + influxdb_clustered: + parent: Management tokens +weight: 203 +related: + - /influxdb/clustered/reference/cli/influxctl/management/revoke/ +list_code_example: | + ```sh + influxctl management revoke + ``` +--- + +Use the [`influxctl management revoke` command](/influxdb/clustered/reference/cli/influxctl/management/revoke/) +to revoke a management token and remove all access associated with the token. + +1. If you haven't already, [download and install the `influxctl` CLI](/influxdb/clustered/reference/cli/influxctl/#download-and-install-influxctl). +2. Run the [`influxctl management list` command](/influxdb/clustered/reference/cli/influxctl/management/list) + to output tokens with their IDs. + Copy the **ID** of the token you want to delete. + + ```sh + influxctl management list + ``` + +3. Run the `influxctl management revoke` command and provide the following: + + - _Optional_: `--force` flag to skip command confirmation + - Token ID to delete + +4. Confirm that you want to delete the token. + +{{% code-placeholders "TOKEN_ID" %}} +```sh +influxctl management revoke --force TOKEN_ID +``` +{{% /code-placeholders %}} + +Replace {{% code-placeholder-key %}}`TOKEN_ID`{{% /code-placeholder-key %}} with +the ID of the token you want to revoke. + +{{% note %}} +#### Revoked tokens are included when listing management tokens + +Revoked tokens still appear when listing management tokens, but they are no +longer valid for any operations. +{{% /note %}} diff --git a/content/influxdb/clustered/get-started/query.md b/content/influxdb/clustered/get-started/query.md index 3749c23c2..dc5210227 100644 --- a/content/influxdb/clustered/get-started/query.md +++ b/content/influxdb/clustered/get-started/query.md @@ -300,7 +300,7 @@ _If your project's virtual environment is already running, skip to step 3._ Replace the following: - - **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/) with + - **`DATABASE_TOKEN`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read access to the **get-started** database - **`ORG_ID`**: any non-empty string (InfluxDB ignores this parameter, but the client requires it) @@ -446,7 +446,7 @@ _If your project's virtual environment is already running, skip to step 3._ 2. Calls the `InfluxDBClient3()` constructor method with credentials to instantiate an InfluxDB `client` with the following credentials: - **`host`**: {{% product-name omit=" Clustered" %}} cluster URL (without `https://` protocol or trailing slash) - - **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with + - **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ - **`database`**: the name of the {{% product-name %}} database to query @@ -609,8 +609,8 @@ _If your project's virtual environment is already running, skip to step 3._ 1. Instantiates `influx.Client` with InfluxDB credentials. - **`Host`**: your {{% product-name omit=" Clustered" %}} cluster URL - - **`Database`**: The name of your {{% product-name %}} database - - **`Token`**: a [database token](/influxdb/clustered/admin/tokens/) with read permission on the specified database. + - **`Database`**: the name of your {{% product-name %}} database + - **`Token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permission on the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 2. Defines a deferred function to close the client after execution. @@ -721,7 +721,7 @@ _This tutorial assumes you installed Node.js and npm, and created an `influxdb_j with InfluxDB credentials. - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL - - **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with read permission on the database you want to query. + - **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permission on the database you want to query. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 3. Defines a string variable (`sql`) for the SQL query. @@ -846,7 +846,7 @@ _This tutorial assumes you installed Node.js and npm, and created an `influxdb_j - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL. - **`database`**: the name of the {{% product-name %}} database to query - - **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with read permission on the specified database. + - **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permission on the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 2. Defines a string variable for the SQL query. 3. Calls the `InfluxDBClient.Query()` method to send the query request with the SQL string. @@ -974,7 +974,7 @@ _This tutorial assumes using Maven version 3.9, Java version >= 15, and an `infl - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL - **`database`**: the name of the {{% product-name %}} database to write to - - **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with read permission on the specified database. + - **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permission on the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 2. Defines a string variable (`sql`) for the SQL query. 3. Defines a Markdown table format layout for headings and data rows. diff --git a/content/influxdb/clustered/get-started/write.md b/content/influxdb/clustered/get-started/write.md index 8e5e98296..e57658fb9 100644 --- a/content/influxdb/clustered/get-started/write.md +++ b/content/influxdb/clustered/get-started/write.md @@ -431,7 +431,9 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200 Replace the following: -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with + sufficient permissions to the specified database If successful, the output is an HTTP `204 No Content` status code. @@ -513,7 +515,9 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200 Replace the following: -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with + sufficient permissions to the specified database If successful, the output is an HTTP `204 No Content` status code. @@ -639,7 +643,8 @@ dependencies to your current project. - **`host`**: {{% product-name omit=" Clustered" %}} cluster hostname (URL without protocol or trailing slash) - **`org`**: an empty or arbitrary string (InfluxDB ignores this parameter) - - **`token`**: a [token](/influxdb/clustered/admin/tokens/) with write access to the specified database. + - **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) + with write access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ - **`database`**: the name of the {{% product-name %}} database to write to @@ -795,7 +800,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu 1. To instantiate the client, calls the `influxdb3.New(influxdb3.ClientConfig)` function and passes the following: - **`Host`**: the {{% product-name omit=" Clustered" %}} cluster URL - **`Database`**: The name of your {{% product-name %}} database - - **`Token`**: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database. + - **`Token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) + with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ - **`WriteOptions`**: `influxdb3.WriteOptions` options for writing to InfluxDB. @@ -958,7 +964,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu with InfluxDB credentials. - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL - - **`token`**: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database. + - **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) + with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 3. Defines a list of line protocol strings where each string represents a data record. @@ -1123,7 +1130,8 @@ InfluxDB v3 [influxdb3-go client library package](https://github.com/InfluxCommu - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL - **`database`**: the name of the {{% product-name %}} database to write to - - **`token`**: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database. + - **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) + with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ _Instantiating the client with the `using` statement ensures that the client is disposed of when it's no longer needed._ @@ -1321,7 +1329,8 @@ _The tutorial assumes using Maven version 3.9 and Java version >= 15._ - **`host`**: your {{% product-name omit=" Clustered" %}} cluster URL - **`database`**: the name of the {{% product-name %}} database to write to - - **`token`**: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database. + - **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) + with _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 2. Defines a list of line protocol strings where each string represents a data record. diff --git a/content/influxdb/clustered/guides/api-compatibility/v1/_index.md b/content/influxdb/clustered/guides/api-compatibility/v1/_index.md index 0ff7ec19b..7b5398a96 100644 --- a/content/influxdb/clustered/guides/api-compatibility/v1/_index.md +++ b/content/influxdb/clustered/guides/api-compatibility/v1/_index.md @@ -62,7 +62,7 @@ Learn how to authenticate requests, adjust request parameters for existing v1 wo ## Authenticate API requests {{% product-name %}} requires each API request to be authenticated with a -[database token](/influxdb/clustered/admin/tokens/). +[database token](/influxdb/clustered/admin/tokens/#database-tokens). With the InfluxDB v1 API, you can use database tokens in InfluxDB 1.x username and password schemes, in the InfluxDB v2 `Authorization: Token` scheme, or in the OAuth `Authorization: Bearer` scheme. @@ -72,8 +72,8 @@ schemes, in the InfluxDB v2 `Authorization: Token` scheme, or in the OAuth `Auth ### Authenticate with a username and password scheme With the InfluxDB v1 API, you can use the InfluxDB 1.x convention of -username and password to authenticate database reads and writes by passing a [database token](/influxdb/clustered/admin/tokens/) as the `password` credential. -When authenticating requests to the v1 API `/write` and `/query` endpoints, {{% product-name %}} checks that the `password` (`p`) value is an authorized [database token](/influxdb/clustered/admin/tokens/). +username and password to authenticate database reads and writes by passing a [database token](/influxdb/clustered/admin/tokens/#database-tokens) as the `password` credential. +When authenticating requests to the v1 API `/write` and `/query` endpoints, {{% product-name %}} checks that the `password` (`p`) value is an authorized [database token](/influxdb/clustered/admin/tokens/#database-tokens). {{% product-name %}} ignores the `username` (`u`) parameter in the request. Use one of the following authentication schemes with clients that support Basic authentication or query parameters (that don't support [token authentication](#authenticate-with-a-token)): @@ -84,7 +84,7 @@ Use one of the following authentication schemes with clients that support Basic #### Basic authentication Use the `Authorization` header with the `Basic` scheme to authenticate v1 API `/write` and `/query` requests. -When authenticating requests, {{% product-name %}} checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/clustered/admin/tokens/). +When authenticating requests, {{% product-name %}} checks that the `password` part of the decoded credential is an authorized [database token](/influxdb/clustered/admin/tokens/#database-tokens). {{% product-name %}} ignores the `username` part of the decoded credential. ##### Syntax @@ -99,7 +99,7 @@ Encode the `[USERNAME]:DATABASE_TOKEN` credential using base64 encoding, and the ##### Example -The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/clustered/admin/tokens/): +The following example shows how to use cURL with the `Basic` authentication scheme and a [database token](/influxdb/clustered/admin/tokens/#database-tokens): {{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} ```sh @@ -113,7 +113,7 @@ curl --get "https://{{< influxdb/host >}}/query" \ Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database #### Query string authentication @@ -129,7 +129,7 @@ https://{{< influxdb/host >}}/write/?[u=any]&p=DATABASE_TOKEN ##### Example -The following example shows how to use cURL with query string authentication and [database token](/influxdb/clustered/admin/tokens/). +The following example shows how to use cURL with query string authentication and [database token](/influxdb/clustered/admin/tokens/#database-tokens). {{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} ```sh @@ -143,11 +143,11 @@ curl --get "https://{{< influxdb/host >}}/query" \ Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database ### Authenticate with a token scheme -Use the `Authorization: Bearer` or the `Authorization: Token` scheme to pass a [database token](/influxdb/clustered/admin/tokens/) for authenticating +Use the `Authorization: Bearer` or the `Authorization: Token` scheme to pass a [database token](/influxdb/clustered/admin/tokens/#database-tokens) for authenticating v1 API `/write` and `/query` requests. `Bearer` and `Token` are equivalent in {{% product-name %}}. @@ -196,7 +196,7 @@ curl -i "https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s" \ Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database ## Responses @@ -299,7 +299,7 @@ Parameter | Ignored | Value `database` | Honored | Database name `retention_policy` | Honored, but discouraged | [Duration](/influxdb/clustered/reference/glossary/#duration) `username` | Ignored | String or empty -`password` | Honored | [Database token](/influxdb/clustered/admin/tokens/) with permission to write to the database +`password` | Honored | [database token](/influxdb/clustered/admin/tokens/#database-tokens) with permission to write to the database `content_encoding` | Honored | `gzip` (compressed data) or `identity` (uncompressed) `skip_database_creation` | Ignored | N/A (see how to [create a database](/influxdb/clustered/admin/databases/create/)) @@ -321,7 +321,7 @@ To configure the v1.x output plugin for writing to {{% product-name %}}, add the Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database ##### Other Telegraf configuration options @@ -337,7 +337,7 @@ Include the following in your request: - A `db` query string parameter with the name of the database to write to. - A request body that contains a string of data in [line protocol](/influxdb/clustered/reference/syntax/line-protocol/) syntax. -- A [database token](/influxdb/clustered/admin/tokens/) in one of the following authentication schemes: [Basic authentication](#basic-authentication), [query string authentication](#query-string-authentication), or [token authentication](#authenticate-with-a-token). +- A [database token](/influxdb/clustered/admin/tokens/#database-tokens) in one of the following authentication schemes: [Basic authentication](#basic-authentication), [query string authentication](#query-string-authentication), or [token authentication](#authenticate-with-a-token). - Optional [parameters](#v1-api-write-parameters). The following example shows how to use the **cURL** command line tool and the {{% product-name %}} v1 API to write line protocol data to a database: @@ -356,7 +356,7 @@ curl -i 'https://{{< influxdb/host >}}/write?db=DATABASE_NAME&precision=s' \ Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database ##### v1 CLI (not supported) @@ -426,7 +426,7 @@ client = InfluxDBClient( Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database ## Query data diff --git a/content/influxdb/clustered/guides/api-compatibility/v2/_index.md b/content/influxdb/clustered/guides/api-compatibility/v2/_index.md index ef310ec96..015721020 100644 --- a/content/influxdb/clustered/guides/api-compatibility/v2/_index.md +++ b/content/influxdb/clustered/guides/api-compatibility/v2/_index.md @@ -50,11 +50,11 @@ For help finding the best workflow for your situation, [contact Support](mailto: ## Authenticate API requests -InfluxDB API endpoints require each request to be authenticated with a [database token](/influxdb/clustered/admin/tokens/). +InfluxDB API endpoints require each request to be authenticated with a [database token](/influxdb/clustered/admin/tokens/#database-tokens). ### Authenticate with a token -Use the `Authorization: Bearer` scheme or the `Authorization: Token` scheme to pass a [database token](/influxdb/clustered/admin/tokens/) that has the necessary permissions for the operation. +Use the `Authorization: Bearer` scheme or the `Authorization: Token` scheme to pass a [database token](/influxdb/clustered/admin/tokens/#database-tokens) that has the necessary permissions for the operation. `Bearer` and `Token` are equivalent in InfluxDB Clustered. The `Token` scheme is used in the InfluxDB 2.x API. @@ -98,7 +98,7 @@ curl --post "https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&pre Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database ## Responses diff --git a/content/influxdb/clustered/guides/migrate-data/migrate-1x-to-clustered.md b/content/influxdb/clustered/guides/migrate-data/migrate-1x-to-clustered.md index dfc5d2a19..71187a64f 100644 --- a/content/influxdb/clustered/guides/migrate-data/migrate-1x-to-clustered.md +++ b/content/influxdb/clustered/guides/migrate-data/migrate-1x-to-clustered.md @@ -334,8 +334,8 @@ You would create the following InfluxDB {{< current-version >}} databases: 3. **Create a database token for writing to your InfluxDB Clustered database.** - Use the [`influxctl token create` command](/influxdb/clustered/admin/tokens/create/) - to [create a database token](/influxdb/clustered/admin/tokens/create/) with + Use the [`influxctl token create` command](/influxdb/clustered/reference/cli/influxctl/token/create/) + to [create a database token](/influxdb/clustered/admin/tokens/database/create/) with _write_ permission to your database. Provide the following: diff --git a/content/influxdb/clustered/guides/migrate-data/migrate-tsm-to-clustered.md b/content/influxdb/clustered/guides/migrate-data/migrate-tsm-to-clustered.md index f5ddab023..72e0191ed 100644 --- a/content/influxdb/clustered/guides/migrate-data/migrate-tsm-to-clustered.md +++ b/content/influxdb/clustered/guides/migrate-data/migrate-tsm-to-clustered.md @@ -166,7 +166,7 @@ to complete the migration. 1. [Create a database](/influxdb/clustered/admin/databases/create/) **to migrate data to**. - 2. [Create a token](/influxdb/clustered/admin/tokens/create/) + 2. [Create a database token](/influxdb/clustered/admin/tokens/database/create/) with **write access** to the database you want to migrate to. 2. **In the InfluxDB Cloud (TSM) organization you're migrating data _from_**: diff --git a/content/influxdb/clustered/process-data/downsample.md b/content/influxdb/clustered/process-data/downsample.md index e1724d4a6..cf0d723f4 100644 --- a/content/influxdb/clustered/process-data/downsample.md +++ b/content/influxdb/clustered/process-data/downsample.md @@ -70,10 +70,10 @@ instantiate two InfluxDB clients: Provide the following credentials for each client: -- **host**: {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_ -- **token**: [InfluxDB database token](/influxdb/clustered/admin/tokens/) +- **host**: your {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_ +- **token**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read and write permissions on the databases you want to query and write to. -- **database**: InfluxDB database name +- **database**: your [database](/influxdb/clustered/admin/databases/) name {{% code-placeholders "((RAW_|DOWNSAMPLED_)*DATABASE)_(NAME|TOKEN)" %}} ```py diff --git a/content/influxdb/clustered/process-data/send-alerts.md b/content/influxdb/clustered/process-data/send-alerts.md index beaa17388..dc74b9136 100644 --- a/content/influxdb/clustered/process-data/send-alerts.md +++ b/content/influxdb/clustered/process-data/send-alerts.md @@ -65,11 +65,11 @@ Use the `InfluxDBClient3` function in the `influxdb_client_3` module to instantiate an InfluxDB client. Provide the following credentials: -- **host**: {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_ -- **org**: InfluxDB organization name -- **token**: [InfluxDB database token](/influxdb/clustered/admin/tokens/) +- **host**: your {{< product-name omit="Clustered" >}} cluster URL _(without the protocol)_ +- **org**: your InfluxDB organization name +- **token**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permissions on the database you want to query -- **database**: InfluxDB database name +- **database**: your [database](/influxdb/clustered/admin/databases/) name {{% code-placeholders "DATABASE_(NAME|TOKEN)" %}} ```py diff --git a/content/influxdb/clustered/process-data/tools/pandas.md b/content/influxdb/clustered/process-data/tools/pandas.md index 2676f7b71..671ffbb69 100644 --- a/content/influxdb/clustered/process-data/tools/pandas.md +++ b/content/influxdb/clustered/process-data/tools/pandas.md @@ -107,8 +107,10 @@ print(dataframe) 2. Replace the following configuration values: - - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [token](/influxdb/clustered/admin/tokens/) with _read_ permission on the specified database + - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to query + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) + with _read_ permission on the specified database 3. In your terminal, use the Python interpreter to run the file: @@ -213,8 +215,10 @@ print(dataframe.to_markdown()) Replace the following configuration values: -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query. -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/clustered/admin/tokens/) with read permission on the specified database. +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) + with read permission on the specified database ### Downsample time series diff --git a/content/influxdb/clustered/process-data/tools/pyarrow.md b/content/influxdb/clustered/process-data/tools/pyarrow.md index 6cb0bcae4..5d03c410c 100644 --- a/content/influxdb/clustered/process-data/tools/pyarrow.md +++ b/content/influxdb/clustered/process-data/tools/pyarrow.md @@ -95,8 +95,10 @@ print(querySQL()) 2. Replace the following configuration values: - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/clustered/admin/tokens/) with read permissions on the databases you want to query. - - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) + with read permissions on the databases you want to query + - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to query 3. In your terminal, use the Python interpreter to run the file: @@ -153,8 +155,11 @@ print(table.group_by('room').aggregate([('temp', 'mean')])) Replace the following: -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: An InfluxDB [token](/influxdb/clustered/admin/tokens/) with read permissions on the databases you want to query. -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the InfluxDB [database](/influxdb/clustered/admin/tokens/) to query. +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) + with read permissions on the databases you want to query +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: + the name of the [database](/influxdb/clustered/admin/databases/) to query {{< expand-wrapper >}} {{% expand "View example results" %}} diff --git a/content/influxdb/clustered/process-data/visualize/chronograf.md b/content/influxdb/clustered/process-data/visualize/chronograf.md index 2ffb6154e..c8d11ce94 100644 --- a/content/influxdb/clustered/process-data/visualize/chronograf.md +++ b/content/influxdb/clustered/process-data/visualize/chronograf.md @@ -38,7 +38,7 @@ If you haven't already, [download and install Chronograf](/chronograf/v1/introdu - **Connection Name:** Name to uniquely identify this connection configuration - **Username:** Arbitrary string _(ignored, but cannot be empty)_ - - **Password:** InfluxDB [database token](/influxdb/clustered/admin/tokens/) + - **Password:** InfluxDB [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permissions on the database you want to query - **Telegraf Database Name:** InfluxDB [database](/influxdb/clustered/admin/databases/) Chronograf uses to populate parts of the application, including the Host List page (default is `telegraf`) diff --git a/content/influxdb/clustered/process-data/visualize/grafana.md b/content/influxdb/clustered/process-data/visualize/grafana.md index 29f99884b..9fefc3762 100644 --- a/content/influxdb/clustered/process-data/visualize/grafana.md +++ b/content/influxdb/clustered/process-data/visualize/grafana.md @@ -91,8 +91,8 @@ When creating an InfluxDB data source that uses SQL to query data: 2. Under **InfluxDB Details**: - - **Database**: Provide a default database name to query. - - **Token**: Provide an [API token](/influxdb/clustered/admin/tokens/) + - **Database**: Provide a default [database](/influxdb/clustered/admin/databases/) name to query. + - **Token**: Provide a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read access to the databases you want to query. 3. Click **Save & test**. @@ -117,10 +117,10 @@ When creating an InfluxDB data source that uses InfluxQL to query data: 2. Under **InfluxDB Details**: - - **Database**: Provide a default database name to query. + - **Database**: Provide a default [database](/influxdb/clustered/admin/databases/) name to query. - **User**: Provide an arbitrary string. _This credential is ignored when querying {{% product-name %}}, but it cannot be empty._ - - **Password**: Provide an [API token](/influxdb/clustered/admin/tokens/) + - **Password**: Provide a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read access to the databases you want to query. - **HTTP Method**: Choose one of the available HTTP request methods to use when querying data: diff --git a/content/influxdb/clustered/process-data/visualize/tableau.md b/content/influxdb/clustered/process-data/visualize/tableau.md index 7f4a3dbfa..b046499df 100644 --- a/content/influxdb/clustered/process-data/visualize/tableau.md +++ b/content/influxdb/clustered/process-data/visualize/tableau.md @@ -85,9 +85,9 @@ Setting `useSystemTrustStore=false` is only necessary on macOS and doesn't actua _See an [example connection URL](#example-connection-url)._ - - **Dialect**: PostreSQL + - **Dialect**: PostgreSQL - **Username**: _Leave empty_ - - **Password**: [Database token](/influxdb/clustered/admin/tokens/) + - **Password**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read access to the specified database - **Properties File**: _Leave empty_ diff --git a/content/influxdb/clustered/query-data/execute-queries/client-libraries/go.md b/content/influxdb/clustered/query-data/execute-queries/client-libraries/go.md index 0cc25ddd8..28d92c431 100644 --- a/content/influxdb/clustered/query-data/execute-queries/client-libraries/go.md +++ b/content/influxdb/clustered/query-data/execute-queries/client-libraries/go.md @@ -110,8 +110,8 @@ In your `influxdb_go_client` module directory, create a file named `query.go` an Replace the following configuration values in the sample code: -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [database token](/influxdb/clustered/admin/tokens/) with _read_ permission on the specified database +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to query +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ permission on the specified database {{% tabs-wrapper %}} {{% tabs %}} diff --git a/content/influxdb/clustered/query-data/execute-queries/client-libraries/python.md b/content/influxdb/clustered/query-data/execute-queries/client-libraries/python.md index 150131846..18f6d67ad 100644 --- a/content/influxdb/clustered/query-data/execute-queries/client-libraries/python.md +++ b/content/influxdb/clustered/query-data/execute-queries/client-libraries/python.md @@ -61,7 +61,7 @@ Execute queries and retrieve data over the Flight+gRPC protocol, and then proces This guide assumes the following prerequisites: - an {{% product-name %}} [database](/influxdb/clustered/admin/databases/) with data to query -- a [database token](/influxdb/clustered/admin/tokens/) with _read_ access to the database +- a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ access to the database To learn how to set up InfluxDB and write data, see the [Setup instructions](/influxdb/clustered/get-started/setup/) in the Get Started tutorial. @@ -284,7 +284,7 @@ For more information, see [`influxdb_client_3` query exceptions](/influxdb/clust Replace the following configuration values: - **`database`**: the name of the [{{% product-name %}} database](/influxdb/clustered/admin/databases/) to query -- **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with _read_ access to the specified database. +- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ ### Execute a query @@ -402,7 +402,7 @@ print(table.group_by('room').aggregate([('temp', 'mean')])) Replace the following configuration values: - **`database`**: the name of the [{{% product-name %}} database](/influxdb/clustered/admin/databases/) to query -- **`token`**: a [database token](/influxdb/clustered/admin/tokens/) with _read_ access to the specified database. +- **`token`**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ Next, learn how to use Python tools to work with time series data: diff --git a/content/influxdb/clustered/query-data/execute-queries/influxctl-cli.md b/content/influxdb/clustered/query-data/execute-queries/influxctl-cli.md index dcf43d8f9..785e2f0e7 100644 --- a/content/influxdb/clustered/query-data/execute-queries/influxctl-cli.md +++ b/content/influxdb/clustered/query-data/execute-queries/influxctl-cli.md @@ -32,8 +32,8 @@ The `influxctl query` command only supports SQL queries; not InfluxQL. Provide the following with your command: -- **Database token**: [Database token](/influxdb/clustered/admin/tokens/) - with read permissions on the queried database. Uses the `token` setting from +- **Database token**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) + with read permissions on the specified database. Uses the `token` setting from the [`influxctl` connection profile](/influxdb/clustered/reference/cli/influxctl/#configure-connection-profiles) or the `--token` command flag. - **Database name**: Name of the database to query. Uses the `database` setting diff --git a/content/influxdb/clustered/query-data/execute-queries/influxdb-v1-api.md b/content/influxdb/clustered/query-data/execute-queries/influxdb-v1-api.md index f13d4c338..90309ea10 100644 --- a/content/influxdb/clustered/query-data/execute-queries/influxdb-v1-api.md +++ b/content/influxdb/clustered/query-data/execute-queries/influxdb-v1-api.md @@ -67,7 +67,7 @@ Replace the following configuration values: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to query. - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/clustered/admin/tokens/) with _read_ access to the specified database. + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ access to the specified database. {{% note %}} #### Authenticate with username and password @@ -76,7 +76,7 @@ If using basic authentication or query string authentication (username and passw to interact with the v1 HTTP query API, provide the following credentials: - **username**: an arbitrary string _({{< product-name >}} ignores the username)_ -- **password**: a [database token](/influxdb/clustered/admin/tokens/) with _read_ access to the specified database. +- **password**: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ access to the specified database. {{< code-tabs-wrapper >}} {{% code-tabs %}} diff --git a/content/influxdb/clustered/query-data/troubleshoot-and-optimize/analyze-query-plan.md b/content/influxdb/clustered/query-data/troubleshoot-and-optimize/analyze-query-plan.md index dc88ac07f..31739769c 100644 --- a/content/influxdb/clustered/query-data/troubleshoot-and-optimize/analyze-query-plan.md +++ b/content/influxdb/clustered/query-data/troubleshoot-and-optimize/analyze-query-plan.md @@ -92,7 +92,9 @@ assert 'logical_plan' in df.plan_type.values, "Expect logical_plan" Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with + sufficient permissions to the specified database {{% /expand %}} {{% /expand-wrapper %}} diff --git a/content/influxdb/clustered/reference/cli/influxctl/management/_index.md b/content/influxdb/clustered/reference/cli/influxctl/management/_index.md index 1533b3a36..24a59afb7 100644 --- a/content/influxdb/clustered/reference/cli/influxctl/management/_index.md +++ b/content/influxdb/clustered/reference/cli/influxctl/management/_index.md @@ -7,6 +7,8 @@ menu: influxdb_clustered: parent: influxctl weight: 201 +related: + - /influxdb/clustered/admin/tokens/management/ --- The `influxctl management` command and its subcommands manage management tokens diff --git a/content/influxdb/clustered/reference/cli/influxctl/management/create.md b/content/influxdb/clustered/reference/cli/influxctl/management/create.md index 19fd477ff..c9c2a2248 100644 --- a/content/influxdb/clustered/reference/cli/influxctl/management/create.md +++ b/content/influxdb/clustered/reference/cli/influxctl/management/create.md @@ -7,6 +7,8 @@ menu: influxdb_clustered: parent: influxctl management weight: 301 +related: + - /influxdb/clustered/admin/tokens/management/create/ --- The `influxctl management create` command creates a management token to be used diff --git a/content/influxdb/clustered/reference/cli/influxctl/management/list.md b/content/influxdb/clustered/reference/cli/influxctl/management/list.md index 346698e6b..8c809f458 100644 --- a/content/influxdb/clustered/reference/cli/influxctl/management/list.md +++ b/content/influxdb/clustered/reference/cli/influxctl/management/list.md @@ -7,6 +7,8 @@ menu: influxdb_clustered: parent: influxctl management weight: 301 +related: + - /influxdb/clustered/admin/tokens/management/list/ --- The `influxctl management list` command lists all management tokens used to diff --git a/content/influxdb/clustered/reference/cli/influxctl/management/revoke.md b/content/influxdb/clustered/reference/cli/influxctl/management/revoke.md index 15d209ca8..5d27a9709 100644 --- a/content/influxdb/clustered/reference/cli/influxctl/management/revoke.md +++ b/content/influxdb/clustered/reference/cli/influxctl/management/revoke.md @@ -7,6 +7,8 @@ menu: influxdb_clustered: parent: influxctl management weight: 301 +related: + - /influxdb/clustered/admin/tokens/management/revoke/ --- The `influxctl management revoke` command revokes management token access diff --git a/content/influxdb/clustered/reference/client-libraries/flight/python-flight.md b/content/influxdb/clustered/reference/client-libraries/flight/python-flight.md index a06aea859..3b8de4561 100644 --- a/content/influxdb/clustered/reference/client-libraries/flight/python-flight.md +++ b/content/influxdb/clustered/reference/client-libraries/flight/python-flight.md @@ -151,6 +151,6 @@ print(data_frame.to_markdown()) Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/) with sufficient permissions to the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database {{% /code-tabs-wrapper %}} diff --git a/content/influxdb/clustered/reference/client-libraries/flight/python-flightsql-dbapi.md b/content/influxdb/clustered/reference/client-libraries/flight/python-flightsql-dbapi.md index 1fb19d73d..f66cca097 100644 --- a/content/influxdb/clustered/reference/client-libraries/flight/python-flightsql-dbapi.md +++ b/content/influxdb/clustered/reference/client-libraries/flight/python-flightsql-dbapi.md @@ -94,7 +94,7 @@ client = FlightSQLClient(host='{{< influxdb/host >}}', Replace the following: -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/clustered/admin/tokens/) with read permissions on the databases you want to query +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permissions on the database you want to query - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/clustered/admin/databases/) ### Instance methods diff --git a/content/influxdb/clustered/reference/client-libraries/v2/go.md b/content/influxdb/clustered/reference/client-libraries/v2/go.md index 11be0a6b1..5c5a1e5d7 100644 --- a/content/influxdb/clustered/reference/client-libraries/v2/go.md +++ b/content/influxdb/clustered/reference/client-libraries/v2/go.md @@ -57,7 +57,7 @@ Use the Go library to write and query data from InfluxDB. ) ``` -2. Define variables for your InfluxDB [database](/influxdb/clustered/admin/databases/) (bucket), organization (required, but ignored), and [token](/influxdb/clustered/admin/tokens/). +2. Define variables for your InfluxDB [database](/influxdb/clustered/admin/databases/) (bucket), organization (required, but ignored), and [database token](/influxdb/clustered/admin/tokens/#database-tokens). ```go bucket := "DATABASE_NAME" diff --git a/content/influxdb/clustered/reference/client-libraries/v2/javascript/nodejs/install.md b/content/influxdb/clustered/reference/client-libraries/v2/javascript/nodejs/install.md index 417098b34..a50e10d4e 100644 --- a/content/influxdb/clustered/reference/client-libraries/v2/javascript/nodejs/install.md +++ b/content/influxdb/clustered/reference/client-libraries/v2/javascript/nodejs/install.md @@ -82,7 +82,7 @@ It only works with InfluxDB v2 management APIs. The client examples include an [`env`](https://github.com/influxdata/influxdb-client-js/blob/master/examples/env.js) module for accessing your InfluxDB properties from environment variables or from `env.js`. The examples use these properties to interact with the InfluxDB API. -Set environment variables or update `env.js` with your InfluxDB [database](/influxdb/clustered/admin/databases/), organization (required, but ignored), [token](/influxdb/clustered/admin/tokens/), and cluster URL. +Set environment variables or update `env.js` with your InfluxDB [database](/influxdb/clustered/admin/databases/), organization (required, but ignored), [database token](/influxdb/clustered/admin/tokens/#database-tokens), and cluster URL. ```sh export INFLUX_URL=https://{{< influxdb/host >}} diff --git a/content/influxdb/clustered/reference/client-libraries/v2/python.md b/content/influxdb/clustered/reference/client-libraries/v2/python.md index d18470816..6f22393ba 100644 --- a/content/influxdb/clustered/reference/client-libraries/v2/python.md +++ b/content/influxdb/clustered/reference/client-libraries/v2/python.md @@ -47,8 +47,8 @@ You'll need the following prerequisites: ``` https://{{< influxdb/host >}} ``` -3. Name of the [database](/influxdb/clustered/admin/databases/) to write to. -4. InfluxDB [database token](/influxdb/clustered/admin/tokens/) with permission to write to the database. +3. The name of the [database](/influxdb/clustered/admin/databases/) to write to. +4. A [database token](/influxdb/clustered/admin/tokens/#database-tokens) with permission to write to the database. _For security reasons, we recommend setting an environment variable to store your token and avoid exposing the raw token value in your script._ ## Write data to InfluxDB with Python @@ -64,7 +64,7 @@ Follow the steps to write [line protocol](/influxdb/clustered/reference/syntax/l import os ``` -3. Define variables for your [database name](/influxdb/clustered/admin/databases/), organization (required, but ignored), and [token](/influxdb/clustered/admin/tokens/). +3. Define variables for your [database name](/influxdb/clustered/admin/databases/), organization (required, but ignored), and [database token](/influxdb/clustered/admin/tokens/#database-tokens). ```python database = "DATABASE_NAME" diff --git a/content/influxdb/clustered/reference/client-libraries/v3/go.md b/content/influxdb/clustered/reference/client-libraries/v3/go.md index 7d9be2744..88f37e030 100644 --- a/content/influxdb/clustered/reference/client-libraries/v3/go.md +++ b/content/influxdb/clustered/reference/client-libraries/v3/go.md @@ -101,8 +101,8 @@ func main() { Replace the following configuration values: -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb/clustered/admin/databases/) to query -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an InfluxDB [database token](/influxdb/clustered/admin/tokens/) with _read_ permission on the specified database +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to query +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _read_ permission on the specified database ## Class influxdb3.Client diff --git a/content/influxdb/clustered/reference/client-libraries/v3/python.md b/content/influxdb/clustered/reference/client-libraries/v3/python.md index fda1103a8..6a08488c5 100644 --- a/content/influxdb/clustered/reference/client-libraries/v3/python.md +++ b/content/influxdb/clustered/reference/client-libraries/v3/python.md @@ -222,7 +222,7 @@ client = InfluxDBClient3(token="DATABASE_TOKEN", Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/clustered/admin/databases/) -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/clustered/admin/tokens/) with read permissions on the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permissions on the specified database ##### Initialize a client for batch writing @@ -270,7 +270,7 @@ invokes the callback function, if specified, for the response status (success, e Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb/clustered/admin/databases/) -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an {{% product-name %}} [database token](/influxdb/clustered/admin/tokens/) with read permissions on the specified database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with read permissions on the specified database ### InfluxDBClient3 instance methods diff --git a/content/influxdb/clustered/reference/sample-data.md b/content/influxdb/clustered/reference/sample-data.md index 4d1c52008..a9b1b49f3 100644 --- a/content/influxdb/clustered/reference/sample-data.md +++ b/content/influxdb/clustered/reference/sample-data.md @@ -154,9 +154,9 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200 Replace the following in the sample script: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: - your InfluxDB Clustered database + your [database](/influxdb/clustered/admin/databases/) - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/clustered/admin/tokens/) + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _write_ permission to the database {{% /expand %}} @@ -261,9 +261,9 @@ home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monox Replace the following in the sample script: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: - your InfluxDB Clustered database + your [database](/influxdb/clustered/admin/databases/) - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/clustered/admin/tokens/) + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _write_ permission to the database {{% /expand %}} @@ -340,9 +340,9 @@ curl --request POST \ Replace the following in the sample script: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: - your InfluxDB Clustered database + your [database](/influxdb/clustered/admin/databases/) - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/clustered/admin/tokens/) + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database {{% /expand %}} @@ -423,9 +423,9 @@ curl --request POST \ Replace the following in the sample script: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: - your InfluxDB Clustered database + your [database](/influxdb/clustered/admin/databases/) - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/clustered/admin/tokens/) + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database {{% /expand %}} @@ -494,9 +494,9 @@ curl --request POST \ Replace the following in the sample script: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: - your InfluxDB Clustered database + your [database](/influxdb/clustered/admin/databases/) - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: - a [database token](/influxdb/clustered/admin/tokens/) + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with sufficient permissions to the specified database {{% /expand %}} diff --git a/content/influxdb/clustered/write-data/best-practices/optimize-writes.md b/content/influxdb/clustered/write-data/best-practices/optimize-writes.md index 5d3af573e..841db912c 100644 --- a/content/influxdb/clustered/write-data/best-practices/optimize-writes.md +++ b/content/influxdb/clustered/write-data/best-practices/optimize-writes.md @@ -136,7 +136,9 @@ curl --request POST "https://{{< influxdb/host >}}/api/v2/write?org=ignored&buck Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to -- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database. +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with + _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ {{% /tab-content %}} @@ -201,7 +203,9 @@ EOF Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with + _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 2. To test the input and processor, enter the following command: @@ -297,7 +301,9 @@ curl -s "https://{{< influxdb/host >}}/api/v2/write?bucket=DATABASE_NAME&precisi Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with + _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 3. To test the input and processor, enter the following command: @@ -385,7 +391,9 @@ The following example creates sample data for two series (the combination of mea Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with + _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 3. To test the input and aggregator, enter the following command: @@ -474,7 +482,9 @@ The following example shows how to use Telegraf to remove points that repeat fie Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with + _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 3. To test the input and processor, enter the following command: @@ -699,7 +709,9 @@ The Go `multiplier.go` sample code does the following: Replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb/clustered/admin/databases/) to write data to - - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a [token](/influxdb/clustered/admin/tokens/) with _write_ access to the specified database. + - {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb/clustered/admin/tokens/#database-tokens) with + _write_ access to the specified database. _Store this in a secret store or environment variable to avoid exposing the raw token string._ 5. To test the input and processor, enter the following command: diff --git a/content/influxdb/clustered/write-data/line protocol/client-libraries.md b/content/influxdb/clustered/write-data/line protocol/client-libraries.md index 8bafe235f..797481813 100644 --- a/content/influxdb/clustered/write-data/line protocol/client-libraries.md +++ b/content/influxdb/clustered/write-data/line protocol/client-libraries.md @@ -52,7 +52,7 @@ After setting up InfluxDB and your project, you should have the following: - {{< product-name >}} credentials: - [Database](/influxdb/clustered/admin/databases/) - - [Token](/influxdb/clustered/admin/tokens/) + - [Database token](/influxdb/clustered/admin/tokens/#database-tokens) - Cluster hostname - A directory for your project. diff --git a/content/influxdb/clustered/write-data/line protocol/influxctl-cli.md b/content/influxdb/clustered/write-data/line protocol/influxctl-cli.md index b314b1887..7d251882e 100644 --- a/content/influxdb/clustered/write-data/line protocol/influxctl-cli.md +++ b/content/influxdb/clustered/write-data/line protocol/influxctl-cli.md @@ -66,10 +66,10 @@ to write the [home sensor sample data](#home-sensor-data-line-protocol) to your {{< product-name omit=" Clustered" >}} cluster. Provide the following: -- Database name using the `--database` flag -- [Database token](/influxdb/clustered/admin/tokens/) (with write permissions +- The [database](/influxdb/clustered/admin/databases/) name using the `--database` flag +- A [database token](/influxdb/clustered/admin/tokens/#database-tokens) (with write permissions on the target database) using the `--token` flag -- Timestamp precision as seconds (`s`) using the `--precision` flag +- The timestamp precision as seconds (`s`) using the `--precision` flag - [Line protocol](#construct-line-protocol). Pass the line protocol in one of the following ways: diff --git a/content/influxdb/clustered/write-data/use-telegraf/configure/_index.md b/content/influxdb/clustered/write-data/use-telegraf/configure/_index.md index 12fd9ca3d..f1693efbb 100644 --- a/content/influxdb/clustered/write-data/use-telegraf/configure/_index.md +++ b/content/influxdb/clustered/write-data/use-telegraf/configure/_index.md @@ -100,9 +100,9 @@ To write to {{% product-name %}}, include your {{% product-name omit=" Clustered ##### token -Your {{% product-name %}} [database token](/influxdb/clustered/admin/tokens/) with _write_ permission to the database. +Your {{% product-name %}} [database token](/influxdb/clustered/admin/tokens/#database-tokens) with _write_ permission to the database. -In the examples, **`INFLUX_TOKEN`** is an environment variable assigned to a [database token](/influxdb/clustered/admin/tokens/) that has _write_ permission to the database. +In the examples, **`INFLUX_TOKEN`** is an environment variable assigned to a [database token](/influxdb/clustered/admin/tokens/#database-tokens) that has _write_ permission to the database. ##### organization diff --git a/layouts/shortcodes/children.html b/layouts/shortcodes/children.html index 825994e07..759fe9e31 100644 --- a/layouts/shortcodes/children.html +++ b/layouts/shortcodes/children.html @@ -119,7 +119,7 @@ {{ else if (eq $type "anchored-list") }} -
    +
      {{ range $pages.ByWeight }} {{ $title := cond ( isset .Params "list_title" ) .Params.list_title .Title }}
    • {{ $title }}