From 5af1143f55d0da230584d6ddba9db29edb928abc Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Mon, 2 Oct 2023 09:52:44 -0400 Subject: [PATCH] initial working branch for dnssec --- src/registrar/config/urls.py | 10 +++++++++ src/registrar/templates/domain_dns.html | 22 ++++++++++++++++++++ src/registrar/templates/domain_dnssec.html | 12 +++++++++++ src/registrar/templates/domain_sidebar.html | 23 +++++++++++++++++++-- src/registrar/views/__init__.py | 2 ++ src/registrar/views/domain.py | 14 +++++++++++++ 6 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 src/registrar/templates/domain_dns.html create mode 100644 src/registrar/templates/domain_dnssec.html diff --git a/src/registrar/config/urls.py b/src/registrar/config/urls.py index 9c3624c2c..3cf6d2dfc 100644 --- a/src/registrar/config/urls.py +++ b/src/registrar/config/urls.py @@ -80,11 +80,21 @@ urlpatterns = [ ), path("domain/", views.DomainView.as_view(), name="domain"), path("domain//users", views.DomainUsersView.as_view(), name="domain-users"), + path( + "domain//dns", + views.DomainDNSView.as_view(), + name="dns", + ), path( "domain//nameservers", views.DomainNameserversView.as_view(), name="domain-nameservers", ), + path( + "domain//dnssec", + views.DomainDNSSECView.as_view(), + name="domain-dnssec", + ), path( "domain//your-contact-information", views.DomainYourContactInformationView.as_view(), diff --git a/src/registrar/templates/domain_dns.html b/src/registrar/templates/domain_dns.html new file mode 100644 index 000000000..dafede300 --- /dev/null +++ b/src/registrar/templates/domain_dns.html @@ -0,0 +1,22 @@ +{% extends "domain_base.html" %} +{% load static field_helpers url_helpers %} + +{% block title %}DNS | {{ domain.name }} | {% endblock %} + +{% block domain_content %} + +

DNS

+ +

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.

+ +

You can enter your name services, as well as other DNS-related information, in the following sections:

+ + {% url 'domain-nameservers' pk=domain.id as url %} +

DNS name servers

+ +

Subdomain records

+ + {% url 'domain-dnssec' pk=domain.id as url %} +

DNSSEC

+ +{% endblock %} {# domain_content #} diff --git a/src/registrar/templates/domain_dnssec.html b/src/registrar/templates/domain_dnssec.html new file mode 100644 index 000000000..1c774f83a --- /dev/null +++ b/src/registrar/templates/domain_dnssec.html @@ -0,0 +1,12 @@ +{% extends "domain_base.html" %} +{% load static field_helpers url_helpers %} + +{% block title %}DNSSEC | {{ domain.name }} | {% endblock %} + +{% block domain_content %} + +

DNSSEC

+ +

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. Read more about DNSSEC and why it is important.

+ +{% endblock %} {# domain_content #} diff --git a/src/registrar/templates/domain_sidebar.html b/src/registrar/templates/domain_sidebar.html index 1e4cd1882..672052ed6 100644 --- a/src/registrar/templates/domain_sidebar.html +++ b/src/registrar/templates/domain_sidebar.html @@ -13,12 +13,31 @@
  • - {% url 'domain-nameservers' pk=domain.id as url %} + {% url 'dns' pk=domain.id as url %} - DNS name servers + DNS +
  • diff --git a/src/registrar/views/__init__.py b/src/registrar/views/__init__.py index f37d2724a..27522d40e 100644 --- a/src/registrar/views/__init__.py +++ b/src/registrar/views/__init__.py @@ -3,7 +3,9 @@ from .domain import ( DomainView, DomainAuthorizingOfficialView, DomainOrgNameAddressView, + DomainDNSView, DomainNameserversView, + DomainDNSSECView, DomainYourContactInformationView, DomainSecurityEmailView, DomainUsersView, diff --git a/src/registrar/views/domain.py b/src/registrar/views/domain.py index ca7cee4ac..788b084eb 100644 --- a/src/registrar/views/domain.py +++ b/src/registrar/views/domain.py @@ -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."""