Layer7 API Management

  • 1.  websocket outbound with dynamic url ?

    Posted Aug 09, 2018 09:46 AM

    Hi Team.

    I'm trying to implement a websocket defintion with a dynamic outbound/bakend URL

     

    and of course I defined a connection policy, which sets different websocket_backend_ip values based on the incoming url.

    Unfortunately it doesn't work as expected. It seems that no connection is opened to the backend system specified in the connection policy.

    Instead I find the following message in the ssg_0_0.log:

     

    2018-08-09T15:32:24.161+0200 WARNING 241922 com.l7tech.external.assertions.websocket.server.InboundSocketCreator: Exception caught creating inbound WebSocket:java.lang.StringIndexOutOfBoundsException: String index out of range: 44

     

    Anyone has any idea , what I am doing wrong ?

    Regards

    .............Michael



  • 2.  Re: websocket outbound with dynamic url ?

    Broadcom Employee
    Posted Aug 09, 2018 09:51 AM

    What versions is this? and is it the OOB Websocket or the tactical assertion?

    I know the OOB version had issues with dynamic URLs which are corrected in the tactical.

     

    Regards,

    Joe



  • 3.  Re: websocket outbound with dynamic url ?

    Posted Aug 09, 2018 10:17 AM

    Hi Jow.

    Thanks a lot for this fast response.

    Its a Gateway 9.2 oob websocket.

    Is the tactical one reliable , meaning , I can easily substitute the oob version without any concern/doubt?

    Is this problem fixed in a gw 9.3 or later ?

    Meaning would it make more sense to upgrade the gw?

    Regards

    ...........Michael



  • 4.  Re: websocket outbound with dynamic url ?
    Best Answer

    Broadcom Employee
    Posted Aug 09, 2018 10:40 AM

    It looks like 9.3 supports this now. Yes, the tactical is reliable, I've worked with several clients to use that over the out of box version. In any case though it looks like 9.3 will fix that for you.

     

    WebSocket Connection Properties - CA API Gateway - 9.3 - CA Technologies Documentation 



  • 5.  Re: websocket outbound with dynamic url ?

    Broadcom Employee
    Posted Aug 09, 2018 10:43 AM

    Ran a quick test on my 9.3 and works just as expected. I defined the variables in the connect policy.

     



  • 6.  Re: websocket outbound with dynamic url ?

    Posted Aug 16, 2018 03:16 AM

    Thanks a lot Joe.

    I was able to use the tactical websocket assertion in my test environment 9.2, and it now works as expected.

    Just one last thing.

    Wouldn't it make sense, to advice any customer with 9.2, whenever they want to work with websockets, they should install the tactical assertion, instead of using the ootb one?

    Are tactical assertions supported by CA Support in the same way as all the other ones?



  • 7.  Re: websocket outbound with dynamic url ?

    Broadcom Employee
    Posted Aug 16, 2018 03:47 AM

    I would say yes, but you need to file a note to record the customer you provided the assertion to, as described in the cawiki entry. Is there a chance that this feature made it into an CR for 9.2 ?

     

    The docs of 9.2 contain

     

    WebSocket Connections

    Several enhancements were made to the Manage WebSocket Connections task:

    • Now able to authenticate and authorize WebSocket connections using the new "connection policy" field
    • Outbound URL can now be dynamic, by using context variables from the connection policy
    • Support for WebSocket compression
    • Support for the selection of TLS protocols and cipher suites
    • Improved logging of connections