Skip to main content

README

Allow Django to authenticate against a RADIUS server.

Introduction

RADIUS is a protocol commonly used by ISPs for authenticating dial-in and other remote users; it’s also used by routers and other network hardware. Popular servers include FreeRADIUS, GNU RADIUS, and the delightfully-name Steel Belted RADIUS.

Motivation

This little package was developed because my place of work uses RSA SecurID token authentication, and it can be accessed via RADIUS – much more easily than their proprietary protocol.

All the heavy lifting here is doing by Wichert Akkerman’s “pyrad” package; this just wraps it up for easy consumption by Django.

The code was based on the example at http://docs.djangoproject.com/en/dev/topics/auth/#other-authentication-sources

This code tries hard to catch any error which might throw an exception so that failure of the backend (misconfigured RADIUS server, bad import, etc) returns None indicating auth faiure.

On successful authentication, the User object is returned. If this user is new to Django, a new User is created in the Django database.

Non-Features

Traditionally, upon authentication, the RADIUS server can return various attribute/value pairs such as allocated IP address and subnetmask, in addition to the Success code. ADIUS can also handle “accounting” the focus here simply on authentication.

Usage

Configuration

In your settings.py or local_settings.py, define the following variables:

RADIUS_SERVER

The IP address (or resolvable DNS name) of the server providing the RADIUS server. Example: “127.0.0.1”

RADIUS_AUTHPORT

UDP port that RADIUS is listening on for authentication requests. The old RFC standard port is 1645, but the more current one is 1812. Specify it as an integer. Example: 1812

RADIUS_SECRET

The shared secret that both the client and server use to encode the packets. Example: “The owls are not what they seem.”

Auth backends

Specify this egg in your zc.buildout configuration, or another build mechanism; you can also just use the bare code.

In your settings.py (or local_settings.py) file specify the module and class path in the authentication stack. Beware that RADIUS typically exhibits a 20-second or so timeout if it can’t auth to the server, so you may want to put it after other authentication backends you may be using. Example:

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'authbackends.authsawsbackend.AuthSawsBackend',
    'koansys.django.authradius.AuthRadius',
  )

To Do

Tests. Sorry.

CHANGES

1.0.3 2009-02-25

Correct usage example, oops.

1.0.2 2009-02-25

Re-Fix URL info, add address.

1.0.1 2009-02-25

Fix URL info, upload to googlecode, post to pypi.

1.0.0 2009-02-25

Creating public egg code from internal private cholesterol-free code.

Metadata

Release files for koansys.django.authradius 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for koansys.django.authradius 1.0.3
File Size Uploaded
koansys.django.authradius-1.0.3.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for koansys.django.authradius 1.0.3
File Interpreter ABI Platform
koansys.django.authradius-1.0.3-py2.6.egg Legacy Egg format - - Details

Total release size: 12.1 kB

Release files / koansys.django.authradius-1.0.3.tar.gz

Download URL koansys.django.authradius-1.0.3.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a1ff161c10732d72bce769fc943076e73a932e732adad8f644e3a1f97d6d1d7e
BLAKE2b-256 checksum
How to use checksums
5e916d393e96f7544bcc8698114b4ed526491b9047a9fd851e25baaee9eee726
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / koansys.django.authradius-1.0.3-py2.6.egg

Download URL koansys.django.authradius-1.0.3-py2.6.egg
Size 7.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
7fd7fe0d12f3b9d40b29cbfc7d20856856d43035cc55b3f2440016d29f949e0f
BLAKE2b-256 checksum
How to use checksums
5843c5c084aa433baaba93f83a3ed328056f7063502ff46e8d92cdfff41efe90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page