Skip to main content

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.

Source Distribution

django-freeipa-auth-json-0.1.2.dev1.tar.gz (6.2 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page