]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1304] Checkpoint before regen (3)
authorFrancis Dupont <fdupont@isc.org>
Sun, 13 Sep 2020 20:21:33 +0000 (22:21 +0200)
committerFrancis Dupont <fdupont@isc.org>
Sun, 13 Sep 2020 20:21:33 +0000 (22:21 +0200)
doc/examples/agent/comments.json
src/bin/agent/agent_lexer.ll
src/bin/agent/simple_parser.cc
src/bin/agent/tests/testdata/get_config.json

index 01eb15bb2573e4b59e73b27722068a49ccd9265e..39f3ff0ce24c6503a4f3348f9c001213d4676a17 100644 (file)
@@ -16,6 +16,8 @@
         {
             "comment": "basic HTTP authentication",
 
+            "type": "basic",
+
             // In basic HTTP authentication clients
             "clients":
             [
index 6c9d390eab9748a1e15fefc937813cdf3543baac..bdb4f88878e8a721c048475bb609f80acd04da25 100644 (file)
@@ -258,7 +258,7 @@ ControlCharacterFill            [^"\\]|\\{JSONEscapeSequence}
     case ParserContext::AUTHENTICATION:
         return AgentParser::make_REALM(driver.loc_);
     default:
-        return AgentParser::make_STRING("authentication", driver.loc_);
+        return AgentParser::make_STRING("realm", driver.loc_);
     }
 }
 
index 1890608d337802cac6a66c9a11e6b0d7bb06d37f..eb65352f853fedf69df4fef56c555eff3affa326 100644 (file)
@@ -115,7 +115,7 @@ AgentSimpleParser::parse(const CtrlAgentCfgContextPtr& ctx,
     }
 
     // Basic HTTP authentications are third.
-    ConstElementPtr auth_config = config->get("authentications");
+    ConstElementPtr auth_config = config->get("authentication");
     if (auth_config) {
         using namespace isc::http;
         BasicHttpAuthConfigPtr auth(new BasicHttpAuthConfig());
index db6515f03c60b12975f3fd6d70475edb691a28b6..f60c521a53824cea46ba87c770bd78ebc19d5fc2 100644 (file)
@@ -1,15 +1,18 @@
 {
     "Control-agent": {
-        "basic-authentication-realm": "kea-control-agent",
-        "basic-authentications": [
-            {
-                "password": "1234",
-                "user": "admin",
-                "user-context": {
-                    "comment": "admin is authorized"
+        "authentication": {
+            "clients": [
+                {
+                    "password": "1234",
+                    "user": "admin",
+                    "user-context": {
+                        "comment": "admin is authorized"
+                    }
                 }
-            }
-        ],
+            ],
+            "realm": "kea-control-agent",
+            "type": "basic"
+        },
         "control-sockets": {
             "d2": {
                 "socket-name": "/tmp/kea-ddns-ctrl-socket",