diff --git a/ct/authentik.sh b/ct/authentik.sh index a90cf4885..e4414ddc4 100644 --- a/ct/authentik.sh +++ b/ct/authentik.sh @@ -47,8 +47,8 @@ function update_script() { RUST_PROFILE="minimal" RUST_TOOLCHAIN="stable" setup_rust setup_yq - AUTHENTIK_VERSION="version/2026.8.6" - # Source: https://github.com/goauthentik/fips/blob/main/Makefile#L26 + AUTHENTIK_VERSION="version/2026.8.7" + # Source: https://github.com/goauthentik/fips/blob/main/Makefile#L28 XMLSEC_VERSION="1.3.13" if check_for_gh_release "geoipupdate" "maxmind/geoipupdate"; then @@ -204,6 +204,20 @@ EOF systemctl start authentik-radius fi msg_ok "Started Services" + + msg_info "Waiting for authentik to become ready (up to 300s)" + CODE=000 + for _ in {1..60}; do + CODE=$(curl -ksI -m 3 https://127.0.0.1:9443/ | sed -n 's,^HTTP/[0-9.]* \([0-9]\{3\}\).*,\1,p' || true) + [[ "$CODE" == "200" || "$CODE" == "302" ]] && break + sleep 5 + done + if [[ "$CODE" == "200" || "$CODE" == "302" ]]; then + msg_ok "authentik is responding (HTTP ${CODE})" + else + msg_warn "authentik did not start responding (HTTP ${CODE}) within 300s. It may still be booting (migrations after an upgrade can take longer); check: journalctl -eu authentik-server" + fi + fi msg_ok "Updated successfully!" exit @@ -226,6 +240,19 @@ msg_info "Starting Services" ct_exec systemctl enable -q --now authentik-server authentik-worker msg_ok "Started Services" +msg_info "Waiting for authentik to become ready (up to 300s)" +CODE=000 +for _ in {1..60}; do + CODE=$(ct_exec curl -ksI -m 3 https://127.0.0.1:9443/ | sed -n 's,^HTTP/[0-9.]* \([0-9]\{3\}\).*,\1,p' || true) + [[ "$CODE" == "200" || "$CODE" == "302" ]] && break + sleep 5 +done +if [[ "$CODE" == "200" || "$CODE" == "302" ]]; then + msg_ok "authentik is responding (HTTP ${CODE})" +else + msg_warn "authentik did not start responding (HTTP ${CODE}) within 300s. It may still be booting (first boot runs migrations); check inside the container with journalctl -eu authentik-server" +fi + description msg_ok "Completed successfully!\n" diff --git a/install/authentik-install.sh b/install/authentik-install.sh index 053711bb2..b18235663 100644 --- a/install/authentik-install.sh +++ b/install/authentik-install.sh @@ -57,7 +57,7 @@ PG_VERSION="17" setup_postgresql PG_DB_NAME="authentik" PG_DB_USER="authentik" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db XMLSEC_VERSION="1.3.13" -AUTHENTIK_VERSION="version/2026.8.6" +AUTHENTIK_VERSION="version/2026.8.7" fetch_and_deploy_gh_release "xmlsec" "lsh123/xmlsec" "tarball" "${XMLSEC_VERSION}" "/opt/xmlsec" fetch_and_deploy_gh_release "authentik" "goauthentik/authentik" "tarball" "${AUTHENTIK_VERSION}" "/opt/authentik" GO_VERSION="$(grep -m1 '^go ' /opt/authentik/go.mod | awk '{print $2}')" setup_go @@ -108,7 +108,6 @@ DatabaseDirectory /opt/authentik-data/geoip RetryFor 5m Parallelism 1 EOF - echo "#39 19 * * 6,4 /usr/bin/geoipupdate -f /usr/local/etc/GeoIP.conf" | crontab - msg_info "Building binary. It may take more than 10 minutes, please be patient."