Layer7 API Management

Expand all | Collapse all

Retrieve Stored password using context variable

Jump to Best Answer
  • 1.  Retrieve Stored password using context variable

    Posted 12-26-2018 10:28 AM

    Hi All,

     

    Can you please help me, how to retrieve the stored passwords which are saved in manage stored password dynamically using context variable.

    I tried using following way, which doesn't provided with the value for the username.

    ${secpass.${username}.plaintext}

     

    As i need to pass the password dynamically depending on the username which i receive.

     

    Thanks in advance for the help.



  • 2.  Re: Retrieve Stored password using context variable

    Posted 12-26-2018 10:50 AM
      |   view attached

    Hello,

     

    First, make sure you have checked the box for 'Permit use via context variable reference' when creating the stored password. To look this up dynamically:

     

    1) Create the stored password

     

    2) Add a 'Look Up Context Variable assertion where the variable ${user} is set to the stored password name

     

    3) Reference the output of this assertion, ie: ${lookup.output}

     

     

     

    This will display the password for the user specified.

     

    Regards,

    Joe

    Attachment(s)



  • 3.  Re: Retrieve Stored password using context variable
    Best Answer

    Posted 12-26-2018 10:52 AM

    Sample attached, just replace the username variable with an appropriate stored password name in your environment.



  • 4.  Re: Retrieve Stored password using context variable

    Posted 12-26-2018 10:59 AM

    Thank You Very Much dasjo02 It worked for me and solved my issue as well.