Table of contents |
Validators are a type of Cherokee modules. It provides a mechanism to restict the access of some resources: directories and extensions.
The scope of a validator is local to a directory or extension definition, inside of an Auth clause.
Cherokee distributes a number of validators:
The PAM validator uses PAM (Pluggable Authentication Modules) to validate the user and passwords pairs in a protected directory.
This validator only works if the server runs as root.
Directory /protected { Auth Basic { Method pam } }
Requires a valid user and password system pair to access the protected directory.
Extension iso { Auth Basic { Method pam } User alo }
The system user alo is the only one allowed to download ISO images.
The plain validator tries to match user and password pair in a text plain file.
The format of the text file is the username followed by colon sign, and then the password. For example:
alo:8!45mKaZ*9 mark:god
It needs one parameter to work:
Directory /secret { Auth basic { Method pain { PasswdFile /var/passwordsweb } } }
The directory secret requieres a valid login/password pair from the /var/passwordsweb. You can place the password file outside the web tree, in this way, remote users won't be able to fetch the list.