SSO with Keycloak
Configure SSO using OpenID Connect and Keycloak
OpenID ConnectTo become familiar with OpenID Connect in Budibase, see OpenID Connect
Use Keycloak to configure OIDC-based SSO in Budibase.
Realm setup
Use a realm other than master. In Keycloak, master is reserved for top-level administration.
To create a new realm:
- Sign in to Keycloak at
<keycloak-url>/admin. - Open the realm dropdown on the left.
- Select
Create realm. - Save the new realm name.

Create a client
Create a client in Keycloak before you configure Budibase.
Open the Clients pane in the Keycloak admin console and click Create client.

Give the client an ID, select OpenID Connect, and continue. Use this client ID in Budibase.
If you already have a suitable client, you can skip this step.

Enable client authentication
In the capability configuration screen, enable Client authentication.
This generates the client secret you will use in Budibase.

Add the Budibase callback URL
Copy the callback URL from Budibase under Settings > Auth > OpenID Connect.
In Budibase, this field is labeled Callback URL.
Add that URL to Valid Redirect URIs in Keycloak, then save.

Find your configuration details
Config URL
Open Realm settings in the Keycloak admin console, then open the General tab.
Scroll to OpenID Endpoint Configuration and copy the URL.
Paste the URL into the Config URL field in Budibase.
Client ID
The Client ID in Budibase should match the client ID you created in Keycloak.

Client secret
Find the Client secret on the Credentials tab in the client configuration screen.

Paste it into the Client secret field in the Budibase OIDC panel.
Optional settings
Budibase also lets you configure:
- Name: The text shown on the login button
- Icon: The provider icon shown on the login button
- PKCE Method: Available on enterprise licenses
- Activated: Enables the OIDC provider
- Allow unverified email linking: Only use this if you trust the identity provider to assert verified email addresses
- Auth Scopes: Includes
openidplus any additional scopes you need
Activate OIDC in Budibase
After you finish the configuration fields, turn on Activated in the Budibase OpenID Connect settings and save.

Manage users
After Budibase is set up, create users in the Keycloak realm.
Open the Users tab in the Keycloak admin panel and click Create user.
Enter a username and email address.

To add a password, open the Credentials tab and click Set Password. Turn off Temporary if the user should not change the password on first sign in.
You can now sign in through Budibase using Keycloak.
Updated 4 months ago