From c0ea7ae1c502fa2c67b0a58aee05b75581dafa7a Mon Sep 17 00:00:00 2001 From: Sunitha Harish Date: Fri, 30 Oct 2020 02:37:30 -0500 Subject: Redfish Session : Support ClientOriginIPAddress This commit implements the ClientOriginIPAddress property on the session resource. The IP address is persisted across the reboot Tested by: 1. Create session POST https://${bmc}/redfish/v1/SessionService/Sessions -d '{"UserName":<>, "Password":<>}' 2. Check the session gets updated with the ClientOriginIPAddress GET https://${bmc}/redfish/v1/SessionService/Sessions/ 3. Redfish validator passed 4. Create session and reboot the BMC to ensure the IP address is persisted 5. Tested the basic auth populates the clientIp at req Signed-off-by: Sunitha Harish Change-Id: Iaa60d0657c991bde4bcf6c86819055c71c92e421 --- include/persistent_data.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'include/persistent_data.hpp') diff --git a/include/persistent_data.hpp b/include/persistent_data.hpp index 19c424a202..0ff0c7e1df 100644 --- a/include/persistent_data.hpp +++ b/include/persistent_data.hpp @@ -193,6 +193,7 @@ class ConfigFile {"session_token", p.second->sessionToken}, {"username", p.second->username}, {"csrf_token", p.second->csrfToken}, + {"client_ip", p.second->clientIp}, #ifdef BMCWEB_ENABLE_IBM_MANAGEMENT_CONSOLE {"client_id", p.second->clientId}, #endif -- cgit v1.2.3