]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3840] update CA default config and dhcp examples
authorRazvan Becheriu <razvan@isc.org>
Thu, 15 May 2025 09:39:54 +0000 (12:39 +0300)
committerRazvan Becheriu <razvan@isc.org>
Fri, 16 May 2025 21:14:52 +0000 (21:14 +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 8d018fb0e8891d6ceb256fc5ab08038ab63fb39a..9182fdf1e6ed2fd711c530ca919880fc0533f1e1 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 2b0eeb1342aa372719bbc11e0ca9f410d489d32c..098119869dac89b50a6925c84fa2bbd9ebdfe806 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 8cf61b7782f63f9faa69bb0660383a931cb3390b..7909c72e6ec591fe916e158980f0127bcfb9928f 100644 (file)
@@ -12,7 +12,7 @@
 
   "lease-database": {
       "type": "memfile",
-      "name": "kea-dhcp4.csv",
+      "name": "kea-leases4.csv",
       "lfc-interval": 3600
   },
 
index 2df5b02b6941873c6175f3dd7f36895f62ada77f..86a9f8c122e413b89514da9c29405111b9c3c432 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 4dfd76753c70031832b3c4d1bb24f783f0734eeb..4d4fbebeed5dfdc9ed8c29f728727490dd4cfbda 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 d832ca56516434e6ab7c3364cb68dbeb1bb258e8..e723f69d01ae9ace0d6a7ee51f99f67a5fc06b75 100644 (file)
@@ -13,7 +13,7 @@
 
   "lease-database": {
       "type": "memfile",
-      "name": "kea-dhcp6.csv"
+      "name": "kea-leases6.csv"
   },
 
   "preferred-lifetime": 3000,
index 93e51324356ec29dc158476a4d40b971ea7d2790..acc62bea803fb6251be31fb3e68385aeff6d33f8 100644 (file)
@@ -50,10 +50,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 35872e339ea4d8f6ed019b44ca0d413a9911c87c..b7c486fdb3f3ca25f75ddec418580d839432465d 100644 (file)
@@ -53,10 +53,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 604ba0d6d4e5613fa243d0e585503867113b6bd8..f31096044d0373d29b9e4bbe51cd75122f199e79 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.