Self-hostKey Connector

キーコネクターをデプロイする

この記事では、既存の自己ホスト型環境でキーコネクターを有効にし、設定する手順を説明します。続行する前に

記事をよく読んで、キー コネクタとは何か、その仕組み、および実装の影響を完全に理解してください。

Bitwardenは、自己ホスト型インスタンスのための1つの組織による1つのキーコネクターのデプロイメントをサポートします。

要件

warning

Management of cryptographic keys is incredibly sensitive and is only recommended for enterprises with a team and infrastructure that can securely support deploying and managing a key server.

キーコネクターを使用するためには、以下の手順を守る必要があります:

あなたの組織がこれらの要件を満たすか、または満たすことができ、キーサーバーの管理をサポートできるチームとインフラストラクチャを含む場合、

。そうすれば、私たちはキーコネクターを有効にします。

キーコネクターの設定とデプロイ

キーコネクターについて私たちに連絡を取ったら、キーコネクターの議論を始めるために私たちは連絡を取ります。この記事に続く手順は、Bitwardenのカスタマーサクセス&実装スペシャリストと協力して完了させる必要があります。

新しいライセンスファイルを取得する

キーコネクターについて私たちに連絡を取った後、カスタマーサクセス&実装チームのメンバーが、あなたの組織のためのキーコネクター対応ライセンスファイルを生成します。あなたのBitwardenの共同作業者が準備ができたと指示したら、新しいライセンスを取得するための次の手順を完了してください:

  1. Bitwardenクラウドウェブアプリを開き、管理者コンソール内のあなたの組織の請求書サブスクリプション画面に移動します。

  2. 下にスクロールして、ライセンスをダウンロードボタンを選択してください。

  3. 指示に従って、自己ホスト型サーバーのインストールに使用したインストールIDを入力し、送信を選択してください。あなたがインストールIDをすぐに思い出せない場合は、./bwdata/env/global.override.envから取得することができます。

ライセンス ファイルはすぐには必要ありませんが、

セルフホスト サーバーにアップロードする必要があります。

キーコネクターを初期化します

あなたのBitwardenサーバーをキーコネクターのために準備するには:

  1. 少なくとも

    バックアップを保存してください。キーコネクターが使用中の場合、問題が発生した場合に備えて、キーコネクター使用前のバックアップイメージにアクセスできることをお勧めします。

    note

    あなたが

    を使用している場合、あなたの実装に最も適した方法でデータベースのバックアップを取ってください。

  2. 最新の変更を取得するために、自己ホスト型のBitwardenインストールを更新してください。

    Bash
    ./bitwarden.sh update
  3. .bwdata/config.yml ファイルを編集し、enable_key_connectortrue に切り替えてキーコネクターを有効にしてください。

    Bash
    nano bwdata/config.yml
  4. あなたの自己ホスト型Bitwardenインストールを再構築します:

    Bash
    ./bitwarden.sh rebuild
  5. 変更を適用するために、自己ホスト型のBitwardenインストールを再度更新してください。

    Bash
    ./bitwarden.sh update

キーコネクターを設定する

キーコネクターを設定するには:

  1. .bwdata/env/key-connector.override.env ファイルを編集してください。このファイルは ./bitwarden.sh 更新 でダウンロードされるはずです。

    Bash
    nano bwdata/env/key-connector.override.env
    warning

    This file will be pre-populated with default values that will spin up a functional local Key Connector setup, however the default values are not recommended for production environments.

  2. key-connector.override.envで、次の項目に値を指定する必要があります:

    • : キーコネクターが通信できるBitwardenのエンドポイント。

    • :キーコネクターがユーザーキーを保存し、取得する場所。

    • : キーコネクターがユーザーキーを保護するためにRSAキーペアにどのようにアクセスするか。

エンドポイント

自動設定は、インストール設定に基づいてエンドポイントの値を自動的に設定しますが、key-connector.override.envの以下の値があなたの設定に適していることを確認することをお勧めします:

Bash
keyConnectorSettings__webVaultUri=https://your.bitwarden.domain.com keyConnectorSettings__identityServerUri=http://identity:5000

データベース

キーコネクターは、組織のメンバーのための暗号化されたユーザーキーを保存するデータベースにアクセスする必要があります。暗号化されたユーザーキーを保存するための安全なデータベースを作成し、デフォルトのkeyConnectorSettings__database__の値をkey-connector.override.envで指定された値に置き換えてください。選択したデータベースの必要な値列に記載されています。

warning

Migration from one database to another is not supported at this time. Regardless of which provider you choose, implement a frequent automated backup schedule for the database.

RSAキーペア

キーコネクターはRSAキーペアを使用して、ユーザーキーを保護します。キーペアを作成し、デフォルトのkeyConnectorSettings__rsaKey__keyConnectorSettings__certificate__の値をkey-connector.override.envで選択した実装に必要な値に置き換えてください。

tip

The RSA key pair must be at a minimum 2048 bits in length.

一般的に、選択肢としては、キーペアを含むX509 証明書へのキーコネクターへのアクセスを許可するか、直接キーペアへのキーコネクターへのアクセスを許可するかがあります。

RSAキーペアを含むX509証明書を使用するには、証明書が保存されている場所に応じて必要な値を指定します(ファイルシステムOS証明書ストアなどを参照してください):

tip

The certificate must be made available as a PKCS12 .pfx file, for example:

Bash
openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout bwkc.key -out bwkc.crt -subj "/CN=Bitwarden Key Connector" -days 36500 openssl pkcs12 -export -out ./bwkc.pfx -inkey bwkc.key -in bwkc.crt -passout pass:{Password}

In all certificate implementations, you'll need the CN value shown in this example.

ファイルシステム(デフォルト)

証明書がキーコネクターを実行しているマシンのファイルシステムに保存されている場合、次の値を指定してください:

note

By default, Key Connector will be configured to create a .pfx file located at etc/bitwarden/key-connector/bwkc.pfx with a generated password. It is not recommended for enterprise implementations to use these defaults.

Bash
keyConnectorSettings__rsaKey__provider=certificate keyConnectorSettings__certificate__provider=filesystem keyConnectorSettings__certificate__filesystemPath={Certificate_Path} keyConnectorSettings__certificate__filesystemPassword={Certificate_Password}

アジュール ブロブ ストレージ

証明書がAzure Blob Storageにアップロードされる場合、次の値を指定してください:

Bash
keyConnectorSettings__rsaKey__provider=certificate keyConnectorSettings__certificate__provider=azurestorage keyConnectorSettings__certificate__azureStorageConnectionString={Connection_String} keyConnectorSettings__certificate__azureStorageContainer={Container_Name} keyConnectorSettings__certificate__azureStorageFileName={File_Name} keyConnectorSettings__certificate__azureStorageFilePassword={File_Password}

azureStorageConnectionStringを、Azureポータルで共有アクセス署名(SAS)のページからあなたのストレージアカウントで生成できる接続文字列に設定します。SASは以下を持つ必要があります:

  • 許可されるサービス:BlobとFile

  • 許可されたリソースタイプ:サービス、コンテナ、オブジェクト

  • 許可された権限:読み取り、書き込み、リスト

  • 許可されたblobインデックスの権限:読み取り/書き込みとフィルター

Azure キー保管庫

証明書がAzure Key Vaultに保存されている場合、以下の値を指定してください:

note

To use Azure Key Vault to store your .pfx certificate, you'll need to create an Active Directory App Registration. This App Registration must:

  • Give delegated API permissions to access Azure Key Vault

  • Have a client secret generated to allow access by Key Connector

Bash
keyConnectorSettings__certificate__provider=azurekv keyConnectorSettings__certificate__azureKeyvaultUri={Vault_URI} keyConnectorSettings__certificate__azureKeyvaultCertificateName={Certificate_Name} keyConnectorSettings__certificate__azureKeyvaultAdTenantId={ActiveDirectory_TenantId} keyConnectorSettings__certificate__azureKeyvaultAdAppId={AppRegistration_ApplicationId} keyConnectorSettings__certificate__azureKeyvaultAdSecret={AppRegistration_ClientSecretValue}

Hashicorp 保管庫

証明書がHashicorp保管庫に保存されている場合、次の値を指定してください:

note

Key Connector integrates with the Hashicorp Vault KV2 Storage Engine. As per the top of this tab, the certificate file should be in PKCS12 format and stored base64-encoded as the value to a named key in your Vault. If following a Vault tutorial for the KV2 Storage Engine, the key name may be file unless otherwise specified.

Bash
keyConnectorSettings__rsaKey__provider=certificate keyConnectorSettings__certificate__provider=vault keyConnectorSettings__certificate__vaultServerUri={Server_URI} keyConnectorSettings__certificate__vaultToken={Token} keyConnectorSettings__certificate__vaultSecretMountPoint={Secret_MountPoint} keyConnectorSettings__certificate__vaultSecretPath={Secret_Path} keyConnectorSettings__certificate__vaultSecretDataKey={Secret_DataKey} keyConnectorSettings__certificate__vaultSecretFilePassword={Secret_FilePassword}

キーコネクターを有効にする

キーコネクターが

キーコネクター対応ライセンス
を取得したので、次の手順を完了してください:

  1. 設定の変更を適用するために、自己ホスト型のBitwardenインストールを再起動してください。

    Bash
    ./bitwarden.sh restart
  2. セルフホスト型 Bitwarden に組織所有者としてログインし、管理コンソールの[請求][サブスクリプション]画面に移動します。

  3. ライセンスを更新ボタンを選択し、キーコネクター対応のライセンスをアップロードします。

  4. まだ行っていない場合は、設定ポリシー画面に移動し、

    単一サインオン認証が必要
    のポリシーを有効にしてください。両方ともキーコネクターを使用する必要があります

  5. 設定シングルサインオン画面に移動します。

    tip

    The next few steps assume that you already have an active

    implementation using
    SAML 2.0
    or
    OIDC
    . If you don't, please implement and test login with SSO before proceeding.

  6. メンバー復号化オプションセクションで、キーコネクターを選択します。

  7. キーコネクターURLの入力欄に、キーコネクターが動作しているアドレス(デフォルトでは、https://your.domain/key-connector)を入力し、テストボタンを選択してキーコネクターにアクセスできることを確認してください。

  8. 画面の下までスクロールし、保存を選択してください。