Prerequisites
- A TrueFoundry tenant with Admin access to Settings → Security & Access → SSO.
- A Keycloak deployment (self-hosted or managed) with admin access to the realm you want to federate.
- The Keycloak realm reachable from TrueFoundry’s login service over HTTPS.
Configuration overview
Create an OIDC client in Keycloak
Copy the client credentials
Build the Issuer URL
Configure and test TrueFoundry
Step 1 — Register a client in Keycloak
Open Clients
Configure general settings
- Client type: select OpenID Connect.
- Client ID: enter
truefoundry(or any other identifier you prefer). - Name (optional): a display name such as
TrueFoundry.
Configure capability
- Client authentication: toggle On (this makes the client confidential and unlocks the Client Secret you’ll need later).
- Authorization: leave Off unless you specifically use Keycloak Authorization Services.
- Authentication flow: check Standard flow, Direct access grants, and OAuth 2.0 Device Authorization Grant.
Configure login settings
-
Root URL (optional): set to your TrueFoundry control plane URL, for example
https://app.your-company.truefoundry.cloud. -
Valid Redirect URIs: add
Step 2 — Copy the Client Secret
Open the Credentials tab
Copy the Client secret
Step 3 — Build the Issuer URL
Keycloak’s OIDC discovery URL for a realm follows this pattern:https://sso.acme.com and the realm is named engineering, the issuer is:
/auth/realms/<realm-name>. Newer versions drop the /auth prefix by default. Use whichever path your deployment actually serves — you can verify by opening https://<keycloak-host>/realms/<realm-name>/.well-known/openid-configuration in a browser.Step 4 — Configure TrueFoundry
Open SSO settings

SSO page in TrueFoundry — click the + icon to add a new SSO configuration
Fill in the SSO form
- Enabled: turn this on.
- Name: a lowercase alphanumeric label — for example,
keycloakoidc. - SSO Provider: select Custom.
- Authentication Configuration: choose OIDC.
- Client ID: the client ID you set in Keycloak (for example,
truefoundry). - Client Secret: the secret copied from the Credentials tab.
- Discover endpoints: leave enabled.
- Issuer URL: the value you built in Step 3, for example
https://sso.acme.com/realms/engineering. - Scopes (optional): leave blank to use the default
openid email. Addprofileif you want first and last name in the token.
Save
Encryption algorithm restrictions
How to disable the RSA-OAEP key provider in Keycloak
How to disable the RSA-OAEP key provider in Keycloak
- In the Keycloak admin console, open the realm you’re federating and click Realm settings in the left navigation.
- Switch to the Keys tab.
- Click the Providers sub-tab.
- Locate any provider whose Algorithm column shows
RSA-OAEP(commonly namedrsa-enc-generatedor similar). - Click the provider, set Enabled to Off, and click Save.
Step 5 — Test single sign-on
- Open a private/incognito window and visit your TrueFoundry login page.
- Click Login with Keycloak (or whichever button label you chose under Show advanced fields → Button Text).
- Authenticate with a Keycloak user from the federated realm.
Troubleshooting
'Failed to discover endpoints' or HTTP 404 on the issuer
'Failed to discover endpoints' or HTTP 404 on the issuer
/auth prefix. Open https://<keycloak-host>/realms/<realm-name>/.well-known/openid-configuration in a browser:- If it returns JSON, copy the
issuerfield verbatim into TrueFoundry. - If you get a 404, try
https://<keycloak-host>/auth/realms/<realm-name>/.well-known/openid-configurationand use that prefix instead.
'Invalid redirect_uri' from Keycloak
'Invalid redirect_uri' from Keycloak
https://login.truefoundry.com/oauth2/callback is missing from Valid Redirect URIs on the Keycloak client. Add it under Clients → your client → Settings, save, and retry.'Failed to decrypt ID token' / 'unsupported algorithm RSA-OAEP'
'Failed to decrypt ID token' / 'unsupported algorithm RSA-OAEP'
RSA-OAEP, which TrueFoundry does not support. Follow the steps in the encryption algorithm restrictions section above to disable the RSA-OAEP key provider, leaving only supported algorithms enabled.'Invalid client credentials'
'Invalid client credentials'
Sign-in works but the user's email is empty
Sign-in works but the user's email is empty
openid email profile and re-test. If you map email under a non-standard claim, expand Show advanced fields and set Email Claim accordingly.