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
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, andgroups
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.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:636for TLS orldap://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.
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:['Engineering', 'ReadOnly'], they receive the union of matched scopes: ['read', 'write', 'deploy'].
JIT provisioning
WhenjitProvisioning is enabled, Grantex automatically creates or updates a principal (SCIM user) on each SSO login. This eliminates the need for manual user provisioning:
- User authenticates via SSO
- Grantex checks if a SCIM user exists with the IdP’s subject identifier
- If not found, creates a new SCIM user with the IdP’s email and display name
- If found, updates the existing user’s details
- Returns the
principalIdin the callback result
SSO enforcement
Require all users in your organization to authenticate via SSO:Session management
Track and manage active SSO sessions: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.