The webmail's client secret reaches the server as a file (K-S2) #19

Merged
jcoffey-dev merged 2 commits from feat/server-secret-files into main 2026-11-19 15:12:29 +00:00
Owner

For K-S2 (tracker #14). Needs server 27.1-rc.32, which will carry inbuxa/inbuxa-server#461 (INBUXA_<name>_FILE). An older server ignores _FILE, so it would register no webmail client. Hold the merge until the chart's server image is rc.32 or later.

What changes

  • Server pods mount the oauth-client-secret key of the webmail's Secret (the chart's own or webmail.existingSecret) at /etc/inbuxa/webmail, mode 0440.
  • INBUXA_WEBMAIL_CLIENT_SECRET_FILE points at that file, replacing INBUXA_WEBMAIL_CLIENT_SECRET from secretKeyRef.
  • The read-secret-from-env-var TODO(K-S2) and env-value-from lint exceptions on the server Deployment go away.
  • In their place, kube-linter's env-var-secret is ignored with its reason: that variable holds a path, not the secret.
  • Unit tests check the file variable, that the plain variable is gone, and the volume and mount. 51/51 pass, lint is clean.

Tested on kind with a server built from #461: lab/chart/frontends-test.sh passes. The webmail sign-in across replicas works, including the token exchange that needs the server to hold the same secret, and so does the console. In the server pod, env shows no WEBMAIL_CLIENT_SECRET=, and /etc/inbuxa/webmail/oauth-client-secret is the mounted key.

The webmail's own APP_SECRET and OAUTH_CLIENT_SECRET stay in its environment until K-W4.

For K-S2 (tracker #14). **Needs server 27.1-rc.32**, which will carry inbuxa/inbuxa-server#461 (`INBUXA_<name>_FILE`). An older server ignores `_FILE`, so it would register no webmail client. Hold the merge until the chart's server image is rc.32 or later. **What changes** - Server pods mount the `oauth-client-secret` key of the webmail's Secret (the chart's own or `webmail.existingSecret`) at `/etc/inbuxa/webmail`, mode 0440. - `INBUXA_WEBMAIL_CLIENT_SECRET_FILE` points at that file, replacing `INBUXA_WEBMAIL_CLIENT_SECRET` from `secretKeyRef`. - The `read-secret-from-env-var` TODO(K-S2) and `env-value-from` lint exceptions on the server Deployment go away. - In their place, kube-linter's `env-var-secret` is ignored with its reason: that variable holds a path, not the secret. - Unit tests check the file variable, that the plain variable is gone, and the volume and mount. 51/51 pass, lint is clean. **Tested on kind** with a server built from #461: `lab/chart/frontends-test.sh` passes. The webmail sign-in across replicas works, including the token exchange that needs the server to hold the same secret, and so does the console. In the server pod, `env` shows no `WEBMAIL_CLIENT_SECRET=`, and `/etc/inbuxa/webmail/oauth-client-secret` is the mounted key. The webmail's own `APP_SECRET` and `OAUTH_CLIENT_SECRET` stay in its environment until K-W4.
jcoffey-dev force-pushed feat/server-secret-files from 7aa04302e6 to 2c4f91118c 2026-11-19 00:41:15 +00:00 Compare
jcoffey-dev added 2 commits 2026-11-19 01:20:06 +00:00
Server pods mount the oauth-client-secret key of the webmail's Secret at
/etc/inbuxa/webmail and point INBUXA_WEBMAIL_CLIENT_SECRET_FILE at it,
instead of putting the secret in their environment. Needs server
27.1-rc.32 (inbuxa-server#461). The TODO(K-S2) lint exception goes.
jcoffey-dev force-pushed feat/server-secret-files from 2c4f91118c to 9dad1bd74e 2026-11-19 01:20:06 +00:00 Compare
jcoffey-dev merged commit 23132d2d4f into main 2026-11-19 15:12:29 +00:00
jcoffey-dev deleted branch feat/server-secret-files 2026-11-19 15:12:29 +00:00
Sign in to join this conversation.