Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please answer - client authentication with certificate in Axis 1

 
Ravi Danum
Ranch Hand
Posts: 145
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am building a web service and client to access the web service.

I am using AXIS 1.

I want to use client authentication with a certificate.

What steps must I follow to configure the web service and the client to achieve this?

Thanks in advance.

-Rava
 
James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all you want is to make HTTPS WebService calls - this should be no different from making any other https call (webservice or not).

Make sure that the app server is configured to accept HTTPS calls.
From the calling application invoke WebService with HTTPS protocol - how to do this really depends on what kind of client code you have.

There is some information here:
http://forums.sun.com/thread.jspa?threadID=5384334

 
Ravi Danum
Ranch Hand
Posts: 145
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Thanks for the reply and link. So far I have modified Tomcat server.xml to uncomment the https connector, and I have created the SSL certificate using:
keytool -genkey -alias tomcat -keyalg RSA.

I changed the client code to access the web service by changing the port and http to https.

On the client machine I also ran: keytool -genkey -alias tomcat -keyalg RSA

Do I need to export the certificate from the client and send the file to the web server? I want to use the certificate to authenticate the client. If I only want to authenticate the client and not the server, does the server still have to run the keytool to create a certificate? Also, I'm not sure how to set the properties on the client side.

I would greatly appreciate any help getting answers to these questions.

-Rava



 
James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this link:
http://www.j2ee-security.net/book/sample-chap/

Download the pdf, and see page 16 - SSL Security for WebServices.

 
Ravi Danum
Ranch Hand
Posts: 145
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, James. I will read it now.

-Ravi
 
Ravi Danum
Ranch Hand
Posts: 145
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi James,

I have looked at the documentation. I have two questions regarding keytool:

1) The document uses: keytool -export, keytool -import, and keytool -genkey. The current jdk 1.6 uses: keytool -exportcert, keytool -importcert, and keytool -genkeypair.

2) The newer examples I've seen use an alias in the commands. If an alias is used, how would this affect the client code when setting up the properties?

Thanks.

-Ravi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic