Automic Workload Automation

Expand all | Collapse all

Password Encrypt and Decrypt

  • 1.  Password Encrypt and Decrypt

    Posted Jul 21, 2016 04:01 AM

    Hi

     

    How to encrypt and decrypt a password in uc4. see example and screenshot below.

     

     


    ab26irzjx6uw.pnghttps://us.v-cdn.net/5019921/uploads/editor/re/ab26irzjx6uw.png" width="1565">



  • 2.  Password Encrypt and Decrypt

    Posted Jul 21, 2016 08:30 AM
    Not quite sure what you are asking for here Noah.  

    In a login object - when you enter in the password it is automatically encrypted for you using proprietary 256-bit encryption.  When you later use that login object in a job - the password is automatically "decrypted" I guess and there are no issues.

    If you want to encrypt a password outside of the login object - like for the automation engine ucsrv.ini or utility ini files - then you can use the ucybcryp program.  This is on the image you download in the Tools folder.

    Hope this helps.


  • 3.  Password Encrypt and Decrypt



  • 4.  Password Encrypt and Decrypt

    Posted Jul 26, 2016 06:36 AM
    petwir that's quiet cool. So you add new login types to store custom (like application) passwords in login objects? I saw solutions with promptsets, but this way is new to me.


  • 5.  Password Encrypt and Decrypt

    Posted Jul 26, 2016 02:46 PM
    Hint for using get_login:

    Please keep in mind that the sentence: You can only read the login entries of backend systems!  means that you cn not use it with common OS Logins (UNIX, Windows, etc).

    Workaround: create a new login type and use this one for unix or win Logins.


  • 6.  Password Encrypt and Decrypt

    Posted Sep 06, 2016 12:57 PM
    joel_wiesmann_automic
    In our case we set up just a single custom LOGIN type (the name of our organization.)  Then we set up a different LOGIN object for different application areas.  For instance one is called LOGIN.POWERSHELL to hold remote server credentials. 


  • 7.  Password Encrypt and Decrypt

    Posted Aug 29, 2017 07:07 PM
    Hi petwir and FrankMuffke

    I think this is exactly what I need but as simple as it seems, I can't figure it out. Do you mind adding a snapshot of the LOGIN type and then how it's being used. Does it have to be in the client you're working in or will having in client 0 cover all clients?

    example 1., I need to run a map cmd and not see the user and password in the job report. I know I can turn off the report option but I need the rest of the info logged. 

    031d9ucfp035.jpghttps://us.v-cdn.net/5019921/uploads/editor/tw/031d9ucfp035.jpg" width="640">

    example 2., same concept as above... I need to mask the password from the following cmd. I need to mask is from the cmd and from the job report.

    pmcmd startworkflow -sv [Service] -d [domain] -u [user] -p [pass] -folder 'folder_name' 

    Thanks guys! 







  • 8.  Password Encrypt and Decrypt

    Posted Aug 29, 2017 07:18 PM
    Wrap your NET USE instruction like so;

    &UC_JOBMD CMD="put your command here including the encrypted password"


    ***EDITED*** MY FIRST VERSION HAD A SYNTAX ERROR.


  • 9.  Password Encrypt and Decrypt

    Posted Aug 30, 2017 11:29 AM
    petwir

    I don't have an encrypted password. Would I be getting it from the LOGIN type? I could still use the snapshots to understand better. 

    Thanks Pete.


  • 10.  Password Encrypt and Decrypt

    Posted Aug 30, 2017 11:44 AM
    See my July 2016 post above.  You must first create a new login type, and then use that new type in your LOGIN object.  Then you can use GET_LOGIN() to retrieve the desired encrypted password.

    There are alternatives to this method as well.  For instance you can also store an encrypted password inside of a Promptset object.  We always use LOGIN objects though.


  • 11.  Password Encrypt and Decrypt

    Posted Sep 12, 2017 09:45 AM
    Hi petwir
    Just wanted to thank you for your help. I got it working! I'm going to document the steps for my crew but I'm also going to share it on this thread (if you don't mind). Thanks again! 


  • 12.  Password Encrypt and Decrypt

    Posted Sep 12, 2017 11:35 AM
    petwir
    question - I can't map to a shared drive that has a space in the folder name. I can do it when not using &UC_JOBMD.
    • works -  net use "\\fsca.mc.cumc.columbia.edu\CA_HSDevel$\PDB_2-Secure\PHI\Opt Out" /user:test123  passphrasehere
    • does not work - &UC_JOBMD CMD="net use &DIRECTORY01\&DIRECTORY02\Opt Out /user:&LI# &PW#"
    I tried using different combinations of single and double ticks but can't get it to work. Do you happen to know? 

    Thanks man.





  • 13.  Password Encrypt and Decrypt

    Posted Sep 12, 2017 11:50 AM
    Hi JohnTorres603474,

    Use the short name, you can get it with dir /x or put the folder containing spaces in "".

    Cheers,
    Alexander



  • 14.  Password Encrypt and Decrypt

    Posted Sep 12, 2017 02:07 PM
    I have gotten into "quote ****" with UC_JOBMD before, where it seems like it will never work.

    I'm not sure if this idea might work?

    :set &NetUseCommand# = 'net use "&DIRECTORY01\&DIRECTORY02\Opt Out"'
    &UC_JOBMD CMD="net use &NetUseCommand# /user:&LI# &PW#"


  • 15.  Password Encrypt and Decrypt

    Posted Sep 14, 2017 09:41 AM
    that's funny "quote ****"... that's exactly how it felt!

    I will try your suggestion but Alexander_Trenker_120 advice worked (and I also had them rename the folder w/o spaces).

    Thanks to you both!