Add interactive password change command without service restart
This commit is contained in:
+14
-2
@@ -319,8 +319,20 @@ the installer rather than being reset.
|
||||
The same password is given to the ntfy `phone-reader` account when that account
|
||||
is first created; existing ntfy accounts keep their passwords.
|
||||
|
||||
To change the web password, edit `password` in `web-auth.json` (keep it 0600)
|
||||
and run `pipelines restart`.
|
||||
After updating the installation, change the web sign-in password from the
|
||||
checkout with:
|
||||
|
||||
```sh
|
||||
./password
|
||||
```
|
||||
|
||||
It prompts twice without echoing the password, requires at least eight
|
||||
characters, and writes the private password file atomically. The updated web
|
||||
proxy picks it up on the next request; no service restart is needed, and existing
|
||||
sessions and running tasks remain connected. SSH is supported with an interactive
|
||||
TTY. This changes the web/app sign-in password; the ntfy notification account's
|
||||
password is unchanged. `--prefix PATH` selects another installation, and
|
||||
`PIPELINES_WEB_AUTH_FILE` selects an explicitly configured password file.
|
||||
|
||||
## Upgrading
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Password command
|
||||
|
||||
Added checkout entry point `./password` with twice-entered hidden input and an
|
||||
8-character minimum. It uses the existing installation's recorded password file,
|
||||
explicit PIPELINES_WEB_AUTH_FILE, or default private file for partial installs.
|
||||
Password arguments are not accepted, and non-TTY use is refused before prompting.
|
||||
|
||||
The helper validates file ownership, regular-file type, permissions and auth JSON;
|
||||
stages on the destination filesystem, fsyncs content and atomically replaces the
|
||||
file. Concurrent helper updates serialize on the parent directory lock, and an
|
||||
external change detected during staging is not overwritten. Cookie secret and
|
||||
unknown metadata remain unchanged, preserving existing sessions. No service,
|
||||
background task, provider credential or ntfy account is modified.
|
||||
|
||||
Runtime use requires the updated proxy's per-request auth reload, implemented in
|
||||
the browser-discovery/relay lane. Merely updating a checkout does not replace an
|
||||
already-running installed proxy. The helper does not kill a proxy: the existing
|
||||
supervisor would treat that as a fatal service exit.
|
||||
|
||||
Verification: 11 focused tests passed, covering custom/default/partial-install
|
||||
paths, private ownership boundaries, old-file preservation on errors, same-device
|
||||
atomic replacement, external-write refusal, prompt retry/privacy and non-TTY
|
||||
refusal. Wrapper help, shell syntax, Python compilation and diff checks passed.
|
||||
No operator password or running service was changed during testing.
|
||||
Reference in New Issue
Block a user