{ "info": { "author": "Gabriel Abdalla Cavalcante", "author_email": "gabriel.cavalcante88@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Flask", "Intended Audience :: End Users/Desktop", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "Apache Password Changer\n-----------------------\n\nA web Interface for users change their own passwords on a htpasswd file.\n\nIntroduction\n------------\n\nApache Password Changer is a simple Flask project that provides resources\nto users change their own passwords in a secure way.(usually this operation\nneeds to be done by an administrator with direct access to the server).\n\nRequirements\n------------\n\n* Apache and gunicorn installed or similar setup.\n* The htpasswd file must be exist.\n* The site must be served through SSL (Security Reasons).\n\nFor more information, take a look at:\n\nhttp://flask.pocoo.org/docs/deploying/wsgi-standalone/\n\nOther ways to deploy are available as well (uwsgi, passenger and others) at the\nsame page.\n\nInstallation\n-----------\n\n1. Install the project through PIP (a virtualenv is highly recommended):\n\n```\npip install htpwd\n```\n\nConfiguration - Apache + Gunicorn\n---------------------------------\n\nFor quick purposes, the samples included in the deploy directory can help a fast\ndeploy in an Apache WebServer. If you choose to do so, the following guidelines\ncan be applied:\n\n * Create a specific user and group to run the project;\n * Copy the 'htpwd.sh' and 'gunicorn.py' to the home directory of the user\n created and change the environment variables contained in 'htpwd.sh' as per\n following:\n\n * HTPASSWD_FILE: The location of htpasswd file (eg: /data/app.htpasswd)\n\n * SECRET_KEY: Secret key that will be used within session and csrf_token.\neg: echo \"SOMESTRINGHERE\" | md5sum\n\n * REGEXP: Some verification regexp, that will be used to verify the\n user name field. Must be provided. If False, it will be defined as [A-z0-9_.]+,\n all possible matches.\n\n eg: ^\\d{11}@ENTERPRISE$ will match Brazilian CPF appended with the\n @ENTERPRISE suffix.\n\n * TARGET_PAGE: The link for a page which the user can access with the new\n password. eg: https://myzabbix.enterprise.com.\n\nIf you need a diferente port for the gunicorn process, change it in gunicorn.py\nmodule.\n\nBellow a full example of the changes needed:\n\nBase subdomain: htpwd.mydomain.com\nUser: htpwd\nGroup: htpwd\nSecret Key: \"MYKEYAAFADFADFAF\"\nRegexp: \\d{11}@test.com\n\nhtpwd.sh\n########\n```\n#Define all needed environment variables\nHTPASSWD_FILE=/data/myfile.htpasswd\nSECRET_KEY=\"MYKEYAAFADFADFAF\"\nREGEXP=\"\\d{11}@test.com\"\nTARGET_PAGE=www.google.com\n\n# And export then\nexport HTPASSWD_FILE SECRET_KEY REGEXP TARGET_PAGE\n\n# Activate the virtualenv and then, start gunicorn\nsource /data/backstage3.3/bin/activate\ngunicorn -D -c gunicorn.py htpwd.htpwd:app\n```\n\ngunicorn.py\n```\nimport multiprocessing\n\n#The internal port, must be the same on the Apache Proxy configuration\nbind = \"127.0.0.1:8000\"\n\n# The best default configuration ever\nworkers = multiprocessing.cpu_count() * 2 + 1\n```\nhtpwd_httpd.conf\n################\n\n```\n#A virtualhost with SSL and mod_proxy activated.\n\n ServerName htpwd.mydomain.com,\n SSLEngine on\n SSLCertificateFile /data/your.cert\n SSLCertificateKeyFIle /data/your.key\n ErrorLog /var/log/httpd/htpwd_errors.log\n CustomLog /var/log/httpd/htpwd_custom.log common\n ProxyPreserveHost On\n\n\n ProxyPass http://127.0.0.1:5558/\n ProxyPassReverse http://127.0.0.1:5558/\n RequestHeader set X-FORWARDED-PROTOCOL ssl\n RequestHeader set X-FORWARDED-SSL on\n\n\n```\n\nDevelopment\n-----------\n\nTo develop using the package, you must install the requirements as noted, define\nthe environment variables and then, start the development server through the command:\n\n```\nrunserver -d -r\n```\n\nTranslations\n------------\n\nTO translate the pages included in the project, you must first add a new language\nin the LANGUAGE DICT using the ISO language notation(info available at\nhttp://www.loc.gov/standards/iso639-2/php/code_list.php), like the example bellow:\n\nLANGUAGE = {\n 'en': 'English',\n 'pt_BR': 'Portugu\u00eas do Brasil',\n 'es': 'Espanish'\n}\n\nAs noted, the espanish language was added into the current languages suuport.\n\nBy default, the project supports English (Native in the whole project) and\nBrazilian Portuguese. After add a new language, you need to init the directory\nwith include the gettext .po file designed for the target language (at the top\nof directory):\n\n```\npybabel extract -F babel.cfg -o messages.pot .\npybabel init -i messages.pot -d translations -l \n```\n\nAfter that, a new directory will be created insided the translations directory,\nwithin and LC_MESSAGES directory and a messages.po file; this last file, contains\nall strings that will be translated.\n\nFor easy use, we recommend the translation using the poeditor or 'Loco' available\nat https://localise.biz which allow users to translate and get .po and .mo files\ndirectly from browser.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gcavalcante8808/htpwd", "keywords": null, "license": "License :: OSI Approved :: Apache Software License", "maintainer": null, "maintainer_email": null, "name": "htpwd", "package_url": "https://pypi.org/project/htpwd/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/htpwd/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/gcavalcante8808/htpwd" }, "release_url": "https://pypi.org/project/htpwd/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "A web Interface for users change their own passwords on a\n htpasswd file.", "version": "0.1.1" }, "last_serial": 1090944, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "3879446d3c5998ee9db7a9cb62a32f4b", "sha256": "41eebd7168dcf6d863b2ee77242ab351bcd5a2354944d804884f2ed71f2bc083" }, "downloads": -1, "filename": "htpwd-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3879446d3c5998ee9db7a9cb62a32f4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8671, "upload_time": "2014-05-13T14:32:57", "url": "https://files.pythonhosted.org/packages/2e/25/766505c9f6bd947947ac4ee85adb912a7e52df35498d15848c6cca65efb4/htpwd-0.1.1.tar.gz" } ], "0.1.2a": [ { "comment_text": "", "digests": { "md5": "fbc13fa68024c81f227fa00d4237e18a", "sha256": "24ca449185cec9c618f6fd555e51dc2175571bf8e05c6e55160cab81938d653f" }, "downloads": -1, "filename": "htpwd-0.1.2a.tar.gz", "has_sig": false, "md5_digest": "fbc13fa68024c81f227fa00d4237e18a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8910, "upload_time": "2014-05-13T15:33:01", "url": "https://files.pythonhosted.org/packages/d9/e0/3f4c3cb2be25a398b2be19a7b183dcbf576f23510e7b87d4df2402997e85/htpwd-0.1.2a.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3879446d3c5998ee9db7a9cb62a32f4b", "sha256": "41eebd7168dcf6d863b2ee77242ab351bcd5a2354944d804884f2ed71f2bc083" }, "downloads": -1, "filename": "htpwd-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3879446d3c5998ee9db7a9cb62a32f4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8671, "upload_time": "2014-05-13T14:32:57", "url": "https://files.pythonhosted.org/packages/2e/25/766505c9f6bd947947ac4ee85adb912a7e52df35498d15848c6cca65efb4/htpwd-0.1.1.tar.gz" } ] }