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.1.tar.gz (20.4 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.1-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_eds_auth-0.1.1.tar.gz
  • Upload date:
  • Size: 20.4 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.1.tar.gz
Algorithm Hash digest
SHA256 2847fafba12dc8438063c551078d0624b62dca5c2231df9ce9c8e8f047f73307
MD5 0eeab483b464b5757be501cd4a5c8627
BLAKE2b-256 6b808fc01fd1c7d363ff472623eb13b4c88e019daed0f7452728a3f2af2adad4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_eds_auth-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 872f3ca9211bc1ba31dc2e4747145caca290e9258e11e2231ea701ebfdc75ed9
MD5 a58a4475740468a3d1257d643a4d9ea3
BLAKE2b-256 7de78b8fe148202004efa1c8c4c7f348417d1392f4a52adb46feac4db7d3c635

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