Front ends: a page for where inbuxa Admin and the webmail are served #259

Merged
jcoffey-dev merged 1 commits from feat/front-ends-page into main 2026-11-21 07:23:21 +00:00
Owner

Settings › Network › Web › Front ends: edits inbuxa:FrontEnds (contract C-4), until now only set by inbuxa join or the server's environment. It holds the console's address, the webmail's address and client secret, and further origins allowed to call the server from a browser. The menu link comes from inbuxa/inbuxa-server#522; until a server has it, the page stays hidden.

What it does

  • Webmail secret: made in the page (48 URL-safe characters), shown once with a Copy button and a note that it goes in the webmail's OAUTH_CLIENT_SECRET, and never read back (the server keeps only a hash). When the node takes it from INBUXA_WEBMAIL_CLIENT_SECRET, the page says so and doesn't offer one.
  • Environment values: what the node's environment says (INBUXA_ADMIN_URL, INBUXA_WEBMAIL_URL) is shown beside the stored value, since both are used.
  • Saving: sends only what changed. An origin typed but not yet added is saved too instead of being silently dropped; the OAuth-client form drops it today.
  • Lockout guard: the server rebuilds its cross-origin allowlist on every save, so taking out the address this console runs from would cut the console off. The page says so and needs a tick before saving. INBUXA_CORS_EXTRA_ORIGINS isn't readable over JMAP, so the warning names it as the exception.
  • Validation: what the server would refuse (a webmail without a secret, a secret under 32 characters, a bad address) is caught before saving.
  • Permissions: read-only without sysHttpUpdate and sysOAuthClientUpdate; the link shows with sysHttpGet.
  • Form fields: autoComplete="off" on every field, and the secret is never in an input, so browser autofill can't put a saved password into it.

Checked

  • Unit tests for the logic: src/features/frontEnds/model.test.ts.
  • Full suite: 1172 passed. typecheck, lint, i18n:check, notice:check, release-version.test.sh, changelog-check.test.sh, listen-ipv6.test.sh and build are clean, and the changed files pass prettier.
  • End to end against a throwaway 27.1-rc.38 container, using the server branch's schema. Signed in, found the link under Network › Web, and set a webmail address: Save stayed off until a secret was made. Made one, typed an origin without pressing Add, and saved. The server then held the webmail address, webmailClientSecretSet: true and the typed origin, and the ihasmail-inbuxa client had the redirect http://localhost:8787/api/auth/callback. "Last changed" showed the right time.
  • Not shown in a browser: the lockout warning (covered by unit tests) and the read-only view.
**Settings › Network › Web › Front ends**: edits `inbuxa:FrontEnds` (contract C-4), until now only set by `inbuxa join` or the server's environment. It holds the console's address, the webmail's address and client secret, and further origins allowed to call the server from a browser. The menu link comes from inbuxa/inbuxa-server#522; until a server has it, the page stays hidden. **What it does** - **Webmail secret:** made in the page (48 URL-safe characters), shown once with a Copy button and a note that it goes in the webmail's `OAUTH_CLIENT_SECRET`, and never read back (the server keeps only a hash). When the node takes it from `INBUXA_WEBMAIL_CLIENT_SECRET`, the page says so and doesn't offer one. - **Environment values:** what the node's environment says (`INBUXA_ADMIN_URL`, `INBUXA_WEBMAIL_URL`) is shown beside the stored value, since both are used. - **Saving:** sends only what changed. An origin typed but not yet added is saved too instead of being silently dropped; the OAuth-client form drops it today. - **Lockout guard:** the server rebuilds its cross-origin allowlist on every save, so taking out the address this console runs from would cut the console off. The page says so and needs a tick before saving. `INBUXA_CORS_EXTRA_ORIGINS` isn't readable over JMAP, so the warning names it as the exception. - **Validation:** what the server would refuse (a webmail without a secret, a secret under 32 characters, a bad address) is caught before saving. - **Permissions:** read-only without `sysHttpUpdate` and `sysOAuthClientUpdate`; the link shows with `sysHttpGet`. - **Form fields:** `autoComplete="off"` on every field, and the secret is never in an input, so browser autofill can't put a saved password into it. **Checked** - Unit tests for the logic: `src/features/frontEnds/model.test.ts`. - Full suite: 1172 passed. `typecheck`, `lint`, `i18n:check`, `notice:check`, `release-version.test.sh`, `changelog-check.test.sh`, `listen-ipv6.test.sh` and `build` are clean, and the changed files pass prettier. - End to end against a throwaway 27.1-rc.38 container, using the server branch's schema. Signed in, found the link under Network › Web, and set a webmail address: Save stayed off until a secret was made. Made one, typed an origin without pressing Add, and saved. The server then held the webmail address, `webmailClientSecretSet: true` and the typed origin, and the `ihasmail-inbuxa` client had the redirect `http://localhost:8787/api/auth/callback`. "Last changed" showed the right time. - Not shown in a browser: the lockout warning (covered by unit tests) and the read-only view.
jcoffey-dev added 1 commit 2026-11-21 07:20:11 +00:00
Front ends: a page for where inbuxa Admin and the webmail are served
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 18s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m44s
e11246de68
Settings › Network › Web › Front ends edits inbuxa:FrontEnds (contract
C-4), until now only set by `inbuxa join` or the server's environment:
the console's address, the webmail's address and client secret, and
further origins allowed to call the server from a browser.

- The webmail's secret is made here (48 URL-safe characters), shown once
  with a copy button and the webmail variable it goes in, and never read
  back; the server keeps only a hash. When the node takes it from
  INBUXA_WEBMAIL_CLIENT_SECRET, the page says so and offers none.
- What each node's environment says (INBUXA_ADMIN_URL,
  INBUXA_WEBMAIL_URL) is shown beside the stored value, since both are
  used.
- Saving sends only what changed. An origin typed but not yet added is
  saved too, rather than dropped.
- The server rebuilds its cross-origin allowlist on every save, so taking
  out the address this console runs from would cut it off: the page says
  so and asks for a confirmation first.
- What the server would refuse (a webmail without a secret, a short
  secret, a bad address) is caught before saving.
- Read-only without sysHttpUpdate and sysOAuthClientUpdate.

The menu link comes from the server's schema (inbuxa-server
console/front-ends-link); without it the page stays hidden.
jcoffey-dev merged commit bbc952e2f8 into main 2026-11-21 07:23:21 +00:00
jcoffey-dev deleted branch feat/front-ends-page 2026-11-21 07:23:21 +00:00
Sign in to join this conversation.