Credential binding password masking is not working for batch (windows batch cmd) when credentials are loaded with configuration as a code in Base64 encoding.

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Credential binding password masking is not working for batch (windows batch cmd) when credentials are loaded with configuration as a code in Base64 encoding.

      Steps to reproduce:
      Create and load test credentials with casc.yaml
      1. Create base64 format for password echo "testpassword" | base64
      dGVzdHBhc3N3b3JkCg==
      2. Test Credentials yaml configuration example

      • usernamePassword:
        scope: GLOBAL
        id: "TST_CREDS"
        username: "testusername"
        password: "${decodeBase64:dGVzdHBhc3N3b3JkCg==}"
        description: "TST_CREDS"

      3. Bind Credential in a job and use in a Execute Windows batch command build step
      @echo off
      ECHO Test_Username: %usernameUsername% Test_Password: %usernamePassword%:
      4. Run the job - password will not be masked.
      Test_Username: testusername Test_Password: testpassword

      Work around - don't use base64
      5. Update credential without base64 encoding
      6. Run the job - password will be masked
      Test_Username: testusername Test_Password: ****

      Note: PowerShell, Bash are not affected by this issue.

      Thank you

            Assignee:
            Unassigned
            Reporter:
            Gene Anisi
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: