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 Secrets Configuration. The value of the secret is resolved during deployment.

The following syntax is used to reference a secret stored in a Control-M vault:

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

You can use secrets in code, as follows:

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

For information about managing secrets of this type, see Secrets Configuration.