From 551c254b89844d8713d3c7fc53fe4d3bda2ca141 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 8 Jun 2026 19:02:00 +0000 Subject: [PATCH] Add Authelia SSO prompt to js99er, magicmirror, wolf-pair These services have no built-in auth. Per CLAUDE.md they should check for Authelia and offer to protect them with SSO before calling configure_caddy_for_service. Adds the standard prompt_yn + import authelia extra block pattern to all three. https://claude.ai/code/session_014CCYqVwW6d6f5dw1qRokYt --- services/js99er.sh | 8 +++++++- services/magicmirror.sh | 10 +++++++++- services/wolf-pair.sh | 8 +++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/services/js99er.sh b/services/js99er.sh index b68ed73..3ee645b 100644 --- a/services/js99er.sh +++ b/services/js99er.sh @@ -420,7 +420,13 @@ COMPOSE log_success "js99er configured at $JS99ER_DIR" # ── 5. Reverse proxy (no-ops if Caddy isn't installed locally) ─────────── - configure_caddy_for_service "js99er" "js99er:80" "js99er" + local JS99ER_EXTRA_BLOCK="" + if [ -d "$DOCKER_DIR/authelia" ]; then + local _use_auth="" + prompt_yn "Protect js99er with Authelia SSO? (y/n):" "y" _use_auth + [[ "$_use_auth" =~ ^[Yy]$ ]] && JS99ER_EXTRA_BLOCK=" import authelia" + fi + configure_caddy_for_service "js99er" "js99er:80" "js99er" "$JS99ER_EXTRA_BLOCK" # ── 6. Build & start ───────────────────────────────────────────────────── local START_JS99ER="" diff --git a/services/magicmirror.sh b/services/magicmirror.sh index ab78ba2..6e1bd14 100644 --- a/services/magicmirror.sh +++ b/services/magicmirror.sh @@ -283,7 +283,15 @@ MM_COMPOSE log_success "MagicMirror instance $i configured at $MM_DIR (port $MM_PORT)" # Offer Caddy only for first instance - [ "$i" -eq 1 ] && configure_caddy_for_service "MagicMirror" "magicmirror-${MM_PORT}:8080" "mirror" + if [ "$i" -eq 1 ]; then + local MM_EXTRA_BLOCK="" + if [ -d "$DOCKER_DIR/authelia" ]; then + local _use_auth="" + prompt_yn "Protect MagicMirror with Authelia SSO? (y/n):" "y" _use_auth + [[ "$_use_auth" =~ ^[Yy]$ ]] && MM_EXTRA_BLOCK=" import authelia" + fi + configure_caddy_for_service "MagicMirror" "magicmirror-${MM_PORT}:8080" "mirror" "$MM_EXTRA_BLOCK" + fi local START_MM="" prompt_yn "Start instance $i now? (y/n):" "y" START_MM diff --git a/services/wolf-pair.sh b/services/wolf-pair.sh index e1acf02..f549472 100644 --- a/services/wolf-pair.sh +++ b/services/wolf-pair.sh @@ -399,7 +399,13 @@ COMPOSE fi # ── 5. Caddy (optional) ─────────────────────────────────────────────────── - configure_caddy_for_service "wolf-pair" "$WOLFPAIR_PORT" "wolf-pair" + local WOLFPAIR_EXTRA_BLOCK="" + if [ -d "$DOCKER_DIR/authelia" ]; then + local _use_auth="" + prompt_yn "Protect wolf-pair with Authelia SSO? (y/n):" "y" _use_auth + [[ "$_use_auth" =~ ^[Yy]$ ]] && WOLFPAIR_EXTRA_BLOCK=" import authelia" + fi + configure_caddy_for_service "wolf-pair" "$WOLFPAIR_PORT" "wolf-pair" "$WOLFPAIR_EXTRA_BLOCK" # ── 6. README ───────────────────────────────────────────────────────────── write_readme "$WOLFPAIR_DIR" << 'MD'