LDAP Password Management

An email-verified password reset workflow connected to an LDAP directory.

PythonFlaskLDAPSQLAlchemyMySQLSMTP

Project overview

This Flask application guides users from an email address through a one-time verification code to a new LDAP password. Reset codes are stored as keyed hashes, attempts are limited, and relevant actions are audited.

What it does

Verify identity

  • Send a one-time code by email
  • Time-limited verification and reset windows

Protect the workflow

  • HMAC-hashed codes and bounded attempts
  • CSRF protection and request rate limits

Directory integration

  • Look up accounts and update LDAP passwords
  • Database-backed reset and audit records

Technologies & implementation

Technology stack

  • Python · Flask · Jinja2
  • LDAP / ldap3
  • SQLAlchemy · MySQL / MariaDB
  • SMTP · Flask-WTF · Flask-Limiter
  • HMAC / SHA-256
  • Gunicorn · ASGI configuration · Docker