summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorjayaprakash Mutyala <mutyalax.jayaprakash@intel.com>2020-03-05 01:26:38 +0300
committerJayaprakash Mutyala <mutyalax.jayaprakash@intel.com>2020-03-14 20:18:43 +0300
commit91e130a365a0d3b93357e6efa0a5be8a0b53c6d1 (patch)
tree781f03cfc4e45771972aeb9bfd80fbe9ff7380cd /CMakeLists.txt
parent818ea7b8f06292eaaa82ba67ef21933f50d71192 (diff)
downloadbmcweb-91e130a365a0d3b93357e6efa0a5be8a0b53c6d1.tar.xz
Allow unrestricted sensor override through flag
Allow overriding sensor values without any restriction based on BMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE flag Tested: 1. Redfish validator - passed for this new change 2. Verified for BMCWEB_ENABLE_VALIDATION_UNSECURE_FEATURE is OFF and BMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE is ON 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: Verified 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. 3. Sensor value Overridden successfully Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Change-Id: I0557cc88d2aceebade4b78e4478e17feecb6e088
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 12 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ced518b68..4bf16735e3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -119,10 +119,16 @@ option (
OFF
)
-option (BMCWEB_ENABLE_VALIDATION_UNSECURE_FEATURE
- "Enables unsecure features required by validation. Note: must
- be turned off for production images."
- OFF)
+option (
+ BMCWEB_ENABLE_VALIDATION_UNSECURE_FEATURE
+ "Enables unsecure features required by validation. Note: must
+ be turned off for production images."
+ OFF)
+
+option (
+ BMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE
+ "Enables Sensor override feature without any check."
+ OFF)
set (BMCWEB_HTTP_REQ_BODY_LIMIT_MB "30" CACHE STRING
"The max HTTP request body size in MB")
@@ -399,6 +405,8 @@ target_compile_definitions (
-DBMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE>
$<$<BOOL:${BMCWEB_ENABLE_VALIDATION_UNSECURE_FEATURE}>:
-DBMCWEB_ENABLE_VALIDATION_UNSECURE_FEATURE>
+ $<$<BOOL:${BMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE}>:
+ -DBMCWEB_INSECURE_UNRESTRICTED_SENSOR_OVERRIDE>
)
# configure and install systemd unit files