10.7 Controlled Access Applications | |
Often it's desirable to control access to an application, due to sensitive data. Or to split access across multiple users.
Two fundamental rules should always be kept in mind when developing protected applications:
You can take every measure possible to properly use a secure-http server, operating system security, and proper Texis database permissions and still there might be some unknown breach point that can threaten the security of your site. If you always assume the worst can happen when you are writing code then you are less likely to be vulnerable to a hacker.
That being said, let's look at an example of how to secure a script. A typical application requires the following:
In addition to verifying the user, we can use the user name to identify the user throughout the application.
A given user may have different permission levels as well. Ordinary users can only search the site's data, for example, but some other users are allowed to upload or insert data. Still other users are administrators, allowed to create and delete users outright.
Our example security script implements this scheme (next page):
Back: Multi-part File Uploads | Next: Controlled Access Applications - Continued |