Credential Functions
Use credential functions to retrieve sensitive information stored as secrets from supported credential stores.
Not valid in Data Collector Edge pipelines. Do not use credential functions in Data Collector Edge pipelines.
Before you use a credential function, you must configure a credential storecredential store. For more information about credential stores, see Credential Stores in the Data Collector documentation..
You can use credential functions in stages that require sensitive information, such as user names or passwords, to securely access data in external systems. Credential functions allow pipelines to access external systems without exposing sensitive details.
You cannot use credential functions in all stages. For example, we intentionally do not allow the use of credential functions in the Expression Evaluator processor. If credential functions were allowed in stages such as the Expression Evaluator, any user with access to the pipeline could access or print sensitive values, compromising the security of the external system.
String literals must be enclosed in single or double quotation marks.
The expression language provides the following credential functions:
- credential:get(<cstoreId>, <userGroup>, <name>)
- Returns the secret from the credential store. Uses the following arguments:
- cstoreId - Unique ID of the credential store to use. Use the ID specified in the $SDC_CONF/credential-stores.properties fileData Collector credential store configuration properties. For more information, see Enabling Credential StoresEnabling Credential Stores in the Data Collector.
- userGroup - Group that a user must belong to in order to
access the secret. Only users that have execute permission on the pipeline and that
belong to this group can validate, preview, or run the pipeline that retrieves the
secret.
If working with Control Hub, specifySpecify the group using the required naming convention:
<group ID>@<organization ID>
.To grant access to all users, specify the defaultall
group when working only with Data Collector. When working with Control Hub and Data Collector version 3.16.0 or later, you can specify the default group usingall
orall@<organization ID>
. StreamSets recommends usingall
so that you do not need to modify credential functions when migrating pipelines from Data Collector to Control Hub.Note: When working with Control Hub and a Data Collector version earlier than 3.16.0, you must use the defaultall@<organization ID>
group. - name - Name of the secret to retrieve from the credential store. Use the
required format for the credential store:
- AWS Secrets Manager - Enter the secret name using the following
format:
"<name><separator><key>"
<name>
is the name of the secret to read.<separator>
is the separator defined in the $SDC_CONF/credential-stores.properties fileData Collector credential store configuration properties.<key>
is the key for the value that you want returned.
- CyberArk - Enter the secret name using the following format:
"<safe><separator><folder><separator><object name>[<separator><element name>]"
<safe>
is the CyberArk safe to read.<separator>
is the separator defined in the $SDC_CONF/credential-stores.properties fileData Collector credential store configuration properties.<folder>
is the CyberArk folder to read.<object name>
is the CyberArk object or secret to read.<element name>
is an optional name for the value that you want returned.If you do not specify
<element name>
, Data Collector usesContent
.
- Google Secret Manager - Enter the secret name using the
following format:
"<name><delimiter><version ID>"
<name>
is the secret name.<delimiter>
is the delimiter defined in the $SDC_CONF/credential-stores.properties fileData Collector credential store configuration properties.<version ID>
is the version of the secret to return.
- Hashicorp Vault - Enter the secret name using the following
format:
"<path><separator><key>"
<path>
is the path in Vault to read,<separator>
is the separator defined in the $SDC_CONF/credential-stores.properties fileData Collector credential store configuration properties.<key>
is the key for the value that you want returned.
- Java keystore - Enter the name of the secret added to the Java
keystore file using the
jks-credentialstore add
command. - Azure Key Vault - Enter the name of the key or secret to retrieve from Azure Key Vault.
- AWS Secrets Manager - Enter the secret name using the following
format:
- credential:getWithOptions(<cstoreId>, <userGroup>, <name>, <storeOptions>)
- Returns the secret from the credential store using additional options to communicate with the credential store. Not applicable for the Java keystore or Google Secret Manager credential stores.