Updating a workload secret for Cloudera Data Engineering Spark Jobs using CLI

You can update an existing secret to use it with the Cloudera Data Engineering (CDE) Spark Jobs.

  • Specify --workload-cred-key when prompted for secret values multiple times. The values which are sensitive are read as a hidden password field interactively from the CLI.
    ./cde credential update --name <workload-credential-name> --workload-cred-key <workload-credential_key> --workload-cred-key <workload-credential_key>
    For example:
    ./cde credential update --name workload-cred-1 --workload-cred-key db-pass --workload-cred-key aws-secret --workload-cred-key api-token         
    Enter Secret value for Workload Cred key "dbPassword" :
    Re-enter Secret value for Workload Cred key "dbPassword" :
    Enter Secret value for Workload Cred key "aws-secret" :
    Re-enter Secret value for Workload Cred key "aws-secret" :
  1. Update the JSON file with workload secret keys.
    For example:
    sample.json file – file name
    
    {
        "aws-secret": "secret123",
        "db-pass": "dbpass123"
      }
  2. Run the following command to create the workload secret with updated parameters:
    ./cde credential update --name <workload-credential-name> --type workload-credential --workload-cred-json-file <workload-credential-json-file-name>
    For example:
    ./cde credential update --name workload-cred-2 --workload-cred-json-file sample.json