Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

1.8 KB
Raw Blame

title: OIDC and LDAP description: Connect Alexandrie to central identity, including an LDAP directory. navigation: icon: i-lucide-key-round

Alexandrie uses OpenID Connect (OIDC) for federated authentication. LDAP is not configured directly in Alexandrie: use an identity provider that connects to LDAP, such as Keycloak, Authentik, or an equivalent service, and expose OIDC to Alexandrie.

Prepare the identity provider

In your OIDC provider:

  1. connect the LDAP directory and map required attributes;
  2. create a confidential OIDC client for Alexandrie;
  3. allow the redirect URI https://wiki.example.com/login/oidc/callback;
  4. collect the OpenID discovery URL, client ID, and client secret.

Register the provider

Up to ten providers are available. For the first one, add the following variables to .env and pass them into the backend service environment if they are not already in your Compose manifest.

OIDC_1_CONFIG_URL=https://sso.example.com/realms/main/.well-known/openid-configuration
OIDC_1_CLIENT_ID=alexandrie
OIDC_1_CLIENT_SECRET=a-confidential-secret
OIDC_1_PROVIDER_NAME=Company SSO
services:
  backend:
    environment:
      OIDC_1_CONFIG_URL: ${OIDC_1_CONFIG_URL}
      OIDC_1_CLIENT_ID: ${OIDC_1_CLIENT_ID}
      OIDC_1_CLIENT_SECRET: ${OIDC_1_CLIENT_SECRET}
      OIDC_1_PROVIDER_NAME: ${OIDC_1_PROVIDER_NAME}

Restart the backend. To enforce SSO, set CONFIG_DISABLE_NATIVE_LOGIN=true. You can also hide the local form with CONFIG_HIDE_NATIVE_LOGIN=true and immediately redirect to the provider with CONFIG_OIDC_PROVIDER_AUTO_REDIRECT; it must exactly match OIDC_1_PROVIDER_NAME.

You can use any provider that implements the OpenID Connect standard. But the frontend support icons for the following providers:

  • Google
  • Microsoft
  • Discord
  • GitHub
  • Apple
  • Authentik
  • Keycloak