cznic-dns-parameters.yinx 17 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744
<?xml version="1.0" encoding="utf-8"?>
<module name="cznic-dns-parameters"
        xmlns="urn:ietf:params:xml:ns:yang:yin:1"
        xmlns:ianadns="http://www.nic.cz/ns/yang/dns-parameters"
        xmlns:h="http://www.w3.org/1999/xhtml">
  <namespace uri="http://www.nic.cz/ns/yang/dns-parameters"/>
  <prefix value="dnspar"/>
  <yang-version value="1.1"/>
  <import module="ietf-yang-types">
    <prefix value="yang"/>
  </import>
  <organization>
    <text>CZ.NIC, z. s. p. o.</text>
  </organization>
  <contact>
    <text>
      <h:p>
        Editor:   Ladislav Lhotka<h:br/>
                  &lt;mailto:lhotka@nic.cz&gt;
      </h:p>
    </text>
  </contact>
  <description>
    <text>
      <h:p>This module provides several data types that are maintained
      in IANA registries related to DNS resource records.</h:p>
    </text>
  </description>
  <reference>
    <text>
      <h:ul>
	<h:li>IANA: Domain Name System Security (DNSSEC) Algorithm
	Numbers.<h:br/>
	http://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers.xhtml</h:li>
	<h:li>IANA: Delegation Signer (DS) Resource Record (RR) Type
	Digest Algorithms.<h:br/>
	http://www.iana.org/assignments/ds-rr-types/ds-rr-types.xhtml#ds-rr-types-1</h:li>
	<h:li>IANA: Domain Name System Security (DNSSEC) NextSECure3
	(NSEC3) Parameters.<h:br/>
	https://www.iana.org/assignments/dnssec-nsec3-parameters/dnssec-nsec3-parameters.xhtml</h:li>
	<h:li>IANA: DNSKEY Flags.<h:br/>
	https://www.iana.org/assignments/dnskey-flags/dnskey-flags.xhtml</h:li>
	<h:li>IANA: DNS-Based Authentication of Named Entities (DANE)
	Parameters.<h:br/>
	http://www.iana.org/assignments/dane-parameters/dane-parameters.xhtml</h:li>
	<h:li>IANA: IPSECKEY Resource Record Parameters.<h:br/>
	https://www.iana.org/assignments/ipseckey-rr-parameters/ipseckey-rr-parameters.xhtml</h:li>
	<h:li>IANA: DNS SSHFP Resource Record Parameters.<h:br/>
	https://www.iana.org/assignments/dns-sshfp-rr-parameters/dns-sshfp-rr-parameters.xhtml</h:li>
      </h:ul>
    </text>
  </reference>
  <revision date="2018-10-26">
    <description>
      <text>Initial revision.</text>
    </description>
  </revision>

  <!-- Typedefs -->

  <typedef name="ascii-string">
    <description>
      <text>
	A string consisting of ASCII characters (U+0000 to U+007F).
      </text>
    </description>
    <type name="string">
      <pattern value="\p{IsBasicLatin}*"/>
    </type>
  </typedef>

  <typedef name="base32hex">
    <description>
      <text>
	<h:p>This typedef represents binary data in Base 32 encoding with
	extended hex alphabet.</h:p>
	<h:p>This type differs from base32hex spec in that letters can
	be upper- or lower-case.</h:p>
      </text>
    </description>
    <reference>
      <text>
	RFC 4648: The Base16, Base32, and Base64 Data Encodings
      </text>
    </reference>
    <type name="string">
      <pattern
	  value="([0-9A-Va-v]{8})*([0-9A-Va-v]{2}={6}||[0-9A-Va-v]{4}={4}|[0-9A-Va-v]{5}===|[0-9A-Va-v]{7}=)?"/>
    </type>
  </typedef>

  <typedef name="hex-digits">
    <description>
      <text>
	A string of case-insensitive hexadecimal digits, possibly
	empty.
      </text>
    </description>
    <type name="string">
      <pattern value="[0-9A-Fa-f]*"/>
    </type>
  </typedef>

  <typedef name="time-interval">
    <type name="uint32">
      <range value="1..max"/>
    </type>
    <units name="seconds"/>
    <description>
      <text>
	32-bit time interval.
      </text>
    </description>
  </typedef>

  <typedef name="utc-date-time">
    <description>
      <text>
	UTC date and time.
      </text>
    </description>
    <type name="yang:date-and-time">
      <pattern value=".*Z"/>
    </type>
  </typedef>
  
  <typedef name="dnssec-algorithm">
    <description>
      <text>
	<h:p>This enumeration type defines algorithms for DNSSEC
	signing as defined by IANA.</h:p>
	<h:p>The numbers defined by the 'value' statements are used in
	KEY, SIG, DNSKEY, RRSIG and CERT resource records for
	identifying the security algorithm.</h:p>
	<h:p>Value 0, 4, 9 and 11 are reserved.</h:p>
      </text>
    </description>
    <reference>
      <text>
	RFC 4034: Resource Records for the DNS Security Extensions
      </text>
    </reference>
    <type name="enumeration">
      <enum name="RSAMD5">
	<description>
	 <text>RSA/MD5</text>
	</description>
	<status value="deprecated"/>
	<value value="1"/>
      </enum>
      <enum name="DH">
	<description>
	  <text>Diffie-Hellman</text>
	</description>
	<value value="2"/>
      </enum>
      <enum name="DSA">
	<description>
	  <text>DSA/SHA1</text>
	</description>
	<value value="3"/>
      </enum>
      <enum name="RSASHA1">
	<description>
	  <text>RSA/SHA1</text>
	</description>
	<value value="5"/>
      </enum>
      <enum name="DSA-NSEC3-SHA1">
	<description>
	  <text>DSA-NSEC3-SHA1</text>
	</description>
	<value value="6"/>
      </enum>
      <enum name="RSASHA1-NSEC3-SHA1">
	<description>
	  <text>RSASHA1-NSEC3-SHA1</text>
	</description>
	<value value="7"/>
      </enum>
      <enum name="RSASHA256">
	<description>
	  <text>RSA/SHA256</text>
	</description>
	<value value="8"/>
      </enum>
      <enum name="RSASHA512">
	<description>
	  <text>RSA/SHA512</text>
	</description>
	<value value="10"/>
      </enum>
      <enum name="ECC-GOST">
	<description>
	  <text>GOST R 34.10-2001</text>
	</description>
	<value value="12"/>
      </enum>
      <enum name="ECDSAP256SHA256">
	<description>
	  <text>ECDSA Curve P-256 with SHA-256</text>
	</description>
	<value value="13"/>
      </enum>
      <enum name="ECDSAP384SHA384">
	<description>
	  <text>ECDSA Curve P-384 with SHA-384</text>
	</description>
	<value value="14"/>
      </enum>
    </type>
  </typedef>

  <typedef name="digest-algorithm">
    <description>
      <text>
	This enumeration type defines types of digest algorithms for
	Delegation Signer (DS) RR type.
      </text>
    </description>
    <type name="enumeration">
      <enum name="SHA-1">
	<value value="1"/>
	<description>
	  <text>
	    SHA-1 digest algorithm. Mandatory to support.
	  </text>
	</description>
	<reference>
	  <text>
	    RFC 4034: Resource Records for the DNS Security Extensions
	  </text>
	</reference>
      </enum>
      <enum name="SHA-256">
	<value value="2"/>
	<description>
	  <text>
	    SHA-256 digest algorithm. Mandatory to support.
	  </text>
	</description>
	<reference>
	  <text>
	    RFC 4509: Use of SHA-256 in DNSSEC Delegation Signer (DS)
	    Resource Records (RRs)
	  </text>
	</reference>
      </enum>
      <enum name="GOST-R-34.11-94">
	<value value="3"/>
	<description>
	  <text>
	    GOST R 34.11-94 digest algorithm. Optional to implement.
	  </text>
	</description>
	<reference>
	  <text>
	    RFC 5933: Use of GOST Signature Algorithms in DNSKEY and
	    RRSIG Resource Records for DNSSEC
	  </text>
	</reference>
      </enum>
      <enum name="SHA-384">
	<value value="4"/>
	<description>
	  <text>
	    SHA-384 digest algorithm. Optional to support.
	  </text>
	</description>
	<reference>
	  <text>
	    RFC 6605: Elliptic Curve Digital Signature Algorithm (DSA)
	    for DNSSEC
	  </text>
	</reference>
      </enum>
    </type>
  </typedef>

  <typedef name="dnskey-flags">
    <description>
      <text>
	This enumeration type defines flags for DNSKEY RR.
      </text>
    </description>
    <reference>
      <text>
	RFC 4034: Resource Records for the DNS Security Extensions
      </text>
    </reference>
    <type name="bits">
      <bit name="ZONE">
	<position value="7"/>
	<description>
	  <text>
	    <h:p>Zone Key flag.</h:p>
	    <h:p>If this bit has value 1, then the DNSKEY record holds
	    a DNS zone key. If bit 7 has value 0, then the DNSKEY
	    record holds some other type of DNS public key and MUST
	    NOT be used to verify RRSIGs that cover RRsets.</h:p>
	  </text>
	</description>
      </bit>
      <bit name="REVOKE">
	<position value="8"/>
	<description>
	  <text>
	    <h:p>Revoke flag.</h:p>
	    <h:p>If this bit has value 1, and the resolver sees an
	    RRSIG(DNSKEY) signed by the associated key, then the
	    resolver MUST consider this key permanently invalid for
	    all purposes except for validating the revocation.</h:p>
	  </text>
	</description>
	<reference>
	  <text>
	    RFC 5011: Automated Updates of DNS Security (DNSSEC) Trust
	    Anchors
	  </text>
	</reference>
      </bit>
      <bit name="SEP">
	<position value="15"/>
	<description>
	  <text>
	    <h:p>Secure Entry Point flag.</h:p>
	    <h:p>If this bit has value 1, then the DNSKEY record holds
	    a key intended for use as a secure entry point.</h:p>
	  </text>
	</description>
	<reference>
	  <text>
	    RFC 3757: Domain Name System KEY (DNSKEY) Resource Record
	    (RR) Secure Entry Point (SEP) Flag
	  </text>
	</reference>
      </bit>
    </type>
  </typedef>

  <typedef name="dnssec-nsec3-flags">
    <description>
      <text>
	This enumeration type defines flags for NSEC3 RR.
      </text>
    </description>
    <reference>
      <text>
	RFC 5155: DNS Security (DNSSEC) Hashed Authenticated Denial of
	Existence
      </text>
    </reference>
    <type name="bits">
      <bit name="Opt-Out">
	<position value="7"/>
	<description>
	  <text>
	    The Opt-Out Flag indicates whether this NSEC3 resource
	    record may cover unsigned delegations.
	  </text>
	</description>
      </bit>
    </type>
  </typedef>

  <typedef name="dnssec-nsec3-hash-algorithm">
    <description>
      <text>
	This enumeration type defines cryptographic hash algorithms
	used to construct the hash value in NSEC3 RR.
      </text>
    </description>
    <reference>
      <text>
	RFC 5155: DNS Security (DNSSEC) Hashed Authenticated Denial of
	Existence
      </text>
    </reference>
    <type name="enumeration">
      <enum name="SHA-1">
	<value value="1"/>
	<description>
	  <text>
	    SHA-1 hash algorithm.
	  </text>
	</description>
      </enum>
    </type>
  </typedef>

  <typedef name="tlsa-certificate-usages">
    <description>
      <text>
	This enumeration type defines the provided association that
	will be used to match the certificate presented in the TLS
	handshake.
      </text>
    </description>
    <reference>
      <text>
	RFC 6698: The DNS-Based Authentication of Named Entities
	(DANE) Transport Layer Security (TLS) Protocol: TLSA
      </text>
    </reference>
    <type name="enumeration">
      <enum name="PKIX-TA">
	<value value="0"/>
	<description>
	  <text>
	    CA constraint.
	  </text>
	</description>
      </enum>
      <enum name="PKIX-EE">
	<value value="1"/>
	<description>
	  <text>
	    Service certificate constraint.
	  </text>
	</description>
      </enum>
      <enum name="DANE-TA">
	<value value="2"/>
	<description>
	  <text>
	    Trust anchor assertion.
	  </text>
	</description>
      </enum>
      <enum name="DANE-EE">
	<value value="3"/>
	<description>
	  <text>
	    Domain-issued certificate.
	  </text>
	</description>
      </enum>
      <enum name="PrivCert">
	<value value="255"/>
	<description>
	  <text>
	    Reserved for Private Use.
	  </text>
	</description>
      </enum>
    </type>
  </typedef>

  <typedef name="tlsa-selectors">
    <description>
      <text>
	This enumeration type specifies which part of the TLS
	certificate presented by the server will be matched against
	the association data.
      </text>
    </description>
    <reference>
      <text>
	RFC 6698: The DNS-Based Authentication of Named Entities
	(DANE) Transport Layer Security (TLS) Protocol: TLSA
      </text>
    </reference>
    <type name="enumeration">
      <enum name="Cert">
	<value value="0"/>
	<description>
	  <text>
	    Full certificate.
	  </text>
	</description>
      </enum>
      <enum name="SPKI">
	<value value="1"/>
	<description>
	  <text>
	    SubjectPublicKeyInfo.
	  </text>
	</description>
      </enum>
      <enum name="PrivSel">
	<value value="255"/>
	<description>
	  <text>
	    Reserved for Private Use.
	  </text>
	</description>
      </enum>
    </type>
  </typedef>

  <typedef name="tlsa-matching-type">
    <description>
      <text>
	This enumeration type specifies how the certificate
	association is presented.
      </text>
    </description>
    <reference>
      <text>
	RFC 6698: The DNS-Based Authentication of Named Entities
	(DANE) Transport Layer Security (TLS) Protocol: TLSA
      </text>
    </reference>
    <type name="enumeration">
      <enum name="Full">
	<value value="0"/>
	<description>
	  <text>
	    No hash used.
	  </text>
	</description>
      </enum>
      <enum name="SHA2-256">
	<value value="1"/>
	<description>
	  <text>
	    256-bit hash by SHA2.
	  </text>
	</description>
	<reference>
	  <text>
	    RFC 6234: US Secure Hash Algorithms (SHA and SHA-based
	    HMAC and HKDF)
	  </text>
	</reference>
      </enum>
      <enum name="SHA2-512">
	<value value="2"/>
	<description>
	  <text>
	    512-bit hash by SHA2.
	  </text>
	</description>
	<reference>
	  <text>
	    RFC 6234: US Secure Hash Algorithms (SHA and SHA-based
	    HMAC and HKDF)
	  </text>
	</reference>
      </enum>
      <enum name="PrivMatch">
	<value value="255"/>
	<description>
	  <text>
	    Reserved for Private Use.
	  </text>
	</description>
      </enum>
    </type>
  </typedef>

  <typedef name="ipseckey-algorithm-type">
    <description>
      <text>
	This enumeration type specifies the IPSec public key's
	cryptographic algorithm.
      </text>
    </description>
    <reference>
      <text>
	RFC 4025: A Method for Storing IPsec Keying Material in DNS
      </text>
    </reference>
    <type name="enumeration">
      <enum name="no-key">
	<value value="0"/>
	<description>
	  <text>
	    No key is present.
	  </text>
	</description>
      </enum>
      <enum name="DSA">
	<value value="1"/>
	<description>
	  <text>
	    A DSA key is present, in the format defined in RFC 2536.
	  </text>
	</description>
	<reference>
	  <text>
	    RFC 2536: DSA KEYs and SIGs in the Domain Name System
	    (DNS)
	  </text>
	</reference>
      </enum>
      <enum name="RSA">
	<value value="2"/>
	<description>
	  <text>
	    A RSA key is present, in the format defined in RFC 3110.
	  </text>
	</description>
	<reference>
	  <text>
	    RFC 3110: RSA/SHA-1 SIGs and RSA KEYs in the Domain Name
	    System (DNS)
	  </text>
	</reference>
      </enum>
    </type>
  </typedef>

  <typedef name="ipseckey-gateway-type">
    <description>
      <text>
	This enumeration type specifies the type of the gateway to
	which an IPsec tunnel may be created.
      </text>
    </description>
    <reference>
      <text>
	RFC 4025: A Method for Storing IPsec Keying Material in DNS
      </text>
    </reference>
    <type name="enumeration">
      <enum name="no-gateway">
	<value value="0"/>
	<description>
	  <text>
	    No gateway is present.
	  </text>
	</description>
      </enum>
      <enum name="IPv4-address">
	<value value="1"/>
	<description>
	  <text>
	    A 4-byte IPv4 address is present.
	  </text>
	</description>
      </enum>
      <enum name="IPv6-address">
	<value value="2"/>
	<description>
	  <text>
	    A 16-byte IPv6 address is present.
	  </text>
	</description>
      </enum>
      <enum name="domain-name">
	<value value="3"/>
	<description>
	  <text>
	    A wire-encoded domain name is present.
	  </text>
	</description>
      </enum>
    </type>
  </typedef>

  <typedef name="sshfp-algorithm-type">
    <description>
      <text>
	This enumeration specifies the algorithm of the public key.
      </text>
    </description>
    <reference>
      <text>
	RFC 4255: Using DNS to Securely Publish Secure Shell (SSH) Key
	Fingerprints
      </text>
    </reference>
    <type name="enumeration">
      <enum name="RSA">
	<value value="1"/>
	<description>
	  <text>RSA algorithm.</text>
	</description>
      </enum>
      <enum name="DSA">
	<value value="2"/>
	<description>
	  <text>DSA algorithm.</text>
	</description>
      </enum>
      <enum name="ECDSA">
	<value value="3"/>
	<description>
	  <text>ECDSA algorithm.</text>
	</description>
	<reference>
	  <text>
	    RFC 6594: Use of the SHA-256 Algorithm with RSA, Digital
	    Signature Algorithm (DSA), and Elliptic Curve DSA (ECDSA)
	    in SSHFP Resource Records
	  </text>
	</reference>
      </enum>
      <enum name="Ed25519">
	<value value="4"/>
	<description>
	  <text>Ed25519 algorithm.</text>
	</description>
	<reference>
	  <text>
	    RFC 7479: Using Ed25519 in SSHFP Resource Records
	  </text>
	</reference>
      </enum>
    </type>
  </typedef>

  <typedef name="sshfp-fingerprint-type">
    <description>
      <text>
	This enumeration specifies the message-digest algorithm used
	to calculate the fingerprint of the public key.
      </text>
    </description>
    <reference>
      <text>
	RFC 4255: Using DNS to Securely Publish Secure Shell (SSH) Key
	Fingerprints
      </text>
    </reference>
    <type name="enumeration">
      <enum name="SHA-1">
	<value value="1"/>
	<description>
	  <text>
	    SHA-1 message-digest algorithm.
	  </text>
	</description>
      </enum>
      <enum name="SHA-256">
	<value value="2"/>
	<description>
	  <text>
	    SHA-256 message-digest algorithm.
	  </text>
	</description>
	<reference>
	  <text>
	    RFC 6594: Use of the SHA-256 Algorithm with RSA, Digital
	    Signature Algorithm (DSA), and Elliptic Curve DSA (ECDSA)
	    in SSHFP Resource Records
	  </text>
	</reference>
      </enum>
    </type>
  </typedef>

</module>