From ffb588086526e73b77b46258c76128c764dc62dc Mon Sep 17 00:00:00 2001
From: Rob van Son
An infrastructure for user acount authorization and file access control is available. Each request is matched against a list of URL path patterns. @@ -1549,26 +1548,13 @@ PASSWORD ticket with the same name as the user account (name cleaned up for security).
-A Login page should create a LOGIN ticket file localy and send a -server specific SALT, a Random salt, and both the LOGIN and SESSION ticket -identifiers. The server side compares the username and hashed password, -actually hashed(Random salt+hashed(SALT+password)) from the client with -the values it calculates from the stored Random salt from the LOGIN -ticket and the hashed(SALT+password) from the PASSWORD ticket. If -successful, a new SESSION ticket is generated. The SESSION ticket -identifier is available as $SESSIONTICKET, the Username, IP address -and Path as $LoginUsername, $LoginIPaddress, and $LoginPath, respectively. -
--In the current example implementation, all random values are created as -a full SHA1 hash (Hex strings) of a 512 byte block read from /dev/urandom. -
-The example session model implements 3 functions:
+A Login page should create a LOGIN ticket file localy and send a +server specific SALT, a Random salt, and both the LOGIN and SESSION ticket +identifiers. The server side compares the username and hashed password, +actually hashed(Random salt+hashed(SALT+password)) from the client with +the values it calculates from the stored Random salt from the LOGIN +ticket and the hashed(SALT+password) from the PASSWORD ticket. If +successful, a new SESSION ticket is generated. The SESSION ticket +identifier is available as $SESSIONTICKET, the Username, IP address +and Path as $LoginUsername, $LoginIPaddress, and $LoginPath, respectively. +
++In the current example implementation, all random values are created as +a full, 160 bit SHA1 hash (Hex strings) of a 512 byte block read from +/dev/urandom. +
@@ -1606,7 +1609,27 @@ For strong security, please use end-to-end encryption. This can be achieved using a VPN (Virtual Private Network), SSH tunnel, or a HTTPS capable server with OpenSSL. The session ticket system of CGIscriptor.pl is intended to be used as a simple authentication mechanism WITHOUT -END-TO-END ENCRYPTION. +END-TO-END ENCRYPTION. The authenticating mechanism tries to use some +simple means to protect the authentication process from eavesdropping. +For this it uses a secure hash function, SHA1. For all practial purposes, +it is impossible to "decrypt" a SHA1 sum. +
++Humans tend to reuse passwords. A compromise of a site running +CGIscriptor.pl could therefore lead to a compromise of user accounts at +other sites. Therefore, plain text passwords are never stored, used, or +even exchanged. Instead, a server site SALT value is "encrypted" with +the plain password, actually, both are hashed with a one-way secure hash +function (SHA1) into a single string. Whenever the word "password" is +used, this hash sum is meant. +
++For the authentication and a change of password, the (old) password +is used to "encrypt" a random one-time token or the new password, +respectively. For authentication, decryption is not needed, so a secure +hash function (SHA1) is used to create a one-way hash sum "encryption". +A new password must be decrypted. New passwords are encryped by XORing +them with the old password.