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

Clarify user migration in 1.x to 2.0 automated upgrade process #2344

Merged
merged 4 commits into from
Mar 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 34 additions & 9 deletions content/influxdb/v2.0/upgrade/v1-to-v2/automatic-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,43 @@ You can continue to use Kapacitor with InfluxDB OSS 2.0 under the following scen

### User migration

`influxd upgrade` migrates existing 1.x users and their permissions.
However, it *does not migrate administrative users*.
`influxd upgrade` migrates existing 1.x users and their permissions **except** the following users:

To review users with admin permissions, in the InfluxDB 1.x CLI, run `show users`.
Any users labeled "admin" *will not* be migrated.
- [1.x admin users](/{{< latest "influxdb" "v1" >}}/administration/authentication_and_authorization/#admin-users)
- [1.x non-admin users](/{{< latest "influxdb" "v1" >}}/administration/authentication_and_authorization/#non-admin-users)
that have not been granted any privileges

{{< expand-wrapper >}}
{{% expand "Review 1.x user privileges" %}}
**To review 1.x users with admin privileges**, run the following against your InfluxDB 1.x instance:

```sql
SHOW USERS
```

sanderson marked this conversation as resolved.
Show resolved Hide resolved
Users with `admin` set to `true` will **not** be migrated.

**To review the specific privileges granted to each 1.x user**, run the following for each user in your InfluxDB 1.x instance:

```sql
SHOW GRANTS FOR "<username>"
```

If no grants appear, the user will **not** be migrated.
{{% /expand %}}
{{< /expand-wrapper >}}
sanderson marked this conversation as resolved.
Show resolved Hide resolved

sanderson marked this conversation as resolved.
Show resolved Hide resolved
If using an admin user for visualization or Chronograf administrative functions,
create a new read-only user before upgrading.
Admin rights are granted to the primary user created in the InfluxDB 2.0 setup
process which runs at the end of the upgrade process.
This provides you with the opportunity to re-assess who should be granted
admin-level access in your InfluxDB 2.0 setup.
**create a new read-only user before upgrading**:

##### Create a read-only 1.x user
```sh
> CREATE USER <username> WITH PASSWORD '<password>'
> GRANT READ ON <database> TO "<username>"
```

InfluxDB 2.0 only grants admin privileges to the primary user set up during the InfluxDB 2.0 upgrade.
This provides you with the opportunity to reassess who to grant admin permissions when setting up InfluxDB 2.0.

### Dashboards

Expand Down