]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3844] backport #3833 to v2_6
authorRazvan Becheriu <razvan@isc.org>
Tue, 20 May 2025 17:33:18 +0000 (20:33 +0300)
committerRazvan Becheriu <razvan@isc.org>
Tue, 20 May 2025 18:08:44 +0000 (21:08 +0300)
43 files changed:
doc/examples/agent/simple.json
doc/examples/ddns/all-keys.json
doc/examples/ddns/sample1.json
doc/examples/kea4/all-keys-netconf.json
doc/examples/kea4/all-keys.json
doc/examples/netconf/kea-dhcp6-operations/BAD-config.xml
doc/examples/netconf/kea-dhcp6-operations/BAD-schema.xml
doc/examples/netconf/kea-dhcp6-operations/BAD-translator.xml
doc/examples/netconf/kea-dhcp6-operations/boot.json
doc/examples/netconf/kea-dhcp6-operations/logging.xml
doc/examples/netconf/kea-dhcp6-operations/netconf.json
doc/examples/netconf/kea-dhcp6-operations/startup.xml
doc/examples/netconf/kea-dhcp6-operations/twopools.xml
doc/examples/netconf/kea-dhcp6-operations/twosubnets.xml
doc/examples/template-ha-mt-tls/kea-ca-1.conf
doc/examples/template-ha-mt-tls/kea-ca-2.conf
doc/examples/template-ha-mt-tls/kea-dhcp4-1.conf
doc/examples/template-ha-mt-tls/kea-dhcp4-2.conf
doc/examples/template-power-user-home/kea-ca-1.conf
doc/examples/template-power-user-home/kea-ca-2.conf
doc/examples/template-power-user-home/kea-dhcp4-1.conf
doc/examples/template-power-user-home/kea-dhcp4-2.conf
doc/sphinx/arm/agent.rst
doc/sphinx/arm/ddns.rst
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
doc/sphinx/arm/ext-gss-tsig.rst
doc/sphinx/arm/ext-netconf.rst
doc/sphinx/arm/hooks-ha.rst
doc/sphinx/arm/hooks-host-cache.rst
doc/sphinx/arm/hooks-lease-cmds.rst
doc/sphinx/arm/hooks-user-chk.rst
doc/sphinx/arm/security.rst
doc/sphinx/index.rst
src/bin/netconf/netconf_config.h
src/hooks/dhcp/user_chk/libdhcp_user_chk.dox
src/hooks/dhcp/user_chk/load_unload.cc
src/lib/config/client_connection.h
src/lib/d2srv/d2_config.h
src/lib/yang/adaptor.h
src/lib/yang/translator_config.h
src/lib/yang/translator_control_socket.h
src/share/api/cache-load.json

index 1b249b2479e2a1549878b77390f6dd4a60a53f36..80539e626adadf48cf5678b2bb752d28e9676fde 100644 (file)
@@ -28,7 +28,7 @@
 
             // This optional parameter can be used to specify a common
             // prefix for files handling client credentials.
-            "directory": "/tmp/kea-creds",
+            "directory": "/usr/local/share/kea/kea-creds",
 
             // This list specifies the user ids and passwords to use for
             // basic HTTP authentication. If empty or not present any client
                     "password": "1234"
                 },
 
-                // This specifies a hiddent client.
+                // This specifies a hidden client.
                 {
-                    // The user id is the content of the file /tmp/kea-creds/hiddenu.
+                    // The user id is the content of the file /usr/local/share/kea/kea-creds/hiddenu.
                     "user-file": "hiddenu",
 
-                    // The password is the content of the file /tmp/kea-creds/hiddenp.
+                    // The password is the content of the file /usr/local/share/kea/kea-creds/hiddenp.
                     "password-file": "hiddenp"
                 },
 
                 // This specifies a hidden client using a secret in a file.
                 {
-                    // The secret is the content of the file /tmp/kea-creds/hiddens
+                    // The secret is the content of the file /usr/local/share/kea/kea-creds/hiddens
                     // which must be in the <user-id>:<password> format.
                     "password-file": "hiddens"
                 }
                 "name": "kea-ctrl-agent",
                 "output-options": [
                     {
-                        "output": "/var/log/kea-ctrl-agent.log",
+                        "output": "/var/log/kea/kea-ctrl-agent.log",
                         // Several additional parameters are possible in addition
                         // to the typical output. Flush determines whether logger
                         // flushes output to a file. Maxsize determines maximum
index 5d562c85f453fe0f2668f7221c37e44bfdbab1e7..02411a1870677d5995c490cfefc407a8ff5e4585 100644 (file)
 
             // An alternative to secret: specify a file where the secret
             // can be found. i.e. the secret is the content of the file.
-            "secret-file": "/tmp/d2-sha1-secret"
+            "secret-file": "/usr/local/share/kea/d2-sha1-secret"
         }
     ],
 
index 2c43ba920ae2bc9f2533cbd072b37ff85840e10b..3766700440a490f2af5c37e7c71c685f25c1b88b 100644 (file)
         {
             "name": "d2.sha256.key",
             "algorithm": "HMAC-SHA256",
-            "secret-file": "/tmp/d2-sha256-secret"
+            "secret-file": "/usr/local/share/kea/d2-sha256-secret"
         },
         {
             "name": "d2.sha512.key",
index 42d50624045cc4b9be734e3fca124165f0ba3d6f..0963399053f4bd2f75305548a5af07b91e2e04f0 100644 (file)
@@ -26,7 +26,7 @@
         "client-classes": [
             {
                 // Class-specific bootfile name to be set in the 'file' field.
-                "boot-file-name": "/tmp/bootfile.efi",
+                "boot-file-name": "/usr/local/share/kea/bootfile.efi",
 
                 // Class name.
                 "name": "phones_server1",
index ea00a073046710d76888f175e19a357b84bc36a7..13150869b935eaefc4ea0a12e0641eb054b0316b 100644 (file)
@@ -26,7 +26,7 @@
         "client-classes": [
             {
                 // Class-specific bootfile name to be set in the 'file' field.
-                "boot-file-name": "/tmp/bootfile.efi",
+                "boot-file-name": "/usr/local/share/kea/bootfile.efi",
 
                 // Class name.
                 "name": "phones_server1",
index 5da5cfa5d1af349b2fb84d399f17a4cbf697525e..089baa180af5bb712bf4fd22203829be25453b82 100644 (file)
@@ -12,7 +12,7 @@
     <interfaces>eth1</interfaces>
   </interfaces-config>
   <control-socket>
-    <socket-name>/tmp/kea6-ctrl-socket</socket-name>
+    <socket-name>kea6-ctrl-socket</socket-name>
     <socket-type>unix</socket-type>
   </control-socket>
 </config>
index c17390243e29123f3073d46ee28762abdedc2e6d..f143e20999fb1c22b4ae4010108dde8bacc83b02 100644 (file)
@@ -12,7 +12,7 @@
     <interfaces>eth1</interfaces>
   </interfaces-config>
   <control-socket>
-    <socket-name>/tmp/kea6-ctrl-socket</socket-name>
+    <socket-name>kea6-ctrl-socket</socket-name>
     <socket-type>unix</socket-type>
   </control-socket>
 </config>
index 128693173cb2c0a5c7fe796ecc164a409d942f1f..12898feefa229302cf2f3f0595640274ea3ccc93 100644 (file)
@@ -12,7 +12,7 @@
     <interfaces>eth1</interfaces>
   </interfaces-config>
   <control-socket>
-    <socket-name>/tmp/kea6-ctrl-socket</socket-name>
+    <socket-name>kea6-ctrl-socket</socket-name>
     <socket-type>unix</socket-type>
   </control-socket>
   <user-context>bad</user-context>
index 18d1da8901b8fc1729ed761330126a033dc7e4d2..c0c98125ad21783f5b6dd1f9a8469905545bebb9 100644 (file)
@@ -2,7 +2,7 @@
     "Dhcp6": {
         "control-socket": {
             "socket-type": "unix",
-            "socket-name": "/tmp/kea6-ctrl-socket"
+            "socket-name": "kea6-ctrl-socket"
         }
     }
 }
index 7ce04e468219d7ca51abe6d8a45a2f24097fca4a..018551dafb6bba6e2e153e5263af757649ea45e5 100644 (file)
@@ -12,7 +12,7 @@
     <subnet>2001:db8::/64</subnet>
   </subnet6>
   <control-socket>
-    <socket-name>/tmp/kea6-ctrl-socket</socket-name>
+    <socket-name>kea6-ctrl-socket</socket-name>
     <socket-type>unix</socket-type>
   </control-socket>
   <logger>
index 653a40c7eb21b926779e344f205447565ed12593..1e7e0fa5a6d2329efb81efbcf0a54b5b7607639b 100644 (file)
@@ -8,7 +8,7 @@
                 "control-socket":
                 {
                     "socket-type": "unix",
-                    "socket-name": "/tmp/kea6-ctrl-socket"
+                    "socket-name": "kea6-ctrl-socket"
                 }
             }
         },
index b085833b14f9fcd38abce825156e981f26fec3ab..14d69e4db057cb0fb5586dc75a744b4434064e98 100644 (file)
@@ -12,7 +12,7 @@
     <interfaces>eth1</interfaces>
   </interfaces-config>
   <control-socket>
-    <socket-name>/tmp/kea6-ctrl-socket</socket-name>
+    <socket-name>kea6-ctrl-socket</socket-name>
     <socket-type>unix</socket-type>
   </control-socket>
 </config>
index 8fb32c9d940c6bd96a415a756fb3d53f954576f7..1b44462870ccac568d1d4b341d63b59807b1ce8c 100644 (file)
@@ -17,7 +17,7 @@
     <interfaces>eth1</interfaces>
   </interfaces-config>
   <control-socket>
-    <socket-name>/tmp/kea6-ctrl-socket</socket-name>
+    <socket-name>kea6-ctrl-socket</socket-name>
     <socket-type>unix</socket-type>
   </control-socket>
 </config>
index ba68a060ad10e01aa04b614c82fc63fc879db799..4e6378a374a6862c0215ecc93e7ac4078b5e520f 100644 (file)
@@ -21,7 +21,7 @@
     <interfaces>eth1</interfaces>
   </interfaces-config>
   <control-socket>
-    <socket-name>/tmp/kea6-ctrl-socket</socket-name>
+    <socket-name>kea6-ctrl-socket</socket-name>
     <socket-type>unix</socket-type>
   </control-socket>
 </config>
index 765dd9cc218e2c57eb1998565af81170c328da4e..1ed335e358ca4cf89d0b9af79e6ee3b3c8d6ca69 100644 (file)
             {
                 "comment": "socket to DHCPv4 server",
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea4-ctrl-socket"
+                "socket-name": "kea4-ctrl-socket"
             },
 
             // Location of the DHCPv6 command channel socket.
             "dhcp6":
             {
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea6-ctrl-socket"
+                "socket-name": "kea6-ctrl-socket"
             },
 
             // Location of the D2 command channel socket.
             "d2":
             {
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea-ddns-ctrl-socket",
+                "socket-name": "kea-ddns-ctrl-socket",
                 "user-context": { "in-use": false }
             }
         },
index 72eb73b1b11014f37372f19741baf4c3313d31c2..31d8b898f89d49e7806863608e60932ee73a1b46 100644 (file)
             {
                 "comment": "socket to DHCPv4 server",
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea4-ctrl-socket"
+                "socket-name": "kea4-ctrl-socket"
             },
 
             // Location of the DHCPv6 command channel socket.
             "dhcp6":
             {
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea6-ctrl-socket"
+                "socket-name": "kea6-ctrl-socket"
             },
 
             // Location of the D2 command channel socket.
             "d2":
             {
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea-ddns-ctrl-socket",
+                "socket-name": "kea-ddns-ctrl-socket",
                 "user-context": { "in-use": false }
             }
         },
index 0dc11983e55442a9d4c0b015c6d61d07811a19c9..b080a92f1cd5f16c86ff76aacfeb4b4c332e2801 100644 (file)
@@ -31,7 +31,7 @@
     // API between the HA peers.
     "control-socket": {
         "socket-type": "unix",
-        "socket-name": "/tmp/kea4-ctrl-socket"
+        "socket-name": "kea4-ctrl-socket"
     },
 
     // Multi-threading parameters.
index 070569b2a762a4e185665d2cc69694b65888819b..d00ac2254cf141f72850ddfa6d618bfa7cc5c817 100644 (file)
@@ -31,7 +31,7 @@
     // API between the HA peers.
     "control-socket": {
         "socket-type": "unix",
-        "socket-name": "/tmp/kea4-ctrl-socket"
+        "socket-name": "kea4-ctrl-socket"
     },
 
     // Multi-threading parameters.
index 9139008794491a218228e6f71fc3fb28ad004cb8..42d421926c4138103d6b5d599166630dcb19c1ae 100644 (file)
             {
                 "comment": "socket to DHCPv4 server",
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea4-ctrl-socket"
+                "socket-name": "kea4-ctrl-socket"
             },
 
             // Location of the DHCPv6 command channel socket.
             "dhcp6":
             {
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea6-ctrl-socket"
+                "socket-name": "kea6-ctrl-socket"
             },
 
             // Location of the D2 command channel socket.
             "d2":
             {
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea-ddns-ctrl-socket",
+                "socket-name": "kea-ddns-ctrl-socket",
                 "user-context": { "in-use": false }
             }
         },
index f36c850abac72a656d33c4cdf14fcf350f8c75e0..518a871ebe3722faeed514d438984ad2dbd51ea2 100644 (file)
             {
                 "comment": "socket to DHCPv4 server",
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea4-ctrl-socket"
+                "socket-name": "kea4-ctrl-socket"
             },
 
             // Location of the DHCPv6 command channel socket.
             "dhcp6":
             {
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea6-ctrl-socket"
+                "socket-name": "kea6-ctrl-socket"
             },
 
             // Location of the D2 command channel socket.
             "d2":
             {
                 "socket-type": "unix",
-                "socket-name": "/tmp/kea-ddns-ctrl-socket",
+                "socket-name": "kea-ddns-ctrl-socket",
                 "user-context": { "in-use": false }
             }
         },
index d4a9d705609c3ce0706ea15dadaeda9608fc96fb..3ee7137978d535003691d135a23521f722472c9b 100644 (file)
@@ -31,7 +31,7 @@
     // API between the HA peers.
     "control-socket": {
         "socket-type": "unix",
-        "socket-name": "/tmp/kea4-ctrl-socket"
+        "socket-name": "kea4-ctrl-socket"
     },
 
     // Use Memfile lease database backend to store leases in a CSV file.
index f75a99775e33eda0d40258691a3f02b6114bc550..3a535a2aaa4bba4f45abdcc938e5f12f16c30fe9 100644 (file)
@@ -31,7 +31,7 @@
     // API between the HA peers.
     "control-socket": {
         "socket-type": "unix",
-        "socket-name": "/tmp/kea4-ctrl-socket"
+        "socket-name": "kea4-ctrl-socket"
     },
 
     // Use Memfile lease database backend to store leases in a CSV file.
index 1581a05976419f6218838ed9f00e621bdffbf1ed..682a151dac1d14ae3cdaae6ef05d01b69a122ae2 100644 (file)
@@ -138,12 +138,13 @@ specified for the DHCPv4, DHCPv6, and D2 services.
 .. note::
 
     As of Kea 2.6.3, control sockets may only reside in the directory
-    determined during compilation as ``"[kea-install-dir]/var/run/kea"``. This
-    path may be overridden at startup by setting the environment variable
-    ``KEA_CONTROL_SOCKET_DIR`` to the desired path.  If a path other than
-    this value is used in ``socket-name``, Kea will emit an error and refuse to
-    start or, if already running, log an unrecoverable error.  For ease of use in
-    simply omit the path component from ``socket-name``.
+    determined during compilation as ``"[kea-install-dir]/var/run/kea"``,
+    which must also have ``0750`` access rights. This path may be overridden
+    at startup by setting the environment variable ``KEA_CONTROL_SOCKET_DIR``
+    to the desired path.  If a path other than this value is used in
+    ``socket-name``, Kea will emit an error and refuse to start or, if already
+    running, log an unrecoverable error.  For ease of use in simply omit the
+    path component from ``socket-name``.
 
 User contexts can store arbitrary data as long as they are in valid JSON
 syntax and their top-level element is a map (i.e. the data must be
@@ -173,7 +174,7 @@ authorized.
 When the ``clients`` authentication list is configured and not empty,
 basic HTTP authentication is required. Each element of the list
 specifies a user ID and a password. The user ID is mandatory, must
-be not empty, and must not contain the colon (:) character. The
+not be empty, and must not contain the colon (:) character. The
 password is optional; when it is not specified an empty password
 is used.
 
@@ -216,45 +217,8 @@ the example above.
 Secure Connections
 ==================
 
-The Kea Control Agent natively supports secure
-HTTP connections using TLS. This allows protection against users from
-the node where the agent runs, something that a reverse proxy cannot
-provide. More about TLS/HTTPS support in Kea can be found in :ref:`tls`.
-
-TLS is configured using three string parameters with file names, and
-a boolean parameter:
-
--  The ``trust-anchor`` specifies the Certification Authority file name or
-   directory path.
-
--  The ``cert-file`` specifies the server certificate file name.
-
--  The ``key-file`` specifies the private key file name. The file must not
-   be encrypted.
-
--  The ``cert-required`` specifies whether client certificates are required
-   or optional. The default is to require them and to perform mutual
-   authentication.
-
-The file format is PEM. Either all the string parameters are specified and
-HTTP over TLS (HTTPS) is used, or none is specified and plain HTTP is used.
-Configuring only one or two string parameters results in an error.
-
-.. note::
-
-   When client certificates are not required, only the server side is
-   authenticated, i.e. the communication is encrypted with an unknown
-   client. This protects only against passive attacks; active
-   attacks, such as "man-in-the-middle," are still possible.
-
-.. note::
-
-   No standard HTTP authentication scheme cryptographically binds its end
-   entity with TLS. This means that the TLS client and server can be
-   mutually authenticated, but there is no proof they are the same as
-   for the HTTP authentication.
-
-The :iscman:`kea-shell` tool also supports TLS.
+Configuration options related to Kea Control Agent security can be found in the
+:ref:`secure-control-agent` section.
 
 .. _agent-launch:
 
index 7cb114dac5c267c9e61ceb19c8edcfb3e8924db4..c44736a0ac255bf03949854037531aeb94d36926 100644 (file)
@@ -306,12 +306,13 @@ values are 107 on Linux and 103 on FreeBSD.
 .. note::
 
     As of Kea 2.6.3, control sockets may only reside in the directory
-    determined during compilation as ``"[kea-install-dir]/var/run/kea"``. This
-    path may be overridden at startup by setting the environment variable
-    ``KEA_CONTROL_SOCKET_DIR`` to the desired path.  If a path other than
-    this value is used in ``socket-name``, Kea will emit an error and refuse to
-    start or, if already running, log an unrecoverable error.  For ease of use in
-    simply omit the path component from ``socket-name``.
+    determined during compilation as ``"[kea-install-dir]/var/run/kea"``,
+    which must also have ``0750`` access rights. This path may be overridden
+    at startup by setting the environment variable ``KEA_CONTROL_SOCKET_DIR``
+    to the desired path.  If a path other than this value is used in
+    ``socket-name``, Kea will emit an error and refuse to start or, if already
+    running, log an unrecoverable error.  For ease of use in simply omit the
+    path component from ``socket-name``.
 
 Communication over the control channel is conducted using JSON structures.
 See the `Control Channel section in the Kea Developer's
index 8b9e21f36fb9d4ddc021ddeb7ed72094a51337fd..c5c7ff8b500943d161d65afa85866cd849bb06e1 100644 (file)
@@ -400,13 +400,13 @@ An example configuration of the memfile backend is presented below:
        "lease-database": {
            "type": "memfile",
            "persist": true,
-           "name": "/tmp/kea-leases4.csv",
+           "name": "kea-leases4.csv",
            "lfc-interval": 1800,
            "max-row-errors": 100
        }
    }
 
-This configuration selects ``/tmp/kea-leases4.csv`` as the storage
+This configuration selects ``kea-leases4.csv`` as the storage
 for lease information and enables persistence (writing lease updates to
 this file). It also configures the backend to perform a periodic cleanup
 of the lease file every 1800 seconds (30 minutes) and sets the maximum number of
@@ -4306,7 +4306,7 @@ ISC tested the following configuration:
            "name": "kea-dhcp4",
            "output-options": [
            {
-               "output": "/tmp/kea-dhcp4.log"
+               "output": "kea-dhcp4.log"
            }
            ],
            "severity": "DEBUG",
@@ -5170,7 +5170,7 @@ message fields:
                "hw-address": "aa:bb:cc:dd:ee:ff",
                "next-server": "10.1.1.2",
                "server-hostname": "server-hostname.example.org",
-               "boot-file-name": "/tmp/bootfile.efi"
+               "boot-file-name": "/usr/local/share/kea/bootfile.efi"
            }
            ],
            ...
@@ -7591,12 +7591,13 @@ values are 107 on Linux and 103 on FreeBSD.
 .. note::
 
     As of Kea 2.6.3, control sockets may only reside in the directory
-    determined during compilation as ``"[kea-install-dir]/var/run/kea"``. This
-    path may be overridden at startup by setting the environment variable
-    ``KEA_CONTROL_SOCKET_DIR`` to the desired path.  If a path other than
-    this value is used in ``socket-name``, Kea will emit an error and refuse to
-    start or, if already running, log an unrecoverable error.  For ease of use in
-    simply omit the path component from ``socket-name``.
+    determined during compilation as ``"[kea-install-dir]/var/run/kea"``,
+    which must also have ``0750`` access rights. This path may be overridden
+    at startup by setting the environment variable ``KEA_CONTROL_SOCKET_DIR``
+    to the desired path.  If a path other than this value is used in
+    ``socket-name``, Kea will emit an error and refuse to start or, if already
+    running, log an unrecoverable error.  For ease of use in simply omit the
+    path component from ``socket-name``.
 
 Communication over the control channel is conducted using JSON
 structures. See the
index 9f30d2820603ba0ec4f2cb486ede0363bb87c3c0..af47d52d065514a066c8c2712ce980206d3ee7fd 100644 (file)
@@ -356,13 +356,13 @@ An example configuration of the memfile backend is presented below:
        "lease-database": {
            "type": "memfile",
            "persist": true,
-           "name": "/tmp/kea-leases6.csv",
+           "name": "kea-leases6.csv",
            "lfc-interval": 1800,
            "max-row-errors": 100
        }
    }
 
-This configuration selects ``/tmp/kea-leases6.csv`` as the storage file
+This configuration selects ``kea-leases6.csv`` as the storage file
 for lease information and enables persistence (writing lease updates to
 this file). It also configures the backend to perform a periodic cleanup
 of the lease file every 1800 seconds (30 minutes) and sets the maximum number of
@@ -3802,7 +3802,7 @@ ISC tested the following configuration:
        "loggers": [ {
            "name": "kea-dhcp6",
            "output-options": [ {
-               "output": "/tmp/kea-dhcp6.log"
+               "output": "kea-dhcp6.log"
            } ],
            "severity": "DEBUG",
            "debuglevel": 0
@@ -6230,7 +6230,7 @@ memory lease file into its data directory. By default this directory is
 ::
 
    "Dhcp6": {
-       "data-directory": "/var/tmp/kea-server6",
+       "data-directory": "/var/lib/kea/kea-server6",
        ...
    }
 
@@ -7422,12 +7422,13 @@ values are 107 on Linux and 103 on FreeBSD.
 .. note::
 
     As of Kea 2.6.3, control sockets may only reside in the directory
-    determined during compilation as ``"[kea-install-dir]/var/run/kea"``. This
-    path may be overridden at startup by setting the environment variable
-    ``KEA_CONTROL_SOCKET_DIR`` to the desired path.  If a path other than
-    this value is used in ``socket-name``, Kea will emit an error and refuse to
-    start or, if already running, log an unrecoverable error.  For ease of use in
-    simply omit the path component from ``socket-name``.
+    determined during compilation as ``"[kea-install-dir]/var/run/kea"``,
+    which must also have ``0750`` access rights. This path may be overridden
+    at startup by setting the environment variable ``KEA_CONTROL_SOCKET_DIR``
+    to the desired path.  If a path other than this value is used in
+    ``socket-name``, Kea will emit an error and refuse to start or, if already
+    running, log an unrecoverable error.  For ease of use in simply omit the
+    path component from ``socket-name``.
 
 Communication over the control channel is conducted using JSON
 structures. See the
index 404a15ee043515b6013456be67f43f543f80ad40..edfe6d81d439c2cdb2b59a8cdf7e83c034b85180 100644 (file)
@@ -275,15 +275,15 @@ file with the name ``dns.keytab``.
 
 .. code-block:: console
 
-    kadmin.local -q "ktadd -k /tmp/dns.keytab DNS/server.example.org"
+    kadmin.local -q "ktadd -k /usr/local/share/kea/dns.keytab DNS/server.example.org"
 
 If successfully exported, the following message is displayed:
 
 .. code-block:: console
 
     Authenticating as principal root/admin@EXAMPLE.ORG with password.
-    Entry for principal DNS/server.example.org with kvno 2, encryption type aes256-cts-hmac-sha1-96 added to keytab WRFILE:/tmp/dns.keytab.
-    Entry for principal DNS/server.example.org with kvno 2, encryption type aes128-cts-hmac-sha1-96 added to keytab WRFILE:/tmp/dns.keytab.
+    Entry for principal DNS/server.example.org with kvno 2, encryption type aes256-cts-hmac-sha1-96 added to keytab WRFILE:/usr/local/share/kea/dns.keytab.
+    Entry for principal DNS/server.example.org with kvno 2, encryption type aes128-cts-hmac-sha1-96 added to keytab WRFILE:/usr/local/share/kea/dns.keytab.
 
 The DHCP client principal (used by the Kea DHCP-DDNS server) is created the
 following way:
@@ -306,7 +306,7 @@ keytab file with the name ``dhcp.keytab``.
 
 .. code-block:: console
 
-    kadmin.local -q "ktadd -k /tmp/dhcp.keytab DHCP/admin.example.org"
+    kadmin.local -q "ktadd -k /usr/local/share/kea/dhcp.keytab DHCP/admin.example.org"
 
 Finally, the ``krb5-admin-server`` must be restarted:
 
@@ -910,13 +910,13 @@ This can be done manually via the command:
 
 .. code-block:: console
 
-    kinit -k -t /tmp/dhcp.keytab DHCP/admin.example.org
+    kinit -k -t /usr/local/share/kea/dhcp.keytab DHCP/admin.example.org
 
 or, when using AD:
 
 .. code-block:: console
 
-    kinit -k -t /tmp/dhcp.keytab DHCP/kea.<domain>
+    kinit -k -t /usr/local/share/kea/dhcp.keytab DHCP/kea.<domain>
 
 The credential cache can be displayed using ``klist``.
 
index b32f4efe7d66bcf044e7c54816a84931e5aa2230..32bef24e7b5f52a73f30b3a13cfd55e74ea8f35f 100644 (file)
@@ -431,7 +431,7 @@ making them manageable. For instance, for the DHCPv4 server:
     {
         "Dhcp4": {
             "control-socket": {
-               "socket-name": "/tmp/kea-dhcp4-ctrl.sock",
+               "socket-name": "kea-dhcp4-ctrl.sock",
                "socket-type": "unix"
             }
         }
@@ -570,7 +570,7 @@ Kea sources.
                    "control-socket":
                    {
                        "socket-type": "unix",
-                       "socket-name": "/tmp/kea4-ctrl-socket"
+                       "socket-name": "kea4-ctrl-socket"
                    }
                },
 
@@ -581,7 +581,7 @@ Kea sources.
                    "control-socket":
                    {
                        "socket-type": "unix",
-                       "socket-name": "/tmp/kea6-ctrl-socket"
+                       "socket-name": "kea6-ctrl-socket"
                    }
                },
 
@@ -748,7 +748,7 @@ DHCPv6 server:
     {
         "Dhcp6": {
             "control-socket": {
-               "socket-name": "/tmp/kea-dhcp6-ctrl.sock",
+               "socket-name": "kea-dhcp6-ctrl.sock",
                "socket-type": "unix"
             }
         }
@@ -766,7 +766,7 @@ socket by running:
 
 .. code-block:: console
 
-    # echo '{ "command": "config-get" }' | socat UNIX:/tmp/kea-dhcp6-ctrl.sock '-,ignoreeof'
+    # echo '{ "command": "config-get" }' | socat UNIX:/opt/kea/var/run/kea/kea-dhcp6-ctrl.sock '-,ignoreeof'
 
 The following is the example ``netconf.json`` configuration for
 :iscman:`kea-netconf`, to manage the Kea DHCPv6 server:
@@ -790,7 +790,7 @@ The following is the example ``netconf.json`` configuration for
         "managed-servers": {
           "dhcp6": {
             "control-socket": {
-              "socket-name": "/tmp/kea-dhcp6-ctrl.sock",
+              "socket-name": "kea-dhcp6-ctrl.sock",
               "socket-type": "unix"
             }
           }
@@ -826,7 +826,7 @@ The following is the configuration extracted from ``startup.xml``:
        <interfaces>eth1</interfaces>
      </interfaces-config>
      <control-socket>
-       <socket-name>/tmp/kea-dhcp6-ctrl.sock</socket-name>
+       <socket-name>kea-dhcp6-ctrl.sock</socket-name>
        <socket-type>unix</socket-type>
      </control-socket>
    </config>
@@ -891,7 +891,7 @@ configuration file:
        <interfaces>eth1</interfaces>
      </interfaces-config>
      <control-socket>
-       <socket-name>/tmp/kea-dhcp6-ctrl.sock</socket-name>
+       <socket-name>kea-dhcp6-ctrl.sock</socket-name>
        <socket-type>unix</socket-type>
      </control-socket>
    </config>
@@ -921,7 +921,7 @@ For example, consider this ``BAD-translator.xml`` file:
        <interfaces>eth1</interfaces>
      </interfaces-config>
      <control-socket>
-       <socket-name>/tmp/kea-dhcp6-ctrl.sock</socket-name>
+       <socket-name>kea-dhcp6-ctrl.sock</socket-name>
        <socket-type>unix</socket-type>
      </control-socket>
      <user-context>bad</user-context>
@@ -946,7 +946,7 @@ server and fails to validate, as in this ``BAD-config.xml`` file:
        <interfaces>eth1</interfaces>
      </interfaces-config>
      <control-socket>
-       <socket-name>/tmp/kea-dhcp6-ctrl.sock</socket-name>
+       <socket-name>kea-dhcp6-ctrl.sock</socket-name>
        <socket-type>unix</socket-type>
      </control-socket>
    </config>
@@ -984,7 +984,7 @@ configuration in the ``twopools.xml`` file:
        <interfaces>eth1</interfaces>
      </interfaces-config>
      <control-socket>
-       <socket-name>/tmp/kea-dhcp6-ctrl.sock</socket-name>
+       <socket-name>kea-dhcp6-ctrl.sock</socket-name>
        <socket-type>unix</socket-type>
      </control-socket>
    </config>
@@ -1027,7 +1027,7 @@ This example specifies two subnets in the ``twosubnets.xml`` file:
        <interfaces>eth1</interfaces>
      </interfaces-config>
      <control-socket>
-       <socket-name>/tmp/kea-dhcp6-ctrl.sock</socket-name>
+       <socket-name>kea-dhcp6-ctrl.sock</socket-name>
        <socket-type>unix</socket-type>
      </control-socket>
    </config>
@@ -1062,7 +1062,7 @@ configuration in the ``logging.xml`` file:
        <subnet>2001:db8::/64</subnet>
      </subnet6>
      <control-socket>
-       <socket-name>/tmp/kea-dhcp6-ctrl.sock</socket-name>
+       <socket-name>kea-dhcp6-ctrl.sock</socket-name>
        <socket-type>unix</socket-type>
      </control-socket>
      <logger>
@@ -1082,7 +1082,7 @@ The corresponding Kea configuration in JSON is:
    {
      "Dhcp6": {
        "control-socket": {
-         "socket-name": "/tmp/kea-dhcp6-ctrl.sock",
+         "socket-name": "kea-dhcp6-ctrl.sock",
          "socket-type": "unix"
        },
        "interfaces-config": {
index 24f0efe970304b8c412ef25c91d909e48ed8aaae..5fcccfce73d8cc5f749b1db20a2ef98835b8a685 100644 (file)
@@ -1598,11 +1598,11 @@ machine as the primary server. This configuration is valid for both the
        "control-sockets": {
            "dhcp4": {
                "socket-type": "unix",
-               "socket-name": "/tmp/kea-dhcp4-ctrl.sock"
+               "socket-name": "kea-dhcp4-ctrl.sock"
            },
            "dhcp6": {
                "socket-type": "unix",
-               "socket-name": "/tmp/kea-dhcp6-ctrl.sock"
+               "socket-name": "kea-dhcp6-ctrl.sock"
            }
        }
    }
index ebf0cd9d341c52c8ec58269a74f28d78665d058a..90c3685940004c4acece4000258019253e9a659b 100644 (file)
@@ -161,10 +161,10 @@ example usage looks as follows:
 
    {
        "command": "cache-load",
-       "arguments": "/tmp/kea-host-cache.json"
+       "arguments": "/usr/local/share/kea/kea-host-cache.json"
    }
 
-This command stores the contents to the ``/tmp/kea-host-cache.json``
+This command stores the contents to the ``/usr/local/share/kea/kea-host-cache.json``
 file. That file can then be loaded with the :isccmd:`cache-load` command or
 processed by any other tool that is able to understand JSON format.
 
index 46e54a03e7d4f86372fe85bcf90d60257a3731a9..7aa31aaad71917d4f3b6d0b637805a49b599c0c6 100644 (file)
@@ -1095,7 +1095,7 @@ to the previous filename: for example, ``.bak14326``.
     determined during compilation: ``"[kea-install-dir]/var/lib/kea"``. This
     path may be overridden at startup by setting the environment variable
     ``KEA_DHCP_DATA_DIRECTORY`` to the desired path.  If a path other than
-    this value is used in ``name``, Kea will emit an error and refuse to start
+    this value is used in ``filename``, Kea will emit an error and refuse to start
     or, if already running, log an unrecoverable error.  For ease of use in
     specifying a custom file name simply omit the path portion from ``filename``.
 
index 37f94b4c88a501d141714399cf400756638aa4d3..15bd43d91d55b354c9e8e270f326a45117c1e08f 100644 (file)
@@ -44,7 +44,7 @@ address after their device is restarted.
    to consult an external source of information about clients and alter
    Kea's behavior remains useful and of educational value.
 
-The library reads the ``/tmp/user_chk_registry.txt`` file while being loaded
+The library reads the ``/usr/local/share/kea/user_chk_registry.txt`` file while being loaded
 and each time an incoming packet is processed. Each line of the file is expected to
 contain a self-contained JSON snippet which must have the
 following two entries:
@@ -67,9 +67,9 @@ A sample user registry file is shown below:
 
 ::
 
-   { "type" : "HW_ADDR", "id" : "0c:0e:0a:01:ff:04", "bootfile" : "/tmp/v4bootfile" }
+   { "type" : "HW_ADDR", "id" : "0c:0e:0a:01:ff:04", "bootfile" : "/usr/local/share/kea/v4bootfile" }
    { "type" : "HW_ADDR", "id" : "0c:0e:0a:01:ff:06", "tftp_server" : "tftp.v4.example.com" }
-   { "type" : "DUID", "id" : "00:01:00:01:19:ef:e6:3b:00:0c:01:02:03:04", "bootfile" : "/tmp/v6bootfile" }
+   { "type" : "DUID", "id" : "00:01:00:01:19:ef:e6:3b:00:0c:01:02:03:04", "bootfile" : "/usr/local/share/kea/v6bootfile" }
    { "type" : "DUID", "id" : "00:01:00:01:19:ef:e6:3b:00:0c:01:02:03:06", "tftp_server" : "tftp.v6.example.com" }
 
 As with any other hook libraries provided by ISC, internals of the
index 3063fb06670215d4ea367a5dd265b07e6468720c..19a9fbe57f0dcb1a86f053a06fee8c35bd359325 100644 (file)
@@ -36,6 +36,13 @@ protection possible:
    the two security mechanisms, and therefore no proof that the TLS client and server
    are the same as the HTTP authentication client and server.
 
+.. note::
+
+   It is recommend to use privileged ports for HTTP/HTTPS against local attacks
+   (by users which are connected to the box where Kea servers/agents run). This
+   measure also prevents against impersonation with HTTP, and Denial of
+   Service in general.
+
 .. _tls_config:
 
 Building Kea with TLS/HTTPS Support
@@ -205,6 +212,51 @@ desired.
 It is highly recommended to read the ``openssl.cnf`` manual page,
 normally called ``config.5ssl`` and displayed using ``man config``.
 
+.. _secure-control-agent:
+
+Secure Kea Control Agent
+========================
+
+The Kea Control Agent natively supports secure
+HTTP connections using TLS. This allows protection against users from
+the node where the agent runs, something that a reverse proxy cannot
+provide. More about TLS/HTTPS support in Kea can be found in :ref:`tls`.
+
+TLS is configured using three string parameters with file names, and
+a boolean parameter:
+
+-  The ``trust-anchor`` specifies the Certification Authority file name or
+   directory path.
+
+-  The ``cert-file`` specifies the server certificate file name.
+
+-  The ``key-file`` specifies the private key file name. The file must not
+   be encrypted.
+
+-  The ``cert-required`` specifies whether client certificates are required
+   or optional. The default is to require them and to perform mutual
+   authentication.
+
+The file format is PEM. Either all the string parameters are specified and
+HTTP over TLS (HTTPS) is used, or none is specified and plain HTTP is used.
+Configuring only one or two string parameters results in an error.
+
+.. note::
+
+   When client certificates are not required, only the server side is
+   authenticated, i.e. the communication is encrypted with an unknown
+   client. This protects only against passive attacks; active
+   attacks, such as "man-in-the-middle," are still possible.
+
+.. note::
+
+   No standard HTTP authentication scheme cryptographically binds its end
+   entity with TLS. This means that the TLS client and server can be
+   mutually authenticated, but there is no proof they are the same as
+   for the HTTP authentication.
+
+The :iscman:`kea-shell` tool also supports TLS.
+
 Securing a Kea Deployment
 =========================
 
@@ -218,13 +270,29 @@ The Kea architecture is modular, with separate daemons for separate tasks.
 A Kea deployment may include DHCPv4, DHCPv6, and Dynamic DNS daemons; a Control Agent
 daemon run on each application server; the ``kea-lfc utility`` for doing periodic lease
 file cleanup; MySQL and or PostgreSQL databases, run either locally on the application
-servers or accessed over the internal network; and a Stork monitoring system.
+servers or accessed over the internal network; a Netconf daemon to perform config and stats
+monitoring of Kea servers; and a Stork monitoring system.
 This modular architecture allows the administrator to minimize the attack surface
 by minimizing the code that is loaded and running.
 For example, :iscman:`kea-dhcp-ddns` should not be run unless DNS updates are required.
 Similarly, :iscman:`kea-lfc` is never triggered (and can be safely removed or never installed) if memfile is not used.
 Potential Kea security issues can be minimized by running only those processes required in the local environment.
 
+.. note::
+
+    As of Kea 2.6.3, the lease files (DHCPv4 and DHCPv6) and duid file (DHCPv6 only)
+    may only be loaded from the directory determined at compilation:
+    ``"[kea-install-dir]/var/lib/kea"``.
+    This path may be overridden at startup by setting the environment variable
+    ``KEA_DHCP_DATA_DIRECTORY`` to the desired path.  If a path other than
+    this value is used in ``name`` or ``data-directory``, Kea will emit an error and
+    refuse to start or, if already running, log an unrecoverable error.
+    This restriction applies to writing lease file using ``lease4-write`` and
+    ``lease6-write`` commands. If a path other than this value is used in ``filename``,
+    Kea will emit an error and refuse to start or, if already running, log an
+    unrecoverable error.  For ease of use in specifying a custom file name simply
+    omit the path portion from ``filename``.
+
 Limiting Application Permissions
 --------------------------------
 
@@ -246,6 +314,17 @@ read from or write to this socket, root access is generally required, although i
 to run as non-root, the owner of the process can write to it. Access can be controlled using normal
 file-access control on POSIX systems (owner, group, others, read/write).
 
+.. note::
+
+    As of Kea 2.6.3, control sockets may only reside in the directory
+    determined during compilation as ``"[kea-install-dir]/var/run/kea"``,
+    which must also have ``0750`` access rights. This path may be overridden
+    at startup by setting the environment variable ``KEA_CONTROL_SOCKET_DIR``
+    to the desired path.  If a path other than this value is used in
+    ``socket-name``, Kea will emit an error and refuse to start or, if already
+    running, log an unrecoverable error.  For ease of use in simply omit the
+    path component from ``socket-name``.
+
 Kea configuration is controlled by a JSON file on the Kea server. This file can be viewed or edited
 by anyone with file permissions (which are controlled by the operating system). Note that
 passwords are stored in clear text in the configuration file, so anyone with access to read the
@@ -253,6 +332,12 @@ configuration file can find this information. As a practical matter, anyone with
 the configuration file has control over Kea.
 Limiting user permission to read or write the Kea configuration file is an important security step.
 
+.. note::
+
+    As of Kea 2.6.3, the config file may only be written (using the
+    ``config-write`` command) to the same directory as the config file used
+    when starting Kea (passed as a ``-c`` argument).
+
 Securing Database Connections
 -----------------------------
 
@@ -267,6 +352,10 @@ in the configuration file.**
 Depending on the database configuration, it is also possible to verify whether the system user matches the
 database username. Consult the MySQL or PostgreSQL manual for details.
 
+Kea supports client TLS settings for MySQL database and it must be
+configured explicitly for all used connections (configuration,
+reservations, leases, forensic logging).
+
 Information Leakage Through Logging
 -----------------------------------
 
@@ -277,6 +366,36 @@ Since Kea 1.9.7, this issue has been resolved by replacing the value of all entr
 Logs are sent to stdout, stderr, files, or syslog; system file permissions system apply to
 stdout/stderr and files. Syslog may export the logs over the network, exposing them further to possible snooping.
 
+.. note::
+
+    As of Kea 2.7.9, log files may only be written to the output directory
+    determined during compilation as: ``"[kea-install-dir]/var/log/kea"``. This
+    path may be overridden at startup by setting the environment variable
+    ``KEA_LOG_FILE_DIR`` to the desired path.  If a path other than
+    this value is used in ``output``, Kea will emit an error and refuse to start
+    or, if already running, log an unrecoverable error.  For ease of use simply
+    omit the path component from ``output`` and specify only the file name.
+
+Summary of Path Restrictions
+----------------------------
+
+Path restrictions mentioned through this section can be summarized according to
+the following table:
+
++-------------------------------------+---------------------------------------+----------------------------------+
+| Restricted Element                  | Default Value                         | Environment Variable Override    |
++=====================================+=======================================+==================================+
+| Config Files (``config-write``)     | Same Directory as Initial Config File | N/A                              |
++-------------------------------------+---------------------------------------+----------------------------------+
+| Lease Files                         | ``var/lib/kea``                       | ``KEA_DHCP_DATA_DIRECTORY``      |
++-------------------------------------+---------------------------------------+----------------------------------+
+| Log Files                           | ``var/log/kea``                       | ``KEA_LOG_FILE_DIR``             |
++-------------------------------------+---------------------------------------+----------------------------------+
+| Unix Sockets                        | ``var/run/kea``                       | ``KEA_CONTROL_SOCKET_DIR``       |
++-------------------------------------+---------------------------------------+----------------------------------+
+
+
+
 Cryptography Components
 -----------------------
 
@@ -372,6 +491,16 @@ Kea 1.9.2 introduced a new ``auth`` hook point. With this new hook point, it is
 hook library to extend the access controls, integrate with another authentication authority, or add role-based
 access control to the Control Agent.
 
+.. note:
+
+    As of Kea 2.6.3, hook libraries may only be loaded from the default installation
+    directory determined during compilation and shown in the config report as
+    "Hooks directory".  This value may be overridden at startup by setting the
+    environment variable ``KEA_HOOKS_PATH`` to the desired path.  If a path other
+    than this value is used in a ``library`` element Kea will emit an error and refuse
+    to load the library. For ease of use ``library`` elements may simply omit path
+    components.
+
 Kea Security Processes
 ======================
 
@@ -400,9 +529,9 @@ processes that are used to ensure adequate code quality:
 
 - Each line of code goes through a formal review before it is accepted. The review process is
   documented and available publicly.
-- Roughly 50% of the source code is dedicated to unit tests. As of December 2020, there were over 6000
+- Roughly 50% of the source code is dedicated to unit tests. As of May 2024, there were over 12000
   unit tests and the number is increasing with time. Unit tests are required to commit any new feature.
-- There are around 1500 system tests for Kea. These simulate both correct and invalid
+- There are around 2000 system tests for Kea. These simulate both correct and invalid
   situations, covering network packets (mostly DHCP, but also DNS, HTTP, HTTPS and others),
   command-line usage, API calls, database interactions, scripts, and more.
 - There are performance tests with over 80 scenarios that test Kea overall performance and
@@ -416,8 +545,10 @@ processes that are used to ensure adequate code quality:
   packets in an invalid order) and more.
 - The Kea development team uses many tools that perform automatic code quality checks, such as danger, as well as
   internally developed sanity checkers.
-- The Kea team uses the following static code analyzers: Coverity Scan, shellcheck, and danger.
-- The Kea team uses the following dynamic code analyzers: Valgrind and Thread Sanitizer (TSAN).
+- The Kea team uses the following static code analyzers: Coverity Scan, cppcheck, clang-static-analyzer, shellcheck,
+  flawfinder, semgrep and danger.
+- The Kea team uses the following dynamic code analyzers: Valgrind, Thread Sanitizer (TSAN), Address Sanitizer (ASAN),
+  Undefined Behavior Sanitizer (UBSAN).
 
 Fuzz Testing
 ------------
index 438621e38d23dc041e9b57012b90a664c018e638..24255e295c4ce0984a9b9e17b111e6153a029952 100644 (file)
@@ -28,6 +28,7 @@ Other useful Kea information can be found in our
    arm/quickstart
    arm/install
    arm/admin
+   arm/security
    arm/config
    arm/keactrl
    arm/agent
@@ -46,7 +47,6 @@ Other useful Kea information can be found in our
    arm/shell
    arm/integrations
    arm/stork
-   arm/security
 
 .. toctree::
    :caption: Appendices
index b4f6339c8848c3eebaf5939148820c7bd7bd8cbe..34df81a4772432819b2b0493ca1a97d678a7c86c 100644 (file)
@@ -56,7 +56,7 @@ namespace netconf {
 ///      "control-socket":
 ///      {
 ///        "socket-type": "unix",
-///        "socket-name": "/tmp/server-v4.sock"
+///        "socket-name": "server-v4.sock"
 ///      }
 ///    }
 ///  }
index ad2be18db4b4cdbd0f80c5b224e4edc5bf744459..dcf1fafae461c4ef2d378d40dd7d496d50111a2c 100644 (file)
@@ -98,7 +98,7 @@ Currently, the library uses a hard coded pathname for the user registry defined
 in load_unload.cc:
 
 @code
-    const char* registry_fname = "/tmp/user_chk_registry.txt";
+    const char* registry_fname = "/usr/local/share/kea/user_chk_registry.txt";
 @endcode
 
 Each line in the file is a self-contained JSON snippet which must have the
@@ -117,9 +117,9 @@ and may have the zero or more of the following entries:
 Sample user registry file is shown below:
 
 @code
-{ "type" : "HW_ADDR", "id" : "0c:0e:0a:01:ff:04", "bootfile" : "/tmp/v4bootfile" }
+{ "type" : "HW_ADDR", "id" : "0c:0e:0a:01:ff:04", "bootfile" : "/usr/local/share/kea/v4bootfile" }
 { "type" : "HW_ADDR", "id" : "0c:0e:0a:01:ff:06", "tftp_server" : "tftp.v4.example.com" }
-{ "type" : "DUID", "id" : "00:01:00:01:19:ef:e6:3b:00:0c:01:02:03:04", "bootfile" : "/tmp/v6bootfile" }
+{ "type" : "DUID", "id" : "00:01:00:01:19:ef:e6:3b:00:0c:01:02:03:04", "bootfile" : "/usr/local/share/kea/v6bootfile" }
 { "type" : "DUID", "id" : "00:01:00:01:19:ef:e6:3b:00:0c:01:02:03:06", "tftp_server" : "tftp.v6.example.com" }
 @endcode
 
@@ -160,7 +160,7 @@ file.  Currently, the library uses a hard coded pathname for the user registry
 defined in load_unload.cc:
 
 @code
-    const char* user_chk_output_fname = "/tmp/user_chk_outcome.txt";
+    const char* user_chk_output_fname = "/usr/local/share/kea/user_chk_outcome.txt";
 @endcode
 
 If the file cannot be created (or opened), the library will unload.
index a31042ca5c80ae31d1d5cd0c8c320af015db1469..b1bf9247187179884b17ebf488391db230cfe46a 100644 (file)
@@ -28,11 +28,11 @@ std::fstream user_chk_output;
 
 /// @brief User registry input file name.
 /// @todo Hard-coded for now, this should be configurable.
-const char* registry_fname = "/tmp/user_chk_registry.txt";
+const char* registry_fname = "/usr/local/share/kea/user_chk_registry.txt";
 
 /// @brief User check outcome file name.
 /// @todo Hard-coded for now, this should be configurable.
-const char* user_chk_output_fname = "/tmp/user_chk_outcome.txt";
+const char* user_chk_output_fname = "/usr/local/share/kea/user_chk_outcome.txt";
 
 /// @brief Text label of user id in the inbound query in callout context
 const char* query_user_id_label = "query_user_id";
index b9d49fc5b40cee99efe0b6565174ee6ccf7fa315..4ac46880520c8b7917dc73b9c94ad665c653b26f 100644 (file)
@@ -50,7 +50,7 @@ class ClientConnectionImpl;
 /// IOService io_service;
 /// ClientConnection conn(io_service);
 /// bool cb_invoked = false;
-/// conn.start(ClientConnection::SocketPath("/tmp/kea.sock"),
+/// conn.start(ClientConnection::SocketPath("/opt/kea/var/run/kea/kea.sock"),
 ///            ClientConnection::ControlCommand(command),
 ///            [this, &cb_invoked](const boost::system::error_code& ec,
 ///                   const ConstJSONFeedPtr& feed) {
index 2b57ddf3871703dc8c7028162f5922ded0543bfa..a02541cf9b21168ce70d0b3a0a7160199ab91e74 100644 (file)
@@ -78,7 +78,7 @@ namespace d2 {
 ///  "control-socket":
 ///  {
 ///    "socket-type": "unix" ,
-///    "socket-name": "/tmp/kea-ddns-ctrl-socket"
+///    "socket-name": "kea-ddns-ctrl-socket"
 //// },
 ///  "tsig-keys":
 //// [
index d4909fbd3263e6d72b0981c5e261593ee42eba50..06e63618854c5d97870ff5f46ac2ebd4bc22de48 100644 (file)
@@ -98,7 +98,7 @@ public:
     ///         "control-socket":
     ///           {
     ///              "socket-type": "unix",
-    ///              "socket-name": "/tmp/kea4-ctrl-socket"
+    ///              "socket-name": "kea4-ctrl-socket"
     ///           }
     ///       }
     ///    }
index c33e930d2e0d9b1796bf876748afd0194166ea10..a9214099ea51b80cf48833211081e1a2e3a6f25a 100644 (file)
@@ -144,7 +144,7 @@ namespace yang {
 ///     },
 ///         "control-socket": {
 ///             "socket-type": "unix",
-///             "socket-name": "/tmp/kea4-sock"
+///             "socket-name": "kea4-sock"
 ///         },
 ///     "subnet4":
 ///     [
@@ -180,7 +180,7 @@ namespace yang {
 ///     <interfaces>eth1</interfaces>
 ///   </interfaces-config>
 ///   <control-socket>
-///     <socket-name>/tmp/kea4-sock</socket-name>
+///     <socket-name>kea4-sock</socket-name>
 ///     <socket-type>unix</socket-type>
 ///   </control-socket>
 /// </config>
@@ -310,7 +310,7 @@ namespace yang {
 ///     },
 ///         "control-socket": {
 ///             "socket-type": "unix",
-///             "socket-name": "/tmp/kea6-sock"
+///             "socket-name": "kea6-sock"
 ///         },
 ///     "subnet6":
 ///     [
@@ -345,7 +345,7 @@ namespace yang {
 ///     <interfaces>eth1</interfaces>
 ///   </interfaces-config>
 ///   <control-socket>
-///     <socket-name>/tmp/kea6-sock</socket-name>
+///     <socket-name>kea6-sock</socket-name>
 ///     <socket-type>unix</socket-type>
 ///   </control-socket>
 /// </config>
index f2602c734bdb03f6e3ad6c91808915f131499967..58508590cd865820fc05ac5474aa1a854da4904b 100644 (file)
@@ -35,7 +35,7 @@ namespace yang {
 /// An example in JSON and YANG formats:
 /// @code
 /// {
-///     "socket-name": "/tmp/kea.sock",
+///     "socket-name": "kea.sock",
 ///     "socket-type": "unix",
 ///     "user-context": { "foo": 1 }
 /// }
@@ -50,7 +50,7 @@ namespace yang {
 ///  /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/
 ///     control-socket (container)
 ///  /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/
-///     control-socket/socket-name = /tmp/kea.sock
+///     control-socket/socket-name = kea.sock
 ///  /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/
 ///     control-socket/socket-type = unix
 ///  /kea-ctrl-agent:config/control-sockets/socket[server-type='dhcp4']/
index ed06c48efe0697b5008ce0402b4d9498e1ed46e2..3332ba99948b9e7ca9bb7e6a8e33305ea8942f59 100644 (file)
@@ -7,7 +7,7 @@
     "cmd-syntax": [
         "{",
         "    \"command\": \"cache-load\",",
-        "    \"arguments\": \"/tmp/kea-host-cache.json\"",
+        "    \"arguments\": \"/usr/local/share/kea/kea-host-cache.json\"",
         "}"
     ],
     "description": "See <xref linkend=\"command-cache-load\"/>",