.. _clixon_restconf: .. sectnum:: :start: 11 :depth: 3 ******** RESTCONF ******** .. This is a comment Clixon supports two RESTCONF compile-time variants: *FCGI* and *Native*. Architecture ============ .. image:: restconf1.jpg :width: 100% The restconf deamon provides a http/https RESTCONF interface to the Clixon backend. It comes in two variants, as shown in the figure above: 1. Native http, which combines a HTTP and Restconf server. Further, HTTP configuration is made using Clixon. 2. A reverse proxy (such as NGINX) and FastCGI where web and restconf function is separated. NGINX is used to make all HTTP configuration. The restconf daemon communicates with the backend using internal netconf over the ``CLIXON_SOCK``. If FCGI is used, there is also a FCGI socket specified by ``fcgi-socket`` in ``clixon-config/restconf``. The restconf daemon reads its initial config options from the configuration file on startup. The native http variant can read config options from the backend as an alternative to reading everything from clixon options. You can add plugins to the restconf daemon, where the primary usecase is authentication, using the ``ca_auth`` callback. Note that there is some complexity in the configuration of the different variants of native Clixon restconf involving HTTP/1 vs HTTP/2, TLS vs plain HTTP, client cert vs basic authentication and external vs internal daemon start. Further, ALPN is used to select http/1 or http/2 in HTTPS. Installation ============ The RESTCONF daemon can be configured for compile-time (by autotools) as follows: --disable-http1 Disable native http/1.1 (ie http/2 only) --disable-nghttp2 Disable native http/2 using libnghttp2 (ie http/1 only) --with-restconf=native RESTCONF using native http. (DEFAULT) --with-restconf=fcgi RESTCONF using fcgi/ reverse proxy. --without-restconf No RESTCONF After that perform system-wide compilation:: make && sudo make install Command-line options ==================== The restconf daemon have the following command-line options: -h Help -V Show version and exit -D Debug level -f Clixon config file -E Extra configuration directory -l