Rauthy as a compose profile: sign-in in Norwegian, off until asked for
dns / dns (push) Successful in 4s

A rauthy service under the profile of the same name, its config here
without secrets, and rauthy.env written by the deploy from Actions
secrets. OIDC_ISSUER moves portal's and the chat's sign-in to it,
RAUTHY_API_KEY lets portal make accounts there. konto.tomtervel.no in
DNS and kasse's Caddy, beside id. Nothing runs until RAUTHY_HOST, the
three secrets and the profile are set.

Tried locally: the config starts, the issuer is https://<host>/auth/v1/,
and a Norwegian browser gets the pages in nb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L5fbDmSQSb6u27EiEuwzoM
This commit is contained in:
blandClaude Opus 5.5 committed 2026-11-07 22:33:46 +01:00
1 parent 5524b1be01
commit 961d090b7d
8 files changed
+163

No files matched your search

+45
View File
@@ -163,6 +163,10 @@ Run workflow**. Set them with `gt` (`gt variable set NAME --body ...`,
| `MAPBOX_TOKEN` | secret | repo | optional: the map tiles portal proxies (the landing hero, location fields); unset, maps are off |
| `MAPBOX_STYLE` | variable | repo | optional: `<owner>/<style>`; unset, `mapbox/streets-v12` |
| `DNSCONTROL_VERSION` | variable | repo | the DNS workflow's dnscontrol |
| `RAUTHY_HOST` | variable | repo | optional, Rauthy (see [Rauthy](#rauthy)): `konto.tomtervel.no` |
| `RAUTHY_ENC_KEY`, `RAUTHY_SECRET_RAFT`, `RAUTHY_SECRET_API` | secret | repo | optional, Rauthy's own: made once, never changed (the key encrypts its database) |
| `OIDC_ISSUER` | variable | repo | optional: `https://konto.tomtervel.no/auth/v1/` moves the site's and the chat's sign-in to Rauthy; unset, Kanidm |
| `RAUTHY_API_KEY`, `RAUTHY_LANGUAGE` | secret, variable | repo | optional: portal makes accounts in Rauthy (`<name>$<secret>`, made in Rauthy's admin), in `nb` |
A variable is printed wherever a workflow echoes it, and this repo's run
logs are public: a value that must not be read is a secret.
@@ -172,6 +176,47 @@ and internal certificate (`bootstrap.sh`), and Garage's node secret.
`kanidm/server.toml` takes `ID_HOST` once: Kanidm's domain is renamed on
purpose, not by a variable changed (see dns/README.md).
## Rauthy
Kanidm has no Norwegian: its sign-in, its account pages and its mail
are in English. [Rauthy](https://github.com/sebadob/rauthy) has
Norwegian (`nb`) in all three, and portal (from the release after
0.14.2) and the chat can sign in through it. It is here as a compose
profile, off until it is asked for, so the vel can try it beside
Kanidm and move when it is ready. Portal keeps the groups either way
(`PEOPLE_BACKEND=memberships`), so moving takes no groups along.
Trying it, beside Kanidm:
1. The secrets, made once and never changed:
```sh
echo "$(openssl rand -hex 4)/$(openssl rand -base64 32)" | gt secret set RAUTHY_ENC_KEY -R tomtervel/infrastructure
openssl rand -hex 24 | gt secret set RAUTHY_SECRET_RAFT -R tomtervel/infrastructure
openssl rand -hex 24 | gt secret set RAUTHY_SECRET_API -R tomtervel/infrastructure
gt variable set RAUTHY_HOST --body konto.tomtervel.no -R tomtervel/infrastructure
gt variable set COMPOSE_PROFILES --body chat,rauthy -R tomtervel/infrastructure
```
2. DNS: `konto` is in `dns/dnsconfig.js`; run the dns workflow. Install
`host-caddy/tomtervel.no` on kasse (it has the `konto` block) and
reload Caddy. Reinstall `deploy-tomtervel` on kasse too: it now puts
`rauthy.env` in place.
3. Deploy. The first admin is `SEED_ADMIN_EMAIL`; its password is in the
log once: `podman compose logs rauthy | grep -A2 -i password`.
4. In Rauthy's admin (`https://konto.tomtervel.no/auth/v1/admin`): a
client for the site (`authorization_code`, `S256`, scopes `openid
profile email`, redirect `https://tomtervel.no/auth/callback`) and
one for the chat (also `refresh_token`, redirect
`https://chat.tomtervel.no/auth/callback`), and an API key with read
and create on users.
5. Moving the sign-in over is then values: `OIDC_ISSUER`,
`OAUTH2_CLIENT_ID`/`OAUTH2_CLIENT_SECRET` and the chat's pair set to
Rauthy's clients, `RAUTHY_API_KEY`, `RAUTHY_LANGUAGE=nb`, and a
portal release that knows them. Back is the same values unset.
Rauthy's mail leaves through kasse's postfix like gdo's, and Rauthy
stops if it cannot reach it. Its database is in the `rauthy_data`
volume, which wants the same backups as NATS.
## Backups
- Kanidm writes a nightly backup into its volume (`/data/backups`,