axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <>
Subject Re: Encryption configuration problems
Date Tue, 04 Dec 2007 14:39:43 GMT
the alternative and perhaps easier direction is to configure declaratively as in 

policy.xml contents:

//signature crypto characteristics would be specified as
     <ramp:crypto provider="">
      <ramp:property name="">JKS</ramp:property>
      <ramp:property name="">client.jks</ramp:property>
      <ramp:property name="">apache</ramp:property>

//encryption characteristics would be specified as
     <ramp:crypto provider="">
      <ramp:property name="">JKS</ramp:property>
      <ramp:property name="">client.jks</ramp:property>
      <ramp:property name="">apache</ramp:property>

  ----- Original Message ----- 
  From: Pete 
  Sent: Tuesday, December 04, 2007 8:45 AM
  Subject: Re: Encryption configuration problems

  Thanks for the reply Nandana.

  You have the scenario correct... Except, it could also be the same request going to multiple
endpoints, each request needs to be encrypted differently.

  I am going to a policy configuration because OutflowConfiguration (and InflowConfiguration)
are deprecated.

  Your policy configuration example is perfect, is there some javadoc on the RampartConfig
and related classes? Nothing came with the 1.3 zipped release. Hope I'm not missing something

  I appreciate the help!


  ----- Original Message ----
  From: Nandana Mihindukulasooriya <>
  Sent: Tuesday, December 4, 2007 12:33:26 AM
  Subject: Re: Encryption configuration problems

      If I got the scenario correct, what you want is to encrypt different requests ( to different
endpoints ) with different
  certificates, right ?
       Which certificate to use in encryption is defined in the property "encryptionUser".
This can be set programatically 
  in both basic configuration and policy based configuration. We have to set the correct certificate
alias as the "encryptionUser"

  In basic configuration,

  OutflowConfiguration ofc = new OutflowConfiguration(); 
  options.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY, ofc);

  In policy based configuration,
  StAXOMBuilder builder = new StAXOMBuilder(xmlPath); 
        Policy policy = PolicyEngine.getPolicy(builder.getDocumentElement());

        RampartConfig rampartConfig = new RampartConfig();
        rampartConfig.setEncryptionUser ("Someone");



  On Nov 29, 2007 11:56 PM, Pete <> wrote:

    Hello all,

    Currently I have my client encrypting AXIS2 SOAP messages with the same key to all endpoints.
(Axis2/Rampart v1.3)

    The problem is that we would like each destination to use a different key.
    The service is the same (same WSDL) at each endpoint and other than the IP/port.
    (Same service definition, multiple endpoints each with a unique key)

    Programatically I know where to route it and set the endpoint, however I am having difficulties
setting up the encryption values on the fly. 

    I see that OutflowSecurity is deprecated.
    I've also tried manually building the XML OutflowSecurityParameter and setting it in the
options before enabling rampart. That didn't go over well...

           Parameter p = new Parameter("OutflowSecurity", " Encryptmykeyclient.properties");

    I've looked at the examples and searched for a decent tutorial on WS-Policy using policy.xml
for configuration. What I have found, does not lead me to believe that it will give me the
right solution. Maybe I'm not finding the right answer or asking the right question?! I really
haven't found a good reference to using policy.xml that I can relate to. (decode)

    Any assistance would be greatly appreciated. Thanks!


    Never miss a thing.  Make Yahoo your home page.

    To unsubscribe, e-mail:
    For additional commands, e-mail:

  Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
View raw message