1 module ietf-http-server {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-http-server";
6 import iana-crypt-hash {
9 "RFC 7317: A YANG Data Model for System Management";
12 import ietf-netconf-acm {
15 "RFC 8341: Network Configuration Access Control Model";
18 import ietf-tcp-server {
21 "RFC DDDD: YANG Groupings for TCP Clients and TCP Servers";
24 import ietf-tls-server {
27 "RFC FFFF: YANG Groupings for TLS Clients and TLS Servers";
31 "IETF NETCONF (Network Configuration) Working Group";
34 "WG Web: https://datatracker.ietf.org/wg/netconf
35 WG List: NETCONF WG list <mailto:netconf@ietf.org>
36 Author: Kent Watsen <mailto:kent+ietf@watsen.net>";
39 "This module defines reusable groupings for HTTP servers that
40 can be used as a basis for specific HTTP server instances.
42 Copyright (c) 2023 IETF Trust and the persons identified
43 as authors of the code. All rights reserved.
45 Redistribution and use in source and binary forms, with
46 or without modification, is permitted pursuant to, and
47 subject to the license terms contained in, the Revised
48 BSD License set forth in Section 4.c of the IETF Trust's
49 Legal Provisions Relating to IETF Documents
50 (https://trustee.ietf.org/license-info).
52 This version of this YANG module is part of RFC GGGG
53 (https://www.rfc-editor.org/info/rfcGGGG); see the RFC
54 itself for full legal notices.
56 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
57 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
58 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
59 are to be interpreted as described in BCP 14 (RFC 2119)
60 (RFC 8174) when, and only when, they appear in all
61 capitals, as shown here.";
67 "RFC GGGG: YANG Groupings for HTTP Clients and HTTP Servers";
72 feature client-auth-supported {
74 "Indicates that the server supports configuring HTTP
75 servers to authenticate HTTP clients. HTTP-level client
76 authentication may not be needed when client authentication
77 is expected to occur only at another protocol layer (e.g.,
81 feature local-users-supported {
82 if-feature "client-auth-supported";
84 "Indicates that the server supports configuring client
85 authentication with its own database of local users, as
86 opposed to in an application specific location.";
90 if-feature "local-users-supported";
92 "Indicates that the server supports configuring 'basic'
93 authentication credentials in its local user database.";
95 "RFC 7617: The 'Basic' HTTP Authentication Scheme";
98 feature tcp-supported {
100 "Indicates that the server supports configuring HTTP
101 servers to listen for HTTP 1.1/2.0 connections over TCP.";
103 "RFC 9110: HTTP Semantics";
106 feature tls-supported {
108 "Indicates that the server supports configuring HTTP
109 servers to listen for HTTP 1.1/2.0 connections over TLS.";
111 "RFC 9110: HTTP Semantics";
116 grouping http-server-grouping {
118 "A reusable grouping for configuring an HTTP server.
120 Note that this grouping uses fairly typical descendant
121 node names such that a stack of 'uses' statements will
122 have name conflicts. It is intended that the consuming
123 data model will resolve the issue (e.g., by wrapping
124 the 'uses' statement in a container called
125 'http-server-parameters'). This model purposely does
126 not do this itself so as to provide maximum flexibility
127 to consuming models.";
130 nacm:default-deny-write;
133 "The value of the 'Server' header field. If not set, then
134 underlying software's default value is used. Set to the
135 empty string to disable.";
138 container client-authentication {
139 if-feature "client-auth-supported";
140 nacm:default-deny-write;
142 "Indicates that HTTP based client authentication is
143 configured. This statement is present so the mandatory
144 descendant nodes do not imply that this node must be
147 "Configures how the HTTP server can authenticate HTTP
148 clients. The HTTP server will request that the HTTP
149 client send authentication when needed.";
151 if-feature "local-users-supported";
153 "A list of locally configured users.";
157 "The list of local users configured on this device.";
161 "The user-id for the authenticating client.";
166 "The authentication type.";
169 if-feature "basic-auth";
173 "The user-id for the authenticating client.";
176 nacm:default-deny-write;
177 type ianach:crypt-hash;
179 "The password for the authenticating client.";
182 "The 'basic' HTTP scheme credentials.";
185 The 'Basic' HTTP Authentication Scheme";
191 } // container client-authentication
192 } // grouping http-server-grouping
194 grouping http-server-stack-grouping {
196 "A grouping that defines common HTTP-based protocol stacks.";
200 "Choice amongst various transports type. TCP, with and
201 without TLS are defined here, with 'feature' statements
202 so that they may be disabled. Other transports MAY be
203 augmented in as 'case' statements by future efforts.";
205 if-feature "tcp-supported";
208 "Container for TCP-based HTTP protocols.";
209 container tcp-server-parameters {
211 "A wrapper around the TCP parameters to avoid
213 uses tcps:tcp-server-grouping;
215 container http-server-parameters {
217 "A wrapper around the HTTP parameters to avoid
219 uses http-server-grouping;
224 if-feature "tls-supported";
227 "Container for TLS-based HTTP protocols.";
228 container tcp-server-parameters {
230 "A wrapper around the TCP parameters to avoid
232 uses tcps:tcp-server-grouping;
234 container tls-server-parameters {
236 "A wrapper around the TLS parameters to avoid
238 uses tlss:tls-server-grouping;
240 container http-server-parameters {
242 "A wrapper around the HTTP parameters to avoid
244 uses http-server-grouping;
249 } // http-server-stack-grouping