Schedule icon
Request icon
Switch icon
SlackIncomingWebhook icon
Fail icon
Log icon

Casdoor IAM Auth Engine and OIDC Discovery Sentinel

Audit Casdoor IAM single sign-on engine health, verify OIDC discovery endpoints and signing keys, and dispatch Slack alerts on authentication degradation.

Categories
Infrastructure

Casdoor is an open-source, UI-first Identity and Access Management (IAM) and Single Sign-On (SSO) platform supporting OAuth 2.0, OpenID Connect (OIDC), SAML, CAS, and LDAP federations. In production architectures, Casdoor governs user authentication, JWT token issuance, and authorization policies across microservices, internal dashboards, and customer-facing portals.

If the Casdoor daemon hangs, database connection pools exhaust, or the OpenID Connect discovery document (/.well-known/openid-configuration) becomes unavailable, all downstream applications fail to validate tokens or authenticate new logins. This blueprint implements an automated Sentinel that audits Casdoor core health, validates OIDC discovery metadata, and alerts engineering teams via Slack before login outages propagate.

How it works

  1. Scheduled Audit Trigger: Runs on a configurable 15-minute interval (*/15 * * * *), disabled by default for controlled onboarding and ad-hoc manual validation.
  2. Core Health Probe: Dispatches an HTTP GET request to /api/health to confirm the Go application runtime is responsive and backend database connectivity is intact.
  3. OIDC Federation Verification: Queries the OpenID Connect discovery endpoint (/.well-known/openid-configuration) to verify the issuer URI, authorization endpoints, and JSON Web Key Sets (JWKS).
  4. Condition Classification: Evaluates HTTP response codes and metadata integrity within an io.kestra.plugin.core.flow.Switch task, routing executions into AUTH_ENGINE_OFFLINE, OIDC_DISCOVERY_DEGRADED, or HEALTHY pathways.
  5. Slack Incident Alerting: Issues formatted incident notifications via io.kestra.plugin.slack.notifications.SlackIncomingWebhook with host coordinates, status codes, and triage runbooks.
  6. Deterministic Failure & Audit: Terminates anomalous executions with io.kestra.plugin.core.execution.Fail to enforce SLA tracking, and emits a final audit log capturing execution telemetry.

What you get

  • Automated IAM Outage Detection: Early warning when authentication APIs fail, preventing silent login disruptions across all connected apps.
  • OIDC Metadata Integrity Auditing: Verifies that public discovery endpoints and token signing keys remain accessible for federated clients.
  • Triage-Ready Incident Notifications: Formatted Slack alerts providing hostname coordinates, status codes, and immediate operational remediation steps.
  • Declarative Security Automation: Eliminates unmanaged cron jobs and fragile shell scripts with auditable, version-controlled YAML.

Who it's for

  • Security & IAM Engineers: Managing central identity providers, user directories, and single sign-on federations.
  • DevOps & Platform Teams: Responsible for zero-trust authentication infrastructure uptime and service availability.
  • Site Reliability Engineers: Monitoring critical path dependency health across internal and customer authentication layers.

Why orchestrate this with Kestra

  • Multi-Endpoint Health Probing: Chains core process checks and OpenID Connect protocol validation in a single declarative flow.
  • Stateful Flow Routing: Evaluates complex responses with Pebble expressions without requiring custom monitoring microservices.
  • Secure Credential Injection: Injects webhook URLs and secrets dynamically using native namespace secret management.
  • Execution History & Replay: Stores an immutable timeline of health audit outcomes for compliance and SOC 2 security reporting.

Prerequisites

  • A running Casdoor instance with HTTP access enabled.
  • Network connectivity from the Kestra worker to the Casdoor service port (8000).
  • An incoming webhook URL configured in your target Slack workspace.

Secrets

  • SLACK_WEBHOOK_URL: Target Slack incoming webhook URL for operational alerts and incident escalation (required).

Quick start

  1. Configure the SLACK_WEBHOOK_URL secret in your Kestra namespace settings.
  2. Start a local Casdoor container for testing: docker run -d --name casdoor -p 8000:8000 casbin/casdoor:latest.
  3. Import this blueprint into Kestra and trigger an execution with default inputs.
  4. Confirm that the health probe and OIDC discovery tasks succeed, and verify execution logs in the Kestra UI.
  5. Enable the schedule trigger to establish automated 15-minute continuous monitoring.

How to extend

  • Synthetic User Authentication: Add tasks to simulate user login via OAuth 2.0 Resource Owner Password Credentials (ROPC) grant.
  • LDAP Federation Testing: Chain io.kestra.plugin.core.http.Request tasks to test sync status with upstream enterprise LDAP directories.
  • PagerDuty Escalation: Add io.kestra.plugin.pagerduty.notifications.PagerDutyAlert for high-severity authentication outages.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.