Enterprise SSO: CyberArk Identity (Idira), Auth0 and Keycloak
Your team signs in to KeelPilot with your organization’s identity provider (IdP) over OpenID Connect. Roles come from IdP groups, you can require SSO for every member, and with SCIM 2.0 deactivating someone in the IdP cuts their access to KeelPilot immediately. This guide covers CyberArk Identity (Idira), Auth0 and Keycloak; any other OIDC provider works with the “Other OIDC” preset.
What it is for and requirements
- Enterprise plan. Saving the configuration, Test connection, Test login and SCIM all require it. See Plans & limits.
- Who configures it: the organization owner or an admin, in Settings → Organization → Enterprise SSO (OIDC). Only the owner can change the provider (issuer, client ID and secret), the trust options, Require SSO, grant
adminthrough SSO and manage the SCIM token. An admin can view and test the configuration and adjust the rest (claims, scopes, domains, JIT, roles up toeditor, session length, SSO enabled). - The IdP must be reachable over public HTTPS (or through a public proxy). KeelPilot connects from its servers to the IdP (discovery, keys, token and userinfo) and blocks internal or non-HTTPS addresses. An on-premises IdP reachable only from your network will not work.
- Users sign in from the login screen with Have SSO OIDC? Click here, the Organization slug (SSO OIDC only) and Sign in with SSO (OIDC). Give them your organization slug.
| Action | Owner | Admin |
|---|---|---|
| View the configuration, Test connection, Test login, Link my SSO identity | Yes | Yes |
| Claims, extra scopes, client authentication, allowed domains, JIT, session length, SSO enabled | Yes | Yes |
| Map groups or the default role to viewer or editor | Yes | Yes |
| Issuer URL, Client ID, Client secret | Yes | No |
| Trust IdP emails, Trust the IdP’s MFA, acr values, Require SSO | Yes | No |
| Grant admin through SSO (mapping or default role) | Yes | No |
| Generate, rotate or revoke the SCIM token | Yes | No |
Values KeelPilot gives you
The Enterprise SSO (OIDC) panel shows them ready to copy, with your organization’s slug. On KeelPilot’s cloud they have this format:
- Redirect URI (“Redirect URI (copy it into the IdP)”):
https://app.keelpilot.io/api/auth/sso/oidc/<slug>/callback - Back-channel logout URL:
https://app.keelpilot.io/api/auth/sso/oidc/<slug>/backchannel-logout. The panel shows it with the Keycloak preset; with any other IdP that supports OIDC Back-Channel Logout the URL is the same (not applicable to CyberArk). - SCIM base URL:
https://app.keelpilot.io/api/scim/v2/<slug>, with the SCIM token as a Bearer token.
KeelPilot always requests the scopes openid email profile, plus whatever you add in Extra scopes. It uses Authorization Code with PKCE (S256), so the IdP application must be confidential (with a client secret) and allow that flow.
CyberArk Identity (Idira)
What the integration is
A standard OIDC integration (Authorization Code + PKCE) through a custom OpenID Connect web app. The menu names below come from CyberArk’s official documentation; they can vary with your tenant’s version.
Before you start
- An administrator role in CyberArk Identity.
- Permission to create a custom web app of type OpenID Connect.
1. Create the application in CyberArk
- 1Go to Manage → Identities → Web apps and click Add Web Apps. In the Custom tab, next to OpenID Connect, click Add and confirm. In Settings, enter the application ID (it goes in the issuer path) and a name (for example, KeelPilot).
- 2In Trust: paste KeelPilot’s redirect URI (below) in Authorized Redirect URIs; Enable full URI match comes on by default, leave it on.
- 3Still in Trust, under OpenID Connect client secrets, click + Generate New Secret, copy the secret right away (it is shown once and then masked) and click I’ve Saved the Secret. In older tenants the secret is generated automatically; to renew it use Regenerate Secret.
- 4Copy the OpenID Connect Client ID and the OpenID Connect Issuer URL (format
https://<tenant>/<application_id>). As an alternative you can use the OpenID Connect Metadata URL. - 5In Tokens, we recommend leaving Generate access and ID tokens with new structure (recommended) on. With it, email and name arrive through userinfo, and KeelPilot requests them automatically.
- 6If you are going to map roles, in Tokens → Script add
setClaimArray('groups', LoginUser.EffectiveGroupNames);and check it with Test (Select User shows the result). CyberArk sends no groups claim by default. Do not usesetIssuer()in that script: it changes the issuer and the login fails. - 7In Permissions, assign the users or roles that may sign in to KeelPilot.
Values that go into the IdP
- Redirect URI:
https://app.keelpilot.io/api/auth/sso/oidc/<slug>/callback - Back-channel logout URL: not applicable. CyberArk supports app-initiated logout (
end_session_endpoint), not back-channel; leave it empty.
2. Configure KeelPilot
- 1In Settings → Organization → Enterprise SSO (OIDC), under Identity provider, pick CyberArk Identity (Idira). The preset uses
client_secret_postas the client authentication method. - 2Enter the Issuer URL, the Client ID and the Client secret. Keep the Groups claim as
groups. - 3Save with SSO enabled off and validate with Test connection and Test login (see below).
email_verified: “Trust IdP emails”
CyberArk documents email_verified as a string and KeelPilot accepts it. If it does not arrive in your tenant (Test login shows it), the first login fails with email_verified_missing: turn on Trust IdP emails even without email_verified and combine it with Allowed email domains. The preset does not turn it on: the owner has to decide.
- What it implies: KeelPilot accepts the email your corporate IdP asserts, without verifying it itself. The IdP is the one guaranteeing it, so turn it on only if your tenant controls user emails, and restrict Allowed email domains to your company’s.
- The email only matters on the first login. From then on the account is identified by the IdP’s
sub. - An explicit
email_verified: falseis always rejected. Owner and admin accounts are never linked by email: they link with Link my SSO identity.
Groups
KeelPilot reads the groups claim you added in the Tokens script (or the one you set in Groups claim). Then map each group to a role and profile in the SSO panel.
MFA
CyberArk does not document amr/acr claims. If Test login does not show them, KeelPilot keeps asking for its own MFA, which is the safe behavior.
Validate before enabling
Run Test connection and Test login: they show the real claims the IdP sends without creating sessions. Only after that, consider turning on Require SSO. See Test before enabling.
3. SCIM (Provisioning tab)
- 1In the app’s Provisioning tab, check Enable provisioning for this application.
- 2SCIM Service URL: KeelPilot’s SCIM base URL (
https://app.keelpilot.io/api/scim/v2/<slug>). - 3Authorization Type: Authorization Header; Header Type: Bearer Token; Bearer Token: the token from Generate SCIM token. Click Verify.
- 4If you use groups, add them in Role Mappings (each role becomes a Destination Group).
- 5In the Provisioning Script, map
userNameto the user’s email. Otherwise the user created through SSO is not found and the create returns 409. - 6Preview Mode lets you test without writing anything; switch to Live Mode when it looks right.
Details in SCIM.
Logout
CyberArk supports app-initiated logout (end_session_endpoint), not back-channel logout. Signing out of KeelPilot does not close the CyberArk session; to cut access right away, deactivate the user (SCIM revokes their sessions).
Sources
Based on the official CyberArk Identity documentation (Idira Docs, build 9.0.0, October 2026). Menu and field names can vary with your tenant’s version.
- Add and configure the custom OpenID Connect application
- Customize the OpenID Connect Custom Logic script
- Provision user accounts to applications with SCIM
- Configure an OpenID Connect logout
- Claims and headers
Auth0
1. Create the application in Auth0
- 1Applications → Create Application → Regular Web Application.
- 2In the application’s Settings, add KeelPilot’s Redirect URI to Allowed Callback URLs and save. Copy the Domain, the Client ID and the Client Secret.
- 3Check which authentication method the application uses for the token endpoint (Client Secret Post or Client Secret Basic): KeelPilot has to use the same one.
- 4For roles, create a post-login Action that adds the user’s roles in a namespaced claim (Auth0 only allows custom claims with a namespace, an
https://URL of yours), and add it to the Login flow:
exports.onExecutePostLogin = async (event, api) => {
api.idToken.setCustomClaim(
'https://keelpilot.example/groups',
event.authorization?.roles ?? []
);
};Replace https://keelpilot.example/groups with your own namespace. event.authorization.roles carries the user’s Auth0 roles; if your connection provides groups, put those instead.
2. Configure KeelPilot
- Preset Auth0.
- Issuer URL:
https://<tenant>.auth0.com/(the application’s Domain withhttps://) or your custom domain, if you sign in through it. KeelPilot ignores the trailing slash when comparing. - Client authentication: the same method as the Auth0 application (
client_secret_postorclient_secret_basic). Automatic picksclient_secret_basicwhenever the IdP advertises it; if the exchange fails withtoken, force the method. - Groups claim: the exact name of the Action’s claim, for example
https://keelpilot.example/groups. KeelPilot reads it by exact name, dots included. - email_verified: Auth0 sends it. Leave Trust IdP emails off: a user with an unverified email in Auth0 is rejected with
email_unverifieduntil they verify it. - MFA: if Auth0 requires MFA, check with Test login which
amrit sends before turning on Trust the IdP’s MFA. - Back-channel logout: if your Auth0 tenant offers OIDC Back-Channel Logout, set KeelPilot’s back-channel logout URL in the application. Test connection shows whether the IdP advertises it.
- SCIM: we have not validated outbound SCIM provisioning from Auth0 to applications. With Auth0, use JIT and group mapping.
Keycloak
1. Create the client in Keycloak
- 1In your realm, go to Clients → Create client. Client type OpenID Connect, a Client ID (for example,
keelpilot). - 2In Capability config: Client authentication ON and Standard flow checked. KeelPilot needs nothing else.
- 3In Valid redirect URIs, KeelPilot’s Redirect URI (exact, no wildcards).
- 4In the client’s Credentials tab, copy the Client Secret.
- 5For groups: in the client’s dedicated client scope, add a Group Membership mapper with Token Claim Name
groupsand Add to ID token on. With or without Full group path both work: KeelPilot ignores the leading/. - 6In the client’s logout settings, set Backchannel logout URL to KeelPilot’s back-channel logout URL.
- 7Optional: in the client’s Advanced tab, require PKCE with method
S256. KeelPilot always sends it.
2. Configure KeelPilot
- Preset Keycloak.
- Issuer URL:
https://<host>/realms/<realm>. The Keycloak hostname must be public HTTPS. - Client authentication: Automatic (Keycloak accepts
client_secret_basic). - Groups claim:
groups. - email_verified: Keycloak sends it from the user’s Email verified field. Leave Trust IdP emails off; a user with an unverified email is rejected with
email_unverified. - MFA: run Test login to see the
amrandacryour authentication flow produces. If your OTP flow issues a specificacr, list it in acr values that prove MFA. - SCIM: Keycloak does not ship SCIM provisioning out of the box. There are community extensions, which we have not validated; with Keycloak, use JIT, group mapping and back-channel logout.
Mapping groups to roles
In Provisioning and roles, each row of IdP group → role maps a group to viewer, editor or admin. The groups come from the Groups claim and, if you use SCIM, from the groups the IdP provisioned.
- It is applied on every login: if someone changes groups in the IdP, their role in KeelPilot changes on their next login. If they match several groups, the most privileged role wins.
- Group names are compared case-insensitively and ignoring a leading
/(Keycloak’s full path). - The owner rule: owner is never granted or removed through SSO, and no group can be mapped to owner. The owner always keeps their role.
- Default role: if no group matches, the user gets Role when no group matches (
viewerby default), unless you turn on Deny access if the user isn’t in any mapped group: then they getno_groupand no account is created. - With Create the account on first login (JIT) on, the account is created on the first login with the resulting role. Turned off, only already-existing accounts (invited or provisioned by SCIM) get in; the rest get
not_provisioned. - With no mappings and no “deny”, the role of existing accounts is not touched.
- With mappings, each login sets the member’s role and removes the access profile assigned in Team (the panel maps groups to roles, not to profiles). See Access Profiles.
- With JIT or SCIM on, set Allowed email domains: any account the IdP authenticates can create a user.
Required SSO
Require SSO (owner only, with SSO enabled) makes SSO the only way in for members:
- Members cannot sign in with a password or Google, or request a password reset; reset links already sent stop working. An invitation can be accepted, but the session is opened through SSO.
- Existing sessions: when you turn it on, the password or Google sessions of members (not the owner) stop renewing at once; the access token in use expires within an hour at most. SSO sessions keep working.
- The owner is exempt and keeps their password and MFA: it is the break-glass account if the IdP goes down or is misconfigured. Keep its credentials safe and don’t share it.
- API keys keep working: they don’t go through the login. Revoke the ones you no longer use (SCIM deprovisioning revokes the user’s keys; see below).
- Before turning it on: link the owner’s and admins’ identity, test the login and do a real login with SSO enabled.
Maximum SSO session length (hours) (72 by default, from 1 to 720) caps SSO sessions: renewing does not extend them, and after that time the user signs in through the IdP again.
SCIM 2.0
With SCIM, the IdP creates, updates and deactivates users in KeelPilot without waiting for them to sign in. It is configured in SCIM 2.0 provisioning, at the bottom of the panel, by the owner.
- 1Save the SSO configuration first. Then click Generate SCIM token.
- 2Copy the token right away: it won’t be shown again. KeelPilot only stores a hash of it.
- 3In the IdP, set the SCIM base URL (
https://app.keelpilot.io/api/scim/v2/<slug>) and the token as a Bearer token. - 4To change it, Rotate SCIM token: the previous one stops working immediately, so update the IdP right after. Revoke token stops provisioning until you generate another.
What deprovisioning does
When the IdP deactivates a user (active=false) or deletes them, KeelPilot deactivates the account and, at that moment:
- revokes all their sessions and refresh tokens;
- revokes their kubeconfig tokens;
- revokes the API keys they created (they don’t come back if the account is reactivated);
- closes their open WebSockets (terminal, kubectl console, live logs): immediately on the server that holds them, and within about a minute at most on the others;
- blocks every way in: SSO, password and Google.
- A SCIM delete does not erase the account: it deactivates it and hides it from SCIM, to keep the audit trail. If the same organization provisions that email again, the account is reactivated.
- The owner cannot be deactivated or modified through SCIM.
- New users are created with Role when no group matches, and Allowed email domains also apply. An email that already exists is not linked (
409). - Groups pushed over SCIM count for the role mapping. Supported: Users (filters
userName eqandexternalId eq), Groups, ServiceProviderConfig, ResourceTypes and Schemas.
Back-channel logout
With OIDC Back-Channel Logout, the IdP notifies KeelPilot server to server when a session ends (for example, when an administrator closes it in the IdP). KeelPilot validates the logout_token (signature with the IdP’s keys, issuer, audience, the logout event, no nonce, single-use jti) and revokes all sessions of that person (sub) or of that IdP session (sid). Configure the URL in the IdP (Keycloak: Backchannel logout URL).
Test before enabling
- 1Fill in the panel and click Save SSO with SSO enabled off.
- 2Test connection reads the IdP’s discovery document and keys without saving anything. It shows whether it supports PKCE S256, the client authentication methods, the signing algorithms, the number of published keys, and whether it has userinfo, end_session and back-channel logout.
- 3The owner and each admin click Link my SSO identity while signed in: these accounts are never linked by email on the first login.
- 4Test login opens the IdP login (it works with SSO still disabled). Sign in with a test user: you return to the panel with the email,
email_verified, the groups, the resulting role, whether the IdP proved MFA, any problems and the claims received. No account or session is created, and no tokens are stored. - 5Adjust claims and mappings until the test comes back clean. Then turn on SSO enabled, save and try a real login in a private window.
- 6Only then, if you want, turn on Require SSO.
Security
What KeelPilot does on every SSO login, regardless of the IdP:
| Control | What KeelPilot does |
|---|---|
| PKCE | Authorization Code with PKCE S256 always. The code_verifier never leaves the server: it travels in an encrypted, HttpOnly cookie. |
| state | Random, bound to the browser that started the login (encrypted HttpOnly cookie, 10 minutes) and single-use: the server records consumed values. Protects against login CSRF. |
| nonce | Random, compared against the id_token. |
| id_token validation | Signature with the keys from the IdP’s discovery (with key rotation by kid); only RS256, RS384, RS512, PS256 and ES256 (no "none" or HMAC); exact issuer; aud and azp equal to the client ID; exp, iat and nbf with 60 s tolerance. The discovery document must belong to the configured issuer (mix-up protection). |
| Identity by sub | Each account is linked to (organization, issuer, sub). The email is only used on the first login, and only if it is verified or the owner chose to trust the IdP. Owner and admin accounts are never linked by email. Changing the issuer or client ID removes the previous links. userinfo data must have the same sub as the id_token. |
| Organization isolation | An IdP only answers for its organization: an account from another organization, or without one, is never linked (wrong_org). |
| Secret and tokens | The client secret is stored encrypted and never returns to the browser (the panel only shows “already set”). No IdP token goes into a URL or a log. The KeelPilot session is not in the URL either: the callback hands over a single-use, 60-second code bound to the browser that signed in. |
| MFA | Without trusting the IdP’s MFA, KeelPilot asks for its own second factor. With trust, it only skips it if the signed id_token proves MFA (amr or acr), never based on userinfo. |
| Audit | Logins, failed logins (with their code), identity links, test logins, back-channel logouts, configuration changes (never the secret) and every SCIM operation are recorded. |
| SSRF | Discovery, keys, token, userinfo and authorization only go to public HTTPS addresses; redirects are not followed, with a 10 s timeout and a 512 KB response cap. |
| Rate limits | Back-channel logout and SCIM have their own limits per organization and IP. |
Troubleshooting
The login screen shows the message followed by the code in parentheses. The most common ones:
“The identity provider doesn’t say whether the email is verified…” (email_verified_missing)
Cause: The IdP does not send email_verified (check it with Test login; CyberArk documents it, but it may not arrive in your tenant) and the option is off.
Fix: The owner turns on Trust IdP emails even without email_verified, after reading what it implies, and sets allowed domains.
“The identity provider reports that your email is not verified.” (email_unverified)
Cause: The IdP sent email_verified: false. It is always rejected.
Fix: Verify the email in the IdP (Keycloak: Email verified on the user; Auth0: the user’s verification).
“Owner and admin accounts aren’t linked by email…” (link_required)
Cause: An owner or admin tried to sign in with SSO without having linked their identity.
Fix: Sign in with your password and click Link my SSO identity in the panel.
“You don’t belong to any group with access to KeelPilot.” (no_group)
Cause: Deny access if the user isn’t in any mapped group is on and no group matched, or the groups claim does not arrive.
Fix: Run Test login: if Groups is empty, check the Groups claim and the IdP mapper or Action (Auth0: the namespaced name).
“Your user hasn’t been provisioned in KeelPilot yet…” (not_provisioned)
Cause: JIT is off and the account does not exist.
Fix: Invite the user, provision them over SCIM or turn on JIT.
“Your email domain is not allowed for this organization.” (domain)
Cause: The email is not in Allowed email domains.
Fix: Add the domain (comma-separated), or check the email claim.
“Your account belongs to another organization.” (wrong_org)
Cause: That email belongs to an account in another organization (or without one).
Fix: It is not linked, by design. Use another email or contact support.
“Your account is already linked to another identity from this provider.” (identity_conflict)
Cause: The KeelPilot account is already linked to a different sub from this IdP.
Fix: Check that it is the same person in the IdP. The owner or an admin can relink with Link my SSO identity on their own account.
“The identity provider rejected the code exchange…” (token)
Cause: Wrong client ID or secret, a different client authentication method, or a redirect URI that does not match.
Fix: Force client_secret_basic or client_secret_post to match the IdP, check the secret and that the redirect URI is exact.
“The issuer published by the identity provider doesn’t match the configured one.” (discovery_issuer)
Cause: The Issuer URL is not exactly the one the IdP publishes (CyberArk: it includes the application id).
Fix: Copy the exact issuer. Test connection reports the same error.
Test connection fails with blocked_url, or the login with sso_start.
Cause: The issuer or an IdP endpoint resolves to an internal address or is not HTTPS.
Fix: Publish the IdP over public HTTPS (or behind a public proxy).
id_token or firma
Cause: The token is not for this client (aud/azp), comes from another issuer, expired, or the server clock is off by more than 60 s; or the signature does not match the published keys.
Fix: Check the Client ID and the issuer, and the IdP clock. If the IdP rotated keys, try again: KeelPilot reloads them.
bad_state, state_reused or invalid_code
Cause: The login took more than 10 minutes, was finished in another browser, the back button reused an old link, or cookies are blocked.
Fix: Start again from Sign in with SSO (OIDC) in the same browser.
“Your organization requires single sign-on…” (sso_required)
Cause: Require SSO is on and the member tried a password or Google.
Fix: Sign in with SSO using the organization slug.
“Your account is deactivated.” (deactivated)
Cause: The IdP deactivated or deleted the user over SCIM.
Fix: Reactivate them in the IdP.
Saving returns “Only the owner can change…” (owner_only).
Cause: An admin tried to change something reserved for the owner.
Fix: Ask the owner (see the table at the top).