Layer7 API Management

  • 1.  How to avoid providing credentials in Assertions everytime

    Posted Jul 22, 2016 02:39 AM

    Hello All,

     

    I have a Policy/service in my Layer7 Policy Manager (version is 9.0) where we are using assertions like as below:

     

    Set Context Variable wsg.User as String to : CN=***,UID=***,OU=***,O=***,L=***,ST=***,C=***

     

    Everytime user is coming with another request or changing the name we have to add/modify the Username and credentials. So is there a way we can make it automate or define any other rest service or any alternate option to avoid this overhead.

     

    NOTE: As of now we are not using OAUTH and if suggested we can go for it  too.

     

    Thanks

    Praty



  • 2.  Re: How to avoid providing credentials in Assertions everytime
    Best Answer

    Posted Jul 22, 2016 02:50 AM

    Set a variable as a cluster-wide property (example username), reference the cluster-wide property as ${gateway.username} in your policy. If you want to programmatically update the cluster-wide property, create a scheduled task that points to something where you can update the value and then utilize restman to update the cluster-wide property in the gateway.