summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorjayaprakash Mutyala <mutyalax.jayaprakash@intel.com>2020-01-22 02:41:36 +0300
committerJayaprakash Mutyala <mutyalax.jayaprakash@intel.com>2020-03-09 07:58:27 +0300
commit70d1d0aa05e3e07bb98564a2d2d3b702b18a1582 (patch)
tree7e28614c817d0f31317998917ad8d5fe2684ccfa /CMakeLists.txt
parentf7929c31c792f96afd1d4e7469f5bf599a553487 (diff)
downloadbmcweb-70d1d0aa05e3e07bb98564a2d2d3b702b18a1582.tar.xz
Allow sensor value override in mfg mode only
Issue: User is able to override sensor value even though system is not in manufacturing mode Fix: Code changes are done to patch sensor values when system is only in manufacturing Mode. Tested: 1. Redfish validator - passed for this new change Case 1: 1. Enable manufacturing mode by pressing power button while bmc booting 2. Patch sensor values from Redfish. Redfish URI: PATCH https://<BMC-IP>/redfish/v1/Chassis/WC_Baseboard/Thermal Body: { "Temperatures": [ { "MemberId": "SSB_Temp", "ReadingCelsius":112 } ] } Response: { "@odata.id": "/redfish/v1/Chassis/WC_Baseboard/Thermal", "@odata.type": "#Thermal.v1_4_0.Thermal", "Fans": [], "Id": "Thermal", "Name": "Thermal", "Temperatures": [] } 3. Sensor value Overridden successfully Case 2: Varified for ValidationUnsecure mode. Case 3: Tested without SpecialMode mode 1. Stop the specialmodemgr.service service 2. Patch sensor values from Redfish. 3. Sensor value Overridden successfully Case 4: 1. Disable manufacturing mode Command: ipmitool raw 0x30 0xB4 3 0 Response: //Success 2. Patch sensor values from Redfish. Redfish URI: PATCH https://<BMC-IP>/redfish/v1/Chassis/WC_Baseboard/Thermal Body: { "Temperatures": [ { "MemberId": "SSB_Temp", "ReadingCelsius":112 } ] } 3. Returning proper error. Response : { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "/redfish/v1/$metadata#Message.v1_0_0.Message", "Message": "The action Overriding of Sensor Value for non manufacturing mode is not supported by the resource.", "MessageArgs": [ "Overriding of Sensor Value for non manufacturing mode" ], "MessageId": "Base.1.4.0.ActionNotSupported", "Resolution": "The action supplied cannot be resubmitted to the implementation. Perhaps the action was invalid, the wrong resource was the target or the implementation documentation may be of assistance.", "Severity": "Critical" } ], "code": "Base.1.4.0.ActionNotSupported", "message": "The action Overriding of Sensor Value for non manufacturing mode is not supported by the resource." } } Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Change-Id: I34cd53fba939fb367310c531a050792ef749dd70
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f874d9d5cb..3ced518b68 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,6 +119,11 @@ option (
OFF
)
+option (BMCWEB_ENABLE_VALIDATION_UNSECURE_FEATURE
+ "Enables unsecure features required by validation. Note: must
+ be turned off for production images."
+ OFF)
+
set (BMCWEB_HTTP_REQ_BODY_LIMIT_MB "30" CACHE STRING
"The max HTTP request body size in MB")
@@ -392,6 +397,8 @@ target_compile_definitions (
-DBMCWEB_INSECURE_ENABLE_REDFISH_FW_TFTP_UPDATE>
$<$<BOOL:${BMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE}>:
-DBMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE>
+ $<$<BOOL:${BMCWEB_ENABLE_VALIDATION_UNSECURE_FEATURE}>:
+ -DBMCWEB_ENABLE_VALIDATION_UNSECURE_FEATURE>
)
# configure and install systemd unit files