Details
-
New Feature
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
Description
After installing Mask Passwords Plugin 2.7.2, it allows the system configuration to set the passwords to be masked. One of which is Credentials Parameter.
However, in a project, if mask passwords is selected and an existing credential is used in the build step, the information is still displayed plaintext within the console output.
Steps To Reproduce:
- Configure System
- Mask Passwords - Parameters to automatically mask
[x] Non-Stored Password Parameter
[x] Credentials Parameter
[x] Password Parameter - Mask Passwords - Global name/password pairs
None added.
I already have several "Username with password" Global credentials
- Mask Passwords - Parameters to automatically mask
- Create freestyle project
- [x] Mask passwords (and enable global passwords)
Responce: Password Parameters, or any other type of build parameters selected for masking in Hudson's/Jenkins' main configuration screen (Manage Hudson > Configure System), will be automatically masked. - [x] Use secret text(s) or file(s)
Add: Username and password
Variable: oracleCredential
Credentials
(*) Specific credentials
my_oracle_username/***** (Oracle remote login)
parameter expression: ${oracleCredential} - Add build step: Execute Windows batch command
Command: @echo %oracleCredential% - [Save]
- [x] Mask passwords (and enable global passwords)
- Build Now, and examine Console Output
Expected: ********** is displayed in place of %oracleCredential%
Actual: Actual username:password value of %oracleCredential% is displayed.
Attachments
Issue Links
- links to
Code changed in jenkins
User: Oleg Nenashev
Path:
src/main/java/com/michelin/cio/hudson/plugins/maskpasswords/MaskPasswordsConfig.java
src/test/java/com/michelin/cio/hudson/plugins/integrations/CorePasswordParameterTest.java
src/test/java/com/michelin/cio/hudson/plugins/maskpasswords/MaskPasswordConfigTests.java
src/test/java/com/michelin/cio/hudson/plugins/maskpasswords/MaskPasswordsURLEncodingTest.java
src/test/java/com/michelin/cio/hudson/plugins/maskpasswords/MaskPasswordsWorkflowTest.java
src/test/java/com/michelin/cio/hudson/plugins/passwordparam/PasswordParameterTest.java
http://jenkins-ci.org/commit/mask-passwords-plugin/3d57fab2af5d3016e9bfd19eacca60095f744811
Log:
JENKINS-25735JENKINS-41995- Create more tests