Admin ConsoleLogin with SSO

Keycloak SAML Implementation

This article contains Keycloak-specific help for configuring login with SSO via SAML 2.0. For help configuring login with SSO for another IdP, refer to SAML 2.0 Configuration.

Configuration involves working simultaneously with the Bitwarden web app and the Keycloak Portal. As you proceed, we recommend having both readily available and completing steps in the order they are documented.

tip

Already an SSO expert? Skip the instructions in this article and download screenshots of sample configurations to compare against your own.

Download Sample

Open SSO in the web app

Log in to the Bitwarden web app and open the Admin Console using the product switcher:

Product switcher
Product switcher

Open your organization's SettingsSingle sign-on screen:

SAML 2.0 configuration
SAML 2.0 configuration

If you haven't already, create a unique SSO identifier for your organization and select SAML from the the Type dropdown. Keep this screen open for easy reference.

You can turn off the Set a unique SP entity ID option at this stage if you wish. Doing so will remove your organization ID from your SP entity ID value, however in almost all cases it is recommended to leave this option on.

tip

There are alternative Member decryption options. Learn how to get started using SSO with trusted devices or Key Connector.

Keycloak setup

Login to Keycloak and select ClientsCreate Client.

Create a Client
Create a Client

On the Create client screen fill in the following fields:

Once you have filled in the required fields on the General Settings page, click Next.

On the Login settings screen, fill in the following field:

Select Save.

Select the Keys tab and toggle the Client signature required option to Off.

Keycloak Keys Config
Keycloak Keys Config

Lastly, on the Keycloak main navigation, select Realm settings and then the Keys tab. Locate the RS256 Certificate and select Certificate.

Keycloak RS256 Certificate
Keycloak RS256 Certificate

The value for the certificate will be required for the following section.

Back to the web app

At this point, you have configured everything you need within the context of the Keycloak Portal. Return to the Bitwarden web app and select Settings Single sign-on from the navigation.

The Single sign-on screen separates configuration into two sections:

  • SAML service provider configuration will determine the format of SAML requests.

  • SAML identity provider configuration will determine the format to expect for SAML responses.

Complete the following fields in the SAML service provider configuration section:

Complete the following fields in the SAML identity provider configuration section:

note

When completing the X509 certificate, take note of the expiration date. Certificates will have to be renewed in order to prevent any disruptions in service to SSO end users. If a certificate has expired, Admin and Owner accounts will always be able to log in with email address and master password.

When you're done with the identity provider configuration, Save your work.

tip

You can require users to log in with SSO by activating the single sign-on authentication policy. Please note, this will require activating the single organization policy as well. Learn more.

Additional Keycloak settings

On the Keycloak Client Settings tab, additional configuration options are available:

Once you have completed the forum, select Save.

Test the configuration

Once your configuration is complete, test it by navigating to https://vault.bitwarden.com, entering your email address, selecting Continue, and selecting the Enterprise Single-On button:

Log in options screen
Log in options screen

Enter the configured organization identifier and select Log In. If your implementation is successfully configured, you will be redirected to the Keycloak login screen:

Keycloak Login Screen
Keycloak Login Screen

After you authenticate with your Keycloak credentials, enter your Bitwarden master password to decrypt your vault!

note

Bitwarden does not support unsolicited responses, so initiating login from your IdP will result in an error. The SSO login flow must be initiated from Bitwarden.

Suggest changes to this page

How can we improve this page for you?
For technical, billing, and product questions, please contact support