How mup-off/devsec-demo works
This Django application provides user authentication and profile management, with role-based authorization, account lockout, security auditing, and guarded file uploads. The main request path runs from the user through URL routing and views; views coordinate forms, models, and security helpers. Signals add profile lifecycle and audit hooks, while context processing exposes role flags to templates. The README describes the repository as a security-learning assignment, not a deployed product. Several view capabilities are represented from partial excerpts and the source index; unsampled wiring is not inferred.
Main entry points: views.py Auth and profile views · models.py User profiles · forms.py Account and profile forms · signals.py Auth and profile signals
Components 15
Identity workflow
- URL routes
mupenz_fulgence/urls.py - Auth and profile views
mupenz_fulgence/views.py - Account and profile forms
mupenz_fulgence/forms.py
Roles and access
- Role enforcement
mupenz_fulgence/rbac.py - Template role flags
mupenz_fulgence/context_processors.py - Group provisioning
mupenz_fulgence/management/commands/setup_groups.py
Security controls
- Login lockout
mupenz_fulgence/login_protection.py - Django cache
- Security audit
mupenz_fulgence/audit_logger.py - Auth and profile signals
mupenz_fulgence/signals.py - Signal registration
mupenz_fulgence/apps.py
Profile data
- User profiles
mupenz_fulgence/models.py - Application database
- Upload validators
mupenz_fulgence/validators.py
Other components
- User
Connections 18
- User → URL routes: requests
- URL routes → Auth and profile views: routes to
mupenz_fulgence/urls.py - Auth and profile views → Account and profile forms: uses forms
mupenz_fulgence/views.py - Auth and profile views → User profiles: reads and updates
mupenz_fulgence/views.py - Auth and profile views → Login lockout: checks lockout
mupenz_fulgence/views.py - Auth and profile views → Security audit: records events
mupenz_fulgence/views.py - Auth and profile views → Role enforcement: checks roles
mupenz_fulgence/views.py - Account and profile forms → User profiles: updates profiles
mupenz_fulgence/forms.py - Account and profile forms → Upload validators: validates uploads
mupenz_fulgence/forms.py - User profiles → Upload validators: validates and names files
mupenz_fulgence/models.py - User profiles → Application database: persists profiles
mupenz_fulgence/models.py - Login lockout → Django cache: stores counters
mupenz_fulgence/login_protection.py - Signal registration → Auth and profile signals: registers handlers
mupenz_fulgence/apps.py - Auth and profile signals → User profiles: creates and saves profiles
mupenz_fulgence/signals.py - Auth and profile signals → Security audit: logs auth events
mupenz_fulgence/signals.py - Template role flags → Role enforcement: gets user role
mupenz_fulgence/context_processors.py - Group provisioning → User profiles: uses profile model
mupenz_fulgence/management/commands/setup_groups.py - Group provisioning → Application database: provisions groups
mupenz_fulgence/management/commands/setup_groups.py