github swissmakers/fail2ban-ui v1.3.5

latest releases: v1.6.2, v1.6.1, v1.6.0...
10 months ago

What's Changed

  • Allowing spaces in the input and ensuring the tags container wraps properly by @swissmakers in #61
  • Add optional OIDC authentication with Keycloak, Authentik, and Pocket-ID support by @swissmakers in #64
    This PR implements optional OpenID Connect (OIDC) authentication for Fail2ban UI, supporting three major identity providers: Keycloak, Authentik, and Pocket-ID. The implementation includes automatic client configuration for development environments, improved logout flows, and comprehensive UI enhancements.

OIDC Authentication

  • Optional authentication via environment variables (backward compatible)
  • Multi-provider support: Keycloak (recommended), Authentik, and Pocket-ID
  • Secure session management: AES-GCM encrypted cookies with automatic HTTPS/HTTP detection
  • CSRF protection: State parameter validation in OAuth flow
  • Configurable session timeouts: Default 1 hour, customizable via OIDC_SESSION_MAX_AGE
  • Automatic logout URL construction: Provider-specific logout handling with redirect back to login page
  • Callback endpoint protection: /api/ban and /api/unban remain accessible without OIDC (protected by callback secret)
  • Secure cookie handling: Automatic Secure flag detection based on request context
  • Session encryption: AES-GCM encryption for session cookies
  • Provider-specific logout: Correct logout URL construction for each provider (Keycloak uses post_logout_redirect_uri)

Development Environment

  • Automatic Keycloak client configuration: init-keycloak.sh script automatically creates and configures OIDC client
  • Complete OIDC testing environment: Docker Compose setup with Keycloak, PostgreSQL, and optional Authentik/Pocket-ID
  • Easy remote access: Configurable via .env file with PUBLIC_FRONTEND_URL and KEYCLOAK_URL
  • Local Fail2ban integration: Optional local Fail2ban instance for complete testing

New Environment Variables

Required (when OIDC enabled)

  • OIDC_ENABLED=true
  • OIDC_PROVIDER=keycloak|authentik|pocketid
  • OIDC_ISSUER_URL - Provider issuer URL
  • OIDC_CLIENT_ID - OIDC client ID
  • OIDC_CLIENT_SECRET - OIDC client secret (or OIDC_CLIENT_SECRET_FILE for auto-config)
  • OIDC_REDIRECT_URL - Callback URL

Optional

  • OIDC_SCOPES - Default: openid,profile,email
  • OIDC_SESSION_SECRET - Auto-generated if not provided
  • OIDC_SESSION_MAX_AGE - Default: 3600 seconds
  • OIDC_USERNAME_CLAIM - Default: preferred_username
  • OIDC_LOGOUT_URL - Auto-constructed if not set
  • OIDC_SKIP_VERIFY - Skip TLS verification (dev only)

Full Changelog: v1.3.0...v1.3.5

Don't miss a new fail2ban-ui release

NewReleases is sending notifications on new releases.