K-W4 (#106). The webmail can read its secrets from mounted files, so they stay out of its environment.
APP_SECRET_FILE, APP_SECRET_PREVIOUS_FILE and OAUTH_CLIENT_SECRET_FILE read the value from a file. One trailing newline is dropped.
The webmail won't start if both forms are set, or if the file can't be read or is empty. The error names the variable and the path, never the value.
README: a section on secrets in files, and one on running with a read-only root: what the webmail writes (only SESSION_FILE), why /tmp is still worth giving it, and IMMUTABLE=1.
The server takes INBUXA_<NAME>_FILE the same way (inbuxa-server#461).
Tested
4 new unit tests, and typecheck, the full test suite (312) and the build all pass.
On kind with the chart change (inbuxa-charts, K-W4): two replicas read both secrets from files and run with IMMUTABLE=1 on a read-only root. Sign-in across replicas and the token exchange pass, which needs the right client secret. The pod's environment has only the paths.
Before the chart gave the pod an fsGroup, the webmail refused to start with APP_SECRET_FILE: can't read /etc/inbuxa-webmail/app-secret (EACCES), and the old pods kept serving.
K-W4 (#106). The webmail can read its secrets from mounted files, so they stay out of its environment.
- `APP_SECRET_FILE`, `APP_SECRET_PREVIOUS_FILE` and `OAUTH_CLIENT_SECRET_FILE` read the value from a file. One trailing newline is dropped.
- The webmail won't start if both forms are set, or if the file can't be read or is empty. The error names the variable and the path, never the value.
- README: a section on secrets in files, and one on running with a read-only root: what the webmail writes (only `SESSION_FILE`), why `/tmp` is still worth giving it, and `IMMUTABLE=1`.
The server takes `INBUXA_<NAME>_FILE` the same way (inbuxa-server#461).
**Tested**
- 4 new unit tests, and typecheck, the full test suite (312) and the build all pass.
- On kind with the chart change (inbuxa-charts, K-W4): two replicas read both secrets from files and run with `IMMUTABLE=1` on a read-only root. Sign-in across replicas and the token exchange pass, which needs the right client secret. The pod's environment has only the paths.
- Before the chart gave the pod an `fsGroup`, the webmail refused to start with `APP_SECRET_FILE: can't read /etc/inbuxa-webmail/app-secret (EACCES)`, and the old pods kept serving.
Should ship in 27.1-rc.7, with #113.
APP_SECRET_FILE, APP_SECRET_PREVIOUS_FILE and OAUTH_CLIENT_SECRET_FILE
read the secret from a mounted file, with one trailing newline dropped.
Both forms set, or a file that can't be read or is empty, stops the start
with an error naming the variable and path, never the value.
README: the read-only root filesystem, and what the webmail writes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
K-W4 (#106). The webmail can read its secrets from mounted files, so they stay out of its environment.
APP_SECRET_FILE,APP_SECRET_PREVIOUS_FILEandOAUTH_CLIENT_SECRET_FILEread the value from a file. One trailing newline is dropped.SESSION_FILE), why/tmpis still worth giving it, andIMMUTABLE=1.The server takes
INBUXA_<NAME>_FILEthe same way (inbuxa-server#461).Tested
IMMUTABLE=1on a read-only root. Sign-in across replicas and the token exchange pass, which needs the right client secret. The pod's environment has only the paths.fsGroup, the webmail refused to start withAPP_SECRET_FILE: can't read /etc/inbuxa-webmail/app-secret (EACCES), and the old pods kept serving.Should ship in 27.1-rc.7, with #113.