Buildout recipe for create and update the flat-files used to store usernames and password for basic authentication of HTTP users
Project description
Introdution
This recipe can be used to generate files for basic authentication of HTTP users, to restrict the access to HTTP resoruces. The aim is to be fully compatible with the htpasswd program that come with the Apache httpd Server, and support all the password formats that it supports. This formats, with some minor diffenrences in the case of the plain method, are also supported by the auth_basic module of the nginx http server.
At this moment this recipe support plain and crypt algorithms for storage passwords. The crypt algorithm is based on the system’s crypt() routine, so it inherits its limitations (see: man 5 crypt).
Note: The plaintext passowrds are only accepted by the Apache httpd server on Windows and Netware.
Caution: This recipe should not be used to update an existing htpasswd file, because it overwritte the htpasswd file in every update.
Example usage
The simplest way to use this recipe is to add a part in buildout.cfg like this:
[buildout]
parts = htpasswd
[htpasswd]
recipe = collective.recipe.htpasswd
output = ${buildout:directory}/etc/htpasswd
credentials =
nueces:secret
nutz:crackme
Supported options
output: Specify a path to the output file. The path will be created if it does not exist.
credentials: One set per line of credentials formed by username and password separated by a colon. e.g. <username>:<password>.
mode: Specified with octal numbers, as in the chmod program. e.g. 640. If it not set the file are created with the mask mode from the system enviroment.
algorithm: The supported options are ‘crypt’ and ‘plain’. Default to ‘cypt’.
Development
Code repository: http://github.com/nueces/collective.recipe.htpasswd
Report bugs at http://github.com/nueces/collective.recipe.htpasswd/issues
Contributors
Juan A. Diaz (nueces), Author
History
0.1a1 (2013-01-30)
Created recipe with ZopeSkel
Initial alpha release. [Juan A. Diaz (nueces)]
Download
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file collective.recipe.htpasswd-0.1a1.zip
.
File metadata
- Download URL: collective.recipe.htpasswd-0.1a1.zip
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1eabfa088aeb042571a5358de8f0fb4c56520011345f096f978f0974c421c87 |
|
MD5 | 9099f02650b77126fa6bdca876f0786f |
|
BLAKE2b-256 | d488676bc7b613476241878ca25fcbf89ce0646ceb0030ed6c41b8c26dd8823d |