route gateway htpasswd management through a daemon wire command (#2504)
This commit is contained in:
parent
614e8c6d5a
commit
f1812335d1
9 changed files with 181 additions and 160 deletions
|
|
@ -249,17 +249,17 @@ Gateway htpasswd user management. Add, remove, or list users in an htpasswd file
|
|||
|
||||
###### **Subcommands:**
|
||||
|
||||
* `create-user` — Add a new user or update the password of an existing user in the gateway htpasswd file. The password is hashed with `BCrypt` (cost 12)
|
||||
* `create-user` — Add a new user or update the password of an existing user in the gateway htpasswd file. The daemon bcrypt-hashes the password (cost 12) and writes the credential store — hivectl relays over the host socket and never touches the file
|
||||
* `delete-user` — Remove a user from the gateway htpasswd file. Exits with an error when the user is not found so callers can detect the no-op case
|
||||
* `list-users` — List all usernames in the gateway htpasswd file, one per line
|
||||
* `list-users` — List all gateway htpasswd usernames, one per line
|
||||
|
||||
|
||||
|
||||
## `hivectl gateway create-user`
|
||||
|
||||
Add a new user or update the password of an existing user in the gateway htpasswd file. The password is hashed with `BCrypt` (cost 12).
|
||||
Add a new user or update the password of an existing user in the gateway htpasswd file. The daemon bcrypt-hashes the password (cost 12) and writes the credential store — hivectl relays over the host socket and never touches the file.
|
||||
|
||||
Pass `--password-stdin` when scripting or when you don't want the password visible in shell history. The file is created if it does not exist; its parent directory must already exist.
|
||||
Pass `--password-stdin` when scripting or when you don't want the password visible in shell history.
|
||||
|
||||
**Usage:** `hivectl gateway create-user [OPTIONS] <USERNAME>`
|
||||
|
||||
|
|
@ -271,9 +271,6 @@ Pass `--password-stdin` when scripting or when you don't want the password visib
|
|||
|
||||
* `--password <PASSWORD>` — Set the password inline. WARNING: visible in shell history and process listings — prefer `--password-stdin` for sensitive input. Mutually exclusive with `--password-stdin`
|
||||
* `--password-stdin` — Read the password from stdin (single line, trailing newline stripped). Mutually exclusive with `--password`
|
||||
* `-f`, `--file <FILE>` — Path to the htpasswd file. Defaults to the standard gateway credential store at `/var/lib/hyperhive/gateway/gateway.htpasswd`
|
||||
|
||||
Default value: `/var/lib/hyperhive/gateway/gateway.htpasswd`
|
||||
|
||||
|
||||
|
||||
|
|
@ -281,31 +278,19 @@ Pass `--password-stdin` when scripting or when you don't want the password visib
|
|||
|
||||
Remove a user from the gateway htpasswd file. Exits with an error when the user is not found so callers can detect the no-op case
|
||||
|
||||
**Usage:** `hivectl gateway delete-user [OPTIONS] <USERNAME>`
|
||||
**Usage:** `hivectl gateway delete-user <USERNAME>`
|
||||
|
||||
###### **Arguments:**
|
||||
|
||||
* `<USERNAME>` — Username to remove
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `-f`, `--file <FILE>` — Path to the htpasswd file. Defaults to the standard gateway credential store
|
||||
|
||||
Default value: `/var/lib/hyperhive/gateway/gateway.htpasswd`
|
||||
|
||||
|
||||
|
||||
## `hivectl gateway list-users`
|
||||
|
||||
List all usernames in the gateway htpasswd file, one per line
|
||||
List all gateway htpasswd usernames, one per line
|
||||
|
||||
**Usage:** `hivectl gateway list-users [OPTIONS]`
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `-f`, `--file <FILE>` — Path to the htpasswd file. Defaults to the standard gateway credential store
|
||||
|
||||
Default value: `/var/lib/hyperhive/gateway/gateway.htpasswd`
|
||||
**Usage:** `hivectl gateway list-users`
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue