Let apps describe their sign-in client: [sso] callback, pkce, token_auth

A rehearsal with Vikunja showed apps with their own redirect path or no
PKCE needed a bridge in the container. coreapp.toml's [sso] now sets the
Authelia client's callback, PKCE and token method; changes re-register
the client, and a failed update restores it. The skill covers [sso],
images without a shell and upstream ENV defaults; coreapp shell and
status explain rough edges the rehearsal hit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 17:45:54 -07:00
co-authored by Claude Opus 5.5
parent e2d9381c35
commit 5d06f1bd9b
10 changed files with 174 additions and 12 deletions
+8 -1
View File
@@ -198,6 +198,9 @@ cmd_new() {
[[ -n "$mysql" ]] && needs="\"mysql\"$needs"
[[ -n "$email" ]] && needs="$needs, \"email\""
sed -i "s/^needs = .*/needs = [${needs#, }]/" "$name/coreapp.toml"
# The example apps with a database or sign-in are Python, not www/
# shellcheck disable=SC2016 # backquotes are Markdown
[[ -d "$name/www" ]] || sed -i 's|`www/`|the `.py` files|g' "$name/README.md"
# The example apps with a database or sign-in have a /health path
[[ ${#overlays[@]} -gt 0 ]] && sed -i 's|^health = .*|health = "/health"|' "$name/coreapp.toml"
@@ -294,10 +297,12 @@ cmd_status() {
local domain
load_app
domain="$(core_domain)"
local address
core "docker ps -a --filter name='^$NAME\$' --format 'Container: {{.Names}} {{.Status}} image {{.Image}}'
[ -n \"\$(docker ps -aq --filter name='^$NAME\$')\" ] || echo 'Not installed on the Core.'"
echo "App: $TITLE $(image)"
echo "Address on the Core: $(core "sed -n 's/^INTERNAL_IP=//p' /federated/services/$NAME/service 2> /dev/null"), port $PORT"
address="$(core "sed -n 's/^INTERNAL_IP=//p' /federated/services/$NAME/service 2> /dev/null || true")"
[[ -z "$address" ]] || echo "Address on the Core: $address, port $PORT"
echo "Needs: ${NEEDS:-nothing}"
echo "URL: https://$NAME.$domain/"
}
@@ -313,6 +318,8 @@ cmd_logs() {
cmd_shell() {
load_app
core "docker exec $NAME sh -c : > /dev/null 2>&1" \
|| die "Can't run a shell in $NAME: it isn't running (coreapp status, coreapp logs), or its image has no sh (images built FROM scratch or distroless). coreapp logs shows its output."
if [[ $# -gt 0 ]]; then
# One command, without a terminal, so scripts and agents can use it:
# coreapp shell 'ls -l /data'