feat(authentik): books-stack providers + ABS OIDC client
Deploy Caddyfile to valhalla / deploy (push) Failing after 1m37s
Deploy Caddyfile to valhalla / deploy (push) Failing after 1m37s
Adds idempotent scripts/run-books-auth.sh (ak shell) that creates forward_single proxy providers for chaptarr/books/storyteller on the embedded outpost and the homelab-audiobooks OIDC provider. Records the ABS client credentials in media stack.env and marks host prep done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ca00f8899d
commit
72688f48ac
4 files changed
+103
-8
No files matched your search
@@ -17,7 +17,7 @@ storyteller reads both libraries :ro ─► /storage1/labdata/storyteller (align
|
||||
| audiobookshelf | `audiobookshelf:80` | 13378 | https://audiobooks.ginnoir.com (native OIDC, LAN + tailnet only) |
|
||||
| storyteller | `storyteller:8001` | 8001 | https://storyteller.ginnoir.com (forward_auth, `/api/*` bypass) |
|
||||
|
||||
## 1. Host prep (before the first deploy)
|
||||
## 1. Host prep (before the first deploy) — done 2026-10-18
|
||||
|
||||
Docker creates missing bind dirs as `root:root`, which breaks chaptarr/CWA/ABS (PUID 1000).
|
||||
|
||||
@@ -31,15 +31,16 @@ sudo chown -R 1000:1000 /config/chaptarr /config/calibre-web-automated /config/a
|
||||
/storage1/complete/books-ingest /storage1/labdata/storyteller
|
||||
```
|
||||
|
||||
## 2. Authentik
|
||||
## 2. Authentik — providers done 2026-10-18
|
||||
|
||||
- **Audiobookshelf (Pattern A, native OIDC).** Create the provider `homelab-audiobooks` using the CLAUDE.md template, with these strict redirect URIs:
|
||||
- `https://audiobooks.ginnoir.com/auth/openid/callback`
|
||||
- `https://audiobooks.ginnoir.com/auth/openid/mobile-redirect`
|
||||
- `audiobookshelf://oauth` (mobile app)
|
||||
`scripts/run-books-auth.sh` creates everything below (idempotent, runs `scripts/setup-books-auth.py` through `ak shell`). **Done on 2026-10-18.**
|
||||
|
||||
Then create the application with slug `audiobooks`. In ABS, go to Settings → Authentication → OpenID Connect. Set the issuer to `https://auth.ginnoir.com/application/o/audiobooks/`, add the client ID and secret, and add `audiobookshelf://oauth` to the allowed mobile redirect URIs.
|
||||
- **chaptarr / books / storyteller (Pattern B).** Add a proxy provider (forward auth, single application) for each host. Attach each one to the embedded outpost. The Caddy blocks are already in place.
|
||||
- **chaptarr / books / storyteller (Pattern B):** proxy providers `homelab-{chaptarr,books,storyteller}` (pk 43–45). They're `forward_single`, cloned from `homelab-sonarr`, attached to the embedded outpost, and each has an app with the same slug.
|
||||
- **Audiobookshelf (Pattern A):** OIDC provider `homelab-audiobooks` (pk 46) plus app `audiobooks`. Its strict redirect URIs are `https://audiobooks.ginnoir.com/auth/openid/{callback,mobile-redirect}` and `audiobookshelf://oauth`. The client ID and secret are in `stack.env` (`ABS_OIDC_CLIENT_*`).
|
||||
**Still to do in the ABS UI** (it keeps OIDC settings in its own database): go to Settings → Authentication → OpenID Connect.
|
||||
- Issuer URL: `https://auth.ginnoir.com/application/o/audiobooks/`. Click *Auto-populate*, then paste the client ID and secret.
|
||||
- Allowed mobile redirect URIs: `audiobookshelf://oauth`.
|
||||
- Match existing users by username or email. Turn on auto-register if you want it.
|
||||
- **CWA single sign-on (optional).** In Admin → Edit Basic Configuration → Feature Configuration, turn on *Allow Reverse Proxy Authentication* and set the header to `X-Authentik-Username`. The CWA usernames must match the Authentik usernames.
|
||||
|
||||
## 3. Post-deploy checklist
|
||||
|
||||
@@ -7,3 +7,8 @@ PGID=1000
|
||||
|
||||
# storyteller — auth token signing key (secrets.token_hex(64))
|
||||
STORYTELLER_SECRET_KEY=5b41f526eb62c2fbe17527b65a0e71ff06d5927fbeb869541f52e812ba8366d28afe1ed26e9986853484995848e3a91ff2b0321ed583d9612af5d82005df22c9
|
||||
|
||||
# audiobookshelf — Authentik OIDC client (homelab-audiobooks, pk 46). Reference only:
|
||||
# ABS stores OIDC config in its own DB (Settings → Authentication).
|
||||
ABS_OIDC_CLIENT_ID=H617VXaM04KA0URJyWI52ThBpC3crIAZY77UYlzt
|
||||
ABS_OIDC_CLIENT_SECRET=1Tmw0PLw8CP82JX4Vz5nuOfpykh6XKngrU8a4Vspc6ZsIarJn3mG5GwKre1D5DnVqfF7MXbOc5g83lkR7NUcHPjlj3QgPX4BFnbUdl2r09LHrcH9X8CY4gJP0Sl1hdcr
|
||||
Reference in new issue
Block a user