Library tutorials & articles

Authentication for Web Services

Introduction

Consider authentication of your web service to be like a door on your house. It needs to be wide enough to allow people to enter, but only if they've knocked first. Getting away from the cutesy analogies, authentication is the process of making sure that the person who is asking to use the web service is really the person that they claim to be. This is done by requiring the user (also known as the "principal") to provide a set of credentials. In return, they will receive a security token that can be used to access the server.

The credentials usually take the form of a user id and password. However, what is really required is everything necessary to uniquely identify the user. For example, in our sample web service, we require that a company code be supplied along with the user id and password. The reason for this additional information is that the data we use to rate a shipment is different for each company.
On the other hand, the security token that is returned is usually more conceptual than physical. It can take the form of a cookie placed on their browser, a session id stored on the serveror an actual string of characters. For our application, we are using a 33-character character string. The reason for our choice will be detailed later in this article. And before we get to that, let's look at the tools that are available to assist with the authentication process.

Comments

  1. 16 Jul 2007 at 18:25

    Hi,
        I have enjoyed reading the article so far and I have a quick question. Isn't the interception of the security token almost as useful to a hacker as the interception of the original credentials? If so (even marginally) then why is it neccessary to go to such lengths to hide the login name and password, but not the token? Couldn't a hacker keep the token alive by using it regularly, therefore avoiding any expiration? Would it be possible to explore these issues, in the scope of the article?

    Thanks,
    Seamus





  2. 01 Jan 1999 at 00:00

    This thread is for discussions of Authentication for Web Services.

Leave a comment

Sign in or Join us (it's free).

AddThis

Related discussion

Related podcasts

  • Java Posse #202 - Newscast for Aug 22nd 2008

    Newcast for August 22nd, 2008Fully formatted shownotes can always be found at http://javaposse.com Sadly, Java does not run on the Mars LanderThe Golden Gate Project http://research.sun.com/projects/goldengate/Space surveillance radar http://www.sun.com/aboutsun/pr/2008-04/sunflash Google has r...