Skip to main content

Overview

Grantex supports OIDC and SAML 2.0 enterprise SSO, plus an LDAP direct-bind preview. You can configure multiple identity provider connections per organization, route users by email domain, and map OIDC/SAML groups to Grantex scopes. The built-in LDAP preview has the limitations described below. Key capabilities:

Setting up OIDC

Step 1: Register Grantex in your IdP

In your identity provider (Okta, Azure AD, Google Workspace, Auth0, etc.), create a new application:
  • Application type: Web application
  • Sign-in redirect URI: https://yourapp.com/sso/callback/oidc
  • Scopes: openid email profile
  • Grant type: Authorization Code
Note the Client ID, Client Secret, and Issuer URL.

Step 2: Create the SSO connection

Step 3: Test the connection

Step 4: Handle the login flow


Setting up SAML 2.0

Step 1: Configure your IdP

In your SAML identity provider:
  • SP Entity ID: urn:grantex:yourorg
  • ACS URL: https://yourapp.com/sso/callback/saml
  • NameID format: Email address or persistent identifier
  • Attributes: Map email, displayName, and groups
Download the IdP certificate and note the SSO URL and Entity ID.

Step 2: Create the SAML connection

Step 3: Handle the SAML callback


Setting up LDAP

LDAP authentication differs from OIDC and SAML in that there is no browser redirect. The user submits credentials directly to your application, and Grantex performs a service-account bind followed by a user bind.
LDAP support is currently a direct-bind preview. The built-in client does not search for user entries, read directory attributes, or retrieve group memberships. It constructs the user DN from ldapSearchFilter and ldapSearchBase, returns no email or display name, and returns an empty groups list. Validate the exact DN convention against a staging directory before enabling it.

Step 1: Gather LDAP server details

You will need the following from your directory administrator:
  • LDAP URL — The server address (e.g. ldaps://ldap.mycompany.com:636 for TLS or ldap://ldap.mycompany.com:389)
  • Bind DN — The service-account distinguished name used for the initial connectivity/authentication bind (e.g. cn=readonly,dc=mycompany,dc=com)
  • Bind password — The password for the bind DN
  • Search base — The base DN appended to the constructed user RDN (e.g. ou=people,dc=mycompany,dc=com)
  • Search filter — A template such as (uid={{username}}). In the preview client this is not executed as a search; parentheses are removed and the result is used as the user RDN.
Always use ldaps:// (LDAP over TLS) in production. Unencrypted LDAP transmits passwords in plaintext.

Step 2: Create the LDAP connection

Step 3: Handle LDAP authentication

Since LDAP does not use browser redirects, the user submits credentials directly to your application. Your backend then calls the LDAP callback endpoint:
The preview performs two binds, not a directory search. It first binds the configured service account, constructs the user DN, then binds that DN with the submitted password. LDAP group-search settings are stored but are not used by the built-in client; only defaultScopes apply to its empty group list.

Domain-based routing

When you assign domains to connections, Grantex automatically routes users to the correct IdP:

Group-to-scope mapping

Map identity provider groups to Grantex scopes:
When a user logs in with the groups ['Engineering', 'ReadOnly'], they receive the union of matched scopes: ['read', 'write', 'deploy'].

JIT provisioning

When jitProvisioning is enabled, Grantex automatically creates or updates a principal (SCIM user) on each SSO login. This eliminates the need for manual user provisioning:
  1. User authenticates via SSO
  2. Grantex checks if a SCIM user exists with the IdP’s subject identifier
  3. If not found, creates a new SCIM user with the IdP’s email and display name
  4. If found, updates the existing user’s details
  5. Returns the principalId in the callback result

SSO enforcement

Require all users in your organization to authenticate via SSO:
Enabling SSO enforcement marks all active connections as enforced. Ensure you have at least one active, tested SSO connection before enabling.

Session management

Track and manage active SSO sessions:
Sessions expire after 8 hours by default.

CLI reference


Supported identity providers

LDAP provider compatibility is not currently certified. The preview works only when the configured filter and base construct the directory’s exact user DN; test the intended server and schema before production use.

API endpoints

Last modified on July 11, 2026