idnits 2.17.1
draft-kwatsen-netconf-http-client-server-04.txt:
Checking boilerplate required by RFC 5378 and the IETF Trust (see
https://trustee.ietf.org/license-info):
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt:
----------------------------------------------------------------------------
No issues found here.
Checking nits according to https://www.ietf.org/id-info/checklist :
----------------------------------------------------------------------------
No issues found here.
Miscellaneous warnings:
----------------------------------------------------------------------------
== The copyright year in the IETF Trust and authors Copyright Line does not
match the current year
== Line 116 has weird spacing: '...assword str...'
== The document doesn't use any RFC 2119 keywords, yet seems to have RFC
2119 boilerplate text.
-- The document date (October 18, 2019) is 1650 days in the past. Is this
intentional?
Checking references for intended status: Proposed Standard
----------------------------------------------------------------------------
(See RFCs 3967 and 4897 for information about using normative references
to lower-maturity documents in RFCs)
No issues found here.
Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--).
Run idnits with the --verbose option for more detailed information about
the items above.
--------------------------------------------------------------------------------
2 NETCONF Working Group K. Watsen
3 Internet-Draft Watsen Networks
4 Intended status: Standards Track October 18, 2019
5 Expires: April 20, 2020
7 YANG Groupings for HTTP Clients and HTTP Servers
8 draft-kwatsen-netconf-http-client-server-04
10 Abstract
12 This document defines two YANG modules: the first defines a minimal
13 grouping for configuring a generic HTTP client, and the second
14 defines a minimal grouping for configuring a generic HTTP server. It
15 is intended that these groupings will be used and extended by
16 applications using the HTTP protocol.
18 Editorial Note (To be removed by RFC Editor)
20 This draft contains many placeholder values that need to be replaced
21 with finalized values at the time of publication. This note
22 summarizes all of the substitutions that are needed. No other RFC
23 Editor instructions are specified elsewhere in this document.
25 Artwork in this document contains placeholder values for the date of
26 publication of this draft. Please apply the following replacement:
28 o "2019-10-18" --> the publication date of this draft
30 The following Appendix section is to be removed prior to publication:
32 o Appendix A. Change Log
34 Status of This Memo
36 This Internet-Draft is submitted in full conformance with the
37 provisions of BCP 78 and BCP 79.
39 Internet-Drafts are working documents of the Internet Engineering
40 Task Force (IETF). Note that other groups may also distribute
41 working documents as Internet-Drafts. The list of current Internet-
42 Drafts is at https://datatracker.ietf.org/drafts/current/.
44 Internet-Drafts are draft documents valid for a maximum of six months
45 and may be updated, replaced, or obsoleted by other documents at any
46 time. It is inappropriate to use Internet-Drafts as reference
47 material or to cite them other than as "work in progress."
48 This Internet-Draft will expire on April 20, 2020.
50 Copyright Notice
52 Copyright (c) 2019 IETF Trust and the persons identified as the
53 document authors. All rights reserved.
55 This document is subject to BCP 78 and the IETF Trust's Legal
56 Provisions Relating to IETF Documents
57 (https://trustee.ietf.org/license-info) in effect on the date of
58 publication of this document. Please review these documents
59 carefully, as they describe your rights and restrictions with respect
60 to this document. Code Components extracted from this document must
61 include Simplified BSD License text as described in Section 4.e of
62 the Trust Legal Provisions and are provided without warranty as
63 described in the Simplified BSD License.
65 Table of Contents
67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
68 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
69 3. The HTTP Client Model . . . . . . . . . . . . . . . . . . . . 3
70 3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 3
71 3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 3
72 3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 4
73 4. The HTTP Server Model . . . . . . . . . . . . . . . . . . . . 8
74 4.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 8
75 4.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 9
76 4.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 9
77 5. Security Considerations . . . . . . . . . . . . . . . . . . . 14
78 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15
79 6.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 15
80 6.2. The YANG Module Names Registry . . . . . . . . . . . . . 15
81 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 16
82 7.1. Normative References . . . . . . . . . . . . . . . . . . 16
83 7.2. Informative References . . . . . . . . . . . . . . . . . 16
84 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 17
86 1. Introduction
88 This document defines two YANG 1.1 [RFC7950] modules: the first
89 defines a grouping for configuring a generic HTTP client, and the
90 second defines a grouping for configuring a generic HTTP server. It
91 is intended that these groupings will be used by applications using
92 the HTTP protocol.
94 2. Terminology
96 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
97 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
98 "OPTIONAL" in this document are to be interpreted as described in BCP
99 14 [RFC2119] [RFC8174] when, and only when, they appear in all
100 capitals, as shown here.
102 3. The HTTP Client Model
104 3.1. Tree Diagram
106 This section provides a tree diagram [RFC8340] for the "ietf-http-
107 client" module.
109 module: ietf-http-client
111 grouping client-identity-grouping
112 +-- (auth-type)
113 +--:(basic)
114 +-- basic {basic-auth}?
115 +-- user-id string
116 +-- password string
117 grouping http-client-grouping
118 +-- protocol-version? enumeration
119 +-- client-identity
120 | +---u client-identity-grouping
121 +-- proxy-server! {proxy-connect}?
122 +-- tcp-client-parameters
123 | +---u tcpc:tcp-client-grouping
124 +-- tls-client-parameters
125 | +---u tlsc:tls-client-grouping
126 +-- proxy-client-identity
127 +---u client-identity-grouping
129 3.2. Example Usage
131 This section presents an example showing the http-client-grouping
132 populated with some data.
134
135 HTTP/1.1
136
137
138 bob
139 secret
140
141
142
144 3.3. YANG Module
146 This YANG module has normative references to [RFC6991].
148 file "ietf-http-client@2019-10-18.yang"
150 module ietf-http-client {
151 yang-version 1.1;
152 namespace "urn:ietf:params:xml:ns:yang:ietf-http-client";
153 prefix httpc;
155 import ietf-tcp-client {
156 prefix tcpc;
157 reference
158 "RFC AAAA: YANG Groupings for TCP Clients and TCP Servers";
159 }
161 import ietf-tls-client {
162 prefix tlsc;
163 reference
164 "RFC BBBB: YANG Groupings for TLS Clients and TLS Servers";
165 }
167 import ietf-netconf-acm {
168 prefix nacm;
169 reference
170 "RFC 8341: Network Configuration Access Control Model";
171 }
173 organization
174 "IETF NETCONF (Network Configuration) Working Group";
176 contact
177 "WG Web:
178 WG List:
179 Author: Kent Watsen ";
181 description
182 "This module defines reusable groupings for HTTP clients that
183 can be used as a basis for specific HTTP client instances.
185 Copyright (c) 2019 IETF Trust and the persons identified
186 as authors of the code. All rights reserved.
188 Redistribution and use in source and binary forms, with
189 or without modification, is permitted pursuant to, and
190 subject to the license terms contained in, the Simplified
191 BSD License set forth in Section 4.c of the IETF Trust's
192 Legal Provisions Relating to IETF Documents
193 (https://trustee.ietf.org/license-info).
195 This version of this YANG module is part of RFC XXXX
196 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
197 itself for full legal notices.;
199 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
200 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
201 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
202 are to be interpreted as described in BCP 14 (RFC 2119)
203 (RFC 8174) when, and only when, they appear in all
204 capitals, as shown here.";
206 revision 2019-10-18 {
207 description
208 "Initial version";
209 reference
210 "RFC XXXX: YANG Groupings for HTTP Clients and HTTP Servers";
211 }
213 // Features
215 feature proxy-connect {
216 description
217 "Proxy connection configuration is configurable for
218 HTTP clients on the server implementing this feature.";
219 }
221 feature basic-auth {
222 description
223 "The 'basic-auth' feature indicates that the client
224 may be configured to use the 'basic' HTTP authentication
225 scheme.";
226 reference
227 "RFC 7617: The 'Basic' HTTP Authentication Scheme";
228 }
229 // Groupings
231 grouping client-identity-grouping {
232 description
233 "The credentials used by the client to authenticate to
234 the HTTP server.";
235 choice auth-type {
236 nacm:default-deny-write;
237 mandatory true;
238 description
239 "The authentication type.";
240 case basic {
241 container basic {
242 if-feature "basic-auth";
243 leaf user-id {
244 type string;
245 mandatory true;
246 description
247 "The user-id for the authenticating client.";
248 }
249 leaf password {
250 nacm:default-deny-all;
251 type string;
252 mandatory true;
253 description
254 "The password for the authenticating client.";
255 }
256 description
257 "The 'basic' HTTP scheme credentials.";
258 reference
259 "RFC 7617: The 'Basic' HTTP Authentication Scheme";
260 }
261 }
262 }
263 } // grouping client-identity-grouping
265 grouping http-client-grouping {
266 description
267 "A reusable grouping for configuring a HTTP client,
268 including the IP address and port number it initiates
269 a connections to.
271 Note that this grouping uses fairly typical descendent
272 node names such that a stack of 'uses' statements will
273 have name conflicts. It is intended that the consuming
274 data model will resolve the issue (e.g., by wrapping
275 the 'uses' statement in a container called
276 'http-client-parameters'). This model purposely does
277 not do this itself so as to provide maximum flexibility
278 to consuming models.";
280 leaf protocol-version {
281 nacm:default-deny-write;
282 type enumeration {
283 enum HTTP/1.0 {
284 description
285 "The client should use the 'HTTP/1.0' protocol.";
286 }
287 enum HTTP/1.1 {
288 description
289 "The client should use the 'HTTP/1.1' protocol.";
290 }
291 enum HTTP/2.0 {
292 description
293 "The client should use the 'HTTP/2.0' protocol.";
294 }
295 }
296 description
297 "The HTTP protocol version the client should use.";
298 }
300 container client-identity {
301 description
302 "The identity the HTTP client should use when
303 authenticating itself to the HTTP server.";
304 uses client-identity-grouping;
305 }
307 container proxy-server {
308 nacm:default-deny-write;
309 if-feature "proxy-connect";
310 presence true; // only so ex-http-client can pass validation?
311 container tcp-client-parameters {
312 description
313 "A wrapper around the TCP parameters to avoid
314 name collisions.";
315 uses "tcpc:tcp-client-grouping";
316 }
317 container tls-client-parameters {
318 description
319 "A wrapper around the TLS parameters to avoid
320 name collisions.";
321 uses "tlsc:tls-client-grouping";
322 }
323 container proxy-client-identity {
324 description
325 "The identity the HTTP client should use when
326 authenticating itself to the HTTP server.";
327 uses client-identity-grouping;
328 }
329 description
330 "Proxy server settings.";
331 }
332 } // grouping http-client-grouping
334 } // module ietf-http-client
336
338 4. The HTTP Server Model
340 4.1. Tree Diagram
342 This section provides a tree diagram [RFC8340] for the "ietf-http-
343 server" module.
345 module: ietf-http-server
347 grouping http-server-grouping
348 +-- server-name? string
349 +-- protocol-versions
350 | +-- protocol-version* enumeration
351 +-- client-authentication!
352 +-- (required-or-optional)
353 | +--:(required)
354 | | +-- required? empty
355 | +--:(optional)
356 | +-- optional? empty
357 +-- (local-or-external)
358 +--:(local) {local-client-auth-supported}?
359 | +-- users
360 | +-- user* [user-id]
361 | +-- user-id? string
362 | +-- (auth-type)?
363 | +--:(basic)
364 | +-- basic {basic-auth}?
365 | +-- user-id? string
366 | +-- password? ianach:crypt-hash
367 +--:(external) {external-client-auth-supported}?
368 +-- client-auth-defined-elsewhere? empty
370 4.2. Example Usage
372 This section presents an example showing the http-server-grouping
373 populated with some data.
375
376 foo.example.com
377
378 HTTP/1.1
379 HTTP/2.0
380
381
382
383
384
385
387 4.3. YANG Module
389 This YANG module has normative references to [RFC6991].
391 file "ietf-http-server@2019-10-18.yang"
393 module ietf-http-server {
394 yang-version 1.1;
395 namespace "urn:ietf:params:xml:ns:yang:ietf-http-server";
396 prefix https;
398 import iana-crypt-hash {
399 prefix ianach;
400 reference
401 "RFC 7317: A YANG Data Model for System Management";
402 }
404 import ietf-netconf-acm {
405 prefix nacm;
406 reference
407 "RFC 8341: Network Configuration Access Control Model";
408 }
410 organization
411 "IETF NETCONF (Network Configuration) Working Group";
413 contact
414 "WG Web:
415 WG List:
416 Author: Kent Watsen ";
418 description
419 "This module defines reusable groupings for HTTP servers that
420 can be used as a basis for specific HTTP server instances.
422 Copyright (c) 2019 IETF Trust and the persons identified
423 as authors of the code. All rights reserved.
425 Redistribution and use in source and binary forms, with
426 or without modification, is permitted pursuant to, and
427 subject to the license terms contained in, the Simplified
428 BSD License set forth in Section 4.c of the IETF Trust's
429 Legal Provisions Relating to IETF Documents
430 (https://trustee.ietf.org/license-info).
432 This version of this YANG module is part of RFC XXXX
433 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
434 itself for full legal notices.;
436 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
437 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
438 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
439 are to be interpreted as described in BCP 14 (RFC 2119)
440 (RFC 8174) when, and only when, they appear in all
441 capitals, as shown here.";
443 revision 2019-10-18 {
444 description
445 "Initial version";
446 reference
447 "RFC XXXX: YANG Groupings for HTTP Clients and HTTP Servers";
448 }
450 // Features
452 feature local-client-auth-supported {
453 description
454 "Indicates that the HTTP server supports local configuration
455 of client credentials.";
456 }
458 feature external-client-auth-supported {
459 description
460 "Indicates that the HTTP server supports external configuration
461 of client credentials.";
462 }
464 feature basic-auth {
465 description
466 "The 'basic-auth' feature indicates that the server
467 may be configured authenticate users using the 'basic'
468 HTTP authentication scheme.";
469 reference
470 "RFC 7617: The 'Basic' HTTP Authentication Scheme";
471 }
473 // Groupings
475 grouping http-server-grouping {
476 description
477 "A reusable grouping for configuring an HTTP server.
479 Note that this grouping uses fairly typical descendent
480 node names such that a stack of 'uses' statements will
481 have name conflicts. It is intended that the consuming
482 data model will resolve the issue (e.g., by wrapping
483 the 'uses' statement in a container called
484 'http-server-parameters'). This model purposely does
485 not do this itself so as to provide maximum flexibility
486 to consuming models.";
488 leaf server-name {
489 nacm:default-deny-write;
490 type string;
491 description
492 "The value of the 'Server' header field. If not set, then
493 underlying software's default value is used. Set to the
494 empty string to disable.";
495 }
497 container protocol-versions {
498 nacm:default-deny-write;
499 description
500 "A list of HTTP protocol versions supported by this
501 server.";
502 leaf-list protocol-version {
503 type enumeration {
504 enum "HTTP/1.0" {
505 description
506 "The server supports the 'HTTP/1.0' protocol.";
507 }
508 enum "HTTP/1.1" {
509 description
510 "The server supports the 'HTTP/1.1' protocol.";
511 }
512 enum "HTTP/2.0" {
513 description
514 "The server supports the 'HTTP/2.0' protocol.";
515 }
516 }
517 description
518 "An HTTP protocol version supported by this server.";
519 }
520 }
522 container client-authentication {
523 nacm:default-deny-write;
524 presence
525 "Indicates that HTTP based client authentication is
526 supported (i.e., the server will request that the
527 HTTP client send authenticate when needed). This
528 is needed as some HTTP-based protocols may only
529 support, e.g., TLS-level client authentication.";
530 description
531 "Specifies if HTTP client authentication is required or
532 optional, and specifies if the credentials needed to
533 authenticate the HTTP client are configured locally
534 or externally.";
535 choice required-or-optional {
536 mandatory true; // or default to 'required' ?
537 description
538 "Indicates if HTTP-level client authentication is required
539 or optional. This is necessary for some protocols (e.g.,
540 RESTCONF) that may optionally authenticate a client via
541 TLS-level authentication, HTTP-level authentication, or
542 both simultaneously).";
543 leaf required {
544 type empty;
545 description
546 "Indicates that HTTP-level client authentication is
547 required to access protected resources.";
548 }
549 leaf optional {
550 type empty;
551 description
552 "Indicates that HTTP-level client authentication is
553 optional to access protected resources.";
554 }
555 }
556 choice local-or-external {
557 mandatory true;
558 description
559 "Indicates if the client credentials are configured
560 locally or externally. The need to support external
561 configuration for client authentication stems from
562 the desire to support consuming data models that
563 prefer to place client authentication with client
564 definitions, rather then in a data model principally
565 concerned with configuring the transport.";
566 case local {
567 if-feature "local-client-auth-supported";
568 description
569 "Client credentials are configured locally.";
570 container users {
571 description
572 "A list of locally configured users.";
573 list user {
574 key user-id;
575 description
576 "The list of local users configured on this device.";
577 leaf user-id {
578 type string;
579 description
580 "The user-id for the authenticating client.";
581 }
582 choice auth-type {
583 description
584 "The authentication type.";
585 container basic {
586 if-feature "basic-auth";
587 leaf user-id {
588 type string;
589 description
590 "The user-id for the authenticating client.";
591 }
592 leaf password {
593 nacm:default-deny-write;
594 type ianach:crypt-hash;
595 description
596 "The password for the authenticating client.";
597 }
598 description
599 "The 'basic' HTTP scheme credentials.";
600 reference
601 "RFC 7617:
602 The 'Basic' HTTP Authentication Scheme";
603 }
604 }
605 }
606 }
607 }
608 case external {
609 if-feature "external-client-auth-supported";
610 description
611 "Client credentials are configured externally.";
612 leaf client-auth-defined-elsewhere {
613 type empty;
614 description
615 "Indicates that credentials needed to authenticate
616 clients are configured elsewhere.";
617 }
618 }
619 } // choice local-or-external
620 } // container client-authentication
622 }
623 }
625
627 5. Security Considerations
629 The YANG modules defined in this document are designed to be accessed
630 via YANG based management protocols, such as NETCONF [RFC6241] and
631 RESTCONF [RFC8040]. Both of these protocols have mandatory-to-
632 implement secure transport layers (e.g., SSH, HTTP) with mutual
633 authentication.
635 The NETCONF access control model (NACM) [RFC8341] provides the means
636 to restrict access for particular users to a pre-configured subset of
637 all available protocol operations and content.
639 Since the modules defined in this document only define groupings,
640 these considerations are primarily for the designers of other modules
641 that use these groupings.
643 There are a number of data nodes defined in the YANG modules that are
644 writable/creatable/deletable (i.e., config true, which is the
645 default). These data nodes may be considered sensitive or vulnerable
646 in some network environments. Write operations (e.g., edit-config)
647 to these data nodes without proper protection can have a negative
648 effect on network operations. These are the subtrees and data nodes
649 and their sensitivity/vulnerability:
651 FIXME: (pending - TBD)
653 Some of the readable data nodes in the YANG modules may be considered
654 sensitive or vulnerable in some network environments. It is thus
655 important to control read access (e.g., via get, get-config, or
656 notification) to these data nodes. These are the subtrees and data
657 nodes and their sensitivity/vulnerability:
659 FIXME: (pending client auth params?)
661 Some of the RPC operations in this YANG module may be considered
662 sensitive or vulnerable in some network environments. It is thus
663 important to control access to these operations. These are the
664 operations and their sensitivity/vulnerability:
666 The modules defined in this document do not define any 'RPC' or
667 'action' statements.
669 6. IANA Considerations
671 6.1. The IETF XML Registry
673 This document registers two URIs in the "ns" subregistry of the IETF
674 XML Registry [RFC3688]. Following the format in [RFC3688], the
675 following registrations are requested:
677 URI: urn:ietf:params:xml:ns:yang:ietf-http-client
678 Registrant Contact: The NETCONF WG of the IETF.
679 XML: N/A, the requested URI is an XML namespace.
681 URI: urn:ietf:params:xml:ns:yang:ietf-http-server
682 Registrant Contact: The NETCONF WG of the IETF.
683 XML: N/A, the requested URI is an XML namespace.
685 6.2. The YANG Module Names Registry
687 This document registers two YANG modules in the YANG Module Names
688 registry [RFC6020]. Following the format in [RFC6020], the following
689 registrations are requested:
691 name: ietf-http-client
692 namespace: urn:ietf:params:xml:ns:yang:ietf-http-client
693 prefix: httpc
694 reference: RFC XXXX
696 name: ietf-http-server
697 namespace: urn:ietf:params:xml:ns:yang:ietf-http-server
698 prefix: https
699 reference: RFC XXXX
701 7. References
703 7.1. Normative References
705 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
706 Requirement Levels", BCP 14, RFC 2119,
707 DOI 10.17487/RFC2119, March 1997,
708 .
710 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
711 the Network Configuration Protocol (NETCONF)", RFC 6020,
712 DOI 10.17487/RFC6020, October 2010,
713 .
715 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types",
716 RFC 6991, DOI 10.17487/RFC6991, July 2013,
717 .
719 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
720 RFC 7950, DOI 10.17487/RFC7950, August 2016,
721 .
723 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
724 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
725 May 2017, .
727 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration
728 Access Control Model", STD 91, RFC 8341,
729 DOI 10.17487/RFC8341, March 2018,
730 .
732 7.2. Informative References
734 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
735 DOI 10.17487/RFC3688, January 2004,
736 .
738 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
739 and A. Bierman, Ed., "Network Configuration Protocol
740 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
741 .
743 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
744 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
745 .
747 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
748 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
749 .
751 Author's Address
753 Kent Watsen
754 Watsen Networks
756 EMail: kent+ietf@watsen.net