Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-16-2011, 12:07 PM
Jim.Stripsky Jim.Stripsky is online now
Registered User
 
Join Date: 10-30-2007
Location: Pittsburgh
Posts: 5
Hide Macro Value

I saw a post from 2005 asking about this, but figured I could ask again since this may be supported now.....

I have a macro to store a password to deploy an EAR file into WebSphere using wsadmin scripting. I would like this value to be hidden from users. Is it possible to mask this value from users once it's written? Or does anyone have another idea how this could be done?

My concern is that an user could find the value and use it to make unauthorized changes to the WebSphere configuration causing unknown problems.

Thanks!
Reply With Quote
  #2  
Old 12-16-2011, 10:01 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
See the Encrypt macro value option.
http://www.kinook.com/VisBuildPro/Ma...properties.htm
Reply With Quote
  #3  
Old 12-19-2011, 09:10 AM
Jim.Stripsky Jim.Stripsky is online now
Registered User
 
Join Date: 10-30-2007
Location: Pittsburgh
Posts: 5
It Doesn't Work in Version 7.7a

I am running version 7.7a and the Encrypt Macro function doesn't work. I setup a 'Project Macro' and clicked the Encrypt Macro checkbox.

In the .bld file, the macro value is not encrypted and when I print out the macro value with a 'Log Message' step, it is not encrypted.

Is there something broken in this version, or are only certain Macro Types able to be encrypted?
Reply With Quote
  #4  
Old 12-19-2011, 10:23 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
How are you creating the macro in Visual Build? Did you go to the Macros tab, Insert, and check the Encrypt option? If so, the macro value will be stored encrypted in the .bld file and obscured when the macro value is later displayed in the Macros pane, properties dialog, etc.

If you instead created a Set Macro step with Encrypt checked, the macro value will be encrypted when the step is built, but the value when entered into the Set Macro step or stored in the .bld file will not be encrypted (this is by design).

Logging the macro value from a build will show its value, since the build has to use actual macro values to function properly.
Reply With Quote
  #5  
Old 12-19-2011, 10:47 AM
Jim.Stripsky Jim.Stripsky is online now
Registered User
 
Join Date: 10-30-2007
Location: Pittsburgh
Posts: 5
Understood

I was creating it as a macro step in the Project Steps. I moved it to the Macro tab and it is encrypted. Thanks for explaining what I was doing incorrectly.

Since I use this value later as an argument to a batch file, I need to not make sure the 'log the command line used' is not checked or the value will be displayed.

As an enhancement, would it be possible to check if a macro value is encrypted before logging the command line and masking it in the log file?
Reply With Quote
  #6  
Old 12-19-2011, 10:58 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The problem with generically obscuring an encrypted macro value for logging is that when the macro value is expanded, there's no way of knowing if it will be used in the build, or logged, or both. And at the point where build output is logged, there's no way to know what, if any, parts contain values that were encrypted. One thing that might help would be to turn off the logging of the command in the step's vbld_StepStarting script event, i.e.:

Step.Property("ShowCmd") = False

http://www.kinook.com/VisBuildPro/Ma...riptevents.htm
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 11:06 PM.


Copyright © 1999-2023 Kinook Software, Inc.