Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo & Maven: Not hiding password in build log

Ricardo Joseph
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 6, 2011

Hi,

When a release build is successful my password is not being hidden on the build log when it displays the goal:

release:prepare -Dusername= myUsername -Dpassword=My_Not_Hidden_Password release:perform

However when it fails due to invalid credentials the password is hidden:

release:prepare -Dusername= myUsername -Dpassword=****** release:perform

Any alternatives to this would be appreciated, however the credentials cannot be hardcoded as the user is required to enter them.

Thank you in advance.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Ricardo Joseph
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 7, 2011

I was performing removals and encryptions too early. I have removed these and everything works fine.

0 votes
James Dumay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 7, 2011

As of Bamboo 3.3, if you create a Bamboo Plan variable thats name contains "password" and run the build manually as a parameterised build Bamboo will automatically mask out the password in the logs for you.

Ricardo Joseph
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 7, 2011

Thank you for the response. I am using Bamboo 3.3

My plugin uses a velocity form to accept user credentials.

These are then put into a VariableDefinitionContextMap

and passed to the maven goal as:

release:prepare -Dusername= EnteredUsername -Dpassword=EnteredPassword release:perform

However Bamboo is not hiding the password value in the build log, upon a successful release only when it fails due to invalid credentials.

I am not sure as to why it masks it when it fails but not when it is successful.

Is there something else that I need to do?

Ricardo Joseph
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 7, 2011

I think I understand what is happeneing...

Could it be that I am not using a Bamboo Plan Variable for the maven goal and actually editing the task directly...

However I still do not understand as to why it hides the values when it fails but not when it is successful.

Ricardo Joseph
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 7, 2011

This is occuring in this section of the build log:

Beginning to execute external process for build 'Default Job'
... running command line:

C:\projects\projectName\pom.xml
-B
release:prepare
-Dusername=myUsername
-Dpassword=my Password is shown here
release:perform

everywhere else in the build log it is hidden. It is only displayed here.

TAGS
AUG Leaders

Atlassian Community Events