Layer7 API Management

  • 1.  Alternative for Manage Cookie assertion in Layer 7 version 7.1

    Posted Aug 16, 2017 05:10 PM

    Hello,

     

    Manage cookie assertion is not present in version 7.1. Is there any workaround to add the cookie in route assertion.

    I've tried with Add Header - Set-Cookie : <cookie value> e.g. Set-Cookie: HelloName=HelloValue to a context variable and used the context variable in route assertion. But this is not working i.e. the request is not having the cookies.

     

    Could someone please suggest

     

    thanks

    koushik



  • 2.  Re: Alternative for Manage Cookie assertion in Layer 7 version 7.1
    Best Answer

    Broadcom Employee
    Posted Aug 16, 2017 06:46 PM

    Koushik,

     

    The Set-Cookie header is used to set the client cookies once a response is sent back. I believe what you are looking for is the Cookie header so that you are setting the cookie for the request. You can use the context variable to grab the original cookie and augment your additional pieces, or simply replace it.

     

    Also a note that version 7.1 is not longer support as of December 31,2016 and at this time only version 8.x and 9.x are supported. I would recommend that you look to upgrade to the latest to ensure that the product is properly supported.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support



  • 3.  Re: Alternative for Manage Cookie assertion in Layer 7 version 7.1

    Posted Aug 21, 2017 10:59 AM

    Hi Stephen,

     

    Thanks for the reply. We've tried by copying the request to a context variable and then modified the context variable to have the required information but it didn't work.

     

    The below approach looks to be working for now.. changed the content type of input request to the desired content type using the 'Change content type' assertion. In the route assertion passed the customize parameters. Basically the original request headers remained intact and then we've changed the parameters and content type and it worked.

     

     

    Thanks

    Koushik