You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Oliver Waeldrich (JIRA)" <ji...@apache.org> on 2007/04/17 16:09:15 UTC

[jira] Created: (MUSE-223) Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.

Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.
---------------------------------------------------------------------------------------------

                 Key: MUSE-223
                 URL: https://issues.apache.org/jira/browse/MUSE-223
             Project: Muse
          Issue Type: New Feature
          Components: Core Engine - Resource and Capability APIs
            Reporter: Oliver Waeldrich
         Assigned To: Dan Jemiolo
             Fix For: 2.3.0


In order to use certificate based client authentication with MUSE we would like to specify a 
SSLSocketFactory to be used when communicating with a MUSE server. Even though it is
possible to specify a default SSLSocketFactory (see HttpsURLConnection.setDefaultSSLSocketFactory())
this is not feasible for environments, where e.g. a client needs to communicate with multiple 
server instances using different credentials. 

Therefore I would suggest an extension to the SimpleSoapClient to specify a SSLSocketFactory  for https
connections and to extend the client's send-functionality as indicated by the code below.

    HttpURLConnection connection = (HttpURLConnection)url.openConnection();
    if (connection instanceof HttpsURLConnection)
        if (mySSLSocketFactoryInstance =! null) {
            ((HttpsURLConnection)connection).setSSLSocketFactory(mySSLSocketFactoryInstance);
        }
    }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Closed: (MUSE-223) Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.

Posted by "Dan Jemiolo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MUSE-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Jemiolo closed MUSE-223.
----------------------------

    Resolution: Fixed

Applied Oliver's patch

> Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.
> ---------------------------------------------------------------------------------------------
>
>                 Key: MUSE-223
>                 URL: https://issues.apache.org/jira/browse/MUSE-223
>             Project: Muse
>          Issue Type: New Feature
>          Components: Core Engine - Resource and Capability APIs
>            Reporter: Oliver Waeldrich
>            Assignee: Dan Jemiolo
>             Fix For: 2.3.0
>
>         Attachments: extension.zip, muse-223-patch.txt
>
>
> In order to use certificate based client authentication with MUSE we would like to specify a 
> SSLSocketFactory to be used when communicating with a MUSE server. Even though it is
> possible to specify a default SSLSocketFactory (see HttpsURLConnection.setDefaultSSLSocketFactory())
> this is not feasible for environments, where e.g. a client needs to communicate with multiple 
> server instances using different credentials. 
> Therefore I would suggest an extension to the SimpleSoapClient to specify a SSLSocketFactory  for https
> connections and to extend the client's send-functionality as indicated by the code below.
>     HttpURLConnection connection = (HttpURLConnection)url.openConnection();
>     if (connection instanceof HttpsURLConnection)
>         if (mySSLSocketFactoryInstance =! null) {
>             ((HttpsURLConnection)connection).setSSLSocketFactory(mySSLSocketFactoryInstance);
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Commented: (MUSE-223) Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.

Posted by "Dan Jemiolo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MUSE-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489568 ] 

Dan Jemiolo commented on MUSE-223:
----------------------------------

Okay, slight problem - javax.net.ssl is only available on J2SE, not J2ME, and the muse-wsa-soap module needs to remain J2ME-compliant. I will refactor SimpleSoapClient a bit so I can add this as an independent module. The frustrating thing is that J2ME seems to have something similar (SecureConnection), but it's part of a J2ME-specific package.

I guess I will just make the SecureSoapClient API available with the default implementation that uses J2SE's SSL API, and people who want a J2ME version can use that implementation as inspiration for their own class.


> Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.
> ---------------------------------------------------------------------------------------------
>
>                 Key: MUSE-223
>                 URL: https://issues.apache.org/jira/browse/MUSE-223
>             Project: Muse
>          Issue Type: New Feature
>          Components: Core Engine - Resource and Capability APIs
>            Reporter: Oliver Waeldrich
>         Assigned To: Dan Jemiolo
>             Fix For: 2.3.0
>
>
> In order to use certificate based client authentication with MUSE we would like to specify a 
> SSLSocketFactory to be used when communicating with a MUSE server. Even though it is
> possible to specify a default SSLSocketFactory (see HttpsURLConnection.setDefaultSSLSocketFactory())
> this is not feasible for environments, where e.g. a client needs to communicate with multiple 
> server instances using different credentials. 
> Therefore I would suggest an extension to the SimpleSoapClient to specify a SSLSocketFactory  for https
> connections and to extend the client's send-functionality as indicated by the code below.
>     HttpURLConnection connection = (HttpURLConnection)url.openConnection();
>     if (connection instanceof HttpsURLConnection)
>         if (mySSLSocketFactoryInstance =! null) {
>             ((HttpsURLConnection)connection).setSSLSocketFactory(mySSLSocketFactoryInstance);
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Updated: (MUSE-223) Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.

Posted by "Oliver Waeldrich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MUSE-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Waeldrich updated MUSE-223:
----------------------------------

    Attachment: extension.zip

I attached an update for the SimpleSoapClient that illustrates how a handler can be registered with the client. This handler can then be used to set e.g. a SSLSocketFactory for client authentication.


> Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.
> ---------------------------------------------------------------------------------------------
>
>                 Key: MUSE-223
>                 URL: https://issues.apache.org/jira/browse/MUSE-223
>             Project: Muse
>          Issue Type: New Feature
>          Components: Core Engine - Resource and Capability APIs
>            Reporter: Oliver Waeldrich
>         Assigned To: Dan Jemiolo
>             Fix For: 2.3.0
>
>         Attachments: extension.zip
>
>
> In order to use certificate based client authentication with MUSE we would like to specify a 
> SSLSocketFactory to be used when communicating with a MUSE server. Even though it is
> possible to specify a default SSLSocketFactory (see HttpsURLConnection.setDefaultSSLSocketFactory())
> this is not feasible for environments, where e.g. a client needs to communicate with multiple 
> server instances using different credentials. 
> Therefore I would suggest an extension to the SimpleSoapClient to specify a SSLSocketFactory  for https
> connections and to extend the client's send-functionality as indicated by the code below.
>     HttpURLConnection connection = (HttpURLConnection)url.openConnection();
>     if (connection instanceof HttpsURLConnection)
>         if (mySSLSocketFactoryInstance =! null) {
>             ((HttpsURLConnection)connection).setSSLSocketFactory(mySSLSocketFactoryInstance);
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Commented: (MUSE-223) Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.

Posted by "Dan Jemiolo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MUSE-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489467 ] 

Dan Jemiolo commented on MUSE-223:
----------------------------------

Sounds good, I'll try and add this today.


> Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.
> ---------------------------------------------------------------------------------------------
>
>                 Key: MUSE-223
>                 URL: https://issues.apache.org/jira/browse/MUSE-223
>             Project: Muse
>          Issue Type: New Feature
>          Components: Core Engine - Resource and Capability APIs
>            Reporter: Oliver Waeldrich
>         Assigned To: Dan Jemiolo
>             Fix For: 2.3.0
>
>
> In order to use certificate based client authentication with MUSE we would like to specify a 
> SSLSocketFactory to be used when communicating with a MUSE server. Even though it is
> possible to specify a default SSLSocketFactory (see HttpsURLConnection.setDefaultSSLSocketFactory())
> this is not feasible for environments, where e.g. a client needs to communicate with multiple 
> server instances using different credentials. 
> Therefore I would suggest an extension to the SimpleSoapClient to specify a SSLSocketFactory  for https
> connections and to extend the client's send-functionality as indicated by the code below.
>     HttpURLConnection connection = (HttpURLConnection)url.openConnection();
>     if (connection instanceof HttpsURLConnection)
>         if (mySSLSocketFactoryInstance =! null) {
>             ((HttpsURLConnection)connection).setSSLSocketFactory(mySSLSocketFactoryInstance);
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


RE: [jira] Updated: (MUSE-223) Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.

Posted by Daniel Jemiolo <da...@us.ibm.com>.
This sounds good to me. Probably the best solution would be to make a 
protected send() method that had little-to-no envelope manipulation, and 
just put the XML content on the wire and returned what came back (if 
anything). I think SimpleSoapClient already has such a method, but it 
could be improved a little (by abstracting out the tracing and call to 
createMessage()). Once this has been done, it should be pretty 
straightforward to override SimpleSoapClient's default (HTTP) behavior and 
use a different protocol/API.

Dan



"Vinh Nguyen \(vinguye2\)" <vi...@cisco.com> wrote on 05/02/2007 
04:01:42 AM:

> Perhaps in the long run, would it be good to have Muse flexible enough
> so that the protocol can easily be specified/configured?  Right now, the
> Muse architecture is tightly coupled with HTTP.  If we can specify it to
> use HTTPS or some other protocol, or be able to plugin our own "protocol
> handler" classes so that SOAP messages can be sent over any protocol,
> this would be great!  The Muse core can then be used in any type of
> application, even non-server based.
> 
> Right now, the SimpleSoapClient code directly uses an HttpURLConnection.
> Perhaps that can be abstracted out, and another class can be plugged in
> to manage the connection?  If there's any other classes that make a
> remote connection to a client, they will need to be included in this
> update, too, so I'm not sure how work this will involve.
> 
> 
> 
> -----Original Message-----
> From: Oliver Waeldrich (JIRA) [mailto:jira@apache.org] 
> Sent: Wednesday, May 02, 2007 12:50 AM
> To: muse-dev@ws.apache.org
> Subject: [jira] Updated: (MUSE-223) Add capability to specify a
> SSLSocketFactory for HTTPS based connections in SimpleSoapClient.
> 
> 
>      [
> https://issues.apache.org/jira/browse/MUSE-223?page=com.atlassian.jira.p
> lugin.system.issuetabpanels:all-tabpanel ]
> 
> Oliver Waeldrich updated MUSE-223:
> ----------------------------------
> 
>     Attachment: muse-223-patch.txt
> 
> Created a patch for this issue.
> 
> Implementations can now implement an AbstractResourceClient and pass a
> SimpleSoapClient on creation. The connection handler can be added to the
> SimpleSoapClient and is invoked directly before and after a SOAP mesage
> is sent.
> 
> This functionality can be used e.g. to set the desired SSLSocketFactory
> object for the SOAP connection.
> 
> > Add capability to specify a SSLSocketFactory for HTTPS based
> connections in SimpleSoapClient.
> > ----------------------------------------------------------------------
> > -----------------------
> >
> >                 Key: MUSE-223
> >                 URL: https://issues.apache.org/jira/browse/MUSE-223
> >             Project: Muse
> >          Issue Type: New Feature
> >          Components: Core Engine - Resource and Capability APIs
> >            Reporter: Oliver Waeldrich
> >         Assigned To: Dan Jemiolo
> >             Fix For: 2.3.0
> >
> >         Attachments: extension.zip, muse-223-patch.txt
> >
> >
> > In order to use certificate based client authentication with MUSE we 
> > would like to specify a SSLSocketFactory to be used when communicating
> 
> > with a MUSE server. Even though it is possible to specify a default 
> > SSLSocketFactory (see HttpsURLConnection.setDefaultSSLSocketFactory())
> > this is not feasible for environments, where e.g. a client needs to 
> > communicate with multiple server instances using different
> credentials.
> > Therefore I would suggest an extension to the SimpleSoapClient to 
> > specify a SSLSocketFactory  for https connections and to extend the
> client's send-functionality as indicated by the code below.
> >     HttpURLConnection connection =
> (HttpURLConnection)url.openConnection();
> >     if (connection instanceof HttpsURLConnection)
> >         if (mySSLSocketFactoryInstance =! null) {
> >
> ((HttpsURLConnection)connection).setSSLSocketFactory(mySSLSocketFactoryI
> nstance);
> >         }
> >     }
> 
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-dev-help@ws.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


RE: [jira] Updated: (MUSE-223) Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.

Posted by "Vinh Nguyen (vinguye2)" <vi...@cisco.com>.
Perhaps in the long run, would it be good to have Muse flexible enough
so that the protocol can easily be specified/configured?  Right now, the
Muse architecture is tightly coupled with HTTP.  If we can specify it to
use HTTPS or some other protocol, or be able to plugin our own "protocol
handler" classes so that SOAP messages can be sent over any protocol,
this would be great!  The Muse core can then be used in any type of
application, even non-server based.

Right now, the SimpleSoapClient code directly uses an HttpURLConnection.
Perhaps that can be abstracted out, and another class can be plugged in
to manage the connection?  If there's any other classes that make a
remote connection to a client, they will need to be included in this
update, too, so I'm not sure how work this will involve.

 

-----Original Message-----
From: Oliver Waeldrich (JIRA) [mailto:jira@apache.org] 
Sent: Wednesday, May 02, 2007 12:50 AM
To: muse-dev@ws.apache.org
Subject: [jira] Updated: (MUSE-223) Add capability to specify a
SSLSocketFactory for HTTPS based connections in SimpleSoapClient.


     [
https://issues.apache.org/jira/browse/MUSE-223?page=com.atlassian.jira.p
lugin.system.issuetabpanels:all-tabpanel ]

Oliver Waeldrich updated MUSE-223:
----------------------------------

    Attachment: muse-223-patch.txt

Created a patch for this issue.

Implementations can now implement an AbstractResourceClient and pass a
SimpleSoapClient on creation. The connection handler can be added to the
SimpleSoapClient and is invoked directly before and after a SOAP mesage
is sent.

This functionality can be used e.g. to set the desired SSLSocketFactory
object for the SOAP connection.

> Add capability to specify a SSLSocketFactory for HTTPS based
connections in SimpleSoapClient.
> ----------------------------------------------------------------------
> -----------------------
>
>                 Key: MUSE-223
>                 URL: https://issues.apache.org/jira/browse/MUSE-223
>             Project: Muse
>          Issue Type: New Feature
>          Components: Core Engine - Resource and Capability APIs
>            Reporter: Oliver Waeldrich
>         Assigned To: Dan Jemiolo
>             Fix For: 2.3.0
>
>         Attachments: extension.zip, muse-223-patch.txt
>
>
> In order to use certificate based client authentication with MUSE we 
> would like to specify a SSLSocketFactory to be used when communicating

> with a MUSE server. Even though it is possible to specify a default 
> SSLSocketFactory (see HttpsURLConnection.setDefaultSSLSocketFactory())
> this is not feasible for environments, where e.g. a client needs to 
> communicate with multiple server instances using different
credentials.
> Therefore I would suggest an extension to the SimpleSoapClient to 
> specify a SSLSocketFactory  for https connections and to extend the
client's send-functionality as indicated by the code below.
>     HttpURLConnection connection =
(HttpURLConnection)url.openConnection();
>     if (connection instanceof HttpsURLConnection)
>         if (mySSLSocketFactoryInstance =! null) {
>
((HttpsURLConnection)connection).setSSLSocketFactory(mySSLSocketFactoryI
nstance);
>         }
>     }

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Updated: (MUSE-223) Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.

Posted by "Oliver Waeldrich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MUSE-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Waeldrich updated MUSE-223:
----------------------------------

    Attachment: muse-223-patch.txt

Created a patch for this issue.

Implementations can now implement an AbstractResourceClient and pass a SimpleSoapClient on creation. The connection handler can be added to the SimpleSoapClient and is invoked directly before and after a SOAP mesage is sent.

This functionality can be used e.g. to set the desired SSLSocketFactory object for the SOAP connection.

> Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.
> ---------------------------------------------------------------------------------------------
>
>                 Key: MUSE-223
>                 URL: https://issues.apache.org/jira/browse/MUSE-223
>             Project: Muse
>          Issue Type: New Feature
>          Components: Core Engine - Resource and Capability APIs
>            Reporter: Oliver Waeldrich
>         Assigned To: Dan Jemiolo
>             Fix For: 2.3.0
>
>         Attachments: extension.zip, muse-223-patch.txt
>
>
> In order to use certificate based client authentication with MUSE we would like to specify a 
> SSLSocketFactory to be used when communicating with a MUSE server. Even though it is
> possible to specify a default SSLSocketFactory (see HttpsURLConnection.setDefaultSSLSocketFactory())
> this is not feasible for environments, where e.g. a client needs to communicate with multiple 
> server instances using different credentials. 
> Therefore I would suggest an extension to the SimpleSoapClient to specify a SSLSocketFactory  for https
> connections and to extend the client's send-functionality as indicated by the code below.
>     HttpURLConnection connection = (HttpURLConnection)url.openConnection();
>     if (connection instanceof HttpsURLConnection)
>         if (mySSLSocketFactoryInstance =! null) {
>             ((HttpsURLConnection)connection).setSSLSocketFactory(mySSLSocketFactoryInstance);
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


[jira] Commented: (MUSE-223) Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.

Posted by "Oliver Waeldrich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MUSE-223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12489711 ] 

Oliver Waeldrich commented on MUSE-223:
---------------------------------------

Another problem is, that there are two implementations of HttpsUrlConnection, one in javax.net.ssl and one in com.sun.net.ssl (deprecated). To be backward compatible we still need to support the deprecated implementation. 

Therefore, I think it would be quite useful not to pass the SSLSocketFactory to MUSE, but allow a client implementation to register a handler with the soap client, which is called e.g. directly after url.openConnection(); The handler would have only one method (e.g. public void handle(HttpURLConnection); ) where an implementation could manipulate the connection object as it prefers. 

This would potentially also be a feasible solution for j2ME environments.

> Add capability to specify a SSLSocketFactory for HTTPS based connections in SimpleSoapClient.
> ---------------------------------------------------------------------------------------------
>
>                 Key: MUSE-223
>                 URL: https://issues.apache.org/jira/browse/MUSE-223
>             Project: Muse
>          Issue Type: New Feature
>          Components: Core Engine - Resource and Capability APIs
>            Reporter: Oliver Waeldrich
>         Assigned To: Dan Jemiolo
>             Fix For: 2.3.0
>
>
> In order to use certificate based client authentication with MUSE we would like to specify a 
> SSLSocketFactory to be used when communicating with a MUSE server. Even though it is
> possible to specify a default SSLSocketFactory (see HttpsURLConnection.setDefaultSSLSocketFactory())
> this is not feasible for environments, where e.g. a client needs to communicate with multiple 
> server instances using different credentials. 
> Therefore I would suggest an extension to the SimpleSoapClient to specify a SSLSocketFactory  for https
> connections and to extend the client's send-functionality as indicated by the code below.
>     HttpURLConnection connection = (HttpURLConnection)url.openConnection();
>     if (connection instanceof HttpsURLConnection)
>         if (mySSLSocketFactoryInstance =! null) {
>             ((HttpsURLConnection)connection).setSSLSocketFactory(mySSLSocketFactoryInstance);
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org