UNKNOWN
Project description
Kerberos authentication for Django
==================================
Provide Kerberos authentication to Django applications.
Basic usage
===========
Add this to your project `urls.py`::
url('^accounts/kerberos/', include('django_auth_kerb.urls')),
And use the default authentication backend, by adding that to your `settings.py` file::
AUTHENTICATION_BACKENDS = (
'django_auth_kerberos.backends.KerberosBackend',
)
Settings
========
`KERBEROS_HOSTNAME`
-------------------
Hostname for retrieving the service key, the correspondig principal will be
`HTTP/{KERBEROS_HOSTNAME}@DEFAULT_REAML`, default is `None`. If `None` the hostname
from the request will be used.
`KERBEROS_KEYTAB`
-----------------
File path of the keytab containing the key for the service principal, default
is `None`. If `None` the default host keytab will be tried, which should fails
since it's usually only readable by root.
`KERBEROS_BACKEND_CREATE`
-------------------------
Whether to create user if no existing model can be found, default is `False`.
`KERBEROS_BACKEND_ADMIN_REGEXP`
-------------------------------
A regular expression that the principal must match to get superuser privileges,
default is `None`. A classic example could be `r'^.*/admin$'`.
Custom backend
==============
A custom authentication backend can be used, in this case the signature of the
authenticate method must be::
class CustomKerberosBackend(object):
def authenticate(self, principal=None):
pass
==================================
Provide Kerberos authentication to Django applications.
Basic usage
===========
Add this to your project `urls.py`::
url('^accounts/kerberos/', include('django_auth_kerb.urls')),
And use the default authentication backend, by adding that to your `settings.py` file::
AUTHENTICATION_BACKENDS = (
'django_auth_kerberos.backends.KerberosBackend',
)
Settings
========
`KERBEROS_HOSTNAME`
-------------------
Hostname for retrieving the service key, the correspondig principal will be
`HTTP/{KERBEROS_HOSTNAME}@DEFAULT_REAML`, default is `None`. If `None` the hostname
from the request will be used.
`KERBEROS_KEYTAB`
-----------------
File path of the keytab containing the key for the service principal, default
is `None`. If `None` the default host keytab will be tried, which should fails
since it's usually only readable by root.
`KERBEROS_BACKEND_CREATE`
-------------------------
Whether to create user if no existing model can be found, default is `False`.
`KERBEROS_BACKEND_ADMIN_REGEXP`
-------------------------------
A regular expression that the principal must match to get superuser privileges,
default is `None`. A classic example could be `r'^.*/admin$'`.
Custom backend
==============
A custom authentication backend can be used, in this case the signature of the
authenticate method must be::
class CustomKerberosBackend(object):
def authenticate(self, principal=None):
pass
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-kerberos-1.0.0.tar.gz
(5.7 kB
view details)
File details
Details for the file django-kerberos-1.0.0.tar.gz
.
File metadata
- Download URL: django-kerberos-1.0.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e66ae37f505e3dabc8edd12f017a22b4a9ebad784f10c6dc7311d0c85df886b |
|
MD5 | 88609cd3fdc0b295a69cd28f4c3f8609 |
|
BLAKE2b-256 | 3e13b8e0c22244474e4ec26d3ef2b62b947466f344d4ace60d366de8ac7895e3 |