Influx cli 2.5 (#4585)

pull/4605/head^2
kelseiv 2022-11-02 10:41:10 -07:00 committed by GitHub
parent 56033d213f
commit adbd8edb07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 84 deletions

View File

@ -12,7 +12,7 @@ updated_in: CLI 2.5.0
The `influx auth create` command creates an API token in InfluxDB.
{{% warn %}}
*Issue resolved**: Using InfluxDB 2.4 and influx CLI 2.4 prevented you from creating an **all-access** or **operator** token using the `influx auth create` command. This issue is resolved in the influx 2.5 CLI release. Please [upgrade to the latest version](/influxdb/latest/tools/influx-cli/) of the influx cli.
**Issue resolved**: Using InfluxDB 2.4 and influx CLI 2.4 prevented you from creating an **all-access** or **operator** token using the `influx auth create` command. This issue is resolved in the influx 2.5 CLI release. Please [upgrade to the latest version](/influxdb/latest/tools/influx-cli/) of the influx cli.
{{% /warn %}}
## Usage

View File

@ -34,17 +34,18 @@ influx config create [flags]
```
## Flags
| Flag | | Description | Input type | {{< cli/mapped >}} |
| :--- | :-------------------- | :------------------------------------------------------------------------------------------ | :--------: | :-------------------- |
| `-a` | `--active` | Set the specified connection to be the active configuration. | | |
| `-n` | `--config-name` | ({{< req >}}) Name of the new configuration. | string | |
| `-h` | `--help` | Help for the `create` command | | |
| | `--hide-headers` | Hide table headers (default `false`) | | `INFLUX_HIDE_HEADERS` |
| `-u` | `--host-url` | ({{< req >}}) Connection URL for the new configuration. | string | |
| | `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` |
| `-o` | `--org` | Organization name | string | |
| `-t` | `--token` | API token | string | `INFLUX_TOKEN` |
| `-p` | `--username-password` | **(OSS only)** Username (and optionally password) to use for authentication. Include `username:password` to ensure a session is automatically authenticated. Include `username` (without password) to prompt for a password before creating the session. | string | |
| Flag | | Description | Input type | {{< cli/mapped >}} |
| :--- | :-------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------: | :-------------------- |
| `-a` | `--active` | Set the specified connection to be the active configuration. | | |
| `-n` | `--config-name` | ({{< req >}}) Name of the new configuration. | string | |
| `-h` | `--help` | Help for the `create` command | | |
| | `--hide-headers` | Hide table headers (default `false`) | | `INFLUX_HIDE_HEADERS` |
| `-u` | `--host-url` | ({{< req >}}) Connection URL for the new configuration. | string | |
| | `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` |
| `-o` | `--org` | Organization name | string | |
| `-t` | `--token` | API token | string | `INFLUX_TOKEN` |
| `-p` | `--username-password` | **(OSS only)** Username (and optionally password) to use for authentication. Include `username:password` to ensure a session is automatically authenticated. Include `username` (without password) to prompt for a password before creating the session. | string | |
## Examples

View File

@ -21,18 +21,17 @@ influx config set [flags]
`set` , `update`
## Flags
| Flag | | Description | Input type | {{< cli/mapped >}} |
| :--- | :--------------- | :----------------------------------------------------------------------------------------- | :--------: | :-------------------- |
| `-a` | `--active` | Set the specified connection to active | | |
| `-n` | `--config-name` | Name for the InfluxDB connection configuration to set or update | string | |
| `-h` | `--help` | Help for the `set` command | | |
| | `--hide-headers` | Hide table headers (default `false`) | | `INFLUX_HIDE_HEADERS` |
| `-u` | `--host-url` | URL for InfluxDB connection configuration to set or update | string | |
| | `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` |
| `-o` | `--org` | Organization name for the connection configuration | string | |
| `-t` | `--token` | API token | string | `INFLUX_TOKEN` |
| `-p` | `--username-password` | **(OSS only)** Username (and optionally password) to use for authentication.
Include `username:password` to ensure a session is automatically authenticated. Include `username` (without password) to prompt for a password before creating the session. | string | |
| Flag | | Description | Input type | {{< cli/mapped >}} |
| :--- | :-------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------: | :-------------------- |
| `-a` | `--active` | Set the specified connection to active | | |
| `-n` | `--config-name` | Name for the InfluxDB connection configuration to set or update | string | |
| `-h` | `--help` | Help for the `set` command | | |
| | `--hide-headers` | Hide table headers (default `false`) | | `INFLUX_HIDE_HEADERS` |
| `-u` | `--host-url` | URL for InfluxDB connection configuration to set or update | string | |
| | `--json` | Output data as JSON (default `false`) | | `INFLUX_OUTPUT_JSON` |
| `-o` | `--org` | Organization name for the connection configuration | string | |
| `-p` | `--username-password` | **(OSS only)** Username (and optionally password) to use for authentication. Include `username:password` to ensure a session is automatically authenticated. Include `username` (without password) to prompt for a password before creating the session. | string | |
## Examples

View File

@ -8,7 +8,7 @@ menu:
name: influx CLI
---
# v2.5.0 [2022-10-21]
## v2.5.0 [2022-10-21]
### Features
@ -24,6 +24,8 @@ menu:
- Fix to allow [influx auth create](/influxdb/v2.4/reference/cli/influx/auth/create/) to successfully create an API token without error.
- Fix stack error typo.
- Fix an error where `stdin` could not be used to create tasks.
- Update `data_type` to `dataType` to ensure CSV files are successfully uploaded.
- Fix to let you create a remote connection for InfluxDB 1.x without requiring a remote org ID (`remoteOrgID`). Add warning that `remoteOrgID` is required for InfluxDB Cloud and InfluxDB OSS, but not required for InfluxDB 1.x (OSS or Enterprise).
## v2.4.0 [2022-08-18]

View File

@ -9,6 +9,7 @@ menu:
name: Create a token
parent: Manage tokens
weight: 201
updated_in: CLI 2.5.0
---
Create API tokens using the InfluxDB user interface (UI), the `influx`
@ -76,7 +77,6 @@ click **{{< icon "plus" >}} Generate** and select a token type
{{% /oss-only %}}
{{% cloud-only %}}
### Create an all-access token
@ -112,63 +112,9 @@ find the token you want to clone and click the **{{< icon "settings" >}}** icon
## Create a token using the influx CLI
{{% warn %}}
InfluxDB 2.4 introduced a bug that prevents you from creating an **all-access** or **operator** token using the `influx auth create` command, and causes the following error: `Error: could not write auth with provided arguments: 403 Forbidden: permission.`
Until this bug is resolved in the next influx CLI release, please use the [workaround below to create an all-access or operator token](/influxdb/v2.4/security/tokens/create-token/#workaround-to-create-an-all-access-or-operator-token).
**Issue resolved**: Using InfluxDB 2.4 and influx CLI 2.4 prevented you from creating an **all-access** or **operator** token using the `influx auth create` command. This issue is resolved in the influx 2.5 CLI release. Please [upgrade to the latest version](/influxdb/latest/tools/influx-cli/) of the influx cli.
{{% /warn %}}
### **Workaround:** To create an all-access or operator token
- Use the following command to create an [all-access](/influxdb/v2.4/security/tokens/#all-access-token) or [operator](/influxdb/v2.4/security/tokens/#operator-token) token. For an operator token, you must also include the `--read-orgs` and `--write-orgs` flags.
```sh
influx auth create
--org-id or --org \
--read-authorizations \
--write-authorizations \
--read-buckets \
--write-buckets \
--read-dashboards \
--write-dashboards \
--read-tasks \
--write-tasks \
--read-telegrafs \
--write-telegrafs \
--read-users \
--write-users \
--read-variables \
--write-variables \
--read-secrets \
--write-secrets \
--read-labels \
--write-labels \
--read-views \
--write-views \
--read-documents \
--write-documents \
--read-notificationRules \
--write-notificationRules \
--read-notificationEndpoints \
--write-notificationEndpoints \
--read-checks \
--write-checks \
--read-dbrp \
--write-dbrp \
--read-annotations \
--write-annotations \
--read-sources \
--write-sources \
--read-scrapers \
--write-scrapers \
--read-notebooks \
--write-notebooks \
--read-remotes \
--write-remotes \
--read-replications \
--write-replications
```
<!--
Use the [`influx auth create` command](/influxdb/v2.4/reference/cli/influx/auth/create) to create a token.
Include flags with the command to grant specific permissions to the token.
See the [available flags](/influxdb/v2.4/reference/cli/influx/auth/create#flags).
@ -180,6 +126,7 @@ influx auth create -o <org-name> [permission-flags]
```
### Examples
#### Create an all-access token
Create an All-Access token to grant permissions to all resources in an organization.
@ -209,7 +156,6 @@ To create a new operator token without using an existing one, see how to use the
{{% /note %}}
{{% /oss-only %}}
#### Create a token with specified read permissions
```sh
@ -255,5 +201,3 @@ body.
See the
[`POST /api/v2/authorizations` documentation](/influxdb/v2.4/api/#operation/PostAuthorizations)
for more information about options.
<!-- -->