Apps get 192.168.5.0/24; keep a copy of each Authelia client
Addresses now come from 192.168.5.0/24, the range Federated's Core developer set aside for custom apps. Apps installed in 192.168.200.x get a new address on their next update. Like Federated's apps, the sso need keeps a copy of its Authelia client in /federated/apps/<name>/.<name>.oidc-client.yml, so Authelia's start (reconcile_authelia_sso) restores it if Authelia is reinstalled. Removing an app deletes the copy before restarting Authelia, which would otherwise add the client back. Needs can have an update step, run on every update; sso's writes the copy for apps installed before this. Fixed: an update of an app with no needs failed at its end (a test that found nothing to run set the exit status), leaving the app on its old address. PLAN.md: the Core developer's guidance and where coreapp-dev stands on each point. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -185,7 +185,7 @@ The Core's own scripts trace secrets, so their output goes to
|
||||
nothing else, with no `{{...}}` left (`grep -r '{{' hello` prints
|
||||
nothing). `coreapp new hello` again refuses; so does `coreapp new x-`.
|
||||
2. `cd hello && coreapp deploy`: updates `/opt/coreapps` on the Core,
|
||||
builds, copies the image, prints `Installing hello at 192.168.200.x`
|
||||
builds, copies the image, prints `Installing hello at 192.168.5.x`
|
||||
(the first free address there) and `Installed: https://hello.<domain>/`.
|
||||
On the Core, `/federated/services/hello/` has `service`,
|
||||
`docker-compose.yml.in`, `env.in`, `install`, `uninstall`, `icon.png`,
|
||||
@@ -258,10 +258,16 @@ has the `DB_*` variables, `.coreapp` says `needs=postgres`.
|
||||
4. In a browser, sign in with a Core account: the page says "Signed in as
|
||||
..." with the account's email and groups. "Sign out" goes back to the
|
||||
sign-in link.
|
||||
5. Redeploy: still one client block, and Authelia isn't restarted
|
||||
`/federated/apps/sso-demo/.sso-demo.oidc-client.yml` (mode 600) holds
|
||||
the same block.
|
||||
5. The copy restores the client: delete the block from `idproviders.yml`
|
||||
(keep a backup), run `/federated/bin/reconcile-authelia-sso`: it says
|
||||
"Restoring sso-demo's Authelia OIDC client" and the block is back.
|
||||
6. Redeploy: still one client block, and Authelia isn't restarted
|
||||
(`docker inspect -f '{{.State.StartedAt}}' authelia` unchanged).
|
||||
`coreapp remove`: no block, Authelia healthy, other clients (Nextcloud)
|
||||
still work. Deploy again: one block.
|
||||
`coreapp remove`: no block and no copy, and running
|
||||
`/federated/bin/reconcile-authelia-sso` doesn't bring it back; Authelia
|
||||
healthy, other clients (Nextcloud) still work. Deploy again: one block.
|
||||
|
||||
### With both
|
||||
|
||||
@@ -281,4 +287,6 @@ an empty `.coreapp` marker on the Core) moves over by replacing those files
|
||||
with a `coreapp.toml` with the same name, image and needs. `coreapp deploy`
|
||||
then updates it: same address, `.env` and data unchanged, no needs set up
|
||||
again (they're read from its `DEPENDS`), Authelia not restarted; `.coreapp`
|
||||
then says which needs it has.
|
||||
then says which needs it has. Apps with an address outside 192.168.5.0/24
|
||||
get a new one on their next update (the container moves; the app keeps
|
||||
working), and apps with sign-in get their client copy.
|
||||
|
||||
Reference in New Issue
Block a user