DNSOP Working Group P. Lexis
Internet-Draft PowerDNS
Intended status: Standards Track P. Spacek
Expires: September 10, 2020 CZ.NIC
O. Sury
Internet Systems Consortium
W. Toorop
NLnet Labs
March 9, 2020

A Data Model for configuring Domain Name System (DNS) Zone Provisioning on Authoritative Nameservers
draft-toorop-dnsop-dns-zone-provisioning-yang-00

Abstract

This document describes a data model for configuring DNS Zone provisioning on authoritative nameservers. This data model only includes definitions for configuration of primary and secondary relationships.

The purpose of this document is to enumerate the properties involved in managing zone provisioning, for usage in managing zone provisioning methods, such as catalog zones or NETCONF.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on September 10, 2020.

Copyright Notice

Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

This document describes a data model for configuring DNS Zone provisioning on authoritative nameservers. The model consists of a list of DNS Zones. Besides the name of the zone, each zone MAY contain properties for provisioning of those zones on primary and secondary nameservers.

1.1. Definitions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

1.2. Properties for primary nameservers

The optional properties for primary nameservers are:

1.3. Properties for primary nameservers

The optional properties for secondary nameservers are:

2. Tree Structure

This document defined the YANG module "ietf-dns-zone-provisioning", which has the following tree structure.

module: ietf-dns-zone-provisioning
  +--rw tsig-keys
  |  +--rw tsig-key* [name]
  |     +--rw name         inet:domain-name
  |     +--rw algorithm    inet:domain-name
  |     +--rw secret       string
  +--rw zones
     +--rw zone* [name]
        +--rw name              inet:domain-name
        +--rw allow-notify* [subnet]
        |  +--rw subnet      inet:ip-prefix
        |  +--rw tsig-key?   -> /tsig-keys/tsig-key/name
        +--rw allow-transfer* [subnet]
        |  +--rw subnet      inet:ip-prefix
        |  +--rw tsig-key?   -> /tsig-keys/tsig-key/name
        +--rw notify-to* [ip]
        |  +--rw ip          inet:ip-address
        |  +--rw port?       inet:port-number
        |  +--rw tsig-key?   -> /tsig-keys/tsig-key/name
        +--rw transfer-from* [ip]
           +--rw ip          inet:ip-address
           +--rw port?       inet:port-number
           +--rw tsig-key?   -> /tsig-keys/tsig-key/name

3. YANG Module

<CODE BEGINS> file "ietf-dns-zone-provisioning@2020-03-09.yang"
module ietf-dns-zone-provisioning {

  yang-version 1.1;

  namespace "urn:ietf:params:xml:ns:yang"
    + ":ietf-dns-zone-provisioning";

  prefix dnszp;

  import ietf-inet-types {
    prefix inet;
  }

  organization
    "IETF Domain Name System Operations Working Group (dnsop)";

  contact
    "WG Web:   <https://datatracker.ietf.org/wg/dnsop/>
     WG List:  <mailto:dnsop@ietf.org>

     Editor:   Willem Toorop
               <mailto:willem@nlnetlabs.nl>";

  description
    "This YANG module defines a model for configuring DNS Zone
     provisioning on authoritative nameservers.
     
     Copyright (c) 2020 IETF Trust and the persons identified as
     authors of the code. All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Simplified BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC ????; see the
     RFC itself for full legal notices.";

  revision 2020-03-09 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: A YANG Data Model for"
        + " DNS Zone provisioning configuration";
  }

  /* Groupings */

  grouping tsig-key {
    leaf name {
      type inet:domain-name;
      mandatory true;
      description
        "The name of the key";
    }
    leaf algorithm {
      type inet:domain-name;
      mandatory true;
      description
        "Name of the algorithm";
      reference
        "<https://www.iana.org/assignments"
          + "/tsig-algorithm-names/tsig-algorithm-names.xhtml>";
    }
    leaf secret {
      type string;
      mandatory true;
      description
        "Shared secret in base64 format. Possible lengths are
         dependent on the algorithm";
    }
    description
      "Shared key used for authenticating transactions with
       authoritative name servers";
    reference
      "RFC2845: Secret Key Transaction Authentication for DNS
       (TSIG)";
  }
  grouping acl-net-key {
    leaf subnet {
      type inet:ip-prefix;
      mandatory true;
      description
        "Contacting IP address must match this subnet.";
    }
    leaf tsig-key {
      type leafref {
        path "/tsig-keys/tsig-key/name";
      }
      description
        "When provided all interactions to and from the
         contacting remote end must use this tsig-key.";
    }
    description
      "Access control allowing the action from IP addresses from the
       given subnet and tsig-key if present. Without tsig-key only
       the subnet needs to match. The subnet should be 0.0.0.0/0 or 
       ::/0 to allow access from all IPv4 or all IPv6 addresses";
  }

  grouping addr-key {
    leaf ip {
      type inet:ip-address;
      mandatory true;
      description
        "IP address to contact.";
    }
    leaf port {
      type inet:port-number;
      default 53;
      description
        "Port to conact.";
    }
    leaf tsig-key {
      type leafref {
        path "/tsig-keys/tsig-key/name";
      }
      description
        "When provided all interactions with to and from the
         contacted remote end must use this tsig-key.";
    }
    description
      "IP address of remote party to contact, either to notify about
       updates in the zone, or to fetch the zone from. An optional
       tsig-key can be given to validate the transfer or to sign the
       notify.";
  }

  container tsig-keys {
    list tsig-key {
      key "name";
      uses tsig-key;
      description
        "The tsig-key which is referred to from acl-net-key
         and/or addr-key.";
    }
    description
      "The list of tsig-keys which are referred from
       acl-net-key and addr-key.";
  }

  container zones {
    list zone {
      key "name";
      leaf name {
        type inet:domain-name;
        description
          "The name of the DNS Zone";
      }
      list allow-notify {
        key "subnet";
        uses acl-net-key;
        description
          "Secondary servers allow notifies for DNS Zone updates
           from IP addresses from this subnet. If a tsig-key is
           given, the notify must be signed with that key.";
      }
      list allow-transfer {
        key "subnet";
        uses acl-net-key;
        description
          "Primary servers allow transfers to the IP addresses
           to the given subnet. If a tsig-key is given, the transfer
           request must be signed and the DNS messages used for the
           transfer will also be signed with that tsig-key";
      }
      list notify-to {
        key "ip";
        uses "addr-key";
        description
          "Primary servers send NOTIFY messages when the Zonne
           has been updated to this IP. If a tsig-key is given,
           it will be signed with that key.";
      }
      list transfer-from {
        key "ip";
        uses "addr-key";
        description
          "Secondary servers contact the given ip-address to
           acquire DNS Zone content. When a tsig-key is given
           the request will be signed with it, and the DNS
           messages conveying the Zone must be signed with
           that tsig-key.";
      }
      description
        "A DNS Zone with properties which describe the provisioning
         relationships within for authoritative nameserver.";
    }
    description
      "The list of DNS Zones for which the properties are defined
       that describe the primary/secondary relationships.";
  }
}
<CODE ENDS>

4. IANA Considerations

This document registers the following namespace URI in the "ns" subregistry of the "IETF XML Registry" [RFC3688]:

This document registers the following YANG module in the "YANG Module Names" registry [RFC6020]:

5. Security considerations

Instances of the data model defined in this document contain sensitive information with which eavesdroppers can interfere in DNS Zone provisioning and potentially even alter DNS Zone content. Care must be taken that instances of this data model are only conveyed over secure authenticated and encrypted channels.

6. Acknowledgements

Thanks to

7. Normative References

[RFC1995] Ohta, M., "Incremental Zone Transfer in DNS", RFC 1995, DOI 10.17487/RFC1995, August 1996.
[RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone Changes (DNS NOTIFY)", RFC 1996, DOI 10.17487/RFC1996, August 1996.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
[RFC2845] Vixie, P., Gudmundsson, O., Eastlake 3rd, D. and B. Wellington, "Secret Key Transaction Authentication for DNS (TSIG)", RFC 2845, DOI 10.17487/RFC2845, May 2000.
[RFC5936] Lewis, E. and A. Hoenes, "DNS Zone Transfer Protocol (AXFR)", RFC 5936, DOI 10.17487/RFC5936, June 2010.
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, DOI 10.17487/RFC6020, October 2010.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017.

Authors' Addresses

Pieter Lexis PowerDNS Den Haag, Netherlands EMail: pieter.lexis@powerdns.com
Petr Spacek CZ.NIC CZ EMail: petr.spacek@nic.cz
Ondrej Sury Internet Systems Consortium CZ EMail: ondrej@isc.org
Willem Toorop NLnet Labs Science Park 400 Amsterdam, 1098 XH Netherlands EMail: willem@nlnetlabs.nl