Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Security

by blue_cowdawg (Monsignor)
on May 23, 2001 at 20:28 UTC ( [id://82612]=note: print w/replies, xml ) Need Help??


in reply to Security

Well my anonymous freind, there are many ways to skin this cat and probably using cookies is the least secure of these. After all I can always manufacture the cookie on my machine and masquerade as someone who has priveliges.

The actual implementation is going to vary depending on what kind of web server you are using, the resources you have available to you, and political factors. For the sake of this discussion I will ignore the political factors.

The simplest way of securing these and I believe the most universal would be to make use of .htaccess (?) files to secure the directories where the front end scripts live as well as any html pages. You would use the directive that requires a login/password and as long as the server in question can recognize the login/password tokens and validate them you are home free.

Doing all this will probably require some reading on your part as milage varies with each server type.

If you are using Apache and have mod_perl loaded and configured this opens up the way to some much more intelligent and flexible options.

For one thing I would consider writing a mod_perl module that does authentication handling and arrange permission atributes for individual users to give them the access they need and no more. OBTW: this would also be a good way to set up some sort of audit trail to track who did what and when.

As I said in my opening remarks there are many ways you can go with this.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Peter L. Berghold --- Peter@Berghold.Net
"Those who fail to learn from history are condemned to repeat it."

Replies are listed 'Best First'.
Re: Re: Security
by Hero Zzyzzx (Curate) on May 23, 2001 at 20:38 UTC

    I agree that cookies aren't the best way to do security. However. . .

    If you create your cookies using random data and with a one-way hash like MD5, and then store the cookies you create in a server-side database, then the cookie manufacturing becomes very difficult. You can send your manufactured cookies 'til the blue cows come home, but until one matches what's stored in the database, it's all for naught.

    Just my $.02. . .

    Update: Copying a cookie is different than manufacturing one. . .See below. . .

      If I copy a cookie from someone's browser (small amount of handwaving here on how I get it in the first place) then it doesn't really matter how I encode it unless I am using some sort of Diffie-Hellman pair. I'd still be stealing someone's identity.

      Unless there is some sort of challenge/response happening where the user has to perform some active function such as type in a password, use a smart card, or whatever using a client side cookie is just asking for trouble.

      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      Peter L. Berghold --- Peter@Berghold.Net
      "Those who fail to learn from history are condemned to repeat it."
      

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://82612]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-25 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found