feat(apikey): add --pepper-stdin and warn on --pepper (mxaccessgw#194)
--pepper on the command line lands in shell history and the process list. Add --pepper-stdin (first stdin line), warn on stderr when --pepper is used, and reject both together. Documented in GatewayProcessDesign.md. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
@@ -804,9 +804,12 @@ ZB.MOM.WW.MxGateway.Server apikey revoke-key --key-id operator01
|
||||
ZB.MOM.WW.MxGateway.Server apikey rotate-key --key-id operator01 --json
|
||||
```
|
||||
|
||||
The subcommands accept `--sqlite-path`, `--pepper`, and `--json`. `--pepper`
|
||||
sets the local `MxGateway:ApiKeyPepper` configuration value for the command
|
||||
process; deployments should normally provide the pepper through the configured
|
||||
The subcommands accept `--sqlite-path`, `--pepper`, `--pepper-stdin`, and `--json`.
|
||||
`--pepper-stdin` reads the first line of standard input and `--pepper <value>` takes it
|
||||
from the command line; either sets the local `MxGateway:ApiKeyPepper` configuration value
|
||||
for the command process (they are mutually exclusive). `--pepper` leaves the pepper in shell
|
||||
history and the process list, so the command prints a warning to stderr — prefer
|
||||
`--pepper-stdin`, the `MxGateway__ApiKeyPepper` environment variable, or the configured
|
||||
secret source. `create-key` and `rotate-key` print the full raw API key exactly
|
||||
once. `list-keys` never prints raw secrets or `secret_hash` values.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user