]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1304] Addressed comments
authorFrancis Dupont <fdupont@isc.org>
Tue, 28 Jul 2020 13:02:20 +0000 (15:02 +0200)
committerFrancis Dupont <fdupont@isc.org>
Sat, 12 Sep 2020 08:50:34 +0000 (10:50 +0200)
doc/examples/agent/comments.json
doc/sphinx/arm/agent.rst
src/hooks/dhcp/high_availability/ha_config.h
src/lib/http/basic_auth.h
src/lib/http/http_messages.mes
src/lib/http/response_creator_auth.h

index d0c6a00285964adafc2bb303f2f920fbc055d6c3..afa706e27ccc513c2952202eda3d7190bd9a247d 100644 (file)
@@ -12,7 +12,7 @@
         "http-port": 8000,
         "basic-authentication-realm": "kea-control-agent",
 
-        // In basoc HTTP authentication
+        // In basic HTTP authentication
         "basic-authentications":
         [
             {
index 37c215a12abff97edf3e6d33f171c9f40d8d034d..d2f26693a07e246f9a62b1718f0e1e2310672946 100644 (file)
@@ -138,7 +138,7 @@ ability to store comments or descriptions; the parser translates a
 comment to be attached within the configuration itself.
 
 The basic HTTP authentication was added by Kea 1.7.10. It protects
-not authorized uses of the control agent by local users. For the
+against not authorized uses of the control agent by local users. For the
 protection against remote attackers HTTPS and reverse proxy of
 :ref:`agent-secure-connection` provide a stronger security.
 
index 95c81b47c931e07892ce3e6b3f90ec750e83c1b3..84c15d9063510fa9a07fae8947d71a803a07bb4f 100644 (file)
@@ -160,7 +160,8 @@ public:
             return (basic_auth_);
         }
 
-        /// @brief Adds a basic HTTP authentication header to a request.
+        /// @brief Adds a basic HTTP authentication header to a request
+        /// when credentials are specified.
         void addBasicAuthHttpHeader(http::PostHttpRequestJsonPtr request) const;
 
     private:
index 3968e56de1abbd35a9e716bd976e98d038f7c4f4..d939cdb45190464abd596ac97f7be6c7dc6597c2 100644 (file)
@@ -52,16 +52,17 @@ private:
     /// @brief Build the credential from the secret.
     void buildCredential();
 
-    /// @brief User id.
+    /// @brief User id e.g. johndoe.
     std::string user_;
 
-    /// @brief Password.
+    /// @brief Password e.g. secret1.
     std::string password_;
 
-    /// @brief Secret.
+    /// @brief Secret e.g. johndoe:secret1.
     std::string secret_;
 
-    /// @brief Credential.
+    /// @brief Credential: base64 encoding of UTF-8 secret,
+    /// e.g. am9obmRvZTpzZWNyZXQx.
     std::string credential_;
 };
 
index cbd173fb5c7966a700ee6812e6dffb4e0d0afc56..c171b96d66b4273658f13572d86324c055d31381 100644 (file)
@@ -43,7 +43,8 @@ a malformed authentication header. The argument explains the problem.
 
 % HTTP_CLIENT_REQUEST_NOT_AUTHORIZED received HTTP request with not matching authentication header
 This information message is issued when the server receives a request with
-authentication header carrying not recognized credential.
+authentication header carrying not recognized credential: the user
+provided incorrect user id and/or password.
 
 % HTTP_CLIENT_REQUEST_NO_AUTH_HEADER received HTTP request without required authentication header
 This information message is issued when the server receives a request without
index 1b5462dbe32a9927b8d439136831dbba5077d51c..830b335f6bbe0b25534ae21969e82a10283cf23d 100644 (file)
@@ -20,7 +20,7 @@ namespace http {
 ///
 /// @param creator The HTTP response creator.
 /// @param request The HTTP request to validate.
-/// @param credentials Authorized credentials and user id map.
+/// @param credentials A map of all allowed credentials.
 /// @param realm Realm name.
 /// @return Error HTTP response if validation failed, null otherwise.
 HttpResponseJsonPtr checkBasicHttpAuth(const HttpResponseCreator& creator,