管理者コンソールSSOでログイン

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

この記事では、既存の自己ホスト型環境でキーコネクターを有効にし、設定する手順を説明します。続行する前にキー コネクタに関する記事をよく読んで、キー コネクタとは何か、その仕組み、および実装の影響を完全に理解してください。

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

要件

注意

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. 少なくとも.bwdata/mssqlバックアップを保存してください。キーコネクターが使用中の場合、問題が発生した場合に備えて、キーコネクター使用前のバックアップイメージにアクセスできることをお勧めします。

    備考

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

  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
    注意

    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キーペア: キーコネクターがユーザーキーを保護するためにRSAキーペアにどのようにアクセスするか。

エンドポイント

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

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

データベース

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

注意

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.

データベース

必要な値

ローカルJSON(デフォルト

テスト以外では推奨されません。

keyConnectorSettings__database__provider=json

keyConnectorSettings__database__jsonFilePath={File_Path}

Microsoft SQLサーバー

keyConnectorSettings__database__provider=sqlserver

keyConnectorSettings__database__sqlServerConnectionString={Connection_String}

MSSQL接続文字列のフォーマット方法を学びましょう

PostgreSQL

keyConnectorSettings__database__provider=postgresql

keyConnectorSettings__database__postgreSqlConnectionString={Connection_String}

PostgreSQL接続文字列のフォーマット方法を学びましょう

MySQL/MariaDB

keyConnectorSettings__database__provider=mysql

keyConnectorSettings__database__mySqlConnectionString={Connection_String}

MySQL接続文字列のフォーマット方法を学びましょう

MongoDB

keyConnectorSettings__database__provider=mongo

keyConnectorSettings__database__mongoConnectionString={Connection_String}


keyConnectorSettings__database__mongoDatabaseName={DatabaseName}

MongoDB接続文字列のフォーマット方法を学びましょう

RSAキーペア

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

チップ

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

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

To use an X509 certificate that contains an RSA key pair, specify the values required depending on the location where your certificate is stored (see Filesystem, OS Certificate Store, and so on):

チップ

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.

Filesystem (default)

If the certificate is stored on the filesystem of the machine running Key Connector, specify the following values:

備考

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

If the certificate is uploaded to Azure Blob Storage, specify the following values:

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}

Set azureStorageConnectionString to a Connection string you can generate in your Azure portal from the Shared access signature (SAS) page of your storage account. The SAS must have:

  • Allowed services: Blob and File

  • Allowed resource types: Service, Container, and Object

  • Allowed permissions: Read, Write, and List

  • Allowed blob index permissions: Read/Write and Filter

Azure Key Vault

If certificate is stored in Azure Key Vault, specify the following values:

備考

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 Vault

If the certificate is stored in Hashicorp Vault, specify the following values:

備考

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}

To use a cloud provider or physical device to store to a RSA 2048 key pair, specify the values required depending on your chosen implementation (see Azure Key Vault, Google Cloud Key Management, and so on):

Azure Key Vault

If you are using Azure Key Vault to store a RSA 2048 key pair, specify the following values:

備考

To use Azure Key Vault to store your RSA 2048 key, 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__rsaKey__provider=azurekv keyConnectorSettings__rsaKey__azureKeyvaultUri={Vault_URI} keyConnectorSettings__rsaKey__azureKeyvaultKeyName={Key_Name} keyConnectorSettings__rsaKey__azureKeyvaultAdTenantId={ActiveDirectory_TenantId} keyConnectorSettings__rsaKey__azureKeyvaultAdAppId={AppRegistration_ApplicationId} keyConnectorSettings__rsaKey__azureKeyvaultAdSecret={AppRegistration_ClientSecretValue}

Learn how to use Azure Key Vault to create a key pair

Google Cloud Key Management

If you are using Google Cloud Key Management to store a RSA 2048 key pair, specify the following values:

Bash
keyConnectorSettings__rsaKey__provider=gcpkms keyConnectorSettings__rsaKey__googleCloudProjectId={Project_Id} keyConnectorSettings__rsaKey__googleCloudLocationId={Location_Id} keyConnectorSettings__rsaKey__googleCloudKeyringId={Keyring_Id} keyConnectorSettings__rsaKey__googleCloudKeyId={Key_Id} keyConnectorSettings__rsaKey__googleCloudKeyVersionId={KeyVersionId}

Learn how to use Google Cloud Key Management Service to create key rings and asymmetric keys

AWS Key Management Service

If you are using AWS Key Management Service (KMS) to store a RSA 2048 key pair, specify the following values:

Bash
keyConnectorSettings__rsaKey__provider=awskms keyConnectorSettings__rsaKey__awsAccessKeyId={AccessKey_Id} keyConnectorSettings__rsaKey__awsAccessKeySecret={AccessKey_Secret} keyConnectorSettings__rsaKey__awsRegion={Region_Name} keyConnectorSettings__rsaKey__awsKeyId={Key_Id}

Learn how to use AWS KMS to create asymmetric keys

PKCS11 Physical HSM

If you are using a physical HSM device with the PKCS11 provider, specify the following values:

Bash
keyConnectorSettings__rsaKey__provider=pkcs11 keyConnectorSettings__rsaKey__pkcs11Provider={Provider} keyConnectorSettings__rsaKey__pkcs11SlotTokenSerialNumber={Token_SerialNumber} keyConnectorSettings__rsaKey__pkcs11LoginUserType={Login_UserType} keyConnectorSettings__rsaKey__pkcs11LoginPin={Login_PIN} ONE OF THE FOLLOWING TWO: keyConnectorSettings__rsaKey__pkcs11PrivateKeyLabel={PrivateKeyLabel} keyConnectorSettings__rsaKey__pkcs11PrivateKeyId={PrivateKeyId}

Where:

  • {Provider} can be yubihsm or opensc

  • {Login_UserType} can be user, so, or context_specific

備考

If you are using the PKCS11 provider to store your private key on an HSM device, the associated public key must be made available and configured as a certificate using any of the options found in the Certificates tab.

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

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

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

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

  3. ライセンスを更新ボタンを選択し、キーコネクター対応のライセンスをアップロードします。これは前のステップで取得したものです

  4. まだ行っていない場合は、設定ポリシー画面に移動し、単一組織単一サインオン認証が必要のポリシーを有効にしてください。両方ともキーコネクターを使用する必要があります

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

    チップ

    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, please implement and test login with SSO before proceeding.

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

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

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

このページに提案する

サポートチームへのお問い合わせ

For technical, billing, product, and Family/Premium questions.

お名前*
ビットワルデン*
アカウントのメールアドレスを確認してください*
製品*
あなたは自己ホスト型ですか?*
件名*
お問い合わせ内容を入力してください...*

クラウドのステータス

ステータスを確認する

© 2024 Bitwarden, Inc. 利用規約 プライバシー クッキーの設定 サイトマップ

このサイトは日本語でご利用いただけます。
Go to EnglishStay Here