GithubHelp home page GithubHelp logo

soconnor71 / wagtailenforcer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from springload/wagtailenforcer

0.0 1.0 0.0 192 KB

The Wagtail arm of the law - enforce security protocols on your Wagtail site

Home Page: https://pypi.python.org/pypi/wagtailenforcer

Python 73.97% HTML 23.80% Makefile 2.23%

wagtailenforcer's Introduction

wagtailenforcer PyPI

WagtailEnforcer, the strong arm of the law.

If you need to enforce security protocols on your Wagtail site you've come to the right place.

Wagtailenforcer makes use of the following packages to ensure strict password policies and other security protocols are implemented.

  • Lt. Marion "Cobra" Cobretti

Check out Awesome Wagtail for more awesome packages and resources from the Wagtail community.

Quickstart

pip install wagtailenforcer

Time to edit the settings.py file. INSTALLED_APPS should have:

...
    'axes',
    'password_policies',
    'wagtailenforcer',
...

.. and MIDDLEWARE_CLASSES:

    'wagtailenforcer.middleware.WagtailenforcerMiddleware'

Some extra settings:

# Password policy settings
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
PASSWORD_CHECK_ONLY_AT_LOGIN = True
PASSWORD_MIN_LENGTH = 7
PASSWORD_MAX_LENGTH = 25
PASSWORD_HISTORY_COUNT = 6
PASSWORD_MIN_LETTERS = 1
PASSWORD_MIN_NUMBERS = 1
PASSWORD_MIN_SYMBOLS = 1
PASSWORD_DIFFERENCE_DISTANCE = 3

# Django Axes settings
AXES_LOGIN_FAILURE_LIMIT = 5
AXES_LOCK_OUT_AT_FAILURE = True
AXES_ONLY_USER_FAILURES = True  # Lock out based on username and not IP or UserAgent
AXES_LOCKOUT_TEMPLATE = 'wagtailenforcer/lockout.html'

# Antivirus
CLAMAV_ACTIVE = True

# Allowed document uploads extensions
ALLOWED_DOCUMENT_EXTENSIONS = ['pdf']

In urls.py:

from wagtailenforcer import urls as wagtailenforcer_urls

wagtailadmin_urls.urlpatterns = wagtailenforcer_urls + wagtailadmin_urls.urlpatterns

Check the docs of the apps if you need to do changes to the predefined settings.

Development

Releases

  • Make a new branch for the release of the new version.
  • Update the CHANGELOG.
  • Update the version number in setup.py, following semver.
  • Make a PR and squash merge it.
  • Back on master with the PR merged, use make publish (confirm, and enter your password).
  • Finally, go to GitHub and create a release and a tag for the new version.
  • Done!

wagtailenforcer's People

Contributors

tacitus avatar jordij avatar hitdaca avatar loicteixeira avatar thibaudcolas avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.