Uploaded image for project: 'JBoss Web Server'
  1. JBoss Web Server
  2. JWS-164

[ASF BZ 57490] Websocket client cannot connect from Tomcat servlet with a SecurityManager in place Make it possible to use Tomcat's WebSocket client within a web application when running under a SecurityManager.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • JWS 3.1.0 DR1
    • JWS 3.0.1 DR1
    • tomcat8
    • None

      Bug 57490 – Websocket client cannot connect from Tomcat servlet with a SecurityManager in place Make it possible to use Tomcat's WebSocket client within a web application when running under a SecurityManager.

      When using the Tomcat websocket client to connect to a websocket server from a servlet running with a SecurityManager, an AccessControlException is thrown even with a Java security policy that allows everything.

      It does not work when the websocket client is used where access to the "org.apache.tomcat." packages is restricted (as it is in the Catalina servlet container).

      Repeat using unmodified Tomcat 8.0.17 and JDK 8u31 in Win7 x64:

      1) Add the following at the end of $CATALINA_BASE/conf/catalina.policy:

      grant

      { permission java.security.AllPermission; }

      ;

      2) Put the attached JSP file (repeat.jsp) into $CATALINA_BASE/webapps/examples/jsp
      (The repeat opens a websocket client to the echo websocket example server,
      sends a text message and then waits for and outputs the echoed response.)

      3) Launch Tomcat from $CATALINA_BASE/bin with "catalina run -security"

      4) Open http://127.0.0.1:8080/examples/jsp/repeat.jsp in a web browser

      https://bz.apache.org/bugzilla/show_bug.cgi?id=57490
      http://svn.apache.org/r1654767

            rhn-support-csutherl Coty Sutherland
            dknox_jira David Knox (Inactive)
            Filip Goldefus Filip Goldefus (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: