Imperva Cyber Community

Expand all | Collapse all

WebSocket Timeout

  • 1.  WebSocket Timeout

    Posted 28 days ago
    Hi,
    we are using an on-premise WAF and configured WebSocket for one Site. Does anyone know the connection timeout for WebSocket? Are these the same values like configured under "Advanced HTTP Settings"?

    Best regards,
    Sascha
    #On-PremisesWAF(formerlySecuresphere)

    ------------------------------
    Sascha Rudolph
    Sec Admin
    Frankfurt Am Main
    ------------------------------


  • 2.  RE: WebSocket Timeout

    Posted 28 days ago
    Hi,


    Imperva on-premise WAF doesn't support WebSocket in security meaning.
    To enable WebSocket communication, you have to do:

    To enable WebSocket communication:

    1. Login to SecureSphere.

      From the Landing Page, click Configure Security, then select Security.
      Or, from Classic view, in the Main workspace, select Policies > Security. The Security window appears.

    2. In the Policies pane, under the Web Service Custom policy group, locate the Websocket Upgrade policy and click it.
    3. Under the Policy Configuration section, clear the Enabled check box.
    4. In the Policies pane, under the HTTP Protocol Validation policy group, locate the Web Protocol Policy and click it.
    5. Locate the HTTP WebSocket Violation policy rule and check the Enabled check box.
    6. Apply Severity, Action and Followed Action values as necessary.


    https://docs.imperva.com/bundle/v12.6-management-server-manager-user-guide/page/58930.htm


    What about timeouts?

    Imperva default timeouts

    • The idle connection timeout for HTTP is 6 minutes.
    • The idle connection timeout for WebSocket/non-HTTP traffic is 30 minutes.

    In order to prevent timeouts, you may want to align your application timeouts with the default Imperva timeouts.


    https://docs.imperva.com/bundle/cloud-application-security/page/websocket.htm




    ------------------------------
    Karol Gruszczynski
    IT SECURITY EXPERT
    Trafford IT
    Warsaw
    ------------------------------



  • 3.  RE: WebSocket Timeout

    Posted 28 days ago
    Thanks for your answer. We already enabled WebSocket communication. 
    The default timeouts you mentioned are refered to Cloud-WAF or are these also the default timeout values for on-premise WAF?

    ------------------------------
    Sascha Rudolph
    Sec Admin
    Frankfurt Am Main
    ------------------------------



  • 4.  RE: WebSocket Timeout

    Posted 28 days ago
    Sorry, I didn't notice that is only for CloudWAF.
    I tried to find out about Websockets on-site WAF timeouts but I found nothing. 
    You should open the case and ask support.




    ------------------------------
    Karol Gruszczynski
    IT SECURITY EXPERT
    Trafford IT
    Warsaw
    ------------------------------