{% extends 'generic/object_list.html' %} {% load helpers %} {% load i18n %} {% block title %}Import Certificates from URLs (CSV){% endblock %} {% block tabs %}{% endblock %} {% block table %}{% endblock %} {% block content %}
{% if step == "preview" %} {# ── Preview step ── #}
Scan Preview

{{ row_count }} URL(s) ready to scan.

{% if errors %}
Validation warnings ({{ errors|length }}):
    {% for err in errors %}
  • Row {{ err.row }}{% if err.field %}, field {{ err.field }}{% endif %}: {{ err.message }}
  • {% endfor %}
{% endif %} {% if rows %}
{% for row in rows %} {% endfor %}
# URL Host Port Verify chain Tenant
{{ row.row }} {{ row.url }} {{ row.host }} {{ row.port }} {% if row.verify_chain %}Yes{% else %}No{% endif %} {{ row.tenant|default:"—" }}
{% csrf_token %} Cancel
{% endif %}
{% elif step == "result" %} {# ── Result step ── #}
Scan Results

{{ imported }} certificate(s) imported.

{% for o in outcomes %} {% endfor %}
URLOutcomeDetail
{{ o.url }} {% if o.status == "imported" %}Imported {% elif o.status == "imported_untrusted" %}Imported (untrusted chain) {% elif o.status == "matched" %}Matched existing {% elif o.status == "blocked" %}Blocked (policy) {% elif o.status == "unreachable" %}Unreachable {% else %}Error{% endif %} {% if o.pk %}{{ o.detail }} {% else %}{{ o.detail }}{% endif %}
View certificates Import more
{% else %} {# ── Input step ── #}
Import Certificates from URLs

Provide a CSV of URLs. For each row the plugin opens a TLS connection, scrapes the certificate the server presents, and imports it. Only the public certificate is stored — private keys are never transmitted in a handshake. HTTPS only; private/loopback addresses are blocked unless an administrator allowlists their range.

{% if errors %}
Could not parse the CSV:
    {% for err in errors %}
  • Row {{ err.row }}{% if err.field %}, field {{ err.field }}{% endif %}: {{ err.message }}
  • {% endfor %}
{% endif %}
{% csrf_token %}

CSV columns
  • url — required, https://host[:port] or host:port (port defaults to 443)
  • assigned_device, assigned_vm, assigned_service — optional, name or ID
  • tenant — optional, name/slug/ID
  • verify_chain — optional true/false (default true); false imports self-signed/untrusted certs with a flag
  • sni — optional SNI override
{% endif %}
{% endblock %}