Skip to main content

Django EDS authentication package

Project description

django-eds-auth

A secure Django authentication backend for EDS (Electronic Digital Signature) based authentication. Uses X.509 certificates and nonce-based challenge-response for cryptographically secure authentication.

Overview

django-eds-auth is a Django authentication backend that implements EDS (Electronic Digital Signature) based login using X.509 certificates. It provides:

  • ✅ Challenge-response authentication with single-use nonces
  • ✅ RSA, ECDSA, and DSA signature verification support
  • ✅ X.509 certificate chain validation
  • ✅ Replay attack prevention
  • ✅ Comprehensive audit logging
  • ✅ No private keys stored on server

Project Structure

  • src/django_eds_auth/ - Main package code
  • example_project/ - Example Django project for testing
  • tests/ - Unit and integration tests (56 tests total)
  • docs/ - Documentation and guides

Quick Start

Installation

# Install the package with development dependencies
pip install -e ".[dev]"

# Or install using pip directly
pip install django-eds-auth

Configuration

  1. Add to INSTALLED_APPS in Django settings:
INSTALLED_APPS = [
    # ...
    'django_eds_auth',
]
  1. Add authentication backend:
AUTHENTICATION_BACKENDS = [
    'django.contrib.auth.backends.ModelBackend',
    'django_eds_auth.backends.EDSAuthBackend',
]
  1. Include URLs:
urlpatterns = [
    # ...
    path('auth/eds/', include('django_eds_auth.urls')),
]
  1. Run migrations:
python manage.py migrate
  1. Start the development server:
cd example_project
python manage.py runserver

Testing

Running the full test suite:

# Run all tests with verbose output
pytest tests/ -v

# Run with coverage report
pytest tests/ --cov=django_eds_auth --cov-report=term-missing

# Run only security tests
pytest tests/test_security_and_coverage.py -v

# Run with timing information
pytest tests/ -v --durations=10

Current test results: 56 tests PASSED

  • Coverage: 60% (improved from 46%)
  • Security module (signature_verification.py): 85% (critical coverage)

Documentation

License

MIT License

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_eds_auth-0.1.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_eds_auth-0.1.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file django_eds_auth-0.1.0.tar.gz.

File metadata

  • Download URL: django_eds_auth-0.1.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.14.3 Linux/6.19.8-arch1-1

File hashes

Hashes for django_eds_auth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 69b7c75c20f1770bdcb333f059317a93d9c9dc8bd3817b5ccc55111415101b17
MD5 3caf53548e05e151f427ce1359530462
BLAKE2b-256 1613aa0bf49af1db9a7407c551d9207d259cb3c4bfa931de0402cada77fc91d5

See more details on using hashes here.

File details

Details for the file django_eds_auth-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: django_eds_auth-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.14.3 Linux/6.19.8-arch1-1

File hashes

Hashes for django_eds_auth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09de498733bea0b6696c51f02ed799cb5515138b16e8d851f2c6a75d78a8ee22
MD5 af48d1b4df4b1de280f609f4c3bae1fc
BLAKE2b-256 22cb167eda2c77dddb8ad73eede8e9c4276939d6d35d35a45c91e7f6a9249c91

See more details on using hashes here.

Supported by

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