summaryrefslogtreecommitdiffstats
path: root/src/bin/agent
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2020-09-13 22:21:33 +0200
committerFrancis Dupont <fdupont@isc.org>2020-09-13 22:21:33 +0200
commitc353ecbedaa54173b1e4bd1ee3932f1e22ecd780 (patch)
tree2878e50cfc661413ce8701cbdef9fe677ad3b3cc /src/bin/agent
parent[#1304] regen files (diff)
downloadkea-c353ecbedaa54173b1e4bd1ee3932f1e22ecd780.tar.xz
kea-c353ecbedaa54173b1e4bd1ee3932f1e22ecd780.zip
[#1304] Checkpoint before regen (3)
Diffstat (limited to 'src/bin/agent')
-rw-r--r--src/bin/agent/agent_lexer.ll2
-rw-r--r--src/bin/agent/simple_parser.cc2
-rw-r--r--src/bin/agent/tests/testdata/get_config.json21
3 files changed, 14 insertions, 11 deletions
diff --git a/src/bin/agent/agent_lexer.ll b/src/bin/agent/agent_lexer.ll
index 6c9d390eab..bdb4f88878 100644
--- a/src/bin/agent/agent_lexer.ll
+++ b/src/bin/agent/agent_lexer.ll
@@ -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_);
}
}
diff --git a/src/bin/agent/simple_parser.cc b/src/bin/agent/simple_parser.cc
index 1890608d33..eb65352f85 100644
--- a/src/bin/agent/simple_parser.cc
+++ b/src/bin/agent/simple_parser.cc
@@ -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());
diff --git a/src/bin/agent/tests/testdata/get_config.json b/src/bin/agent/tests/testdata/get_config.json
index db6515f03c..f60c521a53 100644
--- a/src/bin/agent/tests/testdata/get_config.json
+++ b/src/bin/agent/tests/testdata/get_config.json
@@ -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",