Re: Hide password parameter passed by MavenModuleSet.setGoals

1 message Options
Embed this post
Permalink
Bouiaw

Re: Hide password parameter passed by MavenModuleSet.setGoals

Reply Threaded More More options
Print post
Permalink
I try with the user list in addition to dev one, since my issue is
about plugin development, both may be relevant.

To summarize my concerns : I have developped a patch for Hudson
m2release plugin that allow to specify SCM username and password when
you make a build in order to have no password in my project
configuration.

This plugin functionnality works fine, and I will send the patch for
inclusion but I have one remaining blocking issue : the password
passed with -Dpassword=foo is visible in logs !!!

So I would  like to find a way to modify Hudson logging to replace
-Dpassword=foo by  -Dpassword=*****.
I may be able to do a dirty patch for Hudson (override login class,
search -Dpassword=* and replace it by obfuscated one) but I think this
functionnality may interest other people.

Could someone could help me to do this ?

Regards,
Bouiaw

On Tue, Nov 3, 2009 at 9:25 AM, Bouiaw <[hidden email]> wrote:

> If someone know it is not possible, let me know I will try to patch
> hudson logger to hide related parameters ...
>
> On Sat, Oct 31, 2009 at 11:50 PM, Bouiaw <[hidden email]> wrote:
>> Additional informations about my issue in order to give you more information ...
>>
>> Currently the mmSet, where I have set my goals with the password, is
>> used as following :
>>
>> In the setUp of a BuildWrapper that return an Envrionnement instance :
>>
>> mavenOpts = mmSet.getMavenOpts();
>> ...
>> return new Environment() {
>>
>>                        @Override
>>                        public void buildEnvVars(java.util.Map<String, String> env) {
>>                                if (mavenOpts != null && !env.containsKey("MAVEN_OPTS")) {
>>                                        env.put("MAVEN_OPTS", mavenOpts);
>>                                }
>>                        };
>> }
>>
>> So my question may be : where could I have control to obfuscate logs
>> created from the Environment instance return by the SetUp of a Builder
>> ?
>>
>> On Sat, Oct 31, 2009 at 11:35 PM, Bouiaw <[hidden email]> wrote:
>>> Hi,
>>>
>>> I am currently creating a patch for m2release plugin that allow to
>>> specify when the user do a release SCM username and password.
>>>
>>> I have been doing this easily, but I have a blocking issue : the
>>> password password set with
>>> mmSet.setGoals("-Dscm.password="+scmPassword) is printed in build logs
>>> :
>>> Executing Maven:  -B -f D:\...\pom.xml -Dscm.password=zzzz
>>> -Dscm.username=aaaa -Dresume=false release:prepare release:perform
>>>
>>> I would like to pass the real value of the password to Maven but have
>>> in logs something like -Dscm.password=*********
>>>
>>> How to acheive this in Hudson ?
>>>
>>> Thanks in advance for you help, I think this feature could be useful
>>> for a lot of Hudson users.
>>>
>>> Regards,
>>> Bouiaw
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]