1 module ietf-http-server {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-http-server";
6 import ietf-yang-types {
9 "RFC 6991: Common YANG Data Types";
12 import iana-crypt-hash {
15 "RFC 7317: A YANG Data Model for System Management";
18 import ietf-netconf-acm {
21 "RFC 8341: Network Configuration Access Control Model";
24 import ietf-tcp-server {
27 "RFC DDDD: YANG Groupings for TCP Clients and TCP Servers";
30 import ietf-tls-server {
33 "RFC FFFF: YANG Groupings for TLS Clients and TLS Servers";
37 "IETF NETCONF (Network Configuration) Working Group";
40 "WG Web: https://datatracker.ietf.org/wg/netconf
41 WG List: NETCONF WG list <mailto:netconf@ietf.org>
42 Author: Kent Watsen <mailto:kent+ietf@watsen.net>";
45 "This module defines reusable groupings for HTTP servers that
46 can be used as a basis for specific HTTP server instances.
48 Copyright (c) 2024 IETF Trust and the persons identified
49 as authors of the code. All rights reserved.
51 Redistribution and use in source and binary forms, with
52 or without modification, is permitted pursuant to, and
53 subject to the license terms contained in, the Revised
54 BSD License set forth in Section 4.c of the IETF Trust's
55 Legal Provisions Relating to IETF Documents
56 (https://trustee.ietf.org/license-info).
58 This version of this YANG module is part of RFC GGGG
59 (https://www.rfc-editor.org/info/rfcGGGG); see the RFC
60 itself for full legal notices.
62 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
63 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
64 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
65 are to be interpreted as described in BCP 14 (RFC 2119)
66 (RFC 8174) when, and only when, they appear in all
67 capitals, as shown here.";
73 "RFC GGGG: YANG Groupings for HTTP Clients and HTTP Servers";
78 feature client-auth-supported {
80 "Indicates that the server supports configuring HTTP
81 servers to authenticate HTTP clients. HTTP-level client
82 authentication may not be needed when client authentication
83 is expected to occur only at another protocol layer (e.g.,
87 feature local-users-supported {
88 if-feature "client-auth-supported";
90 "Indicates that the server supports configuring client
91 authentication with its own database of local users, as
92 opposed to in an application specific location.";
96 if-feature "local-users-supported";
98 "Indicates that the server supports configuring 'basic'
99 authentication credentials in its local user database.";
101 "RFC 7617: The 'Basic' HTTP Authentication Scheme";
104 feature tcp-supported {
106 "Indicates that the server supports configuring HTTP
107 servers to listen for HTTP 1.1/2.0 connections over TCP.";
109 "RFC 9110: HTTP Semantics";
112 feature tls-supported {
114 "Indicates that the server supports configuring HTTP
115 servers to listen for HTTP 1.1/2.0 connections over TLS.";
117 "RFC 9110: HTTP Semantics";
122 grouping http-server-grouping {
124 "A reusable grouping for configuring an HTTP server.
126 Note that this grouping uses fairly typical descendant
127 node names such that a stack of 'uses' statements will
128 have name conflicts. It is intended that the consuming
129 data model will resolve the issue (e.g., by wrapping
130 the 'uses' statement in a container called
131 'http-server-parameters'). This model purposely does
132 not do this itself so as to provide maximum flexibility
133 to consuming models.";
136 nacm:default-deny-write;
139 "The value of the 'Server' header field. If not set, then
140 underlying software's default value is used. Set to the
141 empty string to disable.";
144 container client-authentication {
145 if-feature "client-auth-supported";
146 nacm:default-deny-write;
148 "Indicates that HTTP based client authentication is
149 configured. This statement is present so the mandatory
150 descendant nodes do not imply that this node must be
153 "Configures how the HTTP server can authenticate HTTP
154 clients. The HTTP server will request that the HTTP
155 client send authentication when needed.";
157 if-feature "local-users-supported";
159 "A list of locally configured users.";
163 "The list of local users configured on this device.";
167 "The user-id for the authenticating client.";
172 "The authentication type.";
175 if-feature "basic-auth";
179 "The username for the authenticating HTTP
184 "The hashed password the HTTP server uses to
185 authenticate this user. A user is authenticated
186 if the hash of the supplied password matches
188 leaf hashed-password {
189 type ianach:crypt-hash;
191 "The password for the authenticating client.";
194 type yang:date-and-time;
197 "Identifies when the password was last set.";
201 "The 'basic' HTTP scheme credentials.";
204 The 'Basic' HTTP Authentication Scheme";
210 } // container client-authentication
211 } // grouping http-server-grouping
213 grouping http-server-stack-grouping {
215 "A grouping that defines common HTTP-based protocol stacks.";
219 "Choice amongst various transports type. TCP, with and
220 without TLS are defined here, with 'feature' statements
221 so that they may be disabled. Other transports MAY be
222 augmented in as 'case' statements by future efforts.";
224 if-feature "tcp-supported";
227 "Container for TCP-based HTTP protocols.";
228 container tcp-server-parameters {
230 "TCP-level server parameters to
231 listen for HTTP connections.";
232 uses tcps:tcp-server-grouping;
234 container http-server-parameters {
236 "HTTP-level server parameters to
237 listen for HTTP connections.";
238 uses http-server-grouping;
243 if-feature "tls-supported";
246 "Container for TLS-based HTTP protocols.";
247 container tcp-server-parameters {
249 "TCP-level server parameters to
250 listen for HTTPS connections.";
251 uses tcps:tcp-server-grouping;
253 container tls-server-parameters {
255 "TLS-level server parameters to
256 listen for HTTPS connections.";
257 uses tlss:tls-server-grouping;
259 container http-server-parameters {
261 "HTTP-level server parameters to
262 listen for HTTPS connections.";
263 uses http-server-grouping;
268 } // http-server-stack-grouping