Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

FreeIPA authentication for Django using FreeIPA JSON API

Project description

django-freeipa-auth

django-freeipa-auth provides a Django backend authentication app for FreeIPA authentication. The app uses FreeIPA JSON API for its operation.

Quick start

  1. Install using pip
pip install django-freeipa-auth-json
  1. Add freeipa to INSTALLED_APPS in the settings file.
INSTALLED_APPS = [
    ...
    'freeipa',
]
  1. Add freeipa.auth.backends.AuthenticationBackend to AUTHENTICATION_BACKENDS in the settings file.
AUTHENTICATION_BACKENDS = [
    ...
    'freeipa.auth.backends.AuthenticationBackend',
]
  1. Add following settings to the setting files
# REQUIRED: 
IPA_AUTH_SERVER = 'ipa.demo1.freeipa.org'

# OPTIONAL:
IPA_AUTH_SERVER_SSL_VERIFY = True
IPA_AUTH_SERVER_API_VERSION = '2.230'
# Automatically update user information when logged in
IPA_AUTH_AUTO_UPDATE_USER_INFO = True  
# Automatically create and update user groups.
IPA_AUTH_UPDATE_USER_GROUPS = True 

# Dictionary mapping FreeIPA field to Django user attributes
IPA_AUTH_FIELDS_MAP = { 'givenname': 'first_name',
                        'sn'       : 'last_name',
                        'mail'     : 'email',
                      }

Command Line

django-freeipa-auth provide syncipa command to import and update users stored in Django database with FreeIPA server.

usage: manage.py syncipa [-h] [-u USER] [-p PASSWD] 

Synchronizing data with FreeIPA server

optional arguments:
  -h, --help                  show this help message and exit

login arguments: require a user with permission to query all users (e.g. administrator.)
  -u USER, --user USER
  -p PASSWD, --passwd PASSWD  

Project details


Download files

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

Files for django-freeipa-auth-json, version 0.1.2.dev1
Filename, size File type Python version Upload date Hashes
Filename, size django_freeipa_auth_json-0.1.2.dev1-py3-none-any.whl (9.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-freeipa-auth-json-0.1.2.dev1.tar.gz (6.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page