Skip to main content

Authenticate Apache2 (basic auth) using your Django DB

Project description

Authenticating Apache2 using your Django DB

  • Make sure you have apache2 mod-auth-external installed and configured (See: http://code.google.com/p/mod-auth-external/wiki/Configuration)

  • Define django-cliauth as your external authenticator by adding the following line in your virtualhost:

    • DefineExternalAuth django_cliauth pipe “/path/to/your/django-admin.py cliauth –settings=”YOUR_PROJECT.settings””

  • Set your authentication using a .htaccess file (or <Location> inside the virtualhost):

    • AuthType Basic

    • AuthName <authname>

    • AuthBasicProvider external

    • AuthExternal django_cliauth

    • Require valid-user

  • Reload your apache2 configuration

Checking is the user belongs to a group

  • Define django-cliauth as your external group checker by adding the following to your apache virtualhost:

    • DefineExternalGroup django_cliauth_grpck pipe “/path/to/your/django-admin.py cliauth –groupcheck –settings=’YOUR_PROJECT.settings’”

  • Set your authentication using a .htaccess file (or <Location> inside the virtualhost):

    • AuthType Basic

    • AuthName <authname>

    • AuthBasicProvider external

    • AuthExternal django_cliauth

    • GroupExternal django_cliauth_grpck

    • Require group <groupname1> <groupname2> …

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-cliauth-0.9.1.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file django-cliauth-0.9.1.tar.gz.

File metadata

File hashes

Hashes for django-cliauth-0.9.1.tar.gz
Algorithm Hash digest
SHA256 baefe29454deb9bb1ef375f75705fe6216f3ae38a643b9a3d285a48fb5331e53
MD5 cb9dc85a65f0afa92e79a53626ebca49
BLAKE2b-256 1369ea8ac3abebc2a436428b88f6185e001b84c6eb8c52a19a25ddf668bee5fb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page