BigFix Inventory 用 MS SQL のデータベース接続暗号化の有効化
SSL ベースの暗号化を適用するように BigFix Inventory データベースを備えた MS SQL Server を構成します。
始める前に
注: MS SQL で「暗号化の強制」を実行する前に、まず BigFix Inventory を構成して、接続が機能することを確認します。
このタスクについて
.CER Base-64 エンコード X.509 形式でエクスポートします。MS SQL データベースの暗号化を有効にするには、以下の手順を実行します。
- MS SQL データベースをホストする Windows システムで Certmgr ツールを実行します。
- プログラムの左パネルで、に移動します。
- 右パネルで、データベース・サーバー証明書を右クリックし、に移動します。
- 表示されたウィンドウで「次へ」をクリックします。
- 秘密鍵をエクスポートしないことを選択し、「次へ」をクリックします。
- 「Base-64 encoded X.509 (.CER)」を選択し、「次へ」をクリックします。
- 証明書を保存するパス名とファイル名を選択します。
- 指定した設定を確認し、「完了」をクリックします。
- 証明書が、指定された場所にエクスポートされます。
証明書をエクスポートしたら、以下の手順を実行して接続暗号化を有効にします。
手順
- MS SQL Server 証明書を BigFix Inventory マシンにコピーします。
- コマンド行を開き、コマンド cd <BFI_INSTALL_DIR>\jre\jre\bin を使用します。
-
<keystore_extension>タイプのトラストストアを作成し、コマンドkeytool -importcert -file <MS SQL Server.cer file> -keystore <BFI_INSTALL_DIR>\wlp\usr\servers\server1\resources\security\key_bfi_db.p12 -alias "bfi_db_cert" -storetype PKCS12を使用してトラストストアに証明書をインポートします。このトラストストアに任意のトラストストア・パスワードを入力し、Yes と入力して証明書を信頼します。 -
ステップ 3 で使用するパスワードを「aes」エンコーディングで暗号化します。次のコマンドを実行し、key_bfi_db.p12 truststore の作成時に使用したパスワードを入力します。
<BFI_INSTALL_DIR>/wlp/bin/securityUtility encode --encoding=aes。その結果「aes」エンコーディングで暗号化された TrustStore パスワードが得られます。これを保存して次の手順で使用します。 -
既存の属性を更新し、欠落している属性を server.xml ファイルに 追加します。
重要: 変更を加える前に、server.xml ファイルと database.yml ファイルのバックアップを作成します。ヒント: database.yml ファイルを編集する際は、ここに記載されている手順に従います。
データベースについては、証明書と同じサーバー名を使用します。serverName 属性の値を更新します。
<dataSource id='DatabaseConnection' jndiName='jdbc/ilmtDatabaseConnection'> <jdbcDriver libraryRef='DatabaseLib'/> <properties.microsoft.sqlserver databaseName='<your BFI database name>' lockTimeout='180000' encrypt='true' serverName='<host name - the same that certificate is issued to>' trustServerCertificate='false' trustStore='<BFI_INSTALL_DIR>/wlp/usr/servers/server1/resources/security/key_bfi_db.<keystore_extension>' trustStorePassword='<your TrustStore password encrypted in in 'aes' encoding>' user='<your BFI database user>' password='<your encrypted BFI database password>' /> </dataSource>注: パスワードを AES 方式で暗号化しています。詳しくは『データベース・パスワードの更新』を参照してください。BigFix Inventory サーバーのアップグレード中にデータベース接続を暗号化する場合は、データ・ソースでパスワード暗号化属性を定義する必要があります。BigFix Inventory データベースに Windows 認証を使用する場合は、ユーザーとパスワードのパラメーターの代わりに、属性はintegratedSecurity="true"になります。 -
既存の属性を更新し、欠落している属性を database.yml ファイルに 追加します。
重要: データベースについては、証明書と同じホスト名を使用します。host name 属性の値を更新します。
--- production: host: <host name - the same that certificate is issued to> database: <your BFI database name> username: <your BFI database user> database_type: mssql windows_authenticated: false port: '50000' encrypted_password:host: "<your encrypted BFI database password>" encrypt: true trustServerCertificate: false trustStore: <BFI_INSTALL_DIR>/wlp/usr/servers/server1/resources/security/key_bfi_db.p12 trustStorePassword: "<your Truststore password encrypted in in 'aes' encoding>"注: BigFix Inventory データベースに Windows 認証を使用する場合、username と encrypted_password パラメーターは欠落し、windows_authenticated は true に設定されます。 -
既存の属性を更新し、欠落している属性を server.xml ファイルに 追加します。
重要: 変更を加える前に、server.xml ファイルと database.yml ファイルのバックアップを作成します。ヒント: database.yml ファイルを編集する際は、ここに記載されている手順に従います。
データベースについては、証明書と同じサーバー名を使用します。serverName 属性の値を更新します。
<dataSource id="DatabaseConnection" jndiName="jdbc/ilmtDatabaseConnection"> <jdbcDriver libraryRef="DatabaseLib"/> <properties.microsoft.sqlserver databaseName="<your BFI database name>" lockTimeout="180000" encrypt="true" serverName="<host name - the same that certificate is issued to>" trustServerCertificate="false" trustStore="<BFI_INSTALL_DIR>/wlp/usr/servers/server1/resources/security/key_bfi_db.p12" trustStorePassword="<your TrustStore password encrypted in 'aes' encoding>" user="<your BFI database user>" password="<your encrypted BFI database password>" /> </dataSource>注: BigFix Inventory データベースに Windows 認証を使用する場合は、ユーザーとパスワードのパラメーターの代わりに、属性はintegratedSecurity="true"になります。 - BigFix Inventory サービスを開始します。
- アプリケーションにログインして、BigFix Inventory が動作していることを確認します。
- 次回のデータ・インポートを接続に関する問題と照合します。
タスクの結果
- トラブルシューティング:
- tema.log を先頭からレビューします。構成に問題がある場合、WebSphere が FFDC ログを作成することがあります。
[3/10/21 11:28:03:118 UTC] 00000026 com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl I CWRLS0010I: Performing recovery processing for local WebSphere server (server1). [3/10/21 11:28:03:180 UTC] 00000026 com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl I CWRLS0012I: All persistent services have been directed to perform recovery processing for this WebSphere server (server1). [3/10/21 11:28:03:180 UTC] 00000041 com.ibm.tx.jta.impl.RecoveryManager I WTRN0135I: Transaction service recovering no transactions. [3/10/21 11:28:03:352 UTC] 00000026 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed". ClientConnectionId:a89039f3-b6ce-4de6-8d10-8c205c44243e com.ibm.ws.rsadapter.impl.MicrosoftSQLServerHelper 1298" at ffdc_21.03.10_11.28.03.0.log [3/10/21 11:28:03:477 UTC] 00000026 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException: DSRA8100E: Unable to get a PooledConnection from the DataSource. with SQL State : 08S01 SQL Code : 0 com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper 199" at ffdc_21.03.10_11.28.03.1.log [3/10/21 11:28:03:524 UTC] 00000026 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "javax.resource.spi.ResourceAllocationException: DSRA8100E: Unable to get a PooledConnection from the DataSource. with SQL State : 08S01 SQL Code : 0 com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection 299" at ffdc_21.03.10_11.28.03.2.log [3/10/21 11:28:03:524 UTC] 00000026 SystemOut O [JAVA] [ERROR] [ILMTCore] (Default Executor-thread-3) com.ibm.ilmt.common.dao.util.DBDefaultPoolerManager::init:Unable to initialize datasource jdbc/ilmtDatabaseConnection