將機密設定檔資訊模糊化
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
連結器 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
如果您使用自己的金鑰,執行連接器時必須傳遞類似的參數。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-29 (世界標準時間)。
[null,null,["上次更新時間:2025-08-29 (世界標準時間)。"],[],[],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."]]