| ACADEMIC COMPUTING and COMMUNICATIONS CENTER | |||||||||
| ||||||||||||||||||
Running Your Own Bluestem Server | ||||||||||||||||||
| Why Run Your Own Bluestem Server? | ||||||||||||||||||
|
Tigger and icarus already provide bluestem for protecting files, and for personal CGI scripts. However, you may have data that requires extra-special protection (e.g. financial or medical), or you may want to run a web application (e.g. database) or write in a language for which tigger is not adequate. In such a case, if you are capable of running your own web server (i.e. physically secure room, maintain security patches, manage user accounts, run backups, install and troubleshoot software, keep and inspect logs), you can make your web server into a bluestem application server. This will allow your web scripts to authenticate users, using their normal bluestem netid and password, in a very secure manner. |
||||||||||||||||||
| Requirements | ||||||||||||||||||
|
||||||||||||||||||
| Must My Scripts be Perl? | ||||||||||||||||||
|
What?? You don't like perl? I do, but if you can't stand it, don't worry. You have to run perl, but you don't have to write it. You can make bluestem calls from ASP, using the little bluestem protocol. And if needed, you can probably adapt this to other languages as well. |
||||||||||||||||||
| Security Consideration | ||||||||||||||||||
|
One of the main features of Bluestem is that the user's password is never sent to the application server, not even encrypted or used as an encryption key. So it's not possible for a rogue application server to compromise a user's password. However, all bluestem applications on a given server need write access to the internal bluestem cache. Suppose you have two developers writing web scripts (with or without bluestem) for your server. Each of them has access to the bluestem cache, because their scripts run with the identity of the web server. This means that Developer A can poison the bluestem cache, and therefore can impersonate Person X to any bluestem application on your server. He can't affect bluestem applications on other servers like tigger, but he can certain affect all applications on your server. Moral of Story: don't let just anyone write CGI scripts on your server. You may wonder how we allow normal users on tigger or icarus to use bluestem with their own CGI safely. The answer is that we insist on using a modified version of Cgiwrap. Cgiwrap launches as root, runs the bluestem code, puts the authenticated netid into the environment, then changes uid to the user and exec's the user's script. The point is, by the time the user's code runs, it no longer has read or write access to the bluestem cache, so all is well. |
||||||||||||||||||
| Installation | ||||||||||||||||||
|
See Detailed Installation Instructions at UIUC. In brief, the steps are:
|
||||||||||||||||||
| Running Bluestem'ed Scripts | ||||||||||||||||||
|
Just look at the test1.cgi script that comes with the bluestem library for an example. The basic idea is:
## get the library
require 'bluestem.pl';
...
## check for bluestem ID
($ID, $IdleTime, $SessionTime) = bluestem_id();
## If no ID, force login
bluestem_login unless $ID;
## If ID is too old, force login
if ($IdleTime > $IdleMax ) {
bluestem_login('', "$Client idle more than $IdleMax seconds.") ;
}
## ID is known. Carry on.
...
Note: Bluestem provides an authenticated netid. Period. It does not tell you if the person is staff or student, it does not tell you what department they are in, it does not tell you what privileges they have. Just the netid. It is up to your script to decide what privileges to allow the person, based on the netid. |
||||||||||||||||||
| Alternative Ways to Run Bluestem | ||||||||||||||||||
|
Bluestem is ultimately a protocol, and can be run in different ways. Some possibilities:
|
||||||||||||||||||
| What, exactly, is a Bluestem ID? | ||||||||||||||||||
|
A Bluestem ID has three parts, and can look like this:
The Bluestem Id usually has the defaults removed, so the above would simply be: adabyron. Note that the following could all represent different people:
|
||||||||||||||||||
| Troubleshooting | ||||||||||||||||||
|
||||||||||||||||||
| Example Config File | ||||||||||||||||||
# Bluestem Application Server Installation Configuration # # format: <symbol><singlewhitespace><value>\n # # --- OS Platform # # Supported values - aix3, aix4, bsdi2, bsdi3, digital4, hpux9, hpux10, # linux, solaris2, sunos4 # Platform aix4 # --- directory for Bluestem CGI files # BluestemCGI /usr/local/apache/cgi-ssl/bluestem # --- URL Prefix for Bluestem CGI files # BluestemPfx /htbin/bluestem # --- directory for Bluestem utilities, configuration files, cache, master key # BluestemLib /usr/local/lib/bluestem # --- Directory for Bluestem log files # LogDir /var/log/httpd # --- directory for Bluestem 'require' files # PerlLib /usr/local/lib/perl5/site_perl/5.6.0 # --- path to Perl on system # Perl /usr/local/bin/perl # --- HTTP Server User and Group # User nobody Group nobody # --- Netscape Client Redirect Flag # # D: Direct via HTTP Location Header # I: Indirect via intermediate screen # # Choose 'I' if Netscape clients generate a bogus 'Security # warning' popup when redirected to the campus server for login NetscapeRedirect I #==================================================== # ID Server Parameters -- should only be # changed by the ID server manager #==================================================== AlertEmail www\@uic.edu HomePage http://www.uic.edu/ Title UIC WWW Identification Service DefaultDomain uic.edu DefaultAuth tacacs AuthMethods tacacs,pwf,ntlm AuthMethodsDNS tacacs,pwf,ntlm TermServerRE PathSHA1 /usr/local/bin/sha1 PathVmstat /bin/vmstat PathTacacs /usr/local/lib/tacacs PathRdist /bin/rdist BluestemImg1 <img src=https://ness.uic.edu/uic-icons/UIbar.gif border=none width=468 height=20> BluestemImg2 <img src=https://ness.uic.edu/uic-icons/UIthinbar.gif width=468 height=6> BgColors BGcolor="#ffffff" TEXT="#000000" VLINK="#cc6633" ALINK="#ff6633" NetIDURL http://www.uic.edu/depts/accc/accts/netids.html UnsupportedRE AOL-IWENG|MSIE 2 NetscapeURL ftp://uiarchive.uiuc.edu/pub/www/netscape/communicator/4.06/shipping/english/ ExplorerURL http://www.microsoft.com/ie/download/ IconDirURL https://www-s.uiuc.edu/ns-icons CookieSep ~ NTLMDaemon www2.hospital.uic.edu:7884 # ClusterId ness.uic.edu:443:444 BluestemIDPfx /htbin/bluestem |
||||||||||||||||||
| More Info | ||||||||||||||||||
|
If you need more details, the bluestem protocol and details about installation are described at UIUC. (But do note that UIC has some differences, particularly that the key generation url is at UIC.) Don't contact UIUC directly about bluestem. Questions at UIC should go to bluestem@uic.edu |
||||||||||||||||||
| Web Security | Previous: 2 Config File Format | Next: A1 Related Links |
| 2008-1-28 wwwtech@uic.edu |
|