You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to create a new authorization with --delete-user permissions I get an error:
influx auth create -u yolo7 --delete-user
Error: invalid ID
Usage:
influx auth create [flags]
Flags:
--create-user grants the permission to create users
--delete-user grants the permission to delete users
-h, --help help for create
--read-bucket stringArray bucket id
-u, --user string user name (required)
--write-bucket stringArray bucket id
Global Flags:
--host string HTTP address of Influx (default "http://localhost:9999")
--local Run commands locally against the filesystem
-t, --token string API token to be used throughout client calls
invalid ID
Analysis
I noticed two possible root causes for this problem:
Observations
When trying to create a new authorization with
--delete-user
permissions I get an error:Analysis
I noticed two possible root causes for this problem:
Client side (cli) while creating a new
Permission
the functionNewPermission
doesn't set any ID on the newly created permission here:https://github.com/influxdata/platform/blob/3429e8d0c6753e7f1dab6b080397580a5ba94205/authz.go#L166-L173
When creating the authorization, only permissions are passed to it, while the authorization needs a valid ID.
https://github.com/influxdata/platform/blob/3429e8d0c6753e7f1dab6b080397580a5ba94205/cmd/influx/authorization.go#L101-L103
The text was updated successfully, but these errors were encountered: