Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / February 2007

Tip: Looking for answers? Try searching our database.

Simple remote authentication

Thread view: 
hacka@wp.pl - 11 Feb 2007 09:47 GMT
Hello,
I need to implement a simple login / password authentication for my
client-server application, preferably some kind of challenge-response
protocol. I would like to use an existing solution (SASL + CRAM-MD5?),
but I am a bit overwhelmed by all the API's (SASL, JAAS etc.) and
really I need something simple. What would you recommend?

Regards,
Mike.
Ralf Ullrich - 11 Feb 2007 15:18 GMT
>Hello,
>I need to implement a simple login / password authentication for my
[quoted text clipped - 5 lines]
>Regards,
>Mike.

Using SASL is actually quite simple and straightforward. You have to
create a SaslClient (sc) on your client side, and a SaslServer (ss) on
your server side. Then on both sides you have to write a loop that is
controlled by the sc/ss object. During this loop the callback handler,
that you provided when creating the Sasl* objects will receive callbacks.
After the loop finishes, you will know wether the authentication was
successful or not.

All you need to know to successfully use SASL is described here:

Java SASL Programming Guide -
http://java.sun.com/javase/6/docs/technotes/guides/security/sasl/sasl-refguide.html

Ah, and one thing I should mention: you have to define the messages in
your application protocol, that will encapsulate the SASL-messages to be
exchanged. This is only indicated in the above guide through "send(...)"
and "msg.receive()" calls. If you need an idea how to do this, look into
the RFCs regarding the use of SASL in SMTP or NNTP (Sorry too lazy to look
'em up for you). However it's quite easy, just define messages, that can
transport some binary data (the SASL data), and have an associated status
of Continue, Success or Error. (Just look at the "send(...)" calls in the
guide, and you'll know what types of messages you need.

cu
Mike Amling - 13 Feb 2007 19:41 GMT
> Hello,
> I need to implement a simple login / password authentication for my
> client-server application, preferably some kind of challenge-response
> protocol. I would like to use an existing solution (SASL + CRAM-MD5?),
> but I am a bit overwhelmed by all the API's (SASL, JAAS etc.) and
> really I need something simple. What would you recommend?

  SRP has good properties. An attacker who observes the client/server
traffic, or who interacts with the client while masquerading as the
server, or who is a man-in-the-middle between the actual client and
server does not learn enough to determine the password or anything else
that would be sufficient to log in.
  RFC2945 describes SRP-3 (http://www.ietf.org/rfc/rfc2945.txt), which
may be little outdated. SRP-6 is even better
(http://srp.stanford.edu/design.html).
  The multiprecision arithmetic can all be done using functions in
BigInteger.

--Mike Amling


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.