{% extends "base.html" %} {% block title %}{{ t('recovery.title') }} — painfree{% endblock %} {% block body %}

{{ t('recovery.heading') }}

{{ t('recovery.lede') }}

{# Nothing on this page is a secret. The key id is a hash: it says which secret is the right one and is no part of it, which is why an unprivileged page may show it and why the file it names is downloadable. #}
{{ t('recovery.what_title') }}

{{ t('recovery.what_body') }}

{# The valuable sentence is the last one: it turns the custody boundary from the thing that makes these instructions confusing into the reason they are shaped this way. This page is served by the `api` process, which is refused the custody secret and would not start if it were handed one. #}
{{ t('recovery.where_title') }}

{{ t('recovery.where_body') }}

{{ t('recovery.where_boundary') }}

{# Both of these are relative paths, on a page reached in a browser, in a deployment that is containerised by definition. Saying "on the host" and then naming no host sends the reader to the container this page came from -- where the file is absent by design, which reads as missing rather than as elsewhere. Their second guess is worse: the worker *does* hold it, so `exec ... cat` works, and it is the one thing the closing warning on this page tells them not to do. So the anchor is named, and the boundary is given as the reason rather than left to be discovered. #}
{{ t('recovery.key_id') }} {% if card.rotation_unfinished %}{{ card.key_ids | join(', ') }} {{ t('recovery.rotation_unfinished') }} {% elif card.key_id %}{{ card.key_id }} {% else %}{{ t('recovery.no_keys_yet') }}{% endif %}
{{ t('recovery.file') }} {{ card.secret_path }} {{ t('recovery.relative_to') }}
{{ t('recovery.command') }} {{ card.backup_command }} {{ t('recovery.host_shell') }}
{{ t('recovery.version') }} {{ card.version }} {{ card.git_sha }}
{{ t('recovery.acknowledged') }} {% if card.acknowledged %}{{ card.acknowledgement.acknowledged_at.strftime('%Y-%m-%d %H:%M') }} {{ card.acknowledgement.acknowledged_by }} {% else %}{{ t('recovery.not_acknowledged') }}{% endif %}

{{ t('recovery.download') }}

{% if not card.acknowledged and may('connections:write') %}

{{ t('recovery.confirm_body') }}

{% endif %} {% endblock %}