File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes How to secure webservices using SSL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "How to secure webservices using SSL" Watch "How to secure webservices using SSL" New topic
Author

How to secure webservices using SSL

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 458

Hi All,

In one of my recent interviews, I was asked on how to secure Webservices using SSL. For that I answered them that, a certificate needs to be registered certificate keystore (cacerts) using Keytool utility and instead of using Http, we need to use HTTPS. Apparently my answer was not satisfactory for them and wanted more explanation on that.

Is my answer not adequate or did I miss any important point ? Please advice.


Regards
KumarRaja

Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Your answer was very good.
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 458

Thank you.

I do not know, what additional information the interviewer wanted to derive from me.

Apart from what I answered, are there any additional changes needed from client perspective ?
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
I do not know, what additional information the interviewer wanted to derive from me.


Interesting. How do know that the interviewer was not satisified with your answer? What did they want more explanation on?

In regards to client HTML browsers, there are many security settings related to SSL processing behavior. I doubt that the interviewer was expecting exact details on these settings, or at least he/she should not have been....unless your other responses to other questions created doubt about your experience.

SSL is not a good way to secure web services anyway, so you are most likely better off that they did not like your response.

Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2194
Hi!
I don't know if this is what they were after, but there is also the option to have mutual authentication with SSL.
On the client side, you need:
- The client key.
- The server certificate from the server's keystore.
The above are to go in a keystore and a certificates file for the client.

...and on the server side, you need:
- The server's key.
- The certificate from the client's keystore.
Again, the above are to go in a keystore and a certificates file for the server.

A webpage with more details: http://www.java-tips.org/java-ee-tips/java-api-for-xml-web-services/using-jax-ws-based-web-services-wit.html
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
leo donahue
Ranch Hand

Joined: Apr 17, 2003
Posts: 327
Kumar Raja wrote:Hi All,
In one of my recent interviews, I was asked on how to secure Webservices using SSL


What about the login/authentication part? Did they ask you specifically about a certain web server? Tomcat requires some minor changes to server.xml. Maybe they were looking for that? Or maybe they wanted you to say something about having the certificate signed by Certificate Authority? The keytool generates self-signed certificates and your users would have to trust your certificate prior to installing it. Some people are just vague though and don't know what they want to ask.


Thanks, leo
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to secure webservices using SSL
 
Similar Threads
Accepting X509 Certificates
Implementing SSL
SSLServerSocketFactory
WebServices & SSL
certificate to establish a secured connection(SSL)