From c353ecbedaa54173b1e4bd1ee3932f1e22ecd780 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Sun, 13 Sep 2020 22:21:33 +0200 Subject: [#1304] Checkpoint before regen (3) --- src/bin/agent/agent_lexer.ll | 2 +- src/bin/agent/simple_parser.cc | 2 +- src/bin/agent/tests/testdata/get_config.json | 21 ++++++++++++--------- 3 files changed, 14 insertions(+), 11 deletions(-) (limited to 'src/bin/agent') 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", -- cgit v1.2.3