Obfuscate sensitive configuration file information
Stay organized with collections
Save and categorize content based on your preferences.
The connector SDK contains SensitiveDataCodec
functionality allowing you to
encode and decode information your configuration file. To obfuscate
sensitive information in your configuration file:
Run your connector with the -DsecurityLevel=OBFUSCATED
and
com.google.enterprise.cloudsearch.sdk.config.SensitiveDataCodec
parameters.
This command requests the sensitive configuration parameter in your
configuration file, such as a sharepoint.password
parameter containing a
password to a data source.
java -DsecurityLevel=OBFUSCATED -cp google-cloudsearch-csv-connector-v1-0.0.5.jar com.google.enterprise.cloudsearch.sdk.config.SensitiveDataCodec
This command outputs an obfuscated value similar to obf:Pm1saUwfSUJb5sPblTjPUw==
.
In your configuration file, add the obfuscated value in place of the
sensitive string. For example:
sharepoint.password=obf:Pm1saUwfSUJb5sPblTjPUw==
You can also use a key pair with your own keys from Java Keystore. For example:
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
If you are using your own keys, you must pass similar parameters while
running your connector.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-28 UTC.
[null,null,["Last updated 2025-08-28 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."]]