]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3839] update CA default config and dhcp examples
authorRazvan Becheriu <razvan@isc.org>
Thu, 15 May 2025 09:43:15 +0000 (12:43 +0300)
committerRazvan Becheriu <razvan@isc.org>
Mon, 19 May 2025 11:58:11 +0000 (11:58 +0000)
doc/examples/kea4/all-keys-netconf.json
doc/examples/kea4/all-keys.json
doc/examples/kea4/dhcpv4-over-dhcpv6.json
doc/examples/kea6/all-keys-netconf.json
doc/examples/kea6/all-keys.json
doc/examples/kea6/dhcpv4-over-dhcpv6.json
src/bin/dhcp4/tests/dhcp4_test_utils.cc
src/bin/dhcp6/tests/dhcp6_test_utils.cc
src/bin/keactrl/kea-ctrl-agent.conf.pre

index 71eaa77097b0a4506523dc5e94d3f290a0bd545e..ef4a9e8e0ddeb058ee95338b9fabf4f8e63beaa3 100644 (file)
 
             // Name of the lease file. In the case of a database it specifies the
             // database name.
-            "name": "kea-dhcp4.csv",
+            "name": "kea-leases4.csv",
 
             // memfile-specific parameter indicating whether leases should
             // be saved on persistent storage (disk) or not. The true value
index fa9ba83e6d86c8c54565a315faca6df9329d4732..6c6dbb90f3ccbcc2544c19abfb72ec1c7c602bcf 100644 (file)
 
             // Name of the lease file. In the case of a database it specifies the
             // database name.
-            "name": "kea-dhcp4.csv",
+            "name": "kea-leases4.csv",
 
             // memfile-specific parameter indicating whether leases should
             // be saved on persistent storage (disk) or not. The true value
index db39b16802590bf00611c577784d1ef9a1a1ad4b..c383004a7d8831c848f9c0439af9c39ffc4e0740 100644 (file)
@@ -12,7 +12,7 @@
 
   "lease-database": {
       "type": "memfile",
-      "name": "kea-dhcp4.csv",
+      "name": "kea-leases4.csv",
       "lfc-interval": 3600
   },
 
index 17fb58f9666fe0b3295275c607f4d35f488a9b4d..16eb541d82db437a22e8105852590d1e25b27a89 100644 (file)
 
             // Name of the lease file. In the case of a database it specifies the
             // database name.
-            "name": "kea-dhcp6.csv",
+            "name": "kea-leases6.csv",
 
             // memfile-specific parameter indicating whether leases should
             // be saved on persistent storage (disk) or not. The true value
index e80b11b0913d423cb886176da29720d1bc503f8e..f990aadd547db60f1db24f8a089bc1baf6491dde 100644 (file)
 
             // Name of the lease file. In the case of a database it specifies the
             // database name.
-            "name": "kea-dhcp6.csv",
+            "name": "kea-leases6.csv",
 
             // memfile-specific parameter indicating whether leases should
             // be saved on persistent storage (disk) or not. The true value
index b25d4dac0f33130ccf658891bc57f6e3b9d055d3..983b4898dbd8ab14b7cb3fcce664526897cc5e0f 100644 (file)
@@ -13,7 +13,7 @@
 
   "lease-database": {
       "type": "memfile",
-      "name": "kea-dhcp6.csv"
+      "name": "kea-leases6.csv"
   },
 
   "preferred-lifetime": 3000,
index 0854930e7eb8a3e4e7217e27d1d4e96cef87b9df..fb6fa567a5c1a289e75fc0f6e1292f7365a58657 100644 (file)
@@ -49,10 +49,6 @@ BaseServerTest::~BaseServerTest() {
     s2 << CfgMgr::instance().getDataDir() << "/kea-leases4.csv";
     static_cast<void>(::remove(s2.str().c_str()));
 
-    std::ostringstream s3;
-    s3 << CfgMgr::instance().getDataDir() << "/kea-dhcp4.csv";
-    static_cast<void>(::remove(s3.str().c_str()));
-
     // Revert to original data directory.
     CfgMgr::instance().getDataDir(true, original_datadir_);
 
index 8d0cf955e967f3dfbdba2a1608a6e14ce266fdf4..e885b9ee6a0d5727338269b2caa92244b4cea5b7 100644 (file)
@@ -52,10 +52,6 @@ BaseServerTest::~BaseServerTest() {
     s2 << CfgMgr::instance().getDataDir() << "/kea-leases6.csv";
     static_cast<void>(::remove(s2.str().c_str()));
 
-    std::ostringstream s3;
-    s3 << CfgMgr::instance().getDataDir() << "/kea-dhcp6.csv";
-    static_cast<void>(::remove(s3.str().c_str()));
-
     // Revert to original data directory.
     CfgMgr::instance().getDataDir(true, original_datadir_);
 
index d4d8e041f9586e99011b5c53b773754976698676..873dfd7affa5c864ff5342c9831154f7611857cd 100644 (file)
     // is specifically for HA updates only.
     "http-port": 8000,
 
+    // Allow access only to kea-api user.
+    // To make it work, please store your password in kea-api-password file.
+    // Make sure the password file has sufficiently restrictive access permissions,
+    // in particular it is not world-readable.
+    // The basic HTTP auth offers poor security for unencrypted channels.
+    // If possible, a better, stronger HTTPS mechanism should be deployed,
+    // in particular when the client authentication is enabled by setting the
+    // cert-required to true (the default). See trust-anchor, cert-file,
+    // key-file and cert-required below. For more details read the Kea Security
+    // section in the ARM.
+    "authentication": {
+        "type": "basic",
+        "realm": "Kea Control Agent",
+        "directory": "/etc/kea",
+        "clients": [
+            {
+                "user": "kea-api",
+                "password-file": "kea-api-password"
+            }
+        ]
+    },
+
+    // Configuration section containing HTTPS parameters:
+    // TLS trust anchor (Certificate Authority). This is a file name or
+    // (for OpenSSL only) a directory path.
+    // "trust-anchor": "kea-server-ca",
+    // TLS server certificate file name.
+    // "cert-file": "kea-server-cert",
+    // TLS server private key file name.
+    // "key-file": "kea-server-key",
+    // TLS require client certificates flag. Default is true and means
+    // require client certificates. False means they are optional.
+    // "cert-required": true
+
     // Specify location of the files to which the Control Agent
     // should connect to forward commands to the DHCPv4, DHCPv6
     // and D2 servers via unix domain sockets.