Secrets in Code

You can use the Secret object in your JSON code when you do not want to expose confidential information in the source—for example, the password field in a Connection Profile. The syntax below enables you to reference a named secret as defined in the Control-M vault. To learn how to manage secrets, see section Configuring Secrets. The value of the secret is resolved during deployment.

The following syntax is used to reference a secret:

Copy
"<parameter>" :  {"Secret": "<secret name>"}

You can use secrets in code as follows:

Copy
{
    "Type": "ConnectionProfile:Hadoop",
    "Hive": {
        "Host": "hiveServer",
        "Principal": "a@bc",
        "Port": "1024",
        "User": "emuser",
        "Password": {"Secret": "hive_dev_secret"}
    }
}