| ACADEMIC COMPUTING and COMMUNICATIONS CENTER | |||||||||
| ||||||||||||
Restricting Access | ||||||||||||
|
We have a Web service whose purpose is to authenticate the end user (either by IP address or Bluestem id), check an authorization list, and supply the Web page if appropriate. All you have to do is set up a configuration file that contains the authorization list. |
||||||||||||
| Configuration File Syntax | ||||||||||||
|
To use this service, you must construct a configuration file. This file:
Note: If you have an empty allowed.netids file present, no one will be authorized, since no one is on the list. But if you have no file at all, everyone is authorized, because there is no list. The configuration file is mostly just a list of allowed netids and IP addresses, with a little bit of structure that helps maintain a large-ish list. But beware that a really big, changing list (such as all members of a given department) will be a pain to maintain. It divides into sections, for contact, netids, groups and IP addresses. Each section is optional. |
||||||||||||
| Example 1 | ||||||||||||
#My first allowed.netids file. #Comments start with a # sign. I love comments. <contact> <a href="mailto:wwwtech@uic.edu">wwwtech@uic.edu</a> # IP addresses can be numbers or names # If you give a name, it's matched as a suffix. # If you give a number, it's matched as a prefix; the *'s # remind you of this. # But you can't match in the middle: 'tigger.*.uic.edu' won't work. <allow ip> *.uic.edu 128.248.* <allow netids> bobg john bob vinod adabyron <allow groups> # Groups aren't really supported yet. Sort of.Notes:
|
||||||||||||
| Example 2 | ||||||||||||
<contact> <a href="mailto:wwwtech@uic.edu">wwwtech@uic.edu</a> <allow ip> bobg.cc.uic.edu ##Allow my desktop machine via IP for speed <allow groups> allNotes:
|
||||||||||||
| Example 3 | ||||||||||||
<contact> <a href="mailto:wwwtech@uic.edu">wwwtech@uic.edu</a> <allow ip> *.uic.edu ## allow everyone from campus directly <allow groups> allJust like example 2, but give everyone on campus direct access without bluestem, but require bluestem for anyone off-campus. |
||||||||||||
| Example 4 | ||||||||||||
Bluestem is more sophisticated than just dealing with bare netids.
A full Bluestem id looks like netid@domain/authmethod.
(If this doesn't make sense, just ignore this section. If you
need to know, someone will probably have told you.)
This is important only if you want your UIC files visible to some
people who authenticate in remote Bluestem domains (as of this
writing, UIUC.EDU is the only such remote domain) or if the people
use a non-default method of Bluestem authentication.
<contact> <a href="mailto:wwwtech@uic.edu">wwwtech@uic.edu</a> <allow netids> ted alice <allow netids domain="uiuc.edu" > ed janice <allow netids > bob janet@uiuc.edu <allow groups > all@uiuc.eduNotes:
|
||||||||||||
| Test and Install | ||||||||||||
|
Now that you have made your allowed.netids file, does it work? All you have to do is put the allowed.netids file in the directory you want to protect and try it out. You're done, except for the caveats in the next section. You can change the allowed.netids file at any time, of course. But if you make a mistake, you might admit too many people. Or too few. If the file does not exist (or is not readable by the web server), everyone is let in. If it does exist but is empty, no one is let in. |
||||||||||||
| Remaining Caveats | ||||||||||||
|
Using this service described above only provides protection for your files when accessed through the web. It does not protect your files from people who have real accounts on the web server, because these people can just view your files directly. Perhaps it's ok that anyone on the machine can view the file directly. For example, maybe web access is given to the entire campus anyway. Or maybe you want to limit access to your class, mostly, but it's ok if someone else on campus really wants to view the files. If so, you can skip this section. If you do care, however, we need to remove public read access from your files, and give explicit read access to the web server. (Normally the web server gets access along with the public. But in this case, that won't work.) Contact wwwtech@uic.edu to set up a special unix group for your files (most departmental sites already have a special unix group) and to add the web server to this group. After that, you can remove public read permissions and restore group read permissions like this:
chmod o-rx,g+r *.htm*
and your files will be properly secured, locally and on the web.
|
||||||||||||
| Web Security | Previous: 1 Introduction | Next: 3 App Server |
| 2009-7-20 wwwtech@uic.edu |
|