netconfcentral logo

ietf-http-client

HTML

ietf-http-client@2020-08-20



  module ietf-http-client {

    yang-version 1.1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-http-client";

    prefix httpc;

    import ietf-netconf-acm {
      prefix nacm;
      reference
        "RFC 8341: Network Configuration Access Control Model";


    }
    import ietf-crypto-types {
      prefix ct;
      reference
        "RFC AAAA: YANG Data Types and Groupings for Cryptography";


    }
    import ietf-tcp-client {
      prefix tcpc;
      reference
        "RFC DDDD: YANG Groupings for TCP Clients and TCP Servers";


    }
    import ietf-tls-client {
      prefix tlsc;
      reference
        "RFC FFFF: YANG Groupings for TLS Clients and TLS Servers";


    }

    organization
      "IETF NETCONF (Network Configuration) Working Group";

    contact
      "WG Web:   <http://datatracker.ietf.org/wg/netconf/>
     WG List:  <mailto:netconf@ietf.org>
     Author:   Kent Watsen <mailto:kent+ietf@watsen.net>";

    description
      "This module defines reusable groupings for HTTP clients that
     can be used as a basis for specific HTTP client instances.

     Copyright (c) 2020 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 GGGG
     (https://www.rfc-editor.org/info/rfcGGGG); 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 "2020-08-20" {
      description "Initial version";
      reference
        "RFC GGGG: YANG Groupings for HTTP Clients and HTTP Servers";

    }


    feature proxy-connect {
      description
        "Proxy connection configuration is configurable for
       HTTP clients on the server implementing this feature.";
    }

    feature basic-auth {
      description
        "The 'basic-auth' feature indicates that the client
       may be configured to use the 'basic' HTTP authentication
       scheme.";
      reference
        "RFC 7617: The 'Basic' HTTP Authentication Scheme";

    }

    feature tcp-supported {
      description
        "Indicates that the server supports HTTP/TCP.";
    }

    feature tls-supported {
      description
        "Indicates that the server supports HTTP/TLS.";
    }

    grouping http-client-identity-grouping {
      description
        "A grouping to provide HTTP credentials used by the
       client to authenticate itself to the HTTP server.";
      container client-identity {
        nacm:default-deny-write;
        presence
          "Indicates that HTTP-level client authentication
         is sent.  Present so that the 'choice' node's
         mandatory true doesn't imply that a client
         identity must be configured.";
        description
          "The identity the HTTP client should use when
         authenticating itself to the HTTP server.";
        choice auth-type {
          mandatory true;
          description
            "A choice amongst available authentication types.";
          container basic {
            if-feature basic-auth;
            description
              "The 'basic' HTTP scheme credentials.";
            reference
              "RFC 7617: The 'Basic' HTTP Authentication Scheme";

            leaf user-id {
              type string;
              mandatory true;
              description
                "The user-id for the authenticating client.";
            }

            uses ct:password-grouping {
              description
                "The password for the authenticating client.";
            }
          }  // container basic
        }  // choice auth-type
      }  // container client-identity
    }  // grouping http-client-identity-grouping

    grouping http-client-grouping {
      description
        "A reusable grouping for configuring a HTTP client.

       This grouping is expected to be used in conjunction with
       other configurations providing, e.g., the hostname or IP
       address and port number the client initiates 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.

       FIXME: it is assumed that the application can construct any
       necessary HTTP path, e.g., via a YANG 'rpc' definition...ok?";
      uses http-client-identity-grouping;

      container proxy-connect {
        nacm:default-deny-write;
        if-feature proxy-connect;
        presence
          "Indicates that the HTTP-client is to connect thru an
         HTTP-level proxy server.  Present so that the 'choice'
         node's mandatory true doesn't imply that a proxy
         connection must be configured.";
        description "Proxy server settings.";
        choice proxy-type {
          mandatory true;
          description
            "Choice amongst proxy server types.";
          container http-proxy {
            description
              "Container for HTTP Proxy (Web Proxy) server
               configuration parameters.";
            container tcp-client-parameters {
              description
                "A wrapper around the TCP parameters to avoid
                 name collisions.";
              uses tcpc:tcp-client-grouping;
            }  // container tcp-client-parameters

            container http-client-parameters {
              description
                "A wrapper around the HTTP parameters to avoid
                 name collisions.";
              uses http-client-identity-grouping;
            }  // container http-client-parameters
          }  // container http-proxy
          container https-proxy {
            description
              "Container for HTTPS Proxy (Secure Web Proxy) server
               configuration parameters.";
            container tcp-client-parameters {
              description
                "A wrapper around the TCP parameters to avoid
                 name collisions.";
              uses tcpc:tcp-client-grouping;
            }  // container tcp-client-parameters

            container tls-client-parameters {
              description
                "A wrapper around the TLS parameters to avoid
                 name collisions.";
              uses tlsc:tls-client-grouping;
            }  // container tls-client-parameters

            container http-client-parameters {
              description
                "A wrapper around the HTTP parameters to avoid
                 name collisions.";
              uses http-client-identity-grouping;
            }  // container http-client-parameters
          }  // container https-proxy
        }  // choice proxy-type
      }  // container proxy-connect
    }  // grouping http-client-grouping

    grouping http-client-stack-grouping {
      description
        "A grouping that defines common HTTP-based protocol stacks.";
      choice transport {
        mandatory true;
        description
          "Choice amongst various transports type.  TCP, with and
         without TLS are defined here, with 'feature' statements
         so that they may be disabled.  Other transports MAY be
         augmented in as 'case' statements by future efforts.";
        case tcp {
          if-feature tcp-supported;
          container tcp {
            description
              "Container for TCP-based HTTP protocols.";
            container tcp-client-parameters {
              description
                "A wrapper around the TCP parameters to avoid
               name collisions.";
              uses tcpc:tcp-client-grouping;
            }  // container tcp-client-parameters

            container http-client-parameters {
              description
                "A wrapper around the HTTP parameters to avoid
               name collisions.";
              uses http-client-grouping;
            }  // container http-client-parameters
          }  // container tcp
        }  // case tcp

        case tls {
          if-feature tls-supported;
          container tls {
            description
              "Container for TLS-based HTTP protocols.";
            container tcp-client-parameters {
              description
                "A wrapper around the TCP parameters to avoid
               name collisions.";
              uses tcpc:tcp-client-grouping;
            }  // container tcp-client-parameters

            container tls-client-parameters {
              description
                "A wrapper around the TLS parameters to avoid
               name collisions.";
              uses tlsc:tls-client-grouping;
            }  // container tls-client-parameters

            container http-client-parameters {
              description
                "A wrapper around the HTTP parameters to avoid
               name collisions.";
              uses http-client-grouping;
            }  // container http-client-parameters
          }  // container tls
        }  // case tls
      }  // choice transport
    }  // grouping http-client-stack-grouping
  }  // module ietf-http-client

Summary

  
  
Organization IETF NETCONF (Network Configuration) Working Group
  
Module ietf-http-client
Version 2020-08-20
File ietf-http-client@2020-08-20.yang
  
Prefix httpc
Namespace urn:ietf:params:xml:ns:yang:ietf-http-client
  
Cooked /cookedmodules/ietf-http-client/2020-08-20
YANG /src/ietf-http-client@2020-08-20.yang
XSD /xsd/ietf-http-client@2020-08-20.xsd
  
Abstract This module defines reusable groupings for HTTP clients that can be used as a basis for specific HTTP client instances. Copyrig...
  
Contact
WG Web:   <http://datatracker.ietf.org/wg/netconf/>
WG List:  <mailto:netconf@ietf.org>
Author:   Kent Watsen <mailto:kent+ietf@watsen.net>

Description

 
This module defines reusable groupings for HTTP clients that
can be used as a basis for specific HTTP client instances.

Copyright (c) 2020 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 GGGG
(https://www.rfc-editor.org/info/rfcGGGG); 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.

Groupings

Grouping Objects Abstract
http-client-grouping client-identityproxy-connect A reusable grouping for configuring a HTTP client. This grouping is expected to be used in conjunction with other configurations providing, e.g., the hostname or IP address and port number the client initiates connections to. Note that this grouping use...
http-client-identity-grouping client-identity A grouping to provide HTTP credentials used by the client to authenticate itself to the HTTP server.
http-client-stack-grouping transport A grouping that defines common HTTP-based protocol stacks.