Secrets management
Bitwarden

Configure Bitwarden

12min
refer to this section and the bitwarden about key connector https //bitwarden com/help/about key connector/ and deploy key connector https //bitwarden com/help/deploy key connector/ instructions for installation and configuration guidance perform the following tasks to configure bitwarden set up and deploy key connector confirm endpoint values create database create an rsa key pair activate key connector before you start to get started using key connector for customer managed encryption, review the following requirements to use key connector, you must have the following components an enterprise organization a self hosted bitwarden server an active sso implementation enabled single organization and require single sign on authentication policies if your organization meets these requirements, including a team and infrastructure that supports key server management, contact bitwarden so they can activate key connector set up and deploy key connector after you contact bitwarden regarding key connector, they reach out to schedule a key connector discussion perform the following tasks to set up and deploy key connector obtain a new license file initialize key connector configure key connector obtain a license file after bitwarden enables key connector for your organization, complete the following steps to obtain the new license open the bitwarden cloud web app and go to your organization billing > subscription screen in the admin console scroll down and select \[ download license ] when prompted, enter the installation id used to install your self hosted server and select \[ submit ] if you don't know your installation id, retrieve it from /bwdata/env/global override env you won't need your license file immediately, but you must upload it to your self hosted server later initialize key connector to prepare your bitwarden server for key connector, perform the following steps to initialize key connector save a backup of bwdata/mssql after you start using key connector, we recommend you have access to a pre key connector backup image in case you need it if you use an external mssql database, back up your database by following your usual procedure update your self hosted bitwarden installation to retrieve the latest changes /bitwarden sh update edit the bwdata/config yml file and enable key connector by setting enable key connector to true nano bwdata/config yml rebuild your self hosted bitwarden installation /bitwarden sh rebuild update your self hosted bitwarden installation again to apply the changes /bitwarden sh update configure key connector to configure key connector, perform the following steps copy the following files to your bitwarden server the endpoint zip file that {{ch}} generated for the bitwarden service the pem certificate exported from pki management > certificate management extract the contents of the endpoint zip file containing the following files pkcs11manager program to test the connection to the {{ch}} and perform basic functions through the fxpkcs11 module, such as logging in and generating random data ca chain pem ca certificate bundle client cert pem client tls certificate client p12 full client pki in encrypted pkcs #12 format (contains the ca chain, client certificate, and client private key) configtest program to test configuration and connection to the {{ch}} fxpkcs11 cfg configuration file for the fxpkcs11 module, enabling you to customize settings and specify connection details to the {{ch}} libfxpkcs11 so fxpkcs11 module convert the pem certificate to pfx format by using openssl openssl pkcs12 export nokeys in bitwarden cert pem out bitwarden cert pfx specify futurex123 as the password for the pfx file copy the following files to the /opt/bitwarden/bwdata/key connector directory bitwarden pfx client p12 libfxpkcs11 so fxpkcs11 cfg pkcs11manager putting these files in the /opt/bitwarden/bwdata/key connector directory bind mounts them inside the bitwarden key connector container at /etc/bitwarden/key connector edit the bwdata/env/key connector override env file that you downloaded with the /bitwarden sh update see the following additional explanation section for guidance additional explanation this section provides additional explanation for editing bwdata/env/key connector override env example key connector override env file keyconnectorsettings webvaulturi=https //ec2 34 193 223 21 compute 1 amazonaws com keyconnectorsettings identityserveruri=http //identity 5000 keyconnectorsettings database provider=json keyconnectorsettings database jsonfilepath=/etc/bitwarden/key connector/data json keyconnectorsettings certificate provider=filesystem keyconnectorsettings certificate filesystempath=/etc/bitwarden/key connector/bitwarden pfx keyconnectorsettings certificate filesystempassword=futurex123 keyconnectorsettings rsakey provider=pkcs11 keyconnectorsettings rsakey pkcs11librarypath=/etc/bitwarden/key connector/libfxpkcs11 so fxpkcs11 cfg=/etc/bitwarden/key connector/fxpkcs11 cfg keyconnectorsettings rsakey pkcs11slottokenserialnumber=3174612105 keyconnectorsettings rsakey pkcs11loginusertype=user keyconnectorsettings rsakey pkcs11loginpin=edy0dd29b2t82 fc0&@511h1m4d8 keyconnectorsettings rsakey pkcs11privatekeylabel=bitwarden the fxpkcs11 cfg=/etc/bitwarden/key connector/fxpkcs11 cfg enables the {{futurex}} pkcs #11 module to find the configuration file at the non default location ( /etc ) to determine the keyconnectorsettings rsakey pkcs11slottokenserialnumber value, you must perform the following steps run the pkcs11manager utility against your {{ch}} select option 1 ( print library/token info ) set keyconnectorsettings rsakey pkcs11loginpin to the value contained within the \<crypto opr pass> tags in the {{futurex}} pkcs #11 configuration file ( fxpkcs11 cfg ) the value you set in the keyconnectorsettings rsakey pkcs11privatekeylabel definition must match the name assigned to the bitwarden key in {{ch}} the pkcs11manager and fxpkcs11 cfg files are included in the endpoint zip generated for the bitwarden service in {{ch}} confirm endpoint values the automated setup populates endpoint values based on your installation configuration however, we recommend that you confirm the following values in key connector override env are accurate for your setup keyconnectorsettings webvaulturi=https //your bitwarden domain com keyconnectorsettings identityserveruri=http //identity 5000 create database key connector must access a database that stores encrypted user keys for your organization members create a secure database to store encrypted user keys and replace the default keyconnectorsettings database values in key connector override env with the values designated in the required values https //bitwarden com/help/deploy key connector/# text=http%3a//identity%3a5000 ,database, key%20connector%20must column for the chosen database the preceding example key connector override env defines local json , but we do not recommend this option except for testing for production environments, bitwarden recommends using one of the other supported database options (such as microsoft sql server, postgresql, mysql/mariadb, or mongodb) create an rsa key pair key connector uses an rsa key pair to protect user keys at rest you must replace the default keyconnectorsettings rsakey and keyconnectorsettings certificate values in key connector override env with the values required to integrate with {{ch}} the rsa key pair must be at a minimum 2048 bits in length key connector directly accesses the {{ch}} stored private key through the {{futurex}} pkcs #11 module and the x 509 certificate in the file system activate key connector now that you configured key connector and have a key connector enabled license complete the following steps restart your self hosted bitwarden installation to apply the configuration changes /bitwarden sh restart log in to your self hosted bitwarden as an organization owner and go to the admin console billing > subscription screen select \[ update license ] and upload the key connector enabled license retrieved in an earlier step if you haven't already, go to the settings > policies screen and enable the single organization and require single sign on authentication policies, which are required to use key connector go to the settings > single sign on screen the next few steps assume that you already have an active login with sso implementation using saml 2 0 or oidc if you don't, implement and test the login with sso before proceeding in the member decryption options section, select key connector in the key connector url input, enter the address where you are running key connector (by default, https //your domain/key connector ) and select \[ test ] to ensure you can reach key connector scroll to the bottom of the screen and select \[ save ]