You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by th...@abs.gov.au on 2006/11/08 03:31:47 UTC

[Axis2] Question about Rampart (AbstractCrypto)

Martin,

You may have missed the point of my question.

Your code has a super class (AbstractCrypto) that has knowledge of what
it's subclass (Merlin) is doing. Firstly, abstract classes should not know
about the operation their sub classes.

Secondly, it means if we provide our own sub class for AbstractCrypto we
need to provide artifacts used by Merlin even though we aren't using
Merlin.

Perhaps I've made too many assumptions about the way it is supposed to
work. If you can answer these questions it would help to clarify.

- Is Rampart designed to support only the two provided implementations,
BouncyCastle and Merlin?

- Assuming Rampart does support other implementation, if we wished to
provide our own implementation should we sub class AbstractCrypto? Or do we
avoid AbstractCrypto and provide a class that simply implements the Crypto
interface?

I had tried this previously and found that the class required a specific
constructor taking a properties file and a class loader.

Thomas.




|--------------------------------->
|            "Martin Gainty"      |
|            mgainty@hotmail.com  |
|                                 |
|            08/11/2006 11:55 AM  |
|                                 |
|                                 |
|              Please respond to  |
|            axis-user@ws.apache.o|
|                     rg          |
|                                 |
|--------------------------------->
  >----------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                      |
  |                                                                                                                      |
  |                                                                                                                    To|
  |         <ax...@ws.apache.org>                                                                                    |
  |                                                                                                                    cc|
  |                                                                                                                      |
  |                                                                                                               Subject|
  |         Re: [Axis2] Question about Rampart (AbstractCrypto)                                                          |
  |                                                                                                       Protective Mark|
  |                                                                                                                      |
  |                                                                                                                      |
  |                                                                                                                      |
  |                                                                                                                      |
  |                                                                                                                      |
  |                                                                                                                      |
  >----------------------------------------------------------------------------------------------------------------------|



2 providers for keystore specific implementations one of which is merlin
..the other BC
http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/components/crypto/package-summary.html

dims could provide info on defaulting with merlin over BC
M-

This e-mail communication and any attachments may contain confidential and
privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination,
distribution or copying of it or its
contents
----- Original Message -----
From: <th...@abs.gov.au>
To: <ax...@ws.apache.org>
Sent: Tuesday, November 07, 2006 7:32 PM
Subject: [Axis2] Question about Rampart (AbstractCrypto)


> Hello,
>
> My name is Thomas Roberts and I am looking into developing Java Web
> Services with Security components using Axis 2 and Rampart.
>
> I noticed something strange when examining the code for the class
> AbstractCrypto.
>
> The code can be found here:
>
http://svn.apache.org/repos/asf/webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/AbstractCrypto.java

>
>
> In the constructor "public AbstractCrypto(Properties properties,
> ClassLoader loader)" there is some code:
>
>        String location =
> this.properties.getProperty("org.apache.ws.security.crypto.merlin.file");
>
>            InputStream is = null;
>            java.net.URL url = Loader.getResource(loader, location);
>            if(url != null) {
>                  is =  url.openStream();
>            } else {
>                  is = new java.io.FileInputStream(location);
>            }
>
> My querstion is why is the AbstractCrypto class looking up a property
entry
> for it's sub class 'Merlin'?
>
> Our project is hoping to use Certificates with Axis2, but provide them
from
> another source. To include this property entry and presumably also the
Java
> Key Store is redundant.
>
> Thomas.
>
>
>
>
------------------------------------------------------------------------------------------------

> Free publications and statistics available on www.abs.gov.au
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


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