PDA

View Full Version : Hide Password in Failure Step


dprice
06-22-2005, 09:09 AM
I have a failure step that emails me the problem like this:

~~~
At %DATETIME%, the build '%PROJFILE%' on %COMPUTERNAME% failed with the following error:

FAILURE INFORMATION:
Step Name: %FAILSTEP_NAME%
Step Status: %FAILSTEP_STATUS%
Step Output:
%FAILSTEP_OUTPUT%

** Please review the attached build log and fix the build problems immediately! **
~~~

which expands to this:

~~~
At 6/21/2005 10:11:53 PM, the build 'C:\FSeriesAppDotNet\F6TestDotNet.root\F6TestPort. bld' on MyBuildComputer failed with the following error:

FAILURE INFORMATION:
Step Name: Check Out Version Shared Assembly Version File Step Status: 1 Step Output:
'C:\Program Files\Microsoft Visual Studio\VSS\win32\ss.exe' Checkout $/F6TestDotNet.root/F6TesTDotNetPort.root/F6TesTDotNetPort/F6TestSharedAssemblyInfo.cs -GLC:\FSeriesAppDotNet\F6TestDotNet.root\F6TesTDotN etPort.root\F6TesTDotNetPort -GWR -GTM -GCK -NL -I-N -YMyUserName,MyPassword -C- F6TestSharedAssemblyInfo.cs is already checked out, continue?(Y/N)N

Process completed with exit code 100

** Please review the attached build log and fix the build problems immediately! **
~~~

It exposes my password (look for MyUsername,MyPassword above). It there a workaround or fix for this?

Thanks,
Derek

kevina
06-22-2005, 11:50 AM
No automatic ability to obscure particular password or other values is provided in Visual Build Professional.

One workaround would be to add a Set Macro step to your Failure subroutine that created a new Temporary macro called FAILURESTEP_LOGOUTPUT or similar with the value [Replace(vbld_AllMacros()("FAILURESTEP_OUTPUT").Value, "%SS_USER%,%SS_PWD%", "***,***")].

That vb script expression assumes you have defined SS_USER and SS_PWD macros to store your SS username & password.

You would then use FAILURESTEP_LOGOUTPUT as the logged value instead of FAILURESTEP_OUTPUT.

dprice
06-22-2005, 02:13 PM
Thanks - that works great! Okay the next obvious question... Is there a way to mask a Macro as a password field? I didn't see anything, but it's worth a try!

Thanks again,
Derek

kevina
07-11-2005, 09:27 AM
Sorry for the tardy response, there is not a way to obscure the value of a macro (macros are stored in a plaintext xml file, so this would only provide the appearance of protection). Not to mention that somewhere a macro setting would have be configured to obscure it's value (in the GUI), nothing would prevent any other user from changing this back and viewing the 'password' value directly.

To truly protect values in a build would require defining, maintaining and honoring individual user rights (obviously a limited number of users would need access to this value!)...

dprice
07-11-2005, 09:36 AM
Any response is better than none! I figured there wasn't an easy method for this, but I had to ask!

Thanks again,
Derek