in reply to Security in CGI and User Authentication

When member-only content is accessed, a second script, serveContent, is called, into which is passed the username, a crypted version of the password, and the page which the user is attempting to access, which again checks user authorisation and either displays the requested page or demands the user log in.

Please, correct me if I am not interpreting your words correctly. From what I understand, your navigation frame loads the pages by opening in the display frame an url of the form

https://whatever/cgi-bin/something?user=me&pass=secret.

If the tokens passed in the GET request are all you need to "authenticate" the user, then be aware that they may be stored in the history and automatic completion of the browser and may be passed as referer header to external sites accessed by the user from your pages.

A more correct (and standard) system requires passing to the client only a randomly generated token which is associated server-side to the userid. Urls become

https://whatever/cgi-bin/something?token=randomstuff

and the association token<-->user on the server expires after some time from its creation or from its last invocation. This prevents information from leaking to an attacker who has access to the client after the user.

Of course, this does not guarantee full security, but should be an improvement over your scheme.


Cheers

Antonio Bellezza

The stupider the astronaut, the easier it is to win the trip to Vega - A. Tucket
  • Comment on Re: Security in CGI and User Authentication

Replies are listed 'Best First'.
Re: Re: Security in CGI and User Authentication
by Anonymous Monk on Dec 04, 2002 at 01:27 UTC
    Apache::Ticket* in the Eagle Book has a very cool approach to this sort of stuff. The basic approach is to redirect http requests without a 'ticket' (param/cookie/whatever) to a auth server that performs some sort of auth on the user, creates a crypto ticket with the user's name, remote ip, timestamp, contained in it and redirects the user back to the orig server. So the client now has a ticket that can be used in every request and the original server can read and validate it using the auth servers public key. iirc.... :)