The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Mask Passwords Plugin

maskPasswords: Mask passwords and regexes (and enable global passwords)

When enabled, allows masking passwords that may appear in the console.

Passwords or regexes to be masked can be defined at three levels.

First, it is possible to select in Jenkins configuration screen the build parameters whose value must be masked. For example, selecting the Password Parameter type is a good idea.

Second, still in Jenkins' configuration screen, it is possible to define passwords to be masked as global Name/Password pairs, or regexes to be masked.

Third, on a per job basis (that is, in the current configuration screen), passwords to be masked can be defined as local Name/Password pairs, or regexes can be masked:

  • Password is aimed at containing a password to be masked from the console. Empty and blank values are not allowed (e.g. " ", etc.). This field is ciphered. This field can not contain variables, they won't be expanded.
  • If Name is set, then a build variable will be defined accordingly. This allows accessing the password by using the variable rather than hard-coding it in a field which is not ciphered (e.g. the ones of the Invoke Ant or Execute shell build steps).
  • If Regex is set, then any text matching that regex will be masked in the console output. The regex should not contain start- or end-of-string markers and will be internally and-ed (piped) together with all other regexes and regexes matching the specified names and passwords.
  • varPasswordPairs
      Array / List of Nested Object
    • var
      • Type: String
    • password
      • Type: class hudson.util.Secret
  • varMaskRegexes
      Array / List of Nested Object
    • regex
      • Type: String

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.