Connect Outline to Keycloak

Connect Outline to Keycloak with OIDC discovery, stable account mapping, deliberate logout behavior and collection-permission acceptance checks.

Last updated

In short

  • Outline OIDC discovery reduces manual endpoint configuration.
  • Authentication does not automatically synchronize collection permissions.
  • Test logout and existing-account linking before automatic redirects.
On this page (6)

Integrations · Part of Outline

Connect identity without widening knowledge access

Outline can use an OIDC-compatible provider such as Keycloak for sign-in. The integration should establish who the person is while preserving the intended workspace, collection and document permissions. Granting every authenticated employee access to a wiki may be appropriate for public internal guidance, but it is not appropriate for every collection.

This is a documented reference procedure with an acceptance matrix. It is not a claim that a particular Outline and Keycloak release pair has been lab-tested. Record both releases, the deployment method, the existing authentication providers and the applicable Outline licence. Source availability should not be described as unrestricted rights to offer every form of hosted service.

Choose discovery and exact redirects

The Outline OIDC documentation supports automatic discovery through an issuer URL and client credentials. It also describes manual endpoint configuration. Prefer the method supported by your selected release and avoid maintaining two conflicting sources of endpoint configuration.

Setting Purpose Validation
OIDC_ISSUER_URL Locate the intended provider’s discovery document Expected HTTPS realm and signing-key source
OIDC_CLIENT_ID Identify Outline to Keycloak Dedicated client for this environment
OIDC_CLIENT_SECRET Authenticate the application Protected secret with rotation owner
Redirect URI Return the browser to Outline Exact application callback, no wildcard
Username claim Profile/account mapping behavior Existing identity survives a rename
Logout behavior Prevent immediate unintended reauthentication Explicit end-of-session test

Create the client in the intended Keycloak realm and configure the callback required by the selected Outline version. Use the application’s actual public URL, including any path prefix. Reverse-proxy scheme and host configuration must agree with that URL.

Define account linking before first login

If the workspace already contains accounts from another provider, inventory their identifiers, email addresses and ownership. A person who signs in with Keycloak should reach the intended existing account rather than receive a new identity with different access.

Use synthetic cases for an existing user, a new user, an address change and a colliding address. Require an authoritative, verified relationship before linking accounts. Do not use a matching display name as evidence of identity. Keep a reconciliation record for cases that require administrator intervention.

Keycloak’s administration guide describes client scopes, mappers and identity lifecycle. Limit the claims sent to Outline to those needed for the integration. A directory group existing in a token does not prove that the application uses it to maintain collection membership.

Keep collection authorization explicit

Create three synthetic collections: a general handbook, an engineering notebook and a restricted management record. Populate each with harmless unique marker phrases. Assign a general employee, an engineering member and an administrator the intended access.

User action Expected result
General employee searches the handbook Finds permitted documents
General employee searches a restricted marker Receives no restricted content or revealing preview
Engineering member opens the engineering collection Can read or edit according to the chosen role
Employee opens a direct restricted-document URL Access remains denied
Guest or external identity signs in Receives only explicitly approved access
Administrator changes membership Change takes effect through the documented lifecycle

Check exports, shared links, attachments and search results as well as the collection list. Hiding a collection in navigation is not enough if a direct link still exposes it. Record which sharing features are allowed for the workspace and which require approval.

If automated provisioning, group synchronization or advanced access features are required, verify their current edition and integration support separately. Basic OIDC sign-in should not be used as evidence that those lifecycle functions exist.

Make logout behavior understandable

Outline’s OIDC documentation calls out logout-related settings, including disabling automatic redirection or supplying a logout URI. Decide whether signing out ends only the Outline session or also initiates an identity-provider logout, then test the actual browser behavior.

A user who clicks logout and is immediately signed back in by an existing Keycloak session may reasonably think logout failed. Explain the intended behavior in the support procedure and make sure shared-device use is handled appropriately. Also test a disabled Keycloak account with an already-open Outline session; fresh-login denial does not establish immediate revocation of an existing application session.

Preserve recovery and content ownership

Back up Outline’s database, document attachments, configuration and secret material needed for recovery. Keep Keycloak’s relevant state under its own backup process. Restore into an isolated environment and verify that documents still belong to the correct identities before exposing the restored workspace.

Save the previous authentication configuration and maintain an approved recovery route during the pilot. If the integration fails, restore the old provider configuration and reconcile any newly created accounts. Do not delete a duplicate-looking identity until its document ownership and contributions have been inspected.

Recheck the acceptance matrix after application upgrades, claim changes and signing-key rotation. The integration is ready when users retain the correct account, collection access remains narrow, logout behaves as documented and administrators can recover without losing the knowledge base.

Sources and further reading

Use the linked documentation to confirm the version, edition and contract that apply to your project.

Connect our wiki identity

Bring existing Outline users, collection permissions, guest policy and the desired account lifecycle.