[
https://issues.apache.org/jira/browse/RAMPART-444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Lazarski resolved RAMPART-444.
-------------------------------------
Resolution: Incomplete
> Mutliple Client cert is not working with axis2 client
> ------------------------------------------------------
>
> Key: RAMPART-444
> URL: https://issues.apache.org/jira/browse/RAMPART-444
> Project: Rampart
> Issue Type: Bug
> Reporter: Ashish Mandloi
> Priority: Major
>
> Hi
> We have client which connecting to soap server and they have provided us
> client certificate which we have to installed in our keystore. It was
> working fine until we have other client certificate from server. We have
> installed it in keystore and first call to webservie is working fine but for
> the second call for other user we are getting the below Exception
> {code:java}
> org.apache.axis2.AxisFault: unknown
> at
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:517)
> at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:371)
> at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
> at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
> at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
> at
> com.auruspay.manager.issuer.participants.processor.credibanco.VPOSWS20SOAPStub.authorize(VPOSWS20SOAPStub.java:193)
> at
> com.auruspay.manager.issuer.participants.processor.credibanco.CredibancoCartridge.connect(CredibancoCartridge.java:109)
> at
> com.auruspay.manager.issuer.participants.processor.credibanco.PauseCredibancoProcessor.run(CredibancoParticipant.java:92)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> *Here is my code *
> {code:java}
> ConfigurationContext ctx =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem("/home/test/resource/",
> null);
> VPOSWS20SOAPStub serviceVPOSWS = new
> VPOSWS20SOAPStub(ctx, urlService);
> ServiceClient client =
> serviceVPOSWS._getServiceClient();
> client.engageModule("rampart");
> Options clientOptions = new Options();
>
> clientOptions.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY,
> getOutflowConfiguration());
>
> clientOptions.setProperty(WSSHandlerConstants.INFLOW_SECURITY,
> getInflowConfiguration());
> //clientOptions.setUserName("client cert");
> //clientOptions.setPassword("k12345");
> clientOptions.setTo(new EndpointReference(urlService));
> //clientOptions.setTimeOutInMilliSeconds(1000);
> clientOptions.setProperty(HTTPConstants.SO_TIMEOUT,
> 10000);
>
> clientOptions.setProperty(HTTPConstants.CONNECTION_TIMEOUT, 10000);
> clientOptions.setManageSession(false);
>
> client.setOptions(clientOptions);
> client.setCachingOperationContext(false);
> System.out.println("URL
> :"+client.getOptions().getTo().getAddress());
> serviceVPOSWS._setServiceClient( client );
>
>
>
> System.out.println(new Date());
> reqResp = serviceVPOSWS.authorize(req);
> private Parameter getOutflowConfiguration() {
> OutflowConfiguration ofc = new OutflowConfiguration();
> ofc.setActionItems("Signature Encrypt Timestamp");
> String fileName= "COMKEYCONFIG_"+clientID+".properties";
> LOG.info(participant.getTxnLogKey() + " PROPERTIES FILE
> NAME:"+fileName);
> ofc.setSignaturePropFile(fileName);
>
> //ofc.setSignatureKeyIdentifier("X509KeyIdentifier");
> ofc.setSignatureKeyIdentifier("DirectReference") ;
> ofc.setUser("client cert");
> ofc.setPasswordCallbackClass("com.test.ClientPWCBHandler");
> ofc.setEncryptionPropFile(fileName);
> ofc.setEncryptionUser("vposwscrypto");
> ofc.setEncryptionKeyIdentifier("X509KeyIdentifier");
> LOG.info("ofc.getProperty() OUTPUTFLOW :
> "+ofc.getProperty().toString());
> return ofc.getProperty();
> }
> private Parameter getInflowConfiguration() {
> InflowConfiguration ifc = new InflowConfiguration();
> ifc.setActionItems("Signature Timestamp");
> String fileName= "COMKEYCONFIG_"+clientID+".properties";
> ifc.setSignaturePropFile(fileName);
> ifc.setPasswordCallbackClass("com.test.ClientPWCBHandler");
> LOG.info("ifc.getProperty() INPUTFLOW :
> "+ifc.getProperty().toString());
> return ifc.getProperty();
> }
> {code}
> *Configuration for properties file *
> org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
> org.apache.ws.security.crypto.merlin.keystore.type=PKCS12
> org.apache.ws.security.crypto.merlin.keystore.password=k12345
> org.apache.ws.security.crypto.merlin.file=/home/test/Downloads/COM.p12
> Code us working on standalone application with supporting two user
> certificate but when deploy this on code on resin and JPOS framework it not
> working and giving me unknown fault
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]