django-moat

Extra layer of HTTP basic auth (for public staging/dev servers)
Download

django-moat Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Price:
  • FREE
  • Publisher Name:
  • Andy Mroczkowski
  • Publisher web site:
  • http://amrox.github.com/

django-moat Tags


django-moat Description

django-moat is a Django app that adds an additional layer of authentication via HTTP Basic Auth. It's primary use case is to prevent access staging, development, or otherwise private sites on the public internet. It is equivalent to configuring Basic Auth on your webserver (Apache, nginx) but works in environments where that is not possible (heroku).InstallationTo install from sourcepip install -e git+https://github.com/amrox/django-moat#egg=django-moatPyPi package coming soon.ConfigurationAdd moat.middleware.MoatMiddleware to your MIDDLEWARE_CLASSES:MIDDLEWARE_CLASSES = ( # Existing middleware classes "moat.middleware.MoatMiddleware",)moat has several configuration variable you may put in your settings.pyMOAT_ENABLED Enable or disable moat. (True or False) MOAT_ENABLED = TrueHTTP_AUTH_REALM Set Basic Auth Realm HTTP_AUTH_REALM = 'App Staging'MOAT_ALWAYS_ALLOW_VIEWS A list of views to allow through moat MOAT_ALWAYS_ALLOW_VIEWS = MOAT_ALWAYS_ALLOW_MODULES A list of modules to allow through moat MOAT_ALWAYS_ALLOW_MODULES = UsageYour site now requires that your authenticate with a staff-level user before accessing any non-whitelisted view. It is recommended that your add a dedicate staff-level user in the django admin for moat authentication.By default, the admin views will be blocked by moat. You'll either need to create a user with django-admin.py, or add django.contrib.admin.sites to MOAT_ALWAYS_ALLOW_MODULES.Product's homepage


django-moat Related Software