How miles-howell/vixxing works
Purpose and Entry Points
Vixxing is an internal Django tool for help-desk agents to verify callers through RFC 6238 TOTP before account-recovery actions. The Django project is run from TOTP/manage.py; the staff dashboard is rooted at /, while Django admin manages staff and employee records at /admin/.
• TOTP/manage.py
• TOTP/TOTP/urls.py
• TOTP/verify/urls.py
Application Composition
The verify Django app owns the operational workflow: employee lookup, enrollment, verification, lifecycle actions, CSV import/export, and bulk actions. Its views are staff-gated, so there is no employee self-service or public caller endpoint.
• TOTP/verify/views.py
• TOTP/verify/urls.py
• TOTP/verify/templates/verify/dashboard.html
Identity and Persistence Boundary
Django authentication supplies agent accounts and staff authorization. Employee MFA state is persisted through the ORM, associating employee identities with a TOTP secret and enrollment state; migrations establish that schema. SQLite is the default datastore, but Django permits another relational backend.
• TOTP/verify/models.py
• TOTP/verify/migrations/0001_initial.py
• TOTP/verify/admin.py
Core Verification Flow
An agent finds an employee on the dashboard, submits the live six-digit authenticator value, and the server verifies it against the employee’s stored secret with PyOTP’s time-window behavior. The result is returned to the agent-facing dashboard as the decision boundary for downstream help-desk actions; this application does not itself reset accounts.
• TOTP/verify/views.py
• TOTP/verify/templates/verify/dashboard.html
• TOTP/verify/models.py
Enrollment and Secret Rotation
Enrollment and regeneration generate a new base32 secret, construct an otpauth:// provisioning URI, render a QR image, and send it to the employee. Rotation invalidates the prior secret; unenrollment clears MFA state while retaining the employee, and deletion removes the employee record. QR-bearing message bodies and attachments are rendered from dedicated email templates.
• TOTP/verify/views.py
• TOTP/verify/templates/verify/enrollment_email.html
• TOTP/verify/templates/verify/enrollment_email.txt
Batch Management and Data Exposure
The dashboard supports employee creation, CSV import, search, selected-row bulk enrollment/unenrollment/deletion, and CSV export. Import creates identities without enrollment; export intentionally excludes TOTP secrets. Confirmation behavior is implemented in the dashboard UI for destructive operations.
• TOTP/verify/views.py
• TOTP/verify/templates/verify/dashboard.html
Runtime, Delivery, and Deployment
Django settings configure installed apps, database, static delivery, security settings, and named mailers. Enrollment email prefers Microsoft Graph via django-msgraphbackend, with SMTP fallback when configured. Python 3.12+ is required; development uses Django’s server, while longer-lived WSGI deployment is intended for Gunicorn behind an internal reverse proxy. ASGI is also exposed but not presented as the primary deployment path.
• TOTP/TOTP/settings.py
• TOTP/TOTP/wsgi.py
• TOTP/TOTP/asgi.py
Security and Operational Boundary
The system is explicitly LAN/internal-network scoped. Secrets and QR enrollment material require protected transport and email handling; shipped cookie settings do not assume HTTPS. Environment-provided Django, Graph/Entra, SMTP, and host configuration separates deployment credentials from source.
• TOTP/.env.example
• TOTP/TOTP/settings.py
• requirements.txt
Main entry points: views.py Staff-gated views · models.py Employee MFA model · settings.py Django settings · dashboard.html Staff dashboard
Components 16
Staff Access
- Help-desk agent · Internal staff user performing recovery verification.
- Staff dashboard · Employee search, verification, enrollment, and batch-management interface.
TOTP/verify/templates/verify/dashboard.html - Project routes · Routes the root dashboard and Django admin.
TOTP/TOTP/urls.py
Verification Workflow
- Verification routes
TOTP/verify/urls.py - Staff-gated views · Owns lookup, verification, enrollment, lifecycle, CSV, and bulk workflows.
TOTP/verify/views.py - PyOTP verification · Checks a submitted six-digit code against the stored secret and time window.
- Enrollment & rotation · Generates a base32 secret, otpauth URI, and QR material.
TOTP/verify/views.py - Enrollment email templates · Render QR-bearing enrollment messages and attachments.
TOTP/verify/templates/verify/enrollment_email.html
Identity & Data
- Django staff auth · Supplies agent accounts and staff authorization.
- Employee MFA model · Associates employee identity with TOTP secret and enrollment state.
TOTP/verify/models.py - Relational datastore · Django ORM persistence; another relational backend may be used.
- Django admin · Manages staff and employee records at /admin/.
TOTP/verify/admin.py
Runtime & Delivery
- Django settings · Configures apps, database, security, static delivery, and named mailers.
TOTP/TOTP/settings.py - Enrollment mail delivery · Prefers Microsoft Graph through django-msgraphbackend.
- WSGI deployment · Intended for long-lived deployment behind an internal reverse proxy.
TOTP/TOTP/wsgi.py - Deployment environment · Provides Django, Graph/Entra, SMTP, and host credentials.
TOTP/.env.example
Connections 18
- Help-desk agent → Staff dashboard: uses
- Project routes → Verification routes: includes
- Verification routes → Staff-gated views: dispatches
- Staff dashboard → Staff-gated views: submits workflow actions
- Staff-gated views → Django staff auth: requires staff access
- Staff-gated views → Employee MFA model: looks up and changes
- Employee MFA model → Relational datastore: persists through ORM
- Staff-gated views → PyOTP verification: verifies submitted code
- PyOTP verification → Employee MFA model: uses stored secret
- Staff-gated views → Enrollment & rotation: enrolls or regenerates
- Enrollment & rotation → Employee MFA model: stores or replaces secret
- Enrollment & rotation → Enrollment email templates: renders QR message
- Enrollment email templates → Enrollment mail delivery: sends enrollment email
- Django settings → Relational datastore: configures backend
- Django settings → Enrollment mail delivery: configures mailers
- Deployment environment → Django settings: supplies deployment values
- WSGI deployment → Django settings: loads application settings
- Django admin → Employee MFA model: administers records