Support required for X-Auth-Token

Resolves #openbmc/openbmc-test-automation/1493

Change-Id: I3f0c93348d270e040ac747c43de884a154689313
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/code_update/test_image_upload.robot b/extended/code_update/test_image_upload.robot
index 2403393..cc1341b 100644
--- a/extended/code_update/test_image_upload.robot
+++ b/extended/code_update/test_image_upload.robot
@@ -169,7 +169,7 @@
     Initialize OpenBMC  ${timeout}  quiet=${quiet}
     ${base_uri}=  Catenate  SEPARATOR=  ${DBUS_PREFIX}  ${uri}
     ${headers}=  Create Dictionary  Content-Type=application/octet-stream
-    ...  Accept=application/octet-stream
+    ...   X-Auth-Token=${XAUTH_TOKEN}  Accept=application/octet-stream
     Set To Dictionary  ${kwargs}  headers  ${headers}
     Run Keyword If  '${quiet}' == '${0}'  Log Request  method=Post
     ...  base_uri=${base_uri}  args=&{kwargs}
diff --git a/extended/test_bmc_upload_stability.robot b/extended/test_bmc_upload_stability.robot
index 116bbc6..d6f9a79 100755
--- a/extended/test_bmc_upload_stability.robot
+++ b/extended/test_bmc_upload_stability.robot
@@ -60,7 +60,7 @@
     # Create the REST payload headers and data.
     ${data}=  Create Dictionary  data=${image_data}
     ${headers}=  Create Dictionary  Content-Type=application/octet-stream
-    ...  Accept=application/octet-stream
+    ...  X-Auth-Token=${XAUTH_TOKEN}  Accept=application/octet-stream
     Set To Dictionary  ${data}  headers  ${headers}
 
     # Upload to BMC and check for HTTP_BAD_REQUEST.
diff --git a/lib/certificate_utils.robot b/lib/certificate_utils.robot
index 54fb9db..6da2fb3 100755
--- a/lib/certificate_utils.robot
+++ b/lib/certificate_utils.robot
@@ -24,6 +24,7 @@
     Initialize OpenBMC  quiet=${quiet}
 
     ${headers}=  Create Dictionary  Content-Type=application/octet-stream
+    ...  X-Auth-Token=${XAUTH_TOKEN}
     Set To Dictionary  ${kwargs}  headers  ${headers}
 
     Run Keyword If  '${quiet}' == '${0}'  Log Request  method=Put
diff --git a/lib/rest_client.robot b/lib/rest_client.robot
index 3969ea7..59df8ec 100644
--- a/lib/rest_client.robot
+++ b/lib/rest_client.robot
@@ -7,12 +7,15 @@
 Library           disable_warning_urllib.py
 Library           utils.py
 Library           gen_misc.py
+Library           var_funcs.py
 Resource          rest_response_code.robot
 
 *** Variables ***
 # Assign default value to QUIET for programs which may not define it.
 ${QUIET}  ${0}
 
+${XAUTH_TOKEN}  ${EMPTY}
+
 *** Keywords ***
 OpenBMC Get Request
     [Documentation]  Do REST GET request and return the result.
@@ -37,8 +40,12 @@
     #          set kwargs as follows:
     #          ${kwargs}=  Create Dictionary  allow_redirect=${True}.
 
-    Initialize OpenBMC    ${timeout}  quiet=${quiet}
+    Initialize OpenBMC  ${timeout}  quiet=${quiet}
+
     ${base_uri}=    Catenate    SEPARATOR=    ${DBUS_PREFIX}    ${uri}
+    ${headers}=  Create Dictionary  Content-Type=application/octet-stream
+    ...  X-Auth-Token=${XAUTH_TOKEN}  Accept=application/octet-stream
+    Set To Dictionary  ${kwargs}  headers  ${headers}
     Run Keyword If  '${quiet}' == '${0}'  Log Request  method=Get
     ...  base_uri=${base_uri}  args=&{kwargs}
     ${ret}=  Get Request  openbmc  ${base_uri}  &{kwargs}  timeout=${timeout}
@@ -63,7 +70,8 @@
 
     Initialize OpenBMC    ${timeout}  quiet=${quiet}
     ${base_uri}=    Catenate    SEPARATOR=    ${DBUS_PREFIX}    ${uri}
-    ${headers}=     Create Dictionary   Content-Type=application/json
+    ${headers}=  Create Dictionary   Content-Type=application/json
+    ...  X-Auth-Token=${XAUTH_TOKEN}
     set to dictionary   ${kwargs}       headers     ${headers}
     Run Keyword If  '${quiet}' == '${0}'  Log Request  method=Post
     ...  base_uri=${base_uri}  args=&{kwargs}
@@ -88,6 +96,7 @@
     Initialize OpenBMC    ${timeout}
     ${base_uri}=    Catenate    SEPARATOR=    ${DBUS_PREFIX}    ${uri}
     ${headers}=     Create Dictionary   Content-Type=application/json
+    ...  X-Auth-Token=${XAUTH_TOKEN}
     set to dictionary   ${kwargs}       headers     ${headers}
     Log Request    method=Put    base_uri=${base_uri}    args=&{kwargs}
     ${ret}=  Put Request  openbmc  ${base_uri}  &{kwargs}  timeout=${timeout}
@@ -110,7 +119,10 @@
 
     Initialize OpenBMC    ${timeout}
     ${base_uri}=    Catenate    SEPARATOR=    ${DBUS_PREFIX}    ${uri}
-    Log Request    method=Delete    base_uri=${base_uri}    args=&{kwargs}
+    ${headers}=  Create Dictionary   Content-Type=application/json
+    ...  X-Auth-Token=${XAUTH_TOKEN}
+    Set To Dictionary   ${kwargs}  headers   ${headers}
+    Log Request  method=Delete  base_uri=${base_uri}  args=&{kwargs}
     ${ret}=  Delete Request  openbmc  ${base_uri}  &{kwargs}  timeout=${timeout}
     Log Response    ${ret}
     Delete All Sessions
@@ -119,32 +131,71 @@
 Initialize OpenBMC
     [Documentation]  Do a REST login connection within specified time.
     [Arguments]  ${timeout}=20  ${quiet}=${1}
-    ...  ${REST_USERNAME}=${REST_USERNAME}
-    ...  ${REST_PASSWORD}=${REST_PASSWORD}
+    ...  ${rest_username}=${REST_USERNAME}
+    ...  ${rest_password}=${REST_PASSWORD}
 
     # Description of argument(s):
-    # timeout  REST login attempt time out.
-    # quiet    Suppress console log if set.
+    # timeout        REST login attempt time out.
+    # quiet          Suppress console log if set.
+    # rest_username  The REST username.
+    # rest_password  The REST password.
+
+    ${bmcweb_status}=  Run Keyword And Return Status  BMC Web Login Request
+    ...  ${timeout}  ${rest_username}  ${rest_password}
+
+    Return From Keyword If  ${bmcweb_status} == ${True}
 
     # TODO : Task to revert this changes openbmc/openbmc-test-automation#532
     # This will retry at 20 second interval.
     Wait Until Keyword Succeeds  40 sec  20 sec
     ...  Post Login Request  ${timeout}  ${quiet}
-    ...  ${REST_USERNAME}  ${REST_PASSWORD}
+    ...  ${rest_username}  ${rest_password}
+
+
+BMC Web Login Request
+    [Documentation]  Do BMC web-based login.
+    [Arguments]  ${timeout}=20  ${rest_username}=${REST_USERNAME}
+    ...  ${rest_password}=${REST_PASSWORD}
+
+    # Description of argument(s):
+    # timeout        REST login attempt time out.
+    # rest_username  The REST username.
+    # rest_password  The REST password.
+
+    Create Session  openbmc  ${AUTH_URI}  timeout=${timeout}
+
+    ${headers}=  Create Dictionary  Content-Type=application/json
+    @{credentials}=  Create List  ${rest_username}  ${rest_password}
+    ${data}=  Create Dictionary  data=@{credentials}
+    ${resp}=  Post Request  openbmc  /login  data=${data}  headers=${headers}
+    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
+
+    ${processed_token_data}=
+    ...  Evaluate  re.split(r'[;,]', '${resp.headers["Set-Cookie"]}')  modules=re
+    ${result}=  Key Value List To Dict  ${processed_token_data}  delim==
+
+    # Example result data:
+    # 'XSRF-TOKEN=hQuOyDJFEIbrN4aOg2CT; Secure,
+    # SESSION=c4wloTiETumSxPI9nLeg; Secure; HttpOnly'
+    Set Global Variable  ${XAUTH_TOKEN}  ${result['session']}
+
 
 Post Login Request
     [Documentation]  Do REST login request.
     [Arguments]  ${timeout}=20  ${quiet}=${1}
-    ...  ${REST_USERNAME}=${REST_USERNAME}
-    ...  ${REST_PASSWORD}=${REST_PASSWORD}
+    ...  ${rest_username}=${REST_USERNAME}
+    ...  ${rest_password}=${REST_PASSWORD}
 
     # Description of argument(s):
-    # timeout  REST login attempt time out.
-    # quiet    Suppress console log if set.
+    # timeout        REST login attempt time out.
+    # quiet          Suppress console log if set.
+    # rest_username  The REST username.
+    # rest_password  The REST password.
 
     Create Session  openbmc  ${AUTH_URI}  timeout=${timeout}  max_retries=3
+
     ${headers}=  Create Dictionary  Content-Type=application/json
-    @{credentials}=  Create List  ${REST_USERNAME}  ${REST_PASSWORD}
+    @{credentials}=  Create List  ${rest_username}  ${rest_password}
     ${data}=  create dictionary   data=@{credentials}
     ${status}  ${resp}=  Run Keyword And Ignore Error  Post Request  openbmc
     ...  /login  data=${data}  headers=${headers}
@@ -152,10 +203,12 @@
     Should Be Equal  ${status}  PASS  msg=${resp}
     Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
 
+
 Log Out OpenBMC
     [Documentation]  Log out of the openbmc REST session.
 
     ${headers}=  Create Dictionary  Content-Type=application/json
+    ...  X-Auth-Token=${XAUTH_TOKEN}
     ${data}=  Create dictionary  data=@{EMPTY}
 
     # If there is no active sesion it will throw the following exception
@@ -300,7 +353,7 @@
     Initialize OpenBMC  ${timeout}  quiet=${quiet}
     ${base_uri}=  Catenate  SEPARATOR=  ${DBUS_PREFIX}  ${uri}
     ${headers}=  Create Dictionary  Content-Type=application/octet-stream
-    ...  Accept=application/octet-stream
+    ...  X-Auth-Token=${XAUTH_TOKEN}  Accept=application/octet-stream
     Set To Dictionary  ${kwargs}  headers  ${headers}
     Run Keyword If  '${quiet}' == '${0}'  Log Request  method=Post
     ...  base_uri=${base_uri}  args=&{kwargs}
diff --git a/lib/utils.robot b/lib/utils.robot
index 86101b5..ad413fa 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -98,7 +98,8 @@
     Run Keyword If  '${status}' == 'PASS'
     ...  Write Attribute  ${HOST_WATCHDOG_URI}  ExpireAction  data=${data}
 
-    ${data}=  Create Dictionary  data=${milliseconds}
+    ${int_milliseconds}=  Convert To Integer  ${milliseconds}
+    ${data}=  Create Dictionary  data=${int_milliseconds}
     Write Attribute  ${HOST_WATCHDOG_URI}  Interval  data=${data}
 
     ${data}=  Create Dictionary  data=${True}
@@ -567,7 +568,7 @@
     @{password}=  Create List  ${openbmc_password}
     ${data}=  Create Dictionary  data=@{password}
 
-    ${headers}=  Create Dictionary  Content-Type=application/json
+    ${headers}=  Create Dictionary  Content-Type=application/json  X-Auth-Token=${XAUTH_TOKEN}
     ${resp}=  Post Request  openbmc  ${BMC_USER_URI}root/action/SetPassword
     ...  data=${data}  headers=${headers}
     Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
diff --git a/test_lists/HW_CI b/test_lists/HW_CI
index 525d8b4..6d29e31 100644
--- a/test_lists/HW_CI
+++ b/test_lists/HW_CI
@@ -13,7 +13,8 @@
 -i REST_Login_Session_To_BMC
 -i Verify_REST_Get_Message_JSON_Compliant
 -i Verify_REST_Post_Message_JSON_Compliant
--i Verify_REST_Bad_Request_Post_Message_JSON_Compliant
+#TODO: Enable when fixed bmcweb crashing out due to this.
+#-i Verify_REST_Bad_Request_Post_Message_JSON_Compliant
 -i REST_Put_Message_JSON_Format_Compliance_Test
 -i Verify_REST_JSON_Data_On_Success
 -i Verify_REST_JSON_Data_On_Failure
diff --git a/test_lists/skip_test_witherspoon b/test_lists/skip_test_witherspoon
index 8fa56a2..6e14d9f 100644
--- a/test_lists/skip_test_witherspoon
+++ b/test_lists/skip_test_witherspoon
@@ -76,3 +76,5 @@
 -e Verify_IPMI_Disable_Persistency_After_BMC_Reboot
 # Remote logging
 -e Verify_BMC_Journald_Contains_No_Credential_Data
+# Non bmcweb certificate.
+-e Certificate_Test
diff --git a/test_lists/witherspoon/regression_bucket_bmcweb b/test_lists/witherspoon/regression_bucket_bmcweb
new file mode 100644
index 0000000..3288daf
--- /dev/null
+++ b/test_lists/witherspoon/regression_bucket_bmcweb
@@ -0,0 +1,196 @@
+# Basic power on test.
+-i Test_Remote_Logging_Configuration
+-i Check_For_Application_Failures
+-i Test_SSH_And_IPMI_Connections
+# IPMI test.
+-i IPMI_Chassis_Restore_Power_Policy
+-i Verify_Host_PowerOn_Via_IPMI
+-i Verify_Host_PowerOff_Via_IPMI
+-i Test_FRU_Info_At_Power_On
+-i Test_IPMI_Warm_Reset
+-i Test_CPU_Core_SDR_Info_At_Power_On
+-i Test_DIMM_SDR_Info_At_Power_On
+-i Test_Turbo_Allowed_SDR_Info
+-i Test_Auto_Reboot_SDR_Info
+-i Test_TPM_Enable_SDR_Info
+-i DIMM_Present_And_Not_Present
+-i Set_SOL_Disabled
+-i Verify_SOL_During_Boot
+-i Set_Valid_SOL_Retry_Count
+-i Verify_IPMI_SEL_Version
+-i Verify_Empty_SEL
+-i Verify_Supported_Cipher_List
+-i Verify_Unsupported_Cipher_List
+-i Set_Asset_Tag_With_Valid_String_Length
+-i Verify_Get_And_Set_Management_Controller_ID_String
+-i Test_Management_Controller_ID_String_Status_via_IPMI
+-i Verify_Chassis_Identify_via_IPMI
+-i Test_Watchdog_Reset_Via_IPMI_And_Verify_Using_REST
+-i Test_Ambient_Temperature_Via_IPMI
+-i Verify_Get_DCMI_Capabilities
+-i Test_Power_Reading_Via_IPMI_With_Host_Booted
+-i Retrieve_IP_Address_Via_IPMI_And_Verify_With_BMC_Details
+-i Verify_Get_Device_ID
+-i Verify_SDR_Info
+-i Verify_Supported_Cipher_List
+-i Verify_Unsupported_Cipher_List
+-i Verify_Supported_Cipher_List_Via_Lan_Print
+-i Verify_Supported_Cipher_Via_Getciphers
+# Device tree.
+-i Check_BMC_Model_Property_Is_Set
+-i Check_BMC_Compatible_Property_Is_Set
+-i Check_BMC_CPU_Name_Property_Is_Set
+-i Check_BMC_CPU_Compatible_Property_Is_Set
+-i Check_BMC_GPIO_FSI_Name_Property_Is_Set
+-i Check_BMC_GPIO_FSI_Compatible_Property_Is_Set
+-i Check_BMC_GPIO_keys_Name_Property_Is_Set
+-i Check_BMC_GPIO_keys_Compatible_Property_Is_Set
+-i Check_BMC_IIO-HWMON_Name_Property_Is_Set
+-i Check_BMC_IIO-HWMON_Compatible_Property_Is_Set
+-i Check_BMC_LED_Name_Property_Is_Set
+-i Check_BMC_LED_Compatible_Property_Is_Set
+# BMC Dump.
+-i Verify_User_Initiated_Dump_Size
+-i Delete_All_BMC_Dumps_And_Verify
+-i Verify_Dump_Persistency_On_Reset
+# BMC File Mirroring.
+-i Test_BMC_Alt_Side_Mirroring
+# BMC boot and device policies.
+-i Set_The_Boot_Source_As_Disk_Using_REST_API
+-i Set_The_Boot_Source_As_CDROM_Using_Ipmitool
+-i Set_The_Boot_Mode_As_Setup_Using_REST_API
+-i Set_The_Boot_Mode_As_Safe_Using_Ipmitool
+-i Set_Boot_Policy_To_PERMANENT_via_REST
+-i Set_Boot_Policy_To_ONETIME_via_IPMITOOL
+-i Test_Boot_Order_via_REST
+# Hardware Sensors.
+-i Verify_System_Ambient_Temperature
+-i Verify_Fan_Sensor_Attributes
+-i Verify_PCIE_Sensor_Attributes
+-i Verify_Rail_Voltage_Sensor_Attributes
+-i Verify_VDN_Temperature_Sensors_Attributes
+-i Verify_VCS_Temperature_Sensors_Attributes
+-i Verify_VDD_Temperature_Sensors_Attributes
+-i Verify_VDDR_Temperature_Sensors_Attributes
+-i Verify_Power_Redundancy_Using_REST
+-i Verify_Power_Redundancy_Using_IPMI
+# System Inventory.
+-i Verify_System_Inventory_Path
+-i Verify_Boxelder_Present_Property
+-i Verify_UUID_Entry
+-i Verify_Boxelder_MAC_Address_Property_Is_Populated
+-i Verify_Chassis_Motherboard_Properties
+-i Verify_CPU_Present
+-i Verify_DIMM_Present
+-i Verify_FRU_Properties
+-i Verify_GPU_Properties
+-i Verify_Core_Properties
+-i Verify_Fan_Properties
+-i Verify_Core_Functional_State
+-i Verify_DIMM_Functional_State
+-i Verify_Fan_Functional_State
+-i Verify_CPU_Functional_State
+-i Verify_GPU_Functional_State
+-i Check_Air_Or_Water_Cooled
+-i Verify_Minimal_CPU_Inventory
+-i Verify_Minimal_DIMM_Inventory
+-i Verify_Minimal_Core_Inventory
+-i Verify_Minimal_Fan_Inventory
+-i Verify_Minimal_Power_Supply_Inventory
+# LED
+-i Verify_Rear_Power_LED_With_Host_Power_Off
+-i Verify_Rear_Power_LED_With_Host_Power_On
+# OCC and reset reload.
+-i Verify_OCC_State_After_BMC_Reset
+# Power Restory policy.
+-i Test_Restore_Policy_ALWAYS_POWER_OFF_With_Host_Off
+# REST Test.
+-i REST_Login_Session_To_BMC
+-i REST_Logout_Session_To_BMC
+-i REST_Delete_All_Sessions_And_Expect_Error
+-i Multiple_Requests_On_BMC_Using_Single_REST_Session
+-i Verify_REST_JSON_Data_On_Success
+-i Verify_REST_JSON_Data_On_Failure
+-i Verify_REST_Get_Message_JSON_Compliant
+-i Verify_REST_Post_Message_JSON_Compliant
+-i Verify_REST_Bad_Request_Post_Message_JSON_Compliant
+-i REST_Put_Message_JSON_Format_Compliance_Test
+-i Check_Response_Codes_415
+-i Get_Response_Codes
+-i Get_Data
+-i Get_Data_Validation
+-i Put_Response_Codes
+-i Put_Data_Validation
+-i Post_Response_Codes
+-i Delete_Response_Codes
+-i Verify_All_REST_Objects_Are_Accessible
+# Soft boot sensors.
+-i Verify_Boot_Sensor_States_At_Host_Booted
+# Software manager.
+-i Verify_Software_Purpose
+-i BMC_Software_Hex_ID
+-i BMC_Software_Version
+-i BMC_Software_Path
+-i BMC_Software_RequestedActivation
+-i BMC_Software_Activation_Association
+-i Host_Software_Hex_ID
+-i Host_Software_Version
+-i Host_Software_Path
+-i BMC_Software_RequestedActivation
+-i Host_Software_Activation_Association
+# Time.
+-i Get_System_Time
+-i Set_Valid_System_Time
+-i Set_BMC_Time_With_BMC_And_Manual
+-i Set_BMC_Time_With_Both_And_Manual
+-i Set_BMC_Time_With_Split_And_Manual
+-i Set_Host_Time_With_Host_And_Manual
+-i Set_Host_Time_With_Both_And_Manual
+-i Set_Host_Time_With_Split_And_Manual
+-i Set_Host_Time_With_Split_And_NTP
+# Logging and SEL.
+-i Verify_eSEL_Using_REST
+-i Verify_eSEL_Entries_Using_REST
+-i Verify_eSEL_Description_And_EntryID_Using_REST
+-i Check_eSEL_AdditionalData
+-i Create_Test_Error_And_Verify
+-i Test_Error_Persistency_On_Restart
+-i Test_Error_Entry_Numbering_Reset_On_Restart
+-i Create_Test_Error_And_Verify_Resolved_Field
+-i Create_Test_Error_And_Verify_Time_Stamp
+-i Create_Test_Error_Log_And_Delete
+-i Verify_IPMI_SEL_Delete
+-i Verify_IPMI_SEL_Entries
+-i Verify_IPMI_SEL_Last_Add_Time
+-i Create_Test_Error_Callout_And_Verify_AdditionalData
+-i Create_Test_Error_Callout_And_Verify_Associations
+-i Create_Test_Error_Callout_And_Verify_LED
+-i Set_Resolved_Field_And_Verify_Callout_Deletion
+# Network
+-i Get_BMC_IPv4_Address_And_Verify
+-i Verify_IPv4_Prefix_Length
+-i Verify_Gateway_Address
+-i Verify_MAC_Address
+-i Add_Fourth_Octet_Threshold_IP_And_Verify
+-i Add_Third_Octet_Threshold_IP_And_Verify
+-i Add_Second_Octet_Threshold_IP_And_Verify
+-i Add_First_Octet_Threshold_IP_And_Verify
+-i Verify_Hostname
+# SNMP
+-i Configure_SNMP_Manager_On_BMC_And_Verify
+-i Configure_SNMP_Manager_On_BMC_With_Non_Default_Port_And_Verify
+-i Configure_SNMP_Manager_On_BMC_With_Out_Of_Range_IP_And_Verify
+-i Configure_Multiple_SNMP_Managers_And_Verify
+-i Configure_Multiple_SNMP_Managers_With_Non_Default_Port_And_Verify
+-i Configure_Multiple_SNMP_Managers_With_Different_Ports_And_Verify
+-i Configure_SNMP_Manager_On_BMC_With_Empty_Port_And_Verify
+# Fan and energy scale test.
+-i Escale_Base_Test_Inactive_Monitoring
+-i Escale_Base_Test_Active_Monitoring
+-i Escale_Power_Setting_Via_REST_And_Verify
+-i Escale_Power_Setting_Via_IPMI_And_Verify
+-i Escale_Activation_Test_Via_REST
+-i Escale_Dectivation_Test_Via_REST
+-i Check_Number_Of_Fans_With_Power_On
+-i Check_Number_Of_Fan_Monitors_With_Power_On
+-i Check_Fan_Speed
diff --git a/test_lists/witherspoon/regression_bucket_master b/test_lists/witherspoon/regression_bucket_master
index 37fae6a..3288daf 100644
--- a/test_lists/witherspoon/regression_bucket_master
+++ b/test_lists/witherspoon/regression_bucket_master
@@ -194,14 +194,3 @@
 -i Check_Number_Of_Fans_With_Power_On
 -i Check_Number_Of_Fan_Monitors_With_Power_On
 -i Check_Fan_Speed
-# Certificate
--i Test_Server_Certificate_Install_With_Valid_Certificate_And_Valid_Private_Key
--i Test_Server_Certificate_Install_With_Empty_Certificate_And_Valid_Private_Key
--i Test_Server_Certificate_Install_With_Valid_Certificate_And_Empty_Private_Key
--i Test_Server_Certificate_Install_With_Empty_Certificate_And_Empty_Private_Key
--i Test_Client_Certificate_Install_With_Valid_Certificate_And_Valid_Private_Key
--i Test_Client_Certificate_Install_With_Empty_Certificate_And_Valid_Private_Key
--i Test_Client_Certificate_Install_With_Valid_Certificate_And_Empty_Private_Key
--i Test_Client_Certificate_Install_With_Empty_Certificate_And_Empty_Private_Key
--i Test_Delete_Server_Certificate
--i Test_Delete_Client_Certificate
diff --git a/tests/test_rest_interfaces.robot b/tests/test_rest_interfaces.robot
index 3089166..856d23d 100644
--- a/tests/test_rest_interfaces.robot
+++ b/tests/test_rest_interfaces.robot
@@ -198,7 +198,7 @@
     # Create the REST payload headers and data
     ${data}=  Create Dictionary  data  ${image_data}
     ${headers}=  Create Dictionary  Content-Type=application/octet-stream
-    ...  Accept=application/octet-stream
+    ...  X-Auth-Token=${XAUTH_TOKEN}  Accept=application/octet-stream
     Set To Dictionary  ${data}  headers  ${headers}
 
     ${resp}=  Post Request  openbmc  /upload/image  &{data}
@@ -229,7 +229,7 @@
 
     # Create the REST payload headers and EMPTY data
     ${data}=  Create Dictionary  data  ${EMPTY}
-    ${headers}=  Create Dictionary  Content-Type=application/json
+    ${headers}=  Create Dictionary  Content-Type=application/json  X-Auth-Token=${XAUTH_TOKEN}
     Set To Dictionary  ${data}  headers  ${headers}
 
     ${resp}=  Post Request  openbmc  /upload/image  &{data}