PASSWORD PROTECTION |
|
| User Authentication | |
There are two kinds of user authentication. One is HTTP authentication; this is actually done by the web server itself. You create a .htaccess file (containing authentication instructions) in the web directory that you want to protect. Then whenever someone tries to access a web page in that directory, their browser presents a pop-up box that asks for their username and password. The other kind of authentication is done by forms and CGIs, and often uses cookies to track user sessions. This is a much harder method to implement, as it requires you to add code to every page you want protected - and in fact, it will not protect basic HTML files or images at all, so you'd likely have to create CGIs to serve up your entire site (or do some other fancy server manipulation to make it work). You will need this method if you want to limit the amount of time a user stays online/idle, or to restrict logins so that a given user can't have more than one simultaneous login. |
|
Designing Passworded Sites |
|
Give some thought to the reasons for the password protection, and the level of security you need. If you're setting up a developmental site to share designs or documents with a handful of people, then a single username/password may be sufficient. For an intranet site accessible only to people from a certain domain, you may not even need a username/password - you can restrict access based on domain alone. |
|
Keep in mind that unless you are using a secure server (where your protected pages are all being accessed via a https:// url), usernames and passwords are sent over the web "in the clear", and are not encrypted. It's possible for someone to run a "packet sniffer" (a program that intercepts internet traffic) - and if they do, they've got your username and password. If you're providing or asking for any kind of secure data (credit card or bank information, stocks, etc.), you need to use a secure server. |
|
Also, if you have more than a hundred users accessing a hidden area, you should use a database (along with the appropriate mod_auth module compiled into the server) for lookups. The web server has to look up the username in the auth table for _every page_ that's being accessed, even after a user has logged in; if you use a flat password file for this, your server may get bogged down from excessive file I/O. |
|
Web Developer | 360 Panorama (Exterior-Interior) | CD Brochure Development | Video For Web Site |
Promotional Web Games | Report Generator | Group Mailing List Composers | Web and Off Site Data Hosting | Sample of Clients | On Line Polling | Password Protection | Site Maps, Site Search Engines | Home |
|
Copyright © 2007 - 1996, U S A. |
|