diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..30f9e428c --- /dev/null +++ b/.env.example @@ -0,0 +1,79 @@ +# PlanarAlly Environment Configuration +# Copy this file to .env and configure your values + +# Python environment +PYTHONPATH=./server/src +MYPYPATH=./server/src + +# ============================================================================= +# GENERAL CONFIGURATION +# ============================================================================= + +# The client url is the full URL to the landing page of the application +PA_CLIENT_URL=https://your-domain.com/ + +# Allow users to sign up for new accounts +PA_ALLOW_SIGNUPS=true + +# Enable username/password login (set to false to use only OIDC) +PA_USERNAME_PASS=true + +# Enable exporting of campaigns +PA_ENABLE_EXPORT=true + +# ============================================================================= +# WEBSERVER CONFIGURATION +# ============================================================================= + +# Host and port for the webserver +PA_WEBSERVER_HOST=0.0.0.0 +PA_WEBSERVER_PORT=8000 + +# CORS allowed origins +PA_CORS_ALLOWED_ORIGINS=https://your-domain.com/ + +# ============================================================================= +# OIDC CONFIGURATION +# ============================================================================= + +# Enable OIDC authentication +PA_OIDC_ENABLED=false + +# OIDC provider domain (for discovery) +PA_OIDC_DOMAIN=https://your-oidc-provider.com + +# OIDC client credentials +PA_OIDC_CLIENT_ID=your-client-id +PA_OIDC_CLIENT_SECRET=your-client-secret + +# OIDC audience (optional) +PA_OIDC_AUDIENCE= + +# OIDC provider display name +PA_OIDC_PROVIDER_NAME=OIDC + +# Username field from OIDC user info to use as PlanarAlly username +# Options: preferred_username, name, email, sub, given_name, nickname +PA_OIDC_USERNAME_FIELD=preferred_username + +# Direct OIDC URL overrides (bypass discovery) +PA_OIDC_AUTHORIZE_URL=https://your-oidc-provider.com/auth +PA_OIDC_TOKEN_URL=https://your-oidc-provider.com/token +PA_OIDC_USERINFO_URL=https://your-oidc-provider.com/userinfo + +# ============================================================================= +# EXAMPLE CONFIGURATIONS +# ============================================================================= + +# Example 1: OIDC-only authentication +# PA_USERNAME_PASS=false +# PA_OIDC_ENABLED=true + +# Example 2: Both authentication methods +# PA_USERNAME_PASS=true +# PA_OIDC_ENABLED=true + +# OIDC scopes to request (space-separated) +# Standard scopes: openid, profile, email, address, phone +# Custom scopes: groups, roles, department (provider-specific) +PA_OIDC_SCOPE=openid profile email diff --git a/CHANGELOG.md b/CHANGELOG.md index dcd9014a6..cd9f0bd19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,21 @@ tech changes will usually be stripped from release notes for the public ## Unreleased +### Added + +- **OIDC (OpenID Connect) Authentication Support** + - Full OIDC authentication flow implementation with OAuth2 authorization code flow + - Support for OIDC discovery endpoints for automatic provider configuration + - Configurable OIDC provider settings including domain, client credentials, and scopes + - Option for direct URL configuration to bypass discovery for custom providers + - Automatic user creation and management with configurable username field mapping + - Secure state parameter validation to prevent CSRF attacks + - Server-side token exchange and user information retrieval + - Client-side OIDC login UI with provider-specific branding support + - Seamless integration with existing user management system + - [server] Fallback safety mechanism to prevent user lockout when OIDC is misconfigured + - [server] Comprehensive logging for troubleshooting OIDC authentication flows + - [server] Support for custom audience parameters for provider-specific requirements ## [2025.3] ### Added diff --git a/client/index.html b/client/index.html index be75bd25f..47ac88118 100644 --- a/client/index.html +++ b/client/index.html @@ -5,7 +5,13 @@ + + + + + + -