Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document influx v1 auth subcommands #1768

Closed
wants to merge 1 commit into from
Closed

Conversation

pierwill
Copy link
Contributor

@pierwill pierwill commented Nov 5, 2020

Closes #1736.

  • Tests pass (no build errors)
  • Rebased/mergeable

@pierwill pierwill marked this pull request as draft November 5, 2020 19:09
@pierwill pierwill changed the title Document influx v1 subcommands Document influx v1 auth subcommands Nov 6, 2020
@pierwill pierwill force-pushed the v1-subcommands branch 2 times, most recently from 9779566 to 481c4ef Compare November 6, 2020 21:36
@pierwill pierwill marked this pull request as ready for review November 6, 2020 21:36
@pierwill pierwill requested a review from kelseiv November 6, 2020 21:37
Copy link
Contributor

@kelseiv kelseiv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we haven't already, let's look at adding some task-based doc for these commands.

@pierwill
Copy link
Contributor Author

pierwill commented Nov 9, 2020

Changes forthcoming in influxdata/influxdb#19935.

@pierwill pierwill linked an issue Nov 9, 2020 that may be closed by this pull request
@pierwill pierwill requested a review from kelseiv November 9, 2020 20:55
Copy link
Contributor

@russorat russorat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@stuartcarnie stuartcarnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This look great – I suggested a couple of minor edits

Comment on lines 31 to 32
| `-o` | `--org` | The name of the organization | string | `$INFLUX_ORG` |
| | `--org-id` | The ID of the organization | string | `$INFLUX_ORG_ID` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are one or both of these required?

| | `--org-id` | The ID of the organization | string | `$INFLUX_ORG_ID` |
| | `--read-bucket` | The bucket ID | stringArray | |
| | `--skip-verify` | Skip TLS certificate chain and host name verification | | |
| `-t` | `--token` | Authentication token | string | `$INFLUX_TOKEN` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is token "required"? Let's note if flags are required throughout

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @kelseiv. None of the --help outputs for these commands notes any required flags, far as I can tell. I'll looking into the code to see if I can make any headway here.

| `-h` | `--help` | Help for the `delete` command | | |
| | `--hide-headers` | Hide the table headers (defaults `false`) | | `$INFLUX_HIDE_HEADERS` |
| | `--host` | HTTP address of InfluxDB | string | `$INFLUX_HOST` |
| `-i` | `--id` | The authorization ID (required) | string | |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the authorization ID different than the token referred to in influx auth create (...didn't see an auth ID over there)? If not the token, how can folks find this ID?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the auth ID is the "parent" of a token. An authorization has a set of data associated with it (name, description, token). The reason the influx auth create command doesn't have an --id flag is because the auth doesn't exist yet and InfluxDB assigns the ID upon creation.

influxdb/v2.0/tags: [authorization]
---

The `influx v1 auth create` command creates a legacy authorization with the [InfluxDB 1.x compatibility API](/influxdb/v2.0/reference/api/influxdb-1x/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you create an "all access" token with this command? If yes, which flags need to be set for that?

## Flags
| Flag | | Description | Input type | {{< cli/mapped >}} |
|:-----|:------------------|:------------------------------------------------------------------------|:----------:|:------------------------|
| `-c` | `--active-config` | Config name to use for command | string | `$INFLUX_ACTIVE_CONFIG` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this delete the active config profile?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this flag is a way to override which influx config to use with this specific command. The command will delete an authorization token.

## Flags
| Flag | | Description | Input type | {{< cli/mapped >}} |
|:-----|:------------------|:------------------------------------------------------------------------|:----------:|:------------------------|
| `-c` | `--active-config` | Config name to use for command | string | `$INFLUX_ACTIVE_CONFIG` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this list all authorizations for the specified active configuration?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above, which I believe applies here.

Adds the new `influx v1` command, and documents the following `v1 auth` commands:
`create`, `delete`, `list`, `set-active`, `set-inactive`, and `set-password`.
@pierwill pierwill changed the base branch from separate-cloud to master November 11, 2020 17:50
@pierwill pierwill changed the base branch from master to separate-cloud November 11, 2020 17:51
@noramullen1 noramullen1 changed the base branch from separate-cloud to master November 11, 2020 17:55
@noramullen1 noramullen1 changed the base branch from master to separate-cloud November 11, 2020 17:56
@pierwill pierwill changed the base branch from separate-cloud to master November 11, 2020 17:57
@pierwill pierwill changed the base branch from master to separate-cloud November 11, 2020 17:59
@pierwill
Copy link
Contributor Author

Closing. Will create a new PR with same content.

@pierwill pierwill closed this Nov 11, 2020
@pierwill pierwill mentioned this pull request Nov 11, 2020
2 tasks
@pierwill pierwill deleted the v1-subcommands branch November 11, 2020 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new "influx v1" commands
5 participants