initial working branch for dnssec

This commit is contained in:
David Kennedy 2023-10-02 09:52:44 -04:00
parent 3ba4e11ffb
commit 5af1143f55
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
6 changed files with 81 additions and 2 deletions

View file

@ -80,11 +80,21 @@ urlpatterns = [
),
path("domain/<int:pk>", views.DomainView.as_view(), name="domain"),
path("domain/<int:pk>/users", views.DomainUsersView.as_view(), name="domain-users"),
path(
"domain/<int:pk>/dns",
views.DomainDNSView.as_view(),
name="dns",
),
path(
"domain/<int:pk>/nameservers",
views.DomainNameserversView.as_view(),
name="domain-nameservers",
),
path(
"domain/<int:pk>/dnssec",
views.DomainDNSSECView.as_view(),
name="domain-dnssec",
),
path(
"domain/<int:pk>/your-contact-information",
views.DomainYourContactInformationView.as_view(),

View file

@ -0,0 +1,22 @@
{% extends "domain_base.html" %}
{% load static field_helpers url_helpers %}
{% block title %}DNS | {{ domain.name }} | {% endblock %}
{% block domain_content %}
<h1>DNS</h1>
<p>The Domain Name System (DNS) is the internet service that translates your domain name into an IP address. Before your .gov domain can be used, you'll need to connect it to your DNS hosting service and provide us with your name server information.</p>
<p>You can enter your name services, as well as other DNS-related information, in the following sections:</p>
{% url 'domain-nameservers' pk=domain.id as url %}
<p><a href="{{ url }}">DNS name servers</a></p>
<p><a href=>Subdomain records</a></p>
{% url 'domain-dnssec' pk=domain.id as url %}
<p><a href="{{ url }}">DNSSEC</a></p>
{% endblock %} {# domain_content #}

View file

@ -0,0 +1,12 @@
{% extends "domain_base.html" %}
{% load static field_helpers url_helpers %}
{% block title %}DNSSEC | {{ domain.name }} | {% endblock %}
{% block domain_content %}
<h1>DNSSEC</h1>
<p>DNSSEC, or DNS Security Extensions, is additional security layer to protect your website. Enabling DNSSEC ensures that when someone visits your website, they can be certain that it's connecting to the correct server, preventing potential hijacking or tampering with your domain's records. <a href="unknownref">Read more about DNSSEC and why it is important.</a></a></p>
{% endblock %} {# domain_content #}

View file

@ -13,12 +13,31 @@
</li>
<li class="usa-sidenav__item">
{% url 'domain-nameservers' pk=domain.id as url %}
{% url 'dns' pk=domain.id as url %}
<a href="{{ url }}"
{% if request.path == url %}class="usa-current"{% endif %}
>
DNS name servers
DNS
</a>
<ul class="usa--sidenav__sublist">
<li class="usa-sidenav__item">
{% url 'domain-nameservers' pk=domain.id as url %}
<a href="{{ url }}"
{% if request.path == url %}class="usa-current"{% endif %}
>
DNS name servers
</a>
</li>
<li class="usa-sidenav__item">
{% url 'domain-dnssec' pk=domain.id as url %}
<a href="{{ url }}"
{% if request.path == url %}class="usa-current"{% endif %}
>
DNSSEC
</a>
</li>
</ul>
</li>
<li class="usa-sidenav__item">

View file

@ -3,7 +3,9 @@ from .domain import (
DomainView,
DomainAuthorizingOfficialView,
DomainOrgNameAddressView,
DomainDNSView,
DomainNameserversView,
DomainDNSSECView,
DomainYourContactInformationView,
DomainSecurityEmailView,
DomainUsersView,

View file

@ -128,6 +128,13 @@ class DomainAuthorizingOfficialView(DomainPermissionView, FormMixin):
return super().form_valid(form)
class DomainDNSView(DomainPermissionView):
"""DNS Information View."""
template_name = "domain_dns.html"
class DomainNameserversView(DomainPermissionView, FormMixin):
"""Domain nameserver editing view."""
@ -207,6 +214,13 @@ class DomainNameserversView(DomainPermissionView, FormMixin):
return super().form_valid(formset)
class DomainDNSSECView(DomainPermissionView):
"""Domain DNSSEC editing view."""
template_name = "domain_dnssec.html"
class DomainYourContactInformationView(DomainPermissionView, FormMixin):
"""Domain your contact information editing view."""