Authentication
ZenSearch ships with three authentication modes for self-hosted deployments. Pick one at install time; switching later requires re-provisioning user accounts but is otherwise straightforward.
| Mode | Use case | Status |
|---|---|---|
| OIDC | Self-hosted SSO via Keycloak, Auth0, Okta, Azure AD, Google, or any OIDC-compliant provider. The default for production. | GA |
| Clerk | Managed identity service. Useful for cloud-style deployments without standing up your own IdP. | GA |
| SAML | Enterprise SSO for IdPs that don't speak OIDC, or where SAML is the corporate standard. | Available on Enterprise plans with deployment assistance |
| None | Single shared dev identity. Evaluation only — never expose a none-mode deployment to a network where multiple users can reach it. | Dev only |
OIDC covers the vast majority of modern IdPs — Okta, Azure AD, Auth0, Keycloak, Google Workspace, and every other OIDC-compliant provider. If you're evaluating between SAML and OIDC for a new deployment, we recommend OIDC. SAML integrations are supported on Enterprise plans and typically require light engagement from our team to configure against your specific IdP.
The default Developer Edition install uses None mode for zero-config evaluation. Enable a real provider before sharing the deployment with your team.
OIDC
OIDC works with any OpenID Connect–compliant provider (Keycloak, Auth0, Okta, Azure AD, Google Workspace, OneLogin, JumpCloud, etc.).
Setup
-
In your IdP, register a new application:
- Application type: Web / SPA depending on your provider's terminology
- Redirect URI:
https://your-zensearch-host/auth/callback - Scopes: at minimum
openid,profile,email. Add any custom claims you want surfaced (e.g.,groups,manager_email).
-
Copy the issuer URL, client ID, and client secret.
-
In your ZenSearch
.env, set:AUTH_MODE=oidcOIDC_ISSUER_URL=https://your-idp.example.com/realms/zensearchOIDC_CLIENT_ID=zensearchOIDC_CLIENT_SECRET=... -
Restart ZenSearch.
Provider-specific issuer URLs
| Provider | Issuer URL |
|---|---|
| Keycloak | https://keycloak.example.com/realms/<realm> |
| Auth0 | https://<tenant>.auth0.com/ |
| Okta | https://<org>.okta.com/oauth2/default |
| Google Workspace | https://accounts.google.com |
| Azure AD | https://login.microsoftonline.com/<tenant-id>/v2.0 |
| OneLogin | https://<subdomain>.onelogin.com/oidc/2 |
Custom claims
If your IdP includes additional claims in the ID token, ZenSearch can use them to keep the org chart in sync automatically:
manager_email(ormanager/reports_to) → reports-to relationshipdepartment(ordept)title(orjob_title)job_role(ororg_role)
Both top-level claims and public_metadata (for Clerk-style claim bags) are read. Empty values don't clobber existing CSV-imported data.
SAML
SAML is available on Enterprise plans. Configuration varies meaningfully by IdP (metadata discovery, attribute mapping, signed vs unsigned assertions, IdP-initiated vs SP-initiated flow), so SAML rollouts are supported as an engaged process with our team rather than a DIY .env setting.
If SAML is a hard requirement, contact [email protected] — we'll work through IdP metadata, attribute mapping, and test-assertion validation with you. If you're flexible on protocol, OIDC typically gets you to production faster and integrates the same IdPs (Okta, Azure AD, Auth0, OneLogin, JumpCloud, etc.).
Group / role claims on SAML assertions, once attribute mapping is configured, feed the same external RBAC mapping as OIDC groups.
Clerk
Clerk is a managed identity service that handles user sign-up, social logins, MFA, and session management. Useful when you don't want to operate your own IdP.
Setup
-
Create a Clerk application at clerk.com.
-
Add the ZenSearch domain to the application's allowed origins.
-
Copy the Frontend API and Secret Key from the Clerk dashboard.
-
In your ZenSearch
.env:AUTH_MODE=clerkCLERK_DOMAIN=your-app.clerk.accounts.devCLERK_SECRET_KEY=... -
Restart ZenSearch.
User identity, claims, and sessions are managed entirely in the Clerk dashboard.
Switching modes
Changing AUTH_MODE after users are provisioned is supported but requires care:
- Existing users keep their internal IDs and team memberships.
- On next sign-in, the new provider must return a matching
emailclaim for ZenSearch to link the existing record. - Mismatched emails create new users — you'll then need to migrate their team memberships manually.
For production, pick a mode at install time and stick with it.
None mode (development only)
AUTH_MODE=none skips all authentication. Every request is treated as the same hardcoded development user. This is convenient for local evaluation but is not safe for any deployment reachable by more than one person.
The platform refuses to start in none mode if ENVIRONMENT=production.
Related
- Roles & Permissions — what each ZenSearch role can do
- Approval Routing — uses org chart claims pulled from the IdP
- Self-Hosting Guide — overall deployment setup