diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | doc/examples/agent/simple.json | 6 | ||||
-rw-r--r-- | src/lib/http/basic_auth_config.cc | 4 | ||||
-rw-r--r-- | src/lib/http/tests/basic_auth_config_unittests.cc | 4 |
4 files changed, 10 insertions, 10 deletions
@@ -1,8 +1,8 @@ 1985. [func] fdupont Added support for using files to configure basic HTTP - credentials, instead of configuring a value the value - is taken from the content of a file. New parameters of - the Control Agent configuration are: + credentials. Instead of configuring a value, it is taken from + the content of a file. The new parameters of the Control Agent + configuration are: - 'user-file' pointing to a file vs 'user' - 'password-file' pointing to a file vs 'password' - 'password-file' pointing to a file with the secret diff --git a/doc/examples/agent/simple.json b/doc/examples/agent/simple.json index 9264cac37c..abb2fcfea6 100644 --- a/doc/examples/agent/simple.json +++ b/doc/examples/agent/simple.json @@ -50,16 +50,16 @@ // This specifies a hiddent client. { - // The user id is the content of the file /tmp/ca/hiddenu. + // The user id is the content of the file /tmp/kea-creds/hiddenu. "user-file": "hiddenu", - // The password is the content of the file /tmp/ca/hiddenp. + // The password is the content of the file /tmp/kea-creds/hiddenp. "password-file": "hiddenp" }, // This specifies a hidden client using a secret in a file. { - // The secret is the content of the file /tmp/ca/hiddens + // The secret is the content of the file /tmp/kea-creds/hiddens // which must be in the <user-id>:<password> format. "password-file": "hiddens" } diff --git a/src/lib/http/basic_auth_config.cc b/src/lib/http/basic_auth_config.cc index 940a9971e1..b2ddbfe508 100644 --- a/src/lib/http/basic_auth_config.cc +++ b/src/lib/http/basic_auth_config.cc @@ -270,7 +270,7 @@ BasicHttpAuthConfig::parse(const ConstElementPtr& config) { } user = user_cfg->stringValue(); if (user.empty()) { - isc_throw(DhcpConfigError, "user must be not be empty (" + isc_throw(DhcpConfigError, "user must not be empty (" << user_cfg->getPosition() << ")"); } if (user.find(':') != string::npos) { @@ -289,7 +289,7 @@ BasicHttpAuthConfig::parse(const ConstElementPtr& config) { user_file = user_file_cfg->stringValue(); user = getFileContent(user_file); if (user.empty()) { - isc_throw(DhcpConfigError, "user must be not be empty " + isc_throw(DhcpConfigError, "user must not be empty " << "from user-file '" << user_file << "' (" << user_file_cfg->getPosition() << ")"); } diff --git a/src/lib/http/tests/basic_auth_config_unittests.cc b/src/lib/http/tests/basic_auth_config_unittests.cc index 6db82b7a24..c48df58fc8 100644 --- a/src/lib/http/tests/basic_auth_config_unittests.cc +++ b/src/lib/http/tests/basic_auth_config_unittests.cc @@ -347,7 +347,7 @@ TEST(BasicHttpAuthConfigTest, parse) { clients_cfg->add(client_cfg); cfg->set("clients", clients_cfg); EXPECT_THROW_MSG(config.parse(cfg), DhcpConfigError, - "user must be not be empty (:0:0)"); + "user must not be empty (:0:0)"); // The user parameter must not contain ':'. user_cfg = Element::create(string("foo:bar")); @@ -388,7 +388,7 @@ TEST(BasicHttpAuthConfigTest, parse) { clients_cfg->add(client_cfg); cfg->set("clients", clients_cfg); EXPECT_THROW_MSG(config.parse(cfg), DhcpConfigError, - "user must be not be empty from user-file " + "user must not be empty from user-file " "'empty' (:0:0)"); // The user-file parameter must not contain ':'. |