tyrus
  1. tyrus
  2. TYRUS-146

Support request from client to secured services ("wss")

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      Description

      there is a way how to register custom SSLEngineConfigurator (grizzly class), so it should be possible to make requests to secured services:

              final ClientManager client = ClientManager.createClient();
      
              System.getProperties().put("javax.net.debug", "all");
              System.getProperties().put(SSLContextConfigurator.KEY_STORE_FILE, "...");
              System.getProperties().put(SSLContextConfigurator.TRUST_STORE_FILE, "...");
              System.getProperties().put(SSLContextConfigurator.KEY_STORE_PASSWORD, "...");
              System.getProperties().put(SSLContextConfigurator.TRUST_STORE_PASSWORD, "...");
      
              final SSLContextConfigurator defaultConfig = new SSLContextConfigurator();
              defaultConfig.retrieve(System.getProperties());
      
              // or setup SSLContextConfigurator using its API.
      
              SSLEngineConfigurator sslEngineConfigurator = new SSLEngineConfigurator(defaultConfig, true, false, false);
      
              client.getProperties().put(GrizzlyEngine.SSL_ENGINE_CONFIGURATOR, sslEngineConfigurator);
      
              client.connectToServer(... , ClientEndpointConfig.Builder.create().build(), new URI("wss://localhost:8181/sample-echo/echo"));
      

        Activity

        Pavel Bucek created issue -
        Pavel Bucek made changes -
        Field Original Value New Value
        Assignee Pavel Bucek [ pavel_bucek ]
        Pavel Bucek made changes -
        Priority Major [ 3 ] Blocker [ 1 ]
        Pavel Bucek made changes -
        Fix Version/s 1.0-backlog [ 16081 ]
        Fix Version/s 1.0-b14 [ 16363 ]
        Priority Blocker [ 1 ] Major [ 3 ]
        Description there is a way how to register custom SSLEngineConfigurator (grizzly class), so it should be possible to make requests to secured services:

        {code}
                final ClientManager client = ClientManager.createClient();

                System.getProperties().put("javax.net.debug", "all");
                System.getProperties().put(SSLContextConfigurator.KEY_STORE_FILE, "...");
                System.getProperties().put(SSLContextConfigurator.TRUST_STORE_FILE, "...");
                System.getProperties().put(SSLContextConfigurator.KEY_STORE_PASSWORD, "...");
                System.getProperties().put(SSLContextConfigurator.TRUST_STORE_PASSWORD, "...");

                final SSLContextConfigurator defaultConfig = new SSLContextConfigurator();
                defaultConfig.retrieve(System.getProperties());

                // or setup SSLContextConfigurator using its API.

                SSLEngineConfigurator sslEngineConfigurator = new SSLEngineConfigurator(defaultConfig, true, false, false);

                client.getProperties().put(GrizzlyEngine.SSL_ENGINE_CONFIGURATOR, sslEngineConfigurator);

                client.connectToServer(... , ClientEndpointConfig.Builder.create().build(), new URI("wss://localhost:8181/sample-echo/echo"));
        {code}
        Pavel Bucek made changes -
        Fix Version/s 1.2 [ 16550 ]
        Fix Version/s 1.x-backlog [ 16081 ]
        Affects Version/s 1.0 [ 16078 ]
        Pavel Bucek made changes -
        Fix Version/s 1.3 [ 16600 ]
        Fix Version/s 1.2 [ 16550 ]
        Pavel Bucek made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Pavel Bucek
            Reporter:
            Pavel Bucek
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: