Skip to main content

How to manage access authentication

In Aldryn Django applications, access via password can be managed by the Aldryn SSO addon.

Require login

By default, the Test site is password protected while the Live site is not. This is controlled by the ALDRYN_SSO_ALWAYS_REQUIRE_LOGIN environment variable (True for Test, False for Live).

To override the behaviour, you can set the value explicitly in the Environment variables view in the Control Panel.

Basic access authentication

.htaccess is a familiar way of adding password protection to a web server at directory level.

Your Test server is always protected by our SSO, but you may occasionally require other forms of site-wide password protection.

It can be useful in the development process, for example, when you need to restrict access, or for a site that provides API endpoints that should require the client to authenticate.

A similar site-wide password requirement can be added to a Django site, using environment variables. Set them as follows:


Those values can be set independently for test/live servers in the Environment Variables settings for each application.

See basic access authentication for more.