users@glassfish.java.net

Re: secure web service using mutual certificate security

From: <forums_at_java.net>
Date: Tue, 19 Apr 2011 08:05:22 -0500 (CDT)

ok, now i have other error so it is a progress :p

let me explain what i need,and what did i do. i set up web service on one
computer and web service client on another to make it more similar to real
situation. This computer are in same LAN,but i dont think that is importaint
at all. both computer run Glassfish 3.0.1 server. First i try setting up
client withour security, and there was no problem. I also succedd to make
client read data from server with username and symmetric keys
authentification,but i still have problem setting up mutual certificates
security which is a lot better for our needs.

After your replay, i found JVM options javax.net.ssl.keyStore and
javax.net.ssl.trustStore in Glassfish admin inteface. On server computer i
add folowing JVM options:

-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystoreS.jks

-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/truststoreS.jks

and on client computers admin interface i added:

-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystoreC.jks

-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/truststoreC.jks

keystoreS and truststoreS is in default domain conf directory in Glassfish on
server computer (C:\glassfish3\glassfish\domains\domain1\config), keystoreC
and truststoreC is in same directory on client computer.

After restarting glassfish and web service/client i get message:

Greska = javax.xml.ws.WebServiceException: WSSTUBE0024: Error in Securing
Outbound Message.

I also try setting up password for keystore and truststore in jVM
options(because it is not default changeit):

On server:

-Djavax.net.ssl.keyStorePassword=serverpass (pass used for making keystoreS)

-Djavax.net.ssl.trustStorePassword=serverpass(pass used for making
truststoreS(same as pass for keystoreS))

On client:

-Djavax.net.ssl.keyStorePassword=clientpass (pass used for making keystoreC)

-Djavax.net.ssl.trustStorePassword=clientpass(pass used for making
truststoreC(same as pass for keystoreC))

but after restart,i still get same error:

Greska = javax.xml.ws.WebServiceException: WSSTUBE0024: Error in Securing
Outbound Message.

This is of course error i get when i call web service operation on client
computer.

am i doing something wrong??

if you need some other properties or files i made, i will provide it to you.
Thx in advance!

Bojan


--
[Message sent by forum member 'bkova987']
View Post: http://forums.java.net/node/792888