{"id":17762077,"url":"https://github.com/digitalfox/pydentity","last_synced_at":"2025-12-30T18:27:50.316Z","repository":{"id":43189798,"uuid":"41257916","full_name":"digitalfox/pydentity","owner":"digitalfox","description":"Python Web application to manage Apache password file (htpasswd)","archived":true,"fork":false,"pushed_at":"2023-04-01T17:19:33.000Z","size":64,"stargazers_count":10,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T14:17:00.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitalfox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-23T16:41:21.000Z","updated_at":"2024-08-24T16:56:36.000Z","dependencies_parsed_at":"2022-08-31T15:51:17.699Z","dependency_job_id":null,"html_url":"https://github.com/digitalfox/pydentity","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalfox%2Fpydentity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalfox%2Fpydentity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalfox%2Fpydentity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalfox%2Fpydentity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalfox","download_url":"https://codeload.github.com/digitalfox/pydentity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243725015,"owners_count":20337660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-26T19:51:37.944Z","updated_at":"2025-12-14T04:24:03.980Z","avatar_url":"https://github.com/digitalfox.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is it ?\n\nPydentity is a small web application that manage apache password file (htpasswd) with \na simple browser.\n\nCurrent features are:\n\n- change your password by providing the previous one\n- change other people password when you belongs the a specified admin group\n- create new users\n- check password strength. The requirements pattern can be changed in conf. Default is lower case, numeric and special char or uppercase with a length \u003e 8). It is checked at browser *and* server level\n- redirect to custom page (given as args in url ex. /user/user1?return_to=/myapp/) after successful password change or user creation\n- change user groups belonging\n- handle authentication through http basic authentication (of course)\n\nCaveats, limitations, so far:\n\n- only md5 password hash are supported. Of course crypt password will never be. Blowfish could be supported one day\n- only support http authentication. But frankly, if you want to manage htpasswd file you should have that don't you ?\n- no group creation, user can be added or removed from existing groups only\n\n# How it works ?\n\nPydentity is developped on [python](http://www.python.org) and based on the micro framework [Flask](http://flask.pocoo.org/).\nTo handle htpasswd file format, it relies on python [htpasswd library](https://github.com/thesharp/htpasswd)\nand [openssl](https://www.openssl.org/). No database is required.\n\nObviously, you need a WSGI compliant web server. It is tested with [Apache](http://httpd.apache.org/)\nand [mod_wsgi](http://code.google.com/p/modwsgi/), but it should works with others (Gunicorn, Werkzeurg, uWSGI etc.)\n\n\n# License\n\nPydentity is licensed under the [GNU Affero General Public Licence version 3 or newer](http://www.gnu.org/licenses/agpl-3.0.html)\n\n\n# Authors\n\n- Sebastien Renard (sebastien.renard@digitalfox.org): creator, maintainer\n- Fabien Beziaud (fabien.beziaud@gmail.com): extended regexp support and others patches\n\n# Installation\n\nPrerequisites: \n\n- python 2.7\n- WSGI compliant server (example: apache and mod_wsgi)\n- openssl command line\n\nJust drop the code where you want in a place that your webserver can read. You are advised to create a dedicated python\nvirtual environment to install python third party libs, but it's up to you! The pydentity.wsgi file is setup with a\nvirtual env named \"venv\" at the root code level. If you don't use virtual env, comment this line, else, adapt it \nto you virtual env location. Install python requirements with this simple line:\n \n pip install -r requirement\n\nThen setup your Webserver to target pydidentity.wsgi file. Here's a sample Apache + mod_wsgi configuration snippet\nyou could put in a virtual env definition:\n\n    \u003cLocation /\u003e\n        AuthName \"pydentity\"\n        AuthType Basic\n        AuthUserFile /var/www/htpasswd\n        Require valid-user\n    \u003c/Location\u003e\n\n    WSGIDaemonProcess pydentity threads=5 maximum-requests=10000 display-name=pydentity\n    WSGIScriptAlias / /var/www/pydentity/pydentity.wsgi\n\n    \u003cDirectory /var/www/pydentity/\u003e\n        WSGIProcessGroup pydentity\n        WSGIApplicationGroup %{GLOBAL}\n        Order deny,allow\n        Allow from all\n    \u003c/Directory\u003e\n\n\n# Configuration\n\nApplication configuration is very limited. Everything is in the prologue of pydentidy.py file in the CONF dict.\nHere's the parameters you may want to tune:\n\n    PWD_FILE: Full path to the htpasswd file to manage. Default to \u003cpydentity dir\u003e/htpasswd,\n    GROUP_FILE: Full path the group file to manage. Default to \u003cpydentity dir\u003e/htgroup\n    ADMIN_GROUP: Name of the admin group. Default to \"admin\". User need to belong to this group to be able to change other user password or create new users. REQUIRE_REMOTE_USER parameter is required\n    REQUIRE_REMOTE_USER: Whether to require http basic auth upstream (for example with apache). Default to True. If False, everyone is able to change anyone password if the correct previous one is provided.\n\n# Development configuration\n\nWe encourage you to use a Python Virtual Environment such as [virtualenv](https://docs.python.org/3/tutorial/venv.html)\nor [pipenv](https://pypi.org/project/pipenv/).\n\nInstall python requirements with this simple line:\n\n    pip install -r requirement\n\nThen you can simply use the Flask dev server for development:\n\n    export FLASK_APP=hello.py\n    export FLASK_ENV=development\n    flask run\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalfox%2Fpydentity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalfox%2Fpydentity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalfox%2Fpydentity/lists"}