feat(podman): add the bitborg-id user for keycloak #661

Sammanfogat
supernaut sammanfogade 1 incheckning från feat/bitborg-id-user in i main 2026-10-11 12:40:58 +00:00
Ägare

Keycloak moves to its own rootless user (ADR 0042, amended in bitborg-docs#147 and #148). This PR lays the ground on every services host. It is inert: nothing runs in the new user until the keycloak role moves.

  • bitborg-id user: uid 2001, nologin, linger.
  • Subordinate IDs pinned at 231072:65536, written before useradd. Its Postgres files will be owned by these IDs, so a rebuilt host must hand out the same range. A read-only check stops the run if another range overlaps.
  • Graphroot on the data volume: /srv/gitborg-data/bitborg-id/containers bind-mounted over ~/.local/share/containers (ADR 0025 pattern).
  • bitborg-id-address.service puts 10.90.0.1/32 on lo. Later PRs publish Keycloak there for the main service user's containers.
  • user@2001 drop-in: requires the address unit and the bind. The user manager does not start without both (fail closed).
  • Quadlet networks bitborg-id (10.89.10.0/24) and bitborg-id-data (internal).
  • nftables drops traffic to 10.90.0.1 that does not arrive on lo.

Not in this PR: Keycloak itself, its Postgres, Caddy, monitoring, backups.

Verification:

  • syntax-check, ansible-lint (production profile), prettier: clean.
  • Debian 13 systemd container: fresh --check, apply, re-apply with changed=0, reboot. Address, bind, user manager and networks all come back. With the address unit failing, user@2001 refuses to start.
  • Staging before apply: uid 2001 free, existing subids end at 231071, no overlap.
  • To do after merge: staging apply, getsubids bitborg-id, findmnt the bind, ip addr show lo, the network units active as bitborg-id, then a reboot.
Keycloak moves to its own rootless user (ADR 0042, amended in bitborg-docs#147 and #148). This PR lays the ground on every services host. It is inert: nothing runs in the new user until the keycloak role moves. - `bitborg-id` user: uid 2001, nologin, linger. - Subordinate IDs pinned at `231072:65536`, written before `useradd`. Its Postgres files will be owned by these IDs, so a rebuilt host must hand out the same range. A read-only check stops the run if another range overlaps. - Graphroot on the data volume: `/srv/gitborg-data/bitborg-id/containers` bind-mounted over `~/.local/share/containers` (ADR 0025 pattern). - `bitborg-id-address.service` puts `10.90.0.1/32` on `lo`. Later PRs publish Keycloak there for the main service user's containers. - `user@2001` drop-in: requires the address unit and the bind. The user manager does not start without both (fail closed). - Quadlet networks `bitborg-id` (`10.89.10.0/24`) and `bitborg-id-data` (internal). - nftables drops traffic to `10.90.0.1` that does not arrive on `lo`. Not in this PR: Keycloak itself, its Postgres, Caddy, monitoring, backups. Verification: - syntax-check, ansible-lint (production profile), prettier: clean. - Debian 13 systemd container: fresh `--check`, apply, re-apply with `changed=0`, reboot. Address, bind, user manager and networks all come back. With the address unit failing, `user@2001` refuses to start. - Staging before apply: uid 2001 free, existing subids end at 231071, no overlap. - To do after merge: staging apply, `getsubids bitborg-id`, `findmnt` the bind, `ip addr show lo`, the network units active as bitborg-id, then a reboot.
supernaut lade till 1 incheckning 2026-10-11 12:24:22 +00:00
feat(podman): add the bitborg-id user for keycloak
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m50s
98e4683ff0
Keycloak gets its own rootless user (ADR 0042). This lays the ground on
every services host, inert until the keycloak role starts units in it.

- bitborg-id user, uid 2001, nologin, linger
- subids pinned at 231072:65536, written before useradd, overlap check
- graphroot bound from /srv/gitborg-data/bitborg-id/containers
- bitborg-id-address.service puts 10.90.0.1/32 on lo
- user@2001 drop-in requires the address unit and the bind (fail closed)
- bitborg-id and bitborg-id-data networks
- nftables drops 10.90.0.1 unless it arrives on lo
supernaut tvångsskickade feat/bitborg-id-user från 98e4683ff0
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m50s
till 71d4e27c28
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m49s
2026-10-11 12:38:40 +00:00
Jämför
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-11 12:38:43 +00:00
supernaut sammanfogade incheckning 59dfbebbc7 till main 2026-10-11 12:40:58 +00:00
supernaut tog bort grenen feat/bitborg-id-user 2026-10-11 12:40:58 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-11 12:41:00 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra!661
Ingen beskrivning angiven.