{% extends 'paxalia/base.html' %} {% load i18n static %} {% block title %}{% trans "Authentication & Recovery" %} — Paxalia{% endblock %} {% block page_title %}{% trans "Authentication & Recovery" %}{% endblock %} {% block page_subtitle %}{% trans "Mandatory administrator authentication, second-factor enrollment, and recovery" %}{% endblock %} {% block extra_css %}{% endblock %} {% block dashboard_content %}
{% trans "Security Overview" %} {% trans "Administrator Security" %} {% trans "Authentication" %} {% trans "Admin Devices" %} {% trans "Admin Sessions" %}
{% trans "Administrator security contract" %}

{% trans "All three layers are required" %}

{% trans "Paxalia Dashboard administration is available only after the host Django authentication succeeds, a mandatory second factor is verified, and an authorized WebAuthn credential is verified." %}

{% trans "Mandatory" %}
{% trans "Layer 1" %}

{% trans "Primary authentication" %}

{% trans "Active" %}

{% trans "The dashboard uses your host project's Django authentication backend and password handling. Paxalia adds bounded rate limiting and security event logging around the administrator flow rather than creating a second password store." %}

{% trans "Login limit" %}{{ login_limit }}{% blocktrans with seconds=login_window %}Attempts per {{ seconds }} second(s).{% endblocktrans %}
{% trans "Password management" %}{% if password_change_enabled %}{% trans "Available" %}{% else %}{% trans "Host controlled" %}{% endif %}{% trans "Django password validators and session rotation remain authoritative." %}
{% if password_change_enabled %}{% endif %}
{% trans "Layer 2" %}

{% trans "Mandatory 2FA" %}

{% if totp_enabled %}{% trans "Enabled" %}{% else %}{% trans "Enrollment required" %}{% endif %}

{% trans "Paxalia uses the configured django-otp TOTP authenticator for privileged access. Password-only administrator sessions are never considered complete." %}

{% trans "Authenticator" %}TOTP{% trans "Compatible authenticator applications can generate the verification code." %}
{% trans "Verification limit" %}{{ twofa_limit }}{% blocktrans with seconds=twofa_window %}Attempts per {{ seconds }} second(s).{% endblocktrans %}
{% trans "Recovery codes" %}{{ recovery_codes_remaining }}{% trans "One-time recovery codes are hashed at rest and never displayed again after generation." %}
{% if totp_enabled %} {% trans "Verify authenticator" %}
{% csrf_token %}
{% csrf_token %}
{% else %} {% trans "Activate 2FA" %} {% endif %}
{% trans "Layer 3" %}

{% trans "Authorized device credential" %}

{% if current_device %}{% trans "Verified" %}{% else %}{% trans "Required" %}{% endif %}

{% trans "The browser-accessible Layer 3 credential is WebAuthn. Paxalia stores only the public credential and safe authenticator metadata; the private key stays with the authenticator." %}

{% trans "Active devices" %}{% if current_device %}1+{% else %}0{% endif %}{% blocktrans with max=max_devices %}Up to {{ max }} active device(s) are allowed for this administrator.{% endblocktrans %}
{% trans "Challenge TTL" %}{{ challenge_ttl }}s{% trans "Challenges are short-lived and single-use." %}
{% trans "Verification limit" %}{{ device_limit }}{% blocktrans with seconds=device_window %}Attempts per {{ seconds }} second(s).{% endblocktrans %}
{% trans "Session policy" %}

{% trans "Privileged session lifetime" %}

{% trans "A final administrator session is valid only while the user remains an administrator, the confirmed second factor still exists, and the authorized device credential remains active." %}

{% trans "Maximum age" %}{{ session_max_age }}s{% trans "The privileged state expires even if the browser remains open." %}
{% trans "WebAuthn RP ID" %}{{ webauthn_rp_id|default:_('Derived') }}{% trans "Derived from the deployment origin unless explicitly configured." %}
{% trans "WebAuthn origin" %}{{ webauthn_origin|default:_('Derived') }}{% trans "Must match the real deployed browser origin." %}
{% trans "Recovery safety" %}

{% trans "Keep at least one backup authenticator and store recovery codes outside the browser. Recovery codes are not returned through ordinary logs, exports, or device metadata." %}

{% endblock %}