Request icon
Return icon
Switch icon
Log icon
SlackIncomingWebhook icon
OutputValues icon
Schedule icon

Authelia SSO Access Portal and Backend Readiness Sentinel

Audit Authelia SSO portal health, validate Redis session storage and backend database readiness, classify posture, and route Slack alerts via Kestra.

Categories
BusinessInfrastructure

Continuously audits Authelia Single Sign-On (SSO) and Multi-Factor Authentication (MFA) portals by probing system health and authentication engine state, validating backend database and Redis session storage connectivity, classifying operational posture, and dispatching real-time incident escalation alerts to Slack.

This blueprint was created by Mohit Jeswani.

How it works

  1. probe_health_endpoint (io.kestra.plugin.core.http.Request) queries /api/health to verify that the Authelia server process is live and that its underlying session storage (Redis) and authentication database (PostgreSQL, MySQL, SQLite, or LDAP) are responsive.
  2. probe_state_endpoint (io.kestra.plugin.core.http.Request) queries /api/state to confirm that the authentication engine is fully initialized and serving user requests.
  3. classify_authelia_posture (io.kestra.plugin.core.debug.Return) evaluates endpoint response codes and JSON payload attributes using a declarative Pebble expression:
    • Classifies as INSTANCE_UNREACHABLE if endpoints cannot be reached over the network.
    • Classifies as STORAGE_OR_BACKEND_DEGRADED if /api/health returns non-200 or the JSON status attribute does not equal expected_status (indicates Redis session pool failure or database disconnection).
    • Classifies as AUTH_ENGINE_UNREADY if /api/state returns a non-200 status code.
    • Classifies as HEALTHY_COMPLIANT when both endpoints return HTTP 200 with matching status attributes.
  4. route_by_posture (io.kestra.plugin.core.flow.Switch) routes execution based on the classification:
    • HEALTHY_COMPLIANT: Logs successful audit confirmation with endpoint status codes.
    • STORAGE_OR_BACKEND_DEGRADED: Dispatches a critical Slack alert warning that Redis session storage or user databases are down and authentication is blocked.
    • AUTH_ENGINE_UNREADY: Alerts Slack that the authentication engine is in an unready state.
    • INSTANCE_UNREACHABLE: Notifies on-call teams of total portal unavailability.
  5. audit_summary (io.kestra.plugin.core.output.OutputValues) exports structured metrics capturing endpoint HTTP status codes and operational posture for compliance logging.
  6. errors sends a priority failure notification to Slack if unhandled workflow execution errors occur.

What you get

  • Automated, continuous validation of critical SSO and MFA portals without relying on manual user login tests.
  • Early warning of Redis session store connection exhaustion and database outages before users are locked out of internal applications.
  • Protection against reverse-proxy forward-auth cascade failures across Traefik, NGINX, Envoy, and Caddy.
  • Contextual Slack alerts detailing exact endpoint failure codes, payload statuses, and target hostnames.
  • Auditable execution history satisfying SOC2 and ISO27001 identity and access management controls.

Who it's for

  • Platform Engineers and SREs responsible for uptime and reliability of SSO authentication gateways.
  • Security Operations (SecOps) teams maintaining high-availability perimeter authentication.
  • DevOps Engineers managing self-hosted Docker or Kubernetes Authelia deployments.

Why orchestrate this with Kestra

Authelia acts as the security gateway for all internal web services, dashboards, and APIs. When Authelia or its session store fails, every reverse proxy forward-auth check fails, causing total company-wide access lockouts. Standard TCP port checks cannot verify whether Authelia's Redis session cache is operational or whether backend LDAP/SQL queries are succeeding. Kestra orchestrates multi-stage HTTP inspection, declarative Pebble classification, failure escalation to Slack, and centralized compliance audit trails in a single workflow.

Prerequisites

  • A running Authelia instance (Docker container or Kubernetes pod).
  • An incoming Slack webhook URL for incident notifications.

Secrets

  • SLACK_WEBHOOK_URL: Incoming Slack webhook URL used by alert_storage_degraded_slack, alert_auth_engine_slack, alert_unreachable_slack, and alert_flow_failure.

Quick start

  1. Configure SLACK_WEBHOOK_URL in your Kestra namespace secrets.
  2. Start a local Authelia instance using Docker:
    docker run -d --name authelia -p 9091:9091 authelia/authelia:latest
    
  3. Import this blueprint into Kestra and click Execute with default inputs (authelia_host: "localhost").
  4. Confirm that classify_authelia_posture classifies HEALTHY_COMPLIANT and inspect the structured telemetry in audit_summary.
  5. Enable the hourly_canary schedule to automate continuous SSO health monitoring.

How to extend

  • Add simulated user authentication testing using io.kestra.plugin.core.http.Request to perform a mock 1FA credential submission.
  • Integrate PagerDuty or Opsgenie alerts for out-of-hours on-call paging during INSTANCE_UNREACHABLE or STORAGE_OR_BACKEND_DEGRADED incidents.
  • Expand multi-cluster monitoring by looping over an array of Authelia edge instances using io.kestra.plugin.core.flow.ForEach.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.