--- branches/paul/admin/install/libdata_install.txt 2003/12/05 18:40:01 3 +++ branches/paul/admin/install/libdata_install.txt 2004/03/18 19:24:54 67 @@ -1,9 +1,7 @@ - - File: libdata_install.txt Title: LibData Installation Author: Paul F. Bramscher brams006@umn.edu -Date: November 21, 2003 +Date: March 16, 2004 ============================================================================== @@ -46,12 +44,18 @@ other in an SSL location (refer to installation steps below). -Database mySQL. Note that LibData was initially developed on a +Database mySQL 3.x. Note that LibData was initially developed on a version of mySQL without support for transactions, and this substantially affects the atomicity of the SQL code (lacking - the rollback feature). Future versions of LibData will most - likely be written with transactions in mind, and much more - optimized SQL. + the rollback feature). Other sites have reported successful + installation of LibData on mySQL versions 4.x, with minor + modifications to the Perl install script. Also note that + the mySQL password() function may create different hashes + between mySQL versions 3.x and 4.x, so migrating a fully + populated production back-end of LibData from one version to + another may require resetting (effectively rehashing) user + passwords. LibData has not been developed for 4.x at this + stage, so additional modification may be necessary. Programming Language Written exclusively in PHP. Coding is structured/function based for simplicity, using PHP object encapsulation only for @@ -140,6 +144,22 @@ (try /etc/httpd/conf.d/php.conf with a default Red Hat 9 install). (B) "register_globals = On" should be set in your php.ini file (try /etc/php.ini with a default Red Hat 9 install). + + + *** Note that future versions of LibData may be written without this + required setting, but that LibData's security mechanism is not + compromised by setting this ON. The security technique involves storing + a session ID in a client side cookie which must match a server stored + session ID. Every page and every HTML form submission requires + re-checking that the client and server session ID's match. Assuming + they match, an access level is pulled from the server and applied only + to the current page. This constant re-checking, and storing the actual + access level on the server side, makes LibData among the more secure web + mechanisms available. Also, unlike built-in PHP session capability, + LibData sessions are tied to the IP address. So passing a hacked cookie + or GET/POST method -- even with a valid session ID -- would fail unless + it was done from the correct IP address. + (C) Also in the php.ini file, make sure that "magic_quotes_gpc = Off". gpc stands for get/post/cookie, and turning quote escaping on will create problems for interaction at various layers between HTML, @@ -158,7 +178,7 @@ ------------------------------------------- (1) Build the Public LibData html directory ------------------------------------------- -LibData comes as two tar.gz files. One is named libdata_pos10.tar.gz. This tar +LibData comes as two tar.gz files. One is named libdata_pos.tar.gz. This tar contains all of the public HTML and PHP code. The "p" in this package refers to the "public" side of LibData. Extracting the tar will produce a libdata_pos directory which should be moved to a web-servable location on an Apache instance. @@ -182,7 +202,7 @@ --------------------------------------------------- (2) Build the Administration LibData html directory --------------------------------------------------- -The administration/staff modules are contained in libdata_aos10.tar.gz. The "a" in +The administration/staff modules are contained in libdata_aos.tar.gz. The "a" in this package refers to the "administrative" side of LibData. Extracting the tar will produce a libdata_aos directory which should be moved to a web-servable location on an Apache instance as with the previous step -- but it is HIGHLY recommended that this @@ -224,7 +244,17 @@ clean install of the databases, a base data set, and mysql users. ****************************************************************************** -Refer to the install directory in the libdata administrative directory. +*** Also note that the install script works only with mySQL 3.x. mySQL 4.x has +additional fields in the mysql.user table and so the install script may need +minor tweaking. At any rate, mySQL user rights should be managed very carefully +and this script is not meant to provide a definitive solution from a security +standpoint. Essentially the mySQL user named "libdata" must have, at a minimum, +select, insert, update, and delete capability for the libdata and libstats databases. +The mySQL user "libsession" must have select, insert, update, and delete rights +to the libsession database. Refer also to the next section (#5) in this document. + +To run the install script (mySQL 3.x) go to the install directory in the libdata +administrative directory. Run the script named libload.pl, and follow the instructions given. The script must be run on the server hosting the mySQL daemon, and the mySQL root account is @@ -452,6 +482,18 @@ and SELECT and INSERT rights to the libstats database. There are several strategies to fine-tune security, some of them are related uniquely to your institution and levels of paranoia. +(2) The LibData db_connect.php file, independently in both the administrative +and public halves of LibData contains a function named mysql_tryquery(). This +is a light wrapper around the built-in mysql_query() function. Note that there +is a variable for debug mode ($db_debug). Setting this to 1 (true) will cause +all SQL queries which fail to be output to the screen. This is not recommended +for production or public side LibData. However, it can be used in conjunction +with a mail() type function to the mail the failed query, mySQL error message, +and date/time transparently to the system administrator. This functionality is +not supplied (and requires a functioning SMTP gateway). However, the programming +to enable this is quite minimal given the centralized error-trapping with +mysql_tryquery() in the db_connect.php files. (Remember that administrative and +public LibData utilize their own separate db_connect.php files.) ============================================================================== 4.0 TROUBLESHOOTING @@ -494,7 +536,7 @@ -November 21, 2003 +March 16, 2004 Paul F. Bramscher brams006@umn.edu -University of Minnesota Libraries +University of Minnesota Libraries \ No newline at end of file