API Evolution Watchtower
Monitor third-party OpenAPI specifications for consumer-impacting contract changes and govern accepted revisions with persistent PASS/WARN/BLOCK decisions.
Audit Authentik background worker tasks, route failures to Slack, and safely retry stalled LDAP synchronization or certificate renewal routines.
Authentik is an open-source Identity Provider focused on flexibility and security. Production deployments rely on background worker tasks to synchronize external LDAP and Active Directory user directories, renew ACME and SAML signing certificates, prune expired user sessions, and sync SCIM identities. When background tasks encounter upstream directory timeouts, TLS handshakes with expiring authorities, or database transaction locks, Authentik flags them with error states. Because task failures in an identity plane operate quietly in the background, administrators often discover broken directory syncs or expired signing certificates only after user authentications fail. This blueprint provides a continuous sentinel that monitors the Authentik task management API, alerts security teams before federation fails, and triggers safe, guarded retries when enabled.
every_fifteen_minutes) initiates background auditing every 15 minutes, with manual on-demand execution supported via inputs.probe_tasks) connects to the Authentik REST API endpoint (/api/v3/tasks/tasks/) using bearer token authentication to retrieve execution statuses of all background workers.classify_status) processes task state arrays using Pebble template filters, assigning the run to HEALTHY, WARNING, CRITICAL, or PROBE_FAILED.route_by_status) switches downstream execution paths based on the classified operational health tier.CRITICAL state, alert_critical_slack dispatches an incident alert to the configured Slack channel with target instance details and execution metadata.check_remediation) evaluates whether auto_retry is enabled and dry_run is disabled. If approved, retry_tasks loops across failing tasks and issues authenticated POST requests to the task retry endpoint (/api/v3/tasks/tasks/{task_id}/retry/).PROBE_FAILED or API unreachable states, dedicated alerts notify administrators of connectivity degradation or expired API tokens.log_audit_summary) outputs a structured record documenting the execution outcome, health tier, and run lineage.tasks.view_task and tasks.retry_task permissions.AUTHENTIK_API_TOKEN: API token for authenticating against the Authentik REST API.SLACK_WEBHOOK_URL: HTTPS incoming webhook URL for the security alert Slack channel.AUTHENTIK_API_TOKEN and SLACK_WEBHOOK_URL in your Kestra namespace secrets.dry_run: true to confirm API connectivity.every_fifteen_minutes schedule trigger to establish automated continuous surveillance.io.kestra.plugin.prometheus to correlate task failures with worker memory and queue backlogs.io.kestra.plugin.pagerduty.notifications.PagerDutyAlert for sustained directory sync outages.