module ietf-http-client {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-http-client";
prefix httpc;
import ietf-tcp-client {
prefix tcpc;
reference
"RFC AAAA: YANG Groupings for TCP Clients and TCP Servers";
}
import ietf-tls-client {
prefix tlsc;
reference
"RFC BBBB: YANG Groupings for TLS Clients and TLS Servers";
}
import ietf-netconf-acm {
prefix nacm;
reference
"RFC 8341: Network Configuration Access Control Model";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web:
WG List:
Author: Kent Watsen ";
description
"This module defines reusable groupings for HTTP clients that
can be used as a basis for specific HTTP client instances.
Copyright (c) 2019 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 XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.;
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 (RFC 2119)
(RFC 8174) when, and only when, they appear in all
capitals, as shown here.";
revision 2019-04-29 {
description
"Initial version";
reference
"RFC XXXX: YANG Groupings for HTTP Clients and HTTP Servers";
}
// Features
feature proxy-connect {
description
"Proxy connection configuration is configurable for
HTTP clients on the server implementing this feature.";
}
feature basic-auth {
description
"fixme";
}
feature bearer-auth {
description
"fixme";
}
feature digest-auth {
description
"fixme";
}
feature hoba-auth {
description
"fixme";
}
feature mutual-auth {
description
"fixme";
}
feature negotiate-auth {
description
"fixme";
}
feature oauth-auth {
description
"fixme";
}
feature scram-sha-1-auth {
description
"fixme";
}
feature scram-sha-256-auth {
description
"fixme";
}
feature vapid-auth {
description
"fixme";
}
// Groupings
grouping http-client-grouping {
description
"A reusable grouping for configuring a HTTP client,
including the IP address and port number it initiates
a connections to.
Note that this grouping uses fairly typical descendent
node names such that a stack of 'uses' statements will
have name conflicts. It is intended that the consuming
data model will resolve the issue (e.g., by wrapping
the 'uses' statement in a container called
'http-client-parameters'). This model purposely does
not do this itself so as to provide maximum flexibility
to consuming models.";
leaf protocol-version {
nacm:default-deny-write;
type enumeration {
enum HTTP/1.0 {
description
"The client should use the 'HTTP/1.0' protocol.";
}
enum HTTP/1.1 {
description
"The client should use the 'HTTP/1.1' protocol.";
}
enum HTTP/2.0 {
description
"The client should use the 'HTTP/2.0' protocol.";
}
}
description
"The HTTP protocol version the client should use.";
} // leaf protocol-version
container client-identity {
nacm:default-deny-write;
description
"The credentials used by the client to authenticate to
the HTTP server.";
choice auth-type {
description
"The authentication type.";
container basic {
if-feature "basic-auth";
leaf user-id {
type string;
description
"The user-id for the authenticating client.";
}
leaf password {
nacm:default-deny-all;
type string;
description
"The password for the authenticating client.";
}
description
"The 'basic' HTTP scheme credentials.";
reference
"RFC 7617: The 'Basic' HTTP Authentication Scheme";
}
container bearer {
if-feature "bearer-auth";
leaf token {
type string;
description
"The bearer token for the authenticating client,
encoded in base64, as described in RFC 6750,
Section 2.1.";
}
description
"The 'bearer' HTTP scheme credentials.";
reference
"RFC 6750: The OAuth 2.0 Authorization Framework:
Bearer Token Usage";
}
container digest {
if-feature "digest-auth";
leaf username {
type string;
description
"The username for the authenticating client.";
}
leaf password {
nacm:default-deny-all;
type string;
description
"The password for the authenticating client.";
}
description
"The 'digest' HTTP scheme credentials.";
reference
"RFC 7616: HTTP Digest Access Authentication";
}
container hoba {
if-feature "hoba-auth";
// FIXME
description
"The 'hoba' HTTP scheme credentials.";
reference
"RFC 7486: HTTP Origin-Bound Authentication (HOBA)";
}
container mutual {
if-feature "mutual-auth";
// FIXME
description
"The 'mutual' HTTP scheme credentials.";
reference
"RFC 8120: Mutual Authentication Protocol for HTTP";
}
container negotiate {
if-feature "negotiate-auth";
// FIXME
description
"The 'negotiate' HTTP scheme credentials.";
reference
"RFC 4559: SPNEGO-based Kerberos and NTLM HTTP
Authentication in Microsoft Windows";
}
container oauth {
if-feature "oauth-auth";
// FIXME
description
"The 'oauth' HTTP scheme credentials.";
reference
"RFC 6749: The OAuth 2.0 Authorization Framework";
}
container scram-sha-1 {
if-feature "scram-sha-1-auth";
// FIXME
description
"The 'scram-sha-1' HTTP scheme credentials.";
reference
"RFC 7804: Salted Challenge Response HTTP
Authentication Mechanism";
}
container scram-sha-256 {
if-feature "scram-sha-256-auth";
// FIXME
description
"The 'scram-sha-256' HTTP scheme credentials.";
reference
"RFC 7804: Salted Challenge Response HTTP
Authentication Mechanism";
}
container vapid {
if-feature "vapid-auth";
// FIXME
description
"The 'vapid' HTTP scheme credentials.";
reference
"RFC 8292: Voluntary Application Server
Identification (VAPID) for Web Push";
}
}
} // container client-identity
container proxy-server {
nacm:default-deny-write;
if-feature "proxy-connect";
presence true; // only so ex-http-client can pass validation?
container tcp-client-parameters {
description
"A wrapper around the TCP parameters to avoid
name collisions.";
uses "tcpc:tcp-client-grouping";
}
container tls-client-parameters {
description
"A wrapper around the TLS parameters to avoid
name collisions.";
uses "tlsc:tls-client-grouping";
}
container proxy-client-identity {
leaf user-id {
type string;
description
"The user-id for the authenticating client.";
}
leaf password {
nacm:default-deny-all;
type string;
description
"The password for the authenticating client.";
}
description
"The 'basic' HTTP scheme credentials.";
reference
"RFC 7617: The 'Basic' HTTP Authentication Scheme";
}
description
"Proxy server settings.";
} // container proxy-server
} //grouping http-client-grouping
}