{% extends "admin/base_site.html" %} {% load i18n static %} {% block extrastyle %}{{ block.super }} {% include "admin/encryption_suite/_admin_styles.html" %} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block content %}
{% if unconfigured_stores %}

 {% blocktrans trimmed with stores=unconfigured_stores|join:", " %}Not configured: {{ stores }}{% endblocktrans %}

{% endif %}

{% trans "Summary" %}

{% if total_count %}{% endif %} {% if missing_key_rows %}{% endif %} {% if orphan_count %}{% endif %} {% if kms_orphan_count %}{% endif %} {% if superseded_keys %}{% endif %} {% if overdue_keys %}{% endif %}
{% trans "Silos discovered" %}{{ total_count }}
{% trans "Missing keys" %}{{ missing_key_rows|length }}
{% trans "Orphaned data encryption keys" %}{{ orphan_count }}
{% trans "Orphaned key encryption keys" %}{{ kms_orphan_count }}
{% trans "Key re-encryption due" %}{{ superseded_keys|length }}
{% trans "Data re-encryption due" %}{{ overdue_keys|length }}
{% if error %}

{{ error }}

{% blocktrans %} Silo enumeration is owned by the configured silo adapter. To list silos here, override iter_silos() on the adapter (and set supports_enumeration = True). {% endblocktrans %}

{% endif %} {% if rows %}
{% trans "Silos" %}

{% blocktrans trimmed %} A key marked with a check is present and live. A key marked with an x is not found. A key marked with an alert icon exists but will not encrypt or decrypt, because its lifecycle status has moved out of active. {% endblocktrans %}

{% if wants_index %}{% endif %} {% for row in rows %} {% if wants_index %} {% endif %} {% endfor %}
{% trans "Silo UID" %} {% trans "Type" %} {% trans "Key set" %} {% trans "Expected KEK Name" %} {% if kek_existence_source == 'live' %}{% trans "KEK (live)" %} {% else %}{% trans "KEK (last known)" %}{% endif %} {% trans "Field DEK" %} {% trans "File DEK" %}{% trans "Index DEK" %}{% trans "Status" %}
{{ row.silo_uid }} {{ row.silo_label|default:"—" }} {{ row.key_set }} {{ row.resolved_kek }} {% if row.stored_differs %}
{% trans "Stored key differs:" %} {{ row.stored_kek }} {% endif %}
{% if not row.kek_known %}{% trans 'unknown' %} {% else %}{% include "admin/encryption_suite/components/key_marker.html" with marker=row.kek_marker %}{% endif %} {% include "admin/encryption_suite/components/key_marker.html" with marker=row.field_marker %} {% include "admin/encryption_suite/components/key_marker.html" with marker=row.file_marker %} {% include "admin/encryption_suite/components/key_marker.html" with marker=row.index_marker %} {% if row.needs_setup %} {% trans "Needs setup" %} {% elif row.blocked_status %} {% trans "Key deletion scheduled" %} {% else %} {% trans "Ready" %} {% endif %}
{% endif %} {% if missing_key_rows %}
{% trans "Missing Keys" %}

{% if provisioner_creates_keks %}{% trans "Key encryption keys are created automatically by the configured provisioner." %}{% else %}{% trans "Create each key encryption key listed below on your KMS provider, granting your application encrypt/decrypt permission on it." %}{% endif %} {% if key_auto_provision %}{% trans "Data encryption keys are created automatically the first time each silo encrypts a value." %}{% else %}{% trans "Run python manage.py setup_encryption_keys to create the data encryption keys." %}{% endif %}

{% for row in missing_key_rows %} {% endfor %}
{% trans "Silo UID" %} {% trans "Key set" %} {% trans "Missing DEKs" %} {% trans "Missing KEK" %}
{{ row.silo_uid }} {{ row.key_set }} {% if row.missing_deks %}{{ row.missing_deks|join:", " }}{% else %}—{% endif %} {% if row.kek_absent %}{{ row.resolved_kek }}{% else %}—{% endif %}
{% endif %} {% if orphan_rows %}
{% trans "Data Encryption Keys Without a Live Silo" %}

{% blocktrans trimmed %} The data encryption keys below support no live silo. Those marked orphaned are the actionable ones: their silo no longer exists. To remove one, select it on the Data Encryption Keys page and choose "Schedule deletion" — this starts a reversible deletion window. Once the window expires, the delete action destroys the data encryption key for good. {% endblocktrans %}

{% for row in orphan_rows %} {% endfor %}
{% trans "Silo UID" %} {% trans "Type" %} {% trans "Key set" %} {% trans "Purpose" %} {% trans "KEK name" %} {% trans "Status" %} {% trans "DEK (live)" %} {% trans "Undeletable until" %} {% trans "Test console" %}
{{ row.silo_uid }} {{ row.silo_label }} {% if row.no_settings_entry %}{% trans "The settings do not define this key set" as no_entry %}{{ no_entry }} {% endif %}{{ row.key_set }} {{ row.purpose }} {{ row.kek_resource_name }} {{ row.status_label|default:"—" }} {% include "admin/encryption_suite/components/key_marker.html" with marker=row.dek_marker %} {% if row.undeletable_until %}{{ row.undeletable_until|date:"SHORT_DATE_FORMAT" }}{% else %}—{% endif %} {% if row.is_test %}{% trans "Yes" %}{% else %}—{% endif %}

{% trans "Go to the Data Encryption Keys page →" %}

{% endif %} {# Cleanup instructions can stand alone: they are also raised when KMS-side #} {# reconcile is unavailable, which yields no rows to list. #} {% if orphan_kek_rows or cleanup_instructions %}
{% trans "Key Encryption Keys Without a Live Silo" %} {% if cleanup_instructions %} {% for step in cleanup_instructions %}

{{ step.text }}

{% endfor %} {% endif %} {% if orphan_kek_rows %}

{% blocktrans trimmed %} The key encryption keys below support no live silo. Those marked orphaned are the actionable ones: their data is already gone and the keys remain on the KMS, costing money. To act on one, select it on the Key Encryption Keys page and choose schedule deletion, restore, or record an action taken in the KMS. {% endblocktrans %}

{% for row in orphan_kek_rows %} {% endfor %}
{% trans "KEK name" %} {% trans "Status" %} {% if kek_existence_source == 'live' %}{% trans "KEK (live)" %} {% else %}{% trans "KEK (last known)" %}{% endif %} {% trans "KMS deletion" %} {% trans "Test console" %} {% trans "Orphaned" %}
{{ row.name }} {{ row.last_status|default:"—" }} {% if not row.kek_known %}{% trans 'unknown' %} {% else %}{% include "admin/encryption_suite/components/key_marker.html" with marker=row.kek_marker %}{% endif %} {% if row.kms_deletion_at %}{{ row.kms_deletion_at|date:"SHORT_DATE_FORMAT" }}{% else %}—{% endif %} {% if row.is_test %}{% trans "Yes" %}{% else %}—{% endif %} {% include "admin/encryption_suite/components/orphan_marker.html" with is_orphaned=row.is_orphan %}

{% trans "Go to the Key Encryption Keys page →" %}

{% endif %}
{% endif %} {% if superseded_keys %}
{% trans "Key Re-encryption Due" %}

{% blocktrans trimmed %} The data key needs to be re-encrypted after a KMS key rotation. Run 'python manage.py reencrypt_keys' to move key encryption to the current version; no data is touched. {% endblocktrans %}

{% for row in superseded_keys %} {% endfor %}
{% trans "Silo UID" %} {% trans "Key set" %} {% trans "Purpose" %} {% trans "Wrapped by version" %} {% trans "Last re-encrypted" %}
{{ row.silo_ref.uid }} {{ row.key_set }} {{ row.purpose }} {{ row.kek_key_version|default:"—" }} {{ row.last_reencrypted_at|default:"—" }}
{% endif %} {% if overdue_keys %}
{% trans "Data Re-encryption Due" %}

{% blocktrans trimmed %} The data key's own material is older than DEK_ROTATION_PERIOD_DAYS. Run 'python manage.py reencrypt_data' to re-encrypt a silo's data with new keys, a computationally intensive process. {% endblocktrans %}

{% for row in overdue_keys %} {% endfor %}
{% trans "Silo UID" %} {% trans "Key set" %} {% trans "Purpose" %} {% trans "Key material generated" %}
{{ row.silo_ref.uid }} {{ row.key_set }} {{ row.purpose }} {{ row.key_material_last_generated_at|default:"—" }}
{% endif %} {# ---- Drift: what this reconcile pass observed and recorded ---- #} {% if discovered or confirmed_deleted or drift_overdue or drift_missing %}
{% trans "Reconcile Findings" %}
{% trans "Newly discovered keys (now tracked)" %} {{ discovered|length }}
{% trans "Confirmed deleted (gone from the KMS)" %} {{ confirmed_deleted|length }}
{% if drift_overdue %}

{% blocktrans trimmed %} Out of sync — still on the provider, should be gone. Their deletion date has passed, so a provider deletion was canceled in the KMS, or failed. Investigate on the provider: {% endblocktrans %}

{% endif %} {% if drift_missing %}

{% blocktrans trimmed %} Out of sync — gone from the provider, no record of why. An active or scheduled key vanished from the listing (deleted in the KMS). Record the deletion on the Key Encryption Keys page to close it: {% endblocktrans %}

{% endif %}
{% endif %}
{% endblock %}