構成ファイル内の機密情報を難読化する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
コネクタ SDK には SensitiveDataCodec
機能があり、構成ファイルの情報をエンコード / デコードできます。構成ファイル内の機密情報を難読化するには:
-DsecurityLevel=OBFUSCATED
パラメータと com.google.enterprise.cloudsearch.sdk.config.SensitiveDataCodec
パラメータを使用してコネクタを実行します。このコマンドは、構成ファイル内の機密性の高い構成パラメータをリクエストします。たとえば、データソースにアクセスするためのパスワードを含む sharepoint.password
パラメータなどです。
java -DsecurityLevel=OBFUSCATED -cp google-cloudsearch-csv-connector-v1-0.0.5.jar com.google.enterprise.cloudsearch.sdk.config.SensitiveDataCodec
このコマンドは、obf:Pm1saUwfSUJb5sPblTjPUw==
のような形式の難読化された値を出力します。
構成ファイル内に、機密文字列の代わりに難読化された値を追加します。次に例を示します。
sharepoint.password=obf:Pm1saUwfSUJb5sPblTjPUw==
また、鍵ペアを指定して、Java Keystore に含まれている独自の鍵を使用することもできます。次に例を示します。
java -DsecurityLevel=ENCRYPTED -Djavax.net.ssl.keyStore=encryptKeyStore.jks -Djavax.net.ssl.keyStorePassword=testtest -Djavax.net.ssl.keyStoreType=JKS -Dalias=testkeypair -cp google-cloudsearch-csv-connector-v1-0.0.5.jar com.google.enterprise.cloudsearch.sdk.config.SensitiveDataCodec
独自の鍵を使用する場合は、コネクタの実行時に同様のパラメータを渡す必要があります。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-29 UTC。
[null,null,["最終更新日 2025-08-29 UTC。"],[],[],null,["# Obfuscate sensitive configuration file information\n\nThe connector SDK contains `SensitiveDataCodec` functionality allowing you to\nencode and decode information your configuration file. To obfuscate\nsensitive information in your configuration file:\n\n1. Run your connector with the `-DsecurityLevel=OBFUSCATED` and\n `com.google.enterprise.cloudsearch.sdk.config.SensitiveDataCodec` parameters.\n This command requests the sensitive configuration parameter in your\n configuration file, such as a `sharepoint.password` parameter containing a\n password to a data source.\n\n java -DsecurityLevel=OBFUSCATED -cp google-cloudsearch-csv-connector-v1-0.0.5.jar com.google.enterprise.cloudsearch.sdk.config.SensitiveDataCodec\n\n This command outputs an obfuscated value similar to `obf:Pm1saUwfSUJb5sPblTjPUw==`.\n2. In your configuration file, add the obfuscated value in place of the\n sensitive string. For example:\n\n sharepoint.password=obf:Pm1saUwfSUJb5sPblTjPUw==\n\nYou can also use a key pair with your own keys from Java Keystore. For example: \n\n java -DsecurityLevel=ENCRYPTED -Djavax.net.ssl.keyStore=encryptKeyStore.jks -Djavax.net.ssl.keyStorePassword=testtest -Djavax.net.ssl.keyStoreType=JKS -Dalias=testkeypair -cp google-cloudsearch-csv-connector-v1-0.0.5.jar com.google.enterprise.cloudsearch.sdk.config.SensitiveDataCodec\n\nIf you are using your own keys, you must pass similar parameters while\nrunning your connector."]]