Configuration recovery method for baseboard management controller and baseboard management controller
By running a first operating system in a trusted execution environment on the baseboard management controller to verify external devices and combining this with physical button confirmation, the problem of easily tampered configuration files is solved, thus improving the security of the baseboard management controller and the reliability of configuration recovery.
Patent Information
- Application Number
- PCT/CN2025/136154
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-06
- Filing Date
- 2025-11-19
- Publication Date
- 2026-11-12
AI Technical Summary
In the prior art, the configuration files of the baseboard management controller are easily tampered with by malicious software, resulting in poor security and affecting the normal and stable operation of the server.
The first operating system and the second operating system run on different hardware resources of the baseboard management controller. The first operating system, in a trusted execution environment, ensures the security of the configuration recovery process by verifying external devices and confirming with physical buttons.
It improves the security of the baseboard management controller, reduces the risk of configuration file tampering, ensures that configuration recovery is performed with human intervention, prevents malicious software from triggering illegally, and guarantees the stable operation of the server.
Smart Images

Figure CN2025136154_12112026_PF_FP_ABST
Abstract
Description
Configuration recovery method for baseboard management controller and baseboard management controller
[0001] Cross-references to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510574120.0, filed on May 6, 2025, entitled “Configuration Recovery Method and Baseboard Management Controller for Baseboard Management Controller”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of server technology, and in particular to a configuration recovery method for a baseboard management controller and a baseboard management controller. Background Technology
[0004] In servers, the baseboard management controller is mainly used for remote server management, such as monitoring hardware status, restarting the system, and upgrading firmware. When the baseboard management controller fails, the configuration recovery method used in related technologies is to restore the configuration using the configuration file stored internally by the baseboard management controller.
[0005] However, the configuration file used for configuration recovery is easily tampered with by malware and replaced with a malicious version. Using the tampered configuration file for configuration recovery can easily damage the baseboard management controller, thereby affecting the normal and stable operation of the server.
[0006] Therefore, it can be seen that the configuration recovery method of the baseboard management controller in the related technology has the problem of poor security of the baseboard management controller due to the fact that the configuration file is easily tampered with. Summary of the Invention
[0007] This application provides a configuration recovery method for a baseboard management controller and a baseboard management controller, so as to at least solve the problem of poor security of the baseboard management controller caused by the easy tampering of the configuration file in the configuration recovery method of the baseboard management controller in the related art.
[0008] According to a first aspect, this application provides a configuration recovery method for a baseboard management controller, wherein a first operating system and a second operating system run on different hardware resources of the baseboard management controller, and the first operating system runs in a trusted execution environment; the method includes: when a first external device of a specified type is connected to the server where the baseboard management controller is located, verifying the first external device through the first operating system, and if the first external device is verified successfully, sending a recovery confirmation request to the first external device through the second operating system, wherein the specified type is a device type used to store configuration information of the baseboard management controller, and the recovery confirmation request is used to request confirmation of configuration recovery by pressing a specified key on the first external device; when the specified key is detected to be pressed, obtaining the first configuration information stored in the first external device through the second operating system via the first operating system, and using the first configuration information to control the second operating system to perform configuration recovery on the baseboard management controller.
[0009] According to the second aspect, this application also provides a baseboard management controller, on which a first operating system and a second operating system run on different hardware resources. The first operating system runs in a trusted execution environment. The first operating system is used to verify a first external device of a specified type when the server where the baseboard management controller resides connects to it. If the first external device is successfully verified, the second operating system sends a recovery confirmation request to the first external device. The specified type is a device type used to store configuration information of the baseboard management controller. The recovery confirmation request requests confirmation of configuration recovery by pressing a specified button on the first external device. Upon detecting that the specified button has been pressed, the second operating system obtains the first configuration information stored on the first external device and uses the first configuration information to control the second operating system to perform configuration recovery on the baseboard management controller. The second operating system is used to send the recovery confirmation request to the first external device and perform configuration recovery on the baseboard management controller.
[0010] According to a third aspect, this application also provides a server, including: a baseboard management controller, on which a first operating system and a second operating system run, the first operating system running in a trusted execution environment; wherein, the first operating system is used to verify the first external device when the server connects to a first external device of a specified type, and, if the first external device is verified successfully, to send a recovery confirmation request to the first external device via the second operating system, wherein the specified type is a device type used to store configuration information of the baseboard management controller, and the recovery confirmation request is used to request confirmation of configuration recovery by pressing a specified key on the first external device; when the specified key is detected to be pressed, the second operating system obtains the first configuration information stored in the first external device, and uses the first configuration information to control the second operating system to perform configuration recovery on the baseboard management controller; the second operating system is used to send the recovery confirmation request to the first external device and perform configuration recovery on the baseboard management controller.
[0011] According to a fourth aspect, this application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to perform the steps of any of the above method embodiments via the computer program.
[0012] According to a fifth aspect, this application also provides a non-volatile readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments at runtime.
[0013] According to a sixth aspect, this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer non-volatile readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.
[0014] This application utilizes a first operating system and a second operating system to run on different hardware resources of the baseboard management controller. The first operating system, running in a trusted execution environment, controls the execution of configuration recovery, thereby improving the security of configuration recovery. When a first external device of a specified type (a device type used to store the baseboard management controller's configuration information) is connected to the server where the baseboard management controller resides, the first operating system verifies the first external device to ensure its legitimacy. If the first external device is successfully verified, the second operating system sends a recovery confirmation request to the first external device, requesting confirmation by pressing a specified button on the first external device to perform configuration recovery. Configuration recovery ensures that it is performed with human intervention, reducing the possibility of configuration recovery being illegally triggered by malicious software. When a specified key is detected to be pressed, the first operating system obtains the first configuration information stored on the first external device through the second operating system, and uses the first configuration information to control the second operating system to perform configuration recovery on the baseboard management controller. Since the configuration information is stored on the external device, the timing of the external device's access to the server can be controlled, thereby reducing the risk of configuration information being tampered with. This solves the technical problem of poor security of the baseboard management controller caused by the easy tampering of configuration files in the configuration recovery method of the baseboard management controller in related technologies, and achieves the technical effect of improving the security of the baseboard management controller. Attached Figure Description
[0015] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 is a schematic diagram of an application scenario of a configuration recovery method for a baseboard management controller provided in an embodiment of this application.
[0017] Figure 2 is a flowchart of a configuration recovery method for a baseboard management controller according to an embodiment of this application.
[0018] Figure 3 is a system framework diagram of a baseboard management controller according to an embodiment of this application.
[0019] Figure 4 is a schematic diagram of a process for creating a one-click recovery USB key according to an embodiment of this application.
[0020] Figure 5 is a schematic diagram of a one-click recovery process for a USB key according to an embodiment of this application.
[0021] Figure 6 is a structural block diagram of a baseboard management controller according to an embodiment of this application.
[0022] Figure 7 is a computer system architecture block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0024] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0025] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0026] According to one aspect of the embodiments of this application, a configuration recovery method for a baseboard management controller is provided. In this embodiment, the above-described configuration recovery method for the baseboard management controller can be applied, but is not limited to, to a hardware environment including a server 102 (including a baseboard management controller 104), a configuration device 106, and an external device 108 as shown in FIG. 1. The configuration device 106 can be connected to the server 102 via a network or a data cable, and the external device 108 can be connected to the server 102 by directly plugging into an interface on the server 102, connecting to an interface on the server 102 via a data cable, or other means. When the baseboard management controller 104 needs to perform configuration recovery, the configuration information stored on the external device 108 can be used to perform configuration recovery on the baseboard management controller 104.
[0027] The aforementioned network may include, but is not limited to, at least one of the following: wired network and wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network (WAN), metropolitan area network (MAN), and local area network (LAN). The aforementioned wireless network may include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI) and Bluetooth. Server 102 may be, but is not limited to, a cloud server, a server cluster, or other server types. Configuration device 106 may be, but is not limited to, a personal computer (PC), mobile phone, tablet computer, etc. External device 108 may include, but is not limited to, at least one of the following: Universal Serial Bus (USB) storage devices (e.g., USB flash drive), USB security tokens, etc.
[0028] The configuration recovery method of the baseboard management controller in this embodiment can be executed by the baseboard management controller 104, or by the baseboard management controller 104 in combination with at least one of the configuration device 106 and the external device 108. The configuration device 106 executing the configuration method of the baseboard management controller in this embodiment can also be executed by a client installed on it.
[0029] Taking the configuration recovery method of the baseboard management controller in this embodiment executed by the baseboard management controller 104 as an example, FIG2 is a schematic flowchart of an optional baseboard management controller according to an embodiment of the present application. As shown in FIG2, the process of the method may include steps S202 to S204.
[0030] Step S202: When a first external device of a specified type is connected to the server where the baseboard management controller is located, the first external device is verified through the first operating system. If the first external device is verified successfully, a recovery confirmation request is sent to the first external device through the second operating system. The specified type is the device type used to store the configuration information of the baseboard management controller. The recovery confirmation request is used to request configuration recovery by pressing a specified button on the first external device.
[0031] Step S204: When a designated button is detected to be pressed, the first operating system obtains the first configuration information stored in the first external device through the second operating system, and uses the first configuration information to control the second operating system to restore the configuration of the baseboard management controller.
[0032] The configuration recovery method for the baseboard management controller in this application embodiment can be applied to the field of server technology, specifically to scenarios involving the configuration recovery of a server's baseboard management controller. Servers are core infrastructure supporting the operation of various information systems and networks. In a server, the baseboard management controller (BMC) is a component responsible for monitoring and managing the server's hardware status. It is typically integrated on the server motherboard and is primarily used for remote server management, such as monitoring hardware status (using various sensors to monitor hardware health, such as temperature, voltage, fan speed, etc.), restarting the system (e.g., remote power on / off), and firmware upgrades. The baseboard management controller plays a crucial role in ensuring the stable operation and performance of the server.
[0033] When the baseboard management controller malfunctions (or other situations require configuration recovery), the baseboard management controller's configuration file needs to be configured. The configuration recovery method used in related technologies involves using the baseboard management controller's internally stored configuration file for recovery, primarily relying on software-level mechanisms.
[0034] However, the configuration recovery method of the aforementioned baseboard management controller lacks security. The recovery process is susceptible to tampering by malicious software, resulting in the configuration file used for configuration recovery being replaced with a malicious version. Since the configuration file is stored internally within the baseboard management controller, if the baseboard management controller is rooted (illegally accessed), malicious attackers can modify the configuration file or inject malicious code to trigger configuration recovery, thereby damaging the baseboard management controller and affecting the normal and stable operation of the server.
[0035] Furthermore, the configuration recovery function of the baseboard management controller in related technologies is usually implemented in the World Wide Web (web) front end, Redfish (a standardized protocol for server management), or Intelligent Platform Management Interface (IPMI) commands, which rely on the network and cannot be used when the network is down or under attack.
[0036] To at least partially address the aforementioned issues, in this embodiment, the configuration information used for configuration recovery of the baseboard management controller is stored on an external device. This allows control over when the external device connects to the server, thereby reducing the risk of configuration information being tampered with. Furthermore, a first operating system and a second operating system run on different hardware resources of the baseboard management controller. The first operating system runs in a trusted execution environment, and the external device is verified by the first operating system. Combined with a physical confirmation button, configuration recovery is performed, ensuring that the configuration recovery is executed under human supervision, reducing the possibility of malicious configuration recovery, and improving the security of the baseboard management controller.
[0037] The configuration recovery method for the baseboard management controller in this embodiment can be a one-click recovery scheme. Users only need to press a specific button or perform a simple operation to automatically restore the configuration of the baseboard management controller. When the baseboard management controller malfunctions, the fast, accurate, and safe one-click recovery can ensure the stable operation of the server.
[0038] The baseboard management controller can have various hardware resources, such as processors, memory, and peripherals. It can run a first operating system and a second operating system on different hardware resources. The first operating system runs in a Trusted Execution Environment (TEE). The partitioning of hardware resources can be implemented through hardware mechanisms. For example, certain registers of the processor, memory regions, and peripherals are explicitly assigned corresponding attributes to distinguish the operating system (OS) to which the hardware resource belongs.
[0039] It should be noted that, considering the different processor architectures used by the baseboard management controller and the different naming considerations (e.g., from the perspective of functionality, from the perspective of usage frequency, etc.), the first operating system can also be called a secure operating system or a trusted operating system, and the second operating system can also be called a normal operating system or a general operating system, as long as they can meet the requirement that the two run on different hardware resources and one of the operating systems runs in a feasible execution environment.
[0040] A trusted execution environment is a combination of hardware and software technology designed to provide a secure, isolated environment for applications running on a device. The design goal of a TEE is to run transparently without interfering with applications and services in the non-secure execution environment (REE). If the processor, firmware, operating system configuration, and runtime checks all indicate that TEE support is present, with explicit secure storage, resource access, trusted applications, and access control, then the operating system is determined to be running in a TEE.
[0041] Taking a baseboard management controller using an Advanced RISC Machines (ARM) processor architecture as an example, the ARM processor architecture is a Reduced Instruction Set Computer (RISC) processor that can be applied to mobile devices, embedded systems, and servers. Configuration recovery of the baseboard management controller using the ARM processor architecture can rely on the ARM TrustZone technology to physically isolate the data to be protected, thereby ensuring data security. TrustZone is a system-level security technology that divides the hardware resources of the entire system (for example, a chip, a device, and the like, and in this embodiment, a baseboard management controller) into two worlds: a secure world (corresponding to a first operating system) and a non-secure world (corresponding to a second operating system). This division is achieved through hardware mechanisms, for example, certain registers of the processor, memory regions, peripherals, and the like are explicitly divided into secure or non-secure attributes. At the hardware level, the secure world and the non-secure world have independent running environments, including independent instruction set execution spaces, memory mappings, and the like, just like two relatively independent "subsystems" are constructed within a baseboard management controller, and the degree of isolation between them is very high. The non-secure world cannot directly access the resources of the secure world unless through a strictly defined secure interface.
[0042] It should be noted that the baseboard management controller using the ARM processor architecture can utilize the multi-level execution environment of the ARM processor, such as EL0 (Event Level 0, i.e., the ARM CPU's unprivileged mode) to EL3 (Event Level 3, i.e., the ARM CPU's secure mode), to run operating systems with different security levels. EL3 is the highest privilege execution level, typically used to run security-related firmware, such as ARM ATF (ARM Trusted Firmware). In the ARM processor architecture, the baseboard management controller may, but is not limited to, include the following components: a series of hardware interfaces, such as an Inter-Integrated Circuit (I2C) bus. 2C) Serial Peripheral Interface (SPI), Peripheral Component Interconnect Express (PCIe), etc., through which the baseboard management controller can communicate with other components of the server to monitor sensor data, control fans, communicate with the CPU, etc.; one or more ARM processor cores are used to run the baseboard management controller's management and monitoring software. These cores can run in an insecure world or a secure world, or both, to perform different tasks and meet security requirements; storage resources are used to store firmware, configuration files, monitoring data, etc. The storage resources may include, but are not limited to, at least one of the following: non-volatile memory (such as Serial Peripheral Interface NOR Flash (SPI NOR Flash)), random access memory (RAM), one-time programmable memory for secure storage. Programmable (OTP) zone; Network interface for communication between the baseboard management controller and the remote management platform. The network interface allows administrators to remotely monitor server status and perform management operations, and may include, but is not limited to, at least one of the following: Intelligent Platform Management Interface (IPMI) protocol or Redfish Application Programming Interface (Redfish API); Operating environment, which is divided into secure and insecure parts. The secure operating system (i.e., the first operating system) is responsible for managing security-related tasks, such as key management, secure communication, and secure storage access. The insecure operating system (i.e., the second operating system) is responsible for handling routine monitoring and management tasks. One implementation is to use Linux as the second operating system, while the secure environment based on TrustZone technology runs a small secure operating system or trusted application; Security mechanism integration, where the baseboard management controller can implement security mechanisms using TrustZone technology, such as by running a key management module in the secure world, using EL3-level system calls to handle sensitive operations, and utilizing dedicated general-purpose input / output (GPIO) modules. Input / output (GPIO) pins are used for security status detection and control, such as detecting the pressing of a specified key.
[0043] Configuration information used for configuration recovery of the baseboard management controller can be stored on a specified type of storage device, such as a USB storage device. Correspondingly, the specified type of storage device can be a USB key. If the server connects to a specified type of first external device, that is, if the server detects that a specified type of first external device has been connected, the first operating system can initiate the configuration recovery verification process of the baseboard management controller to verify the first external device, for example, to verify the legality and validity of the first external device, so as to improve the security of configuration recovery. The verification of the first external device can be performed by verifying the verification information of the first external device (e.g., device identifier, device key, etc.). The verification can be of the format and content of the verification information, etc., which are not limited in this embodiment.
[0044] For example, taking the first external device as a U-shield, the configuration file used to configure and restore the BMC is stored on the external U-shield. Its digital signature and device fingerprint (e.g., unique serial number) are verified through TEE to ensure that only authorized U-shields can initiate the restoration.
[0045] If the first external device passes verification, the first operating system can send a recovery confirmation request to the first external device via the second operating system, requesting confirmation by pressing a designated key on the first external device to perform the configuration recovery. The recovery confirmation request is to request physical confirmation from the user; that is, it requires the user to manually press a designated key on the first external device to finally confirm the execution of the configuration recovery operation. This recovery confirmation adds an extra layer of security, reducing the possibility of unauthorized or malicious tampering. The designated key can be a marked key on the first external device, whose signal can only be detected by the first operating system. When the user presses the designated key, the first operating system can detect the signal triggered by the pressed key.
[0046] In some embodiments, a one-click recovery scheme can be used, employing a secure triggering mechanism. The recovery process is triggered via a physical button (i.e., a designated button) or a specific hardware signal. The signal is directly transmitted to the first operating system (e.g., TrustZone, i.e., TEE), bypassing the second operating system (a regular operating system, i.e., REE) to avoid interception. This physically ensures the security of the one-click recovery, requires manual confirmation, and this confirmation signal is immune to attack even if the baseboard management controller is rooted.
[0047] When a designated button is detected to be pressed, the first operating system can obtain the first configuration information stored in the first external device via the second operating system. The first configuration information refers to the configuration information stored in the first external device used to restore the configuration of the baseboard management controller, and may include, but is not limited to, network settings, security policies, user-defined options, etc. This configuration information is usually stored in the first external device under the control of the first operating system during the initialization of the first external device.
[0048] For example, taking a USB key as the first external device, when the signal of a designated button on the USB key being pressed is detected by the security OS, the security OS can send a command to the ordinary OS to request a one-click configuration recovery. After receiving the command from the security OS, the ordinary OS reads the configuration information stored in the USB key and transmits it to the security OS.
[0049] The first operating system can use the first configuration information to control the second operating system to perform configuration recovery on the baseboard management controller. If the first configuration information is encrypted, it can be decrypted first. The decrypted first configuration information is used to recover the configuration of the baseboard management controller. In some embodiments, the first operating system can first verify the first configuration information to ensure its validity and reliability before passing the verified first configuration information to the second operating system for configuration recovery.
[0050] Furthermore, in cases where decryption of the first configuration information is not required, the second operating system can directly use the first configuration information to restore the configuration of the baseboard management controller after reading the first configuration information from the first external device, or it can first verify the first configuration information and then use the verified first configuration information to restore the configuration of the baseboard management controller.
[0051] The embodiments provided in this application involve running a first operating system and a second operating system on different hardware resources of the baseboard management controller. The first operating system runs in a trusted execution environment. When a first external device of a specified type is connected to the server where the baseboard management controller resides, the first operating system verifies the first external device. If the first external device is successfully verified, the second operating system sends a recovery confirmation request to the first external device. The specified type is a device type used to store the configuration information of the baseboard management controller, and the recovery confirmation request is used to request confirmation by pressing a specified button on the first external device to restore the configuration. When the specified button is detected to be pressed, the first operating system obtains the first configuration information stored on the first external device through the second operating system, and uses the first configuration information to control the second operating system to restore the configuration of the baseboard management controller. This solves the problem of poor security of the baseboard management controller caused by the easy tampering of configuration files in the configuration recovery method of the baseboard management controller in the related art, and improves the security of the baseboard management controller.
[0052] In some exemplary embodiments, after sending a recovery confirmation request to the first external device via the second operating system, the method further includes: accessing a designated port via the first operating system and determining whether a recovery confirmation signal is detected from the designated port.
[0053] In this embodiment, detecting that a designated key has been pressed can be performed by the first operating system. A secure triggering mechanism is employed, where the recovery process is initiated by pressing the designated key. Pressing the designated key triggers a recovery confirmation signal, which is directly transmitted to the first operating system, bypassing the second operating system to avoid interception. This physically ensures the security of one-click recovery, requiring manual confirmation. Furthermore, this confirmation signal is not vulnerable to attack even if the baseboard management controller is rooted.
[0054] The recovery acknowledgment signal can be transmitted to the first operating system via a designated port. A port refers to a channel used for data transmission and communication; a designated port is one that is restricted to the first operating system only, such as a GPIO port. After the second operating system sends a recovery acknowledgment request to the first external device, the first operating system can access the designated port to detect whether a recovery acknowledgment signal has been received from that port.
[0055] When a user receives a confirmation request for recovery, they can press a designated key to trigger the aforementioned recovery confirmation signal. The first external device can send the recovery confirmation signal to a designated port via some communication method (such as electrical signal transmission). The first operating system accesses the designated port to determine whether a recovery confirmation signal has been detected. If the first operating system detects the recovery confirmation signal, it means that the user confirms the configuration recovery, and subsequent operations of reading configuration information and executing the configuration recovery can proceed.
[0056] For example, the one-key recovery module of the security OS detects the pressing of the security key through GPIO that is accessible only to the security OS, and sends a request to the BMC to restore the configuration file.
[0057] According to this embodiment, by accessing a designated port through the first operating system to detect the recovery confirmation signal, the physical security of the signal can be ensured, software-level attacks can be prevented, and physical isolation and security control of the recovery confirmation can be achieved.
[0058] In some exemplary embodiments, verifying a first external device through a first operating system includes: receiving first verification information stored in the first external device from a second operating system through the first operating system; and verifying the first verification information through the first operating system using a specified key stored in a one-time programmable area, wherein the one-time programmable area is only accessible to the first operating system.
[0059] When the second operating system detects the connection of the first external device, it can read the first verification information stored in the first external device and transmit it to the first operating system. The first operating system can receive the first verification information stored in the first external device transmitted by the second operating system. The first verification information is used to verify the first external device and may include, but is not limited to, at least one of the following: digital signature, device key (also known as security key), device identifier, and timestamp. The device identifier of the first external device is used to identify the first external device and may include, but is not limited to, at least one of the following: device model, serial number (SN), and device name. In this embodiment, the first verification information is not limited.
[0060] Then, the first operating system can use the stored specified key to verify the first verification information received from the first external device. The verification process matches the information type of the first verification information and may include, but is not limited to, decrypting the first verification information, checking the digital signature, or comparing the serial number of the first external device to confirm the legitimacy of the first external device and the tamper-proof status of the data.
[0061] The designated key can be a key used for configuration recovery of the baseboard management controller. If the verification information for external devices includes device keys, the designated key can be a seed key used to generate the device key for an authorized device, which is a device authorized to perform configuration recovery on the baseboard management controller. The designated key can also be a key for a Secure File System (SFS). A Secure File System can include functions such as data encryption, access control, permission management, logging, and auditing to protect the data stored on it from unauthorized access, tampering, or disclosure. For baseboard management controllers using ARM processor architecture, SFS refers to a file system using TrustZone technology for encryption and security verification, used to store and protect sensitive data such as configuration files and keys used during BMC configuration recovery. This file system design ensures data integrity and confidentiality; even if the baseboard management controller's normal operating system is attacked, the data stored in the SFS remains secure and unaffected.
[0062] The specified key can be stored in any storage area accessible to the first operating system. To prevent malicious modification of the specified key, it can be stored in a programmable area. A programmable area is a non-volatile storage area that can only be written to once, often used to store critical security parameters or keys. In this embodiment, the specified key is written to the programmable area, and only the first operating system is allowed to access it. It is understood that even if a second operating system or any other software attempts to access it, it will not be able to read or modify the data therein.
[0063] Taking a USB key as the first external device and a security key as the first verification information as the first verification key, when the one-key recovery process of the ordinary OS detects the USB key connection, it obtains the security key of the USB key from the USB key and initiates a one-key recovery request, and then passes the security key of the USB key to the secure OS. After the one-key recovery module of the secure OS detects the one-key recovery request initiated by the ordinary OS, it verifies the security key of the USB key using the key stored in the OTP. If the verification is successful, it sends a one-key recovery confirmation request to the ordinary OS (an example of a recovery confirmation request). After receiving the one-key recovery confirmation request from the secure OS, the ordinary OS prompts the user to press the one-key recovery security button on the USB key (an example of a designated button).
[0064] This embodiment uses a key stored in a one-time programmable area to verify the authentication information of an external device, ensuring the trustworthiness of the device, preventing recovery operations triggered by malicious devices, and enhancing the controllability and security of the recovery process.
[0065] In some exemplary embodiments, the specified key can be a pre-set key for the baseboard management controller (unrelated to the authorized device), or it can be generated based on the device identifier of the authorized device and a random number. Compared to the pre-set key scheme, the key generated based on the device identifier of the authorized device and a random number has higher flexibility and relevance, and can employ more diverse verification methods. The authorized device is a device that allows configuration recovery of the baseboard management controller, and its device type is a specified type.
[0066] Correspondingly, before receiving the first verification information stored in the first external device transmitted by the second operating system through the first operating system, the above method further includes: when the server connects to the second external device and the second external device is configured as an authorized device, querying the programmable area once through the first operating system; if no data is written in the programmable area, obtaining the device identifier of the second external device through the second operating system via the first operating system, generating a specified key based on the device identifier of the second external device and a random number, and writing the generated specified key into the programmable area.
[0067] In this embodiment, the user can connect the second access device to the server and trigger the configuration of the second external device as an authorized device by using specific buttons or button combinations on the second access device, or by performing specific operations on the configuration interface of the configuration device. For the baseboard management controller, when the server connects the second external device and configures the second external device as an authorized device, the second operating system can detect the access information of the second external device and feed the information back to the first operating system. After receiving the information transmitted by the second operating system, the first operating system can query the programmable area once. It should be noted that the second external device can be a USB storage device (e.g., a USB flash drive) or other devices that can be used for configuration recovery of the baseboard management controller, etc., and is not limited here.
[0068] If no device has been previously configured as an authorized device, no data is written to the primary programmable area, and the first operating system does not retrieve data from the primary programmable area. In this case, it can request the device identifier of the second external device through the second operating system. Then, it generates a specified key based on the device identifier of the second external device and a random number, and writes the generated specified key into the primary programmable area.
[0069] To improve information processing efficiency, when a second external device is connected to the server and configured as an authorized device, the first operating system can receive the device identifier of the second external device transmitted by the second operating system; and in response to the received device identifier, perform a query operation of the programmable area once. If no data is written to the programmable area once, a specified key is generated based on the device identifier of the second external device and a random number.
[0070] Taking the creation of a one-key recovery USB shield using a USB flash drive as an example, when the server connects to the USB flash drive and uses the connected USB flash drive to create a one-key recovery USB shield, the one-key recovery module of the security OS queries whether there is any data written to the OTP. If no data is written, it means that a one-key recovery USB shield has not been created. In this case, the security OS can request the device identifier of the USB flash drive through the ordinary OS to generate a key to write to the OTP, ensuring that only one USB shield can be used on one machine.
[0071] A standard operating system can obtain the device identifier of a USB flash drive and send it to a secure operating system. The secure operating system's one-key recovery module generates a secure SFS key based on the USB flash drive's device identifier and a random number.
[0072] In this embodiment, when configuring authorized devices, the device identifier is combined with a random number to generate a key and stored in the OTP. This ensures that there is a unique key in the OTP of the board management controller, strengthens device authorization management, realizes unique device authorization and key generation, and prevents unauthorized devices from accessing the device.
[0073] In some exemplary embodiments, after generating a specified key based on the device identifier of the second external device and a random number, the method further includes: encrypting the device identifier of the second external device and the current timestamp using the specified key through a first operating system to obtain second verification information, and writing the second verification information as the device key of the second external device to the second external device for storage via the second operating system.
[0074] In this embodiment, the first operating system can encrypt the device identifier of the second external device using a specified key to obtain second verification information. This second verification information is then transmitted to the second operating system, which writes it as the device key to the second external device. The second external device can store the second verification information, which can be used during subsequent configuration recovery.
[0075] To ensure the integrity and traceability of the key, the device identifier of the second external device and the current timestamp can be encrypted using a specified key to obtain the aforementioned second verification information. The current timestamp can be the timestamp when the second external device transmits the device identifier to the first operating system, the timestamp when the specified key is generated, or other timestamps. Here, the timestamp records a specific time, and the timestamp can be a number or string containing information such as year, month, day, and second, or other forms, without restriction.
[0076] Taking a USB flash drive as the second external device, the secure OS uses the device identifier and time of the current USB flash drive to generate encrypted data using the secure SFS key, which serves as the unique security key for the USB flash drive, and returns it to the regular OS. The regular OS then writes the encrypted data to the USB flash drive and prompts the user that if this key is lost, the configuration cannot be restored with one click.
[0077] In this embodiment, by generating a device key using encrypted device identifier and timestamp, the integrity and traceability of the key can be ensured. Even if the device is tampered with, the validity of the device key can be determined by the timestamp.
[0078] In some exemplary embodiments, after generating a specified key based on the device identifier of the second external device and a random number, the method further includes:
[0079] The first operating system receives the second configuration information transmitted by the second operating system, encrypts the second configuration information using a specified key, and writes the encrypted second configuration information to the second external device for storage via the second operating system. The second configuration information is the configuration information of the baseboard management controller at the first moment.
[0080] In related technologies, the configuration file used for configuring and restoring the baseboard management controller is stored in the device's internal storage and is generally not encrypted. This means it may become invalid due to storage corruption or physical access by an attacker. Therefore, the storage medium for the configuration file poses a security risk. Furthermore, configuring and restoring the baseboard management controller directly restores factory settings; if the user has modified the relevant configurations in the meantime, they will be lost during the configuration restoration process.
[0081] Therefore, in this embodiment, a specified key can be used to encrypt the configuration information of the baseboard management controller, and the encrypted data (encrypted configuration information) can be written to an authorized device for storage. Since the configuration information is encrypted, its security is improved; furthermore, the configuration information is at a specific point in time, not at the factory settings, thus supporting restoration to the configured version and improving the flexibility of configuration recovery.
[0082] After generating the specified key, the first operating system can obtain the configuration information of the baseboard management controller (or the server's configuration information, which is related to the baseboard management controller) from the second operating system, thus obtaining the second configuration information. Subsequently, it encrypts the second configuration information using the specified key and transmits the encrypted second configuration information to the second operating system. Upon receiving the encrypted second configuration information from the first operating system, the second operating system writes the encrypted second configuration information to the second external device for storage.
[0083] Taking a USB flash drive as the second external device, the ordinary operating system (OS) transmits the current server's configuration information to the secure OS for encryption. The secure OS then encrypts the configuration data transmitted by the ordinary OS using a secure SFS key and sends it back to the ordinary OS. The ordinary OS then writes the encrypted configuration file sent back by the secure OS to the USB flash drive.
[0084] This embodiment uses a specified key to encrypt configuration information, allowing users to save configuration states at different points in time, enhancing the flexibility and security of configuration recovery, and protecting user-defined configurations from being reset.
[0085] In some exemplary embodiments, obtaining the device identifier of the second external device through the first operating system via the second operating system includes: obtaining the device model and serial number of the second external device through the first operating system via the second operating system.
[0086] In this embodiment, at least one of the device model and serial number can be used as the device identifier. To improve the security level of the specified key and the device key (generating with two pieces of information provides higher security compared to generating with a single piece of information), the device model and serial number can be used as the device identifier to generate the specified key and the device key. Correspondingly, the second operating system can obtain the device model and serial number of the second external device, and the second operating system transmits the device model information of the second external device to the first operating system. The device identifier of the second external device includes the device model and the serial number of the second external device.
[0087] Taking a USB flash drive as the second external device as an example, the ordinary OS obtains the USB flash drive's model, serial number (SN), and other information and sends it to the secure OS. The secure OS's one-key recovery module generates a secure SFS (Secure File System) key based on the USB flash drive's model, SN, and a random number. It then uses this key to generate encrypted data, which serves as the USB flash drive's unique security key, and returns it to the ordinary OS.
[0088] In this embodiment, by using the device model and serial number as device identifiers to generate the specified key and device key, the comprehensiveness and uniqueness of the device identifier can be ensured, thereby enhancing the accuracy of device verification.
[0089] In some exemplary embodiments, the method further includes: when the server is connected to a second external device, receiving a configuration instruction sent by the first configuration device through a second operating system, wherein the configuration instruction is used to instruct the second external device to be configured as an authorized device; and sending a query request to the first operating system through the second operating system, wherein the query request is used to query whether an authorized device has been configured for the baseboard management controller. The query for the one-time programmable area is performed after receiving the query request.
[0090] Configuring the first external device as an authorized device can be triggered by operating the second external device. However, considering the limited functionality of the second external device itself, which restricts the possibilities of related operations, an additional configuration device can be used to trigger the configuration of the first external device as an authorized device. The connection method between the configuration device and the server is shown in Figure 1, which has already been explained and will not be repeated here.
[0091] In this embodiment, the user can connect a second external device to the server and send a configuration command to the server through a first configuration device (which has a communication connection with the server) to instruct the second external device to be configured as an authorized device. Here, the configuration command may indicate that the currently connected external device is configured as an authorized device. Since the currently connected device is the second external device, the configuration command actually indicates that the second external device is configured as an authorized device.
[0092] The second operating system can receive the above configuration instructions and, in response to the received configuration instructions, send a query request to the first operating system. The purpose of the query request is to check whether an authorized device has been configured for the baseboard management controller. The first operating system queries the programmable area after receiving the query request.
[0093] For example, a user connects a USB storage device to the server and sends a configuration command via management software on their computer, instructing the server's USB storage device to be configured as a one-key recovery USB key. The regular operating system receives this configuration command and, in response, sends a query request to the security operating system. The security operating system queries the OTP to determine if a one-key recovery USB key has already been created.
[0094] In this embodiment, by sending a configuration command through the configuration device, the connected external device is configured as an authorized device. After receiving the configuration command, the second operating system triggers the first operating system to query whether an authorized device already exists. This avoids duplicate configuration and enhances the standardization of configuration management.
[0095] In some exemplary embodiments, before receiving the configuration instruction sent by the first configuration device through the second operating system, the method further includes: displaying an interactive interface of the baseboard management controller on the display screen of the first configuration device, wherein the interactive interface is an interface for configuring an authorized device for the baseboard management controller, and a configuration trigger control is displayed on the interactive interface; and sending a configuration instruction to the baseboard management controller in response to a trigger operation performed on the configuration trigger control.
[0096] In this embodiment, authorized device configuration can be performed through the interactive interface of the baseboard management controller (e.g., the BMC web human-machine interface). The interactive interface is used to configure authorized devices for the baseboard management controller, and it may display configuration trigger controls (which can be buttons, icons, or other interactive controls). These configuration trigger controls can be used to initiate authorized device configuration.
[0097] Users can run management software (which can be an application, a mini-program, or a webpage) on the first configuration device and, through certain operations, display the interactive interface of the aforementioned baseboard management controller on the screen of the first configuration device. By clicking, double-clicking, long-pressing, or other triggering operations, the management software can be triggered to send the aforementioned configuration commands to the server.
[0098] For example, after BMC completes the configuration, it can initialize the one-click recovery USB key. The server connects to a USB drive, and the user clicks the "Create One-Click Recovery USB Key" button on the BMC web interface, triggering the creation of a one-click recovery USB key from the connected USB drive.
[0099] This embodiment simplifies user operations, improves the controllability of the configuration process and the user experience, and enhances the friendliness of human-computer interaction by configuring trigger controls to achieve device authorization.
[0100] In some exemplary embodiments, after querying the programmable region once through the first operating system, the method further includes: if a specified key has been written into the programmable region, obtaining second verification information stored in the second external device through the first operating system via the second operating system, and verifying the second verification information using the specified key; if the second verification information is verified successfully, receiving third configuration information transmitted by the second operating system through the first operating system, encrypting the third configuration information using the specified key, and writing the encrypted third configuration information into the second external device for storage through the second operating system.
[0101] If configuration information is only saved when an external device is configured as an authorized device, the configuration information stored in the authorized device will be at a specific point in time. Although this saves configurations from a point in time compared to a factory reset, the configuration information will be lost after that point. Reconfiguration is complex and prone to data loss. Therefore, in this embodiment, updating the configuration information saved by the authorized device is allowed. Updating the configuration information can be achieved by reconfiguring the device.
[0102] Correspondingly, if a specified key has been written into the programmable area, the second operating system can obtain the second verification information stored in the second external device and transmit the obtained second verification information to the first operating system. Here, the second verification information can be obtained by the first operating system encrypting the device identifier of the second external device and a timestamp (e.g., the timestamp of the encryption moment or any of the aforementioned possible timestamps) using the specified key. The first operating system can verify the obtained second verification information using the specified key within the programmable area. The method of verifying the second verification information using the specified key is the same as or similar to the method of verifying the first verification information using the specified key.
[0103] In some embodiments, the second verification information and the device identifier of the second external device can be obtained together. In this case, the second verification information and the device identifier of the second external device (e.g., the aforementioned device model and serial number) stored on the second external device can be obtained through the first operating system via the second operating system. The device identifier of the second external device can be used to verify the second verification information or to perform other processing operations.
[0104] In some embodiments, when the server connects to the second external device and configures the second external device as an authorized device, when the second external device stores the second verification information, the server receives the second verification information transmitted by the first operating system (or the second verification information and the device identifier of the second external device) and queries the programmable area once. If no data is written in the programmable area once, the second verification information can be ignored. Alternatively, in order to improve the utilization rate and flexibility of the device, the verification information can be regenerated for the second external device based on the device identifier of the second external device, and the regenerated verification information can be sent to the second external device for storage via the second operating system.
[0105] In some embodiments, when a server connects to a second external device and configures the second external device as an authorized device, when the second external device stores second verification information, the server receives the second verification information transmitted by the first operating system (or, the second verification information and the device identifier of the second external device), and queries a programmable area. If a specified key has been written into the programmable area, the specified key can be used to verify the second verification information. For cases where both the second verification information and the device identifier of the second external device are obtained simultaneously, one way to verify the second verification information is to encrypt the device identifier of the second external device using the specified key and compare the encryption result with the second verification information. Other verification methods are also possible, and this embodiment does not limit this method.
[0106] If the second verification information passes, it indicates that the second external device is an authorized device (i.e., an authorized device), and the configuration information stored on the authorized device can be updated. The first operating system can receive the third configuration information transmitted by the second operating system. That is, the third configuration information is the configuration information of the baseboard management controller at a second moment. The second moment can be the time point after the system has performed an operation (such as an update or adjustment), and the second moment is different from the aforementioned first moment. Then, the first operating system encrypts the third configuration information using a specified key, and then transmits the encrypted third configuration information to the second operating system. The second operating system then writes the encrypted third configuration information into the second external device for storage.
[0107] This embodiment improves the flexibility of configuration information storage and the security of configuration information updates by updating the configuration information stored in the external device after verifying the verification information (e.g., device key) of the external device.
[0108] In some exemplary embodiments, before obtaining the second verification information stored in the second external device through the second operating system via the first operating system, the method further includes: sending a reconfiguration confirmation request to the second configuration device through the second operating system via the first operating system; and, upon receiving a reconfiguration confirmation signal returned by the second configuration device in response to the reconfiguration confirmation request, sending an information acquisition request to the second external device through the second operating system via the first operating system to request the acquisition of the verification information stored in the second external device.
[0109] The acquisition of the second verification information stored on the second external device can be performed automatically. That is, if a specified key has been written into a programmable area, the first operating system directly acquires the second verification information stored on the second external device via the second operating system. To improve the reliability of configuration information updates, the acquisition of the second verification information stored on the second external device can be performed in response to a received reconfiguration confirmation signal. The reconfiguration confirmation signal is used to indicate confirmation of reconfiguration of the configuration information stored on the second external device.
[0110] Correspondingly, before the first operating system obtains the second verification information stored on the second external device through the second operating system, the first operating system can send a reconfiguration confirmation request to the second configuration device through the second operating system to request confirmation of reconfiguring the configuration information stored on the second external device. This second configuration device can be the device that triggers the configuration of the second external device as an authorized device, such as a computer or console. It can be understood that sending the reconfiguration confirmation request is to confirm whether to perform subsequent operations, i.e., to reconfigure the configuration information stored on the second external device.
[0111] The user can trigger the reconfiguration confirmation signal by using a physical button on the second external device (e.g., the designated button mentioned above) or other means to confirm the reconfiguration of the verification information stored on the second external device. Similar to the previous embodiments, the first operating system can detect the reconfiguration confirmation signal in a similar manner to the aforementioned detection of the recovery confirmation signal (e.g., the first operating system can access a designated port and determine whether a reconfiguration confirmation signal has been detected from the designated port).
[0112] After receiving a reconfiguration confirmation signal from the second configuration device in response to the reconfiguration confirmation request, the first operating system can send an information retrieval request to the second external device via the second operating system to request the verification information stored on the second external device. If the first operating system does not receive a reconfiguration confirmation signal from the second configuration device in response to the reconfiguration confirmation request within a certain period of time, it can be assumed that the user does not wish to reconfigure the configuration information, and therefore no further processing can be performed, thereby reducing unnecessary operations.
[0113] For example, after initializing the one-click recovery USB key, it can be recreated. The server connects to the USB drive, and the user clicks the "Create One-Click Recovery USB Key" button on the BMC web interface. The security OS's one-click recovery module checks if the key has been written to the OTP. If it has, it returns that the USB key has been created and requests the USB key (or the USB drive's model, serial number, and key) from the ordinary OS. After verifying the USB key's validity, the security OS encrypts the configuration data transmitted from the ordinary OS using the key written to the secure SFS on the OTP and sends it back to the ordinary OS. The ordinary OS writes the encrypted configuration data sent back by the security OS to the USB drive and prompts the user that this data cannot be changed or deleted (here, "cannot be changed or deleted" means the user cannot modify or delete it themselves).
[0114] This embodiment, by interacting with the configuration device and reconfiguring the configuration information only after obtaining a reconfiguration confirmation signal, can reduce human error and improve the accuracy and efficiency of configuration information reconfiguration.
[0115] In some exemplary embodiments, the designated key can be generated in one or more ways. It can use random numbers or pseudo-random numbers as the designated key, or it can be obtained by hashing the device identifier of the authorized device (an authorized device is a device that allows configuration recovery of the baseboard management controller, and its device type is a specified type), or the device identifier of the authorized device and other information (e.g., random numbers, pseudo-random numbers, timestamps, etc.). Hash processing is an algorithm that converts data of arbitrary length into a fixed-length value (hash value). Hash values are unique; even slight changes in the data will result in different hash values. In this case, the designated key includes a first hash value obtained by hashing the device identifier of the authorized device.
[0116] For example, a regular operating system can obtain information such as the USB flash drive's model and serial number (SN) and send it to the secure operating system. The secure operating system's one-key recovery module generates a hash value based on the USB flash drive's model and SN, along with a random number, as the key for the secure SFS.
[0117] In some embodiments, verifying the first verification information using a specified key stored in a programmable area through a first operating system includes: decrypting the first verification information using the specified key through the first operating system to obtain decrypted verification information, wherein the decrypted verification information includes a device identifier portion; performing hash processing on the device identifier portion through the first operating system, and comparing the obtained second hash value with the first hash value to verify the device identifier portion.
[0118] To verify the first verification information, the first operating system can use a specified key to decrypt the first verification information to obtain the decrypted verification information. The method of decrypting the first verification information corresponds to the method of encrypting the verification information, and different encryption and decryption methods can be selected according to usage requirements; this embodiment does not limit this.
[0119] The obtained decrypted verification information includes the device identifier, which can be verified. There are several ways to verify the device identifier. For example, it can be validated based on a set data format; if the format validation passes, the device identifier is considered verified. To improve the reliability of data verification, the device identifier can be hashed, and the resulting second hash value can be compared with the first hash value to verify the device identifier. If the second hash value and the first hash value are the same, the device identifier is considered verified; if they are different, the device identifier verification is considered failed.
[0120] This embodiment uses the hash value of the device identifier to verify the device identifier, ensuring the irreversibility of the verification process and the immutability of the device identifier, thereby enhancing the reliability and security of the verification.
[0121] In some exemplary embodiments, in order to improve the reliability of the verification information, the verification information (device identifier) of the authorized device can be generated by combining the device identifier and the timestamp. In this case, the decrypted verification information also includes a timestamp part. Here, the timestamp can be a marker of the time point when the information is generated or the operation is sent, including information such as year, month, day, and hour.
[0122] For example, a secure OS can use the current USB flash drive's model, serial number, and time to generate encrypted data using a key from an OTP (Optical Point of View) as a unique security key for the USB flash drive, and return it to a regular OS. The regular OS then writes the obtained encrypted data to the USB flash drive and can also prompt the user that this key cannot be recovered with a single click if lost.
[0123] Correspondingly, verifying the first verification information using a specified key stored in a programmable area through the first operating system also includes: parsing the timestamp portion according to a specified time format through the first operating system to verify the timestamp portion.
[0124] For the timestamp portion, the first operating system can parse it according to a pre-defined time format. This specified time format can be a standard format predefined by the system to standardize the representation and interpretation of timestamps. For example, a timestamp might be stored in the format "year month day hour:minute:second," and the first operating system can parse the timestamp content according to this format.
[0125] The first operating system verifies the parsed timestamp. Verification methods may include, but are not limited to, checking whether the timestamp is within a reasonable time range, such as whether it is within the valid time interval set by the system, or whether it differs from the current system time within an acceptable error range.
[0126] This embodiment uses timestamp parsing and verification to prevent timestamp tampering, ensure the timeliness of device verification information, and protect the configuration recovery mechanism from being exploited by outdated or malicious information.
[0127] In some exemplary embodiments, using the first configuration information to control the second operating system to perform configuration recovery on the baseboard management controller includes: decrypting the first configuration information using a specified key to obtain decrypted configuration information; and sending the decrypted configuration information back to the second operating system so that the second operating system can use the decrypted configuration information to perform configuration recovery on the baseboard management controller.
[0128] To ensure the security and reliability of the configuration information, the first configuration information can be encrypted. In this case, the first operating system can decrypt the first configuration information using a specified key. Similar to the previous embodiments, this specified key is stored in a one-time programmable area and is only accessible to the first operating system. The first operating system can send the decrypted configuration information back to the second operating system, which can then use the decrypted configuration information to restore the configuration of the baseboard management controller. For example, the decrypted configuration information may include network configuration parameters of the baseboard management controller (such as Internet Protocol (IP) address, subnet mask, etc.) and hardware monitoring transmissions (such as temperature thresholds, fan speed control transmissions, etc.). The second operating system can reconfigure the corresponding modules and functions of the baseboard management controller based on this configuration information, restoring the baseboard management controller to the user-expected configuration state.
[0129] For example, after receiving a command from the secure OS to perform a one-click system restore, the regular OS reads the current encrypted configuration information from the USB drive and transmits it to the secure OS for decryption. The secure OS then decrypts the encrypted configuration information transmitted by the regular OS using a key written to the secure SFS on the OTP and sends it back to the regular OS. Upon receiving the decrypted configuration information from the secure OS, the regular OS configures the BMC, completing the one-click system restore function.
[0130] It should be noted that, in the case where the first configuration information is unencrypted, upon detecting that a designated button has been pressed, the first operating system can send a configuration recovery command to the second operating system. The second operating system then retrieves the first configuration information from the first external device and directly uses the first configuration information to restore the configuration of the baseboard management controller. Alternatively, upon detecting that a designated button has been pressed, the first operating system retrieves the first configuration information stored on the first external device via the second operating system, verifies the first configuration information, and, upon successful verification, uses the first configuration information to control the second operating system to restore the configuration of the baseboard management controller. If the second operating system has a configuration information verification function, it can also retrieve the first configuration information from the first external device, verify the first configuration information, and, upon successful verification, use the first configuration information to restore the configuration of the baseboard management controller.
[0131] In this embodiment, the configuration information is decrypted in the first operating system, ensuring the security of the decryption process. The decrypted configuration information is then transmitted to the second operating system for configuration restoration, thus realizing the controllable use of secure configuration information.
[0132] In some exemplary embodiments, before verifying the first external device through the first operating system, the method further includes: initiating a security monitoring mode call to the first operating system through the second operating system, and transmitting first verification information to the first operating system.
[0133] The primary and secondary operating systems are highly isolated. A security monitoring mode serves as a bridge between the two (the secure and insecure worlds). When switching between the two operating systems is necessary (e.g., calling functions or exchanging data from the insecure world to the secure world), the primary operating system can enter security monitoring mode. In this mode, the system performs a series of security checks and state transitions to ensure data and operational security. For example, it checks whether the call request conforms to pre-defined security policies and correctly switches and protects the involved hardware resources (such as register states).
[0134] In this embodiment, when the server is connected to the first external device, the second operating system can initiate a security monitoring mode call to the first operating system. Taking a baseboard management controller using an ARM processor architecture as an example, the ordinary OS calls the kernel state, and the kernel state requests a security service (Supervisor Mode Call, or SMC) interrupt through a program running in the ordinary world to enter the secure OS via the ATF.
[0135] When the second operating system interacts with the first external device, it can obtain first verification information, which is used to verify the legitimacy and security of the first external device. Simultaneously with initiating a security monitoring mode call to the first operating system, the second operating system can transmit the first verification information to the first operating system, so that the first operating system can use the first verification information to verify the first external device in security monitoring mode.
[0136] In this embodiment, a security monitoring mode call is initiated through the second operating system to achieve secure information exchange with the first operating system, avoiding the risk of information leakage during transmission and enhancing the security of information exchange.
[0137] The configuration recovery method of the baseboard management controller in this application embodiment is explained below with reference to optional examples. In this optional example, the baseboard management controller is a BMC using an ARM processor architecture, the first operating system is a secure OS corresponding to the secure world, the second operating system is a normal OS corresponding to the non-secure world, the designated port is a GPIO port, the authorized device is a U-shield (one-key recovery U-shield), the first external device and the second external device are USB flash drives (the U-shield is a USB flash drive that allows configuration recovery of the BMC after authorization), and the designated button is a one-key recovery confirmation button.
[0138] The BMC system framework diagram is shown in Figure 3. Based on the division of hardware resources, the baseboard management controller can be divided into the normal world and the secure world. The USB flash drive (U-shield) can be connected to the server via the USB interface (i.e., joined to the normal world). The normal world corresponds to unprotected hardware resources, which may include: a one-key recovery monitoring module running in the EL0 application layer, used to monitor the access of the U-shield, trigger the recovery process, and interact with the user for confirmation; and the baseboard management controller operating system (which can be a Linux system), i.e., the normal OS, running in the EL1 system layer. The EL0 application layer and the EL1 system layer can communicate through system calls that trap into kernel space (Supervisor Call, or SVC) interrupts. The normal world and the secure world can interact through the EL3 ATF layer. The EL3 ATF layer is the ARM chip security layer, which provides isolation and security control for the normal world and the secure world at the physical level, and provides a secure communication channel for both while isolating them. The secure world corresponds to protected hardware resources, which can include: a trusted operating system (OS), i.e., a secure OS, and trusted applications (TAs), such as a one-key recovery module and a key management module. The one-key recovery module controls the one-key recovery process, and the key management module can access the One-Time Programmable Area (OTP) to manage the keys stored therein. Since the USB flash drive can act as an SFS (Secure SFS), the keys stored in the OTP are the keys for the secure SFS. The secure OS can access the GPIO corresponding to the one-key recovery confirmation button to determine whether the button has been pressed. The one-key recovery confirmation button is the physical button on the USB key used to confirm the one-key recovery process.
[0139] Based on the system framework diagram shown in Figure 3, this optional example provides a solution for a secure one-click recovery system for BMC based on TrustZone secure file verification and USB storage media. When creating a USB key, the configuration file and authentication file encrypted with TrustZone can be stored on a USB storage device as the USB key. Since the encryption key is generated from the USB serial number, it ensures one key per device. Furthermore, based on a series of security checks and state transition operations performed by the secure OS in secure monitoring mode, the key for configuration recovery and the key required for encrypting the configuration file (the aforementioned specified key) are stored in an OTP area accessible by the secure OS, ensuring key security and thus protecting the security of encrypted data. This mechanism enables secure one-click system recovery even without network access.
[0140] Figure 4 is a schematic diagram of an optional process for creating a one-key recovery U-shield according to an embodiment of this application. As shown in Figure 4, the process for creating a one-key recovery U-shield may include the following steps S401 to S412, wherein BMC in the ordinary world refers to the aforementioned baseboard management controller operating system.
[0141] Step S401: After BMC completes the configuration, it initializes the one-click recovery USB key. The user connects their USB drive to the server and clicks "Create One-Click Recovery USB Key" on the BMC web interface. In this case, BMC initializes the one-click recovery USB key.
[0142] In step S402, the BMC initiates an SMC call and sends a query request to the security OS to check whether the server has created a USB key.
[0143] In step S403, the one-key recovery module of the security OS checks if there is data being written to the OTP. If data is being written, it returns a query result indicating that a one-key recovery USB key has been created. If no one-key recovery USB key has been created, it returns a query result indicating that no one-key recovery USB key has been created. This allows the BMC to request information such as the USB drive's model and serial number. The requested USB drive's model and serial number information is used to generate a key, which is then written to the OTP to ensure that only one USB key can be used per device.
[0144] Step S404: The security OS returns the query results.
[0145] In step S405, the BMC sends the obtained USB flash drive model, serial number, and other information to the secure OS, which can be sent via a key generation command.
[0146] In step S406, the one-key recovery module of the secure OS generates a hash value as the key for secure SFS based on the model and serial number of the USB flash drive and a random number, and uses this key to generate encrypted data of the current model, serial number and time of the USB flash drive as the unique security key of the USB flash drive.
[0147] In step S407, the secure OS returns the command execution result and encrypted data.
[0148] In step S408, BMC will write the encrypted data to the USB flash drive and prompt the user that if the key is lost, it cannot be restored to factory settings with one click.
[0149] In step S409, the BMC initiates a configuration encryption command and transmits the current server's configuration file (including BMC-related configuration information) to the secure OS.
[0150] If the configuration allows for the remaking of the USB key (allowing updates to the configuration information saved in the USB key), and data is written to the OTP, it indicates that a one-click recovery USB key has already been created. The security OS can request the security key of the USB drive (which can be the key derived from step S406) through the BMC, and can also request information such as the USB drive's model and serial number. After verifying the USB key's validity, it can be remade. For cases where the USB key is being remade, after verifying its validity, step S406 can be skipped to step S408, and step S409 can be executed.
[0151] In step S410, the secure OS encrypts the configuration file transmitted by the BMC using a secure SFS key written to the OTP.
[0152] In step S411, the secure OS returns the command execution result and the encrypted configuration file.
[0153] In step S412, BMC writes the encrypted configuration file returned by the secure OS to the USB drive and prompts the user that this data cannot be changed or deleted.
[0154] Figure 5 is a schematic diagram of an optional U-shield one-click recovery process according to an embodiment of this application. As shown in Figure 5, the one-click recovery process may include the following steps S501 to S512, wherein the BMC in the ordinary world refers to the aforementioned baseboard management controller operating system.
[0155] Step S501: After the server connects to the one-click recovery U-shield, the BMC's one-click recovery process detects the U-shield connection and obtains the security key of the U-shield from the U-shield.
[0156] In step S502, the BMC initiates an SMC call, sends a one-click system recovery request to the secure OS, and passes the security key of the USB flash drive to the secure OS.
[0157] In step S503, after the one-key recovery module of the security OS detects the one-key recovery system request sent by the BMC, it verifies the security key of the USB flash drive through the key stored in the OTP.
[0158] In step S504, if the verification passes, the security OS sends a one-click recovery confirmation request to the BMC. If the verification fails, the one-click system recovery request is ignored, or a result rejecting the one-click recovery request is returned.
[0159] In step S505, the BMC receives a one-click recovery confirmation request from the security OS, prompting the user to press the one-click recovery confirmation button. The user can press the one-click recovery confirmation button on the U-shield based on the prompt.
[0160] Step S506: The one-key recovery module of the security OS detects that the one-key recovery confirmation button has been pressed (via a GPIO accessible only by the security OS).
[0161] In step S507, the security OS sends a command to the BMC requesting a one-click recovery of the configuration file.
[0162] In step S508, the BMC receives a command from the security OS to restore the configuration file with one click and reads the encrypted configuration file stored in the U-shield.
[0163] In step S509, the BMC transmits the encrypted configuration file to the secure OS.
[0164] In step S510, the secure OS decrypts the encrypted configuration file transmitted by the BMC using the key written to the secure SFS of the OTP.
[0165] In step S511, the secure OS sends the decrypted configuration file back to the BMC.
[0166] In step S512, after receiving the decrypted configuration file returned by the secure OS, the BMC restores its configuration.
[0167] It should be noted that although this optional example is illustrated using a server architecture of a specific platform, the configuration recovery method provided is not limited to servers on that specific platform and is equally applicable to servers and computer platforms on other platforms.
[0168] This optional example places the configuration file and physical confirmation button for the server's BMC one-click recovery function within a secure TEE environment. Configuration file decryption and integrity verification are both encrypted using the TEE's internal key, decrypting only after successful verification. Hash value comparison is used to prevent tampering. Furthermore, the entire configuration recovery process is completed under TEE monitoring, blocking REE intervention and ensuring the integrity of system firmware and partition writes. In addition, a network connection is not required to restore the BMC configuration to a specified point in time, improving server robustness and providing stability for big data services.
[0169] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0170] According to another aspect of the embodiments of this application, a baseboard management controller is also provided. This baseboard management controller can be used to implement the configuration recovery method of a baseboard management controller provided in any of the above embodiments, and will not be repeated hereafter. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0171] Figure 6 is a structural block diagram of an optional baseboard management controller according to an embodiment of the present application. As shown in Figure 6, a first operating system 602 and a second operating system 604 are running on different hardware resources of the baseboard management controller. The first operating system 602 runs in a trusted execution environment.
[0172] The first operating system 602 is configured to verify the first external device when a specified type of first external device is connected to the server where the baseboard management controller is located, and send a recovery confirmation request to the first external device via the second operating system if the first external device is successfully verified. The specified type is a device type used to store the configuration information of the baseboard management controller, and the recovery confirmation request is used to request confirmation of configuration recovery by pressing a specified button on the first external device. When the specified button is detected to be pressed, the second operating system obtains the first configuration information stored in the first external device, and uses the first configuration information to control the second operating system to perform configuration recovery on the baseboard management controller.
[0173] The second operating system 604 is configured to send a recovery confirmation request to the first external device and perform configuration recovery on the baseboard management controller.
[0174] The embodiments provided in this application involve running a first operating system and a second operating system on different hardware resources of the baseboard management controller. The first operating system runs in a trusted execution environment. When a first external device of a specified type is connected to the server where the baseboard management controller resides, the first operating system verifies the first external device. If the first external device is successfully verified, the second operating system sends a recovery confirmation request to the first external device. The specified type is a device type used to store the configuration information of the baseboard management controller, and the recovery confirmation request is used to request confirmation by pressing a specified button on the first external device to restore the configuration. When the specified button is detected to be pressed, the first operating system obtains the first configuration information stored on the first external device through the second operating system, and uses the first configuration information to control the second operating system to restore the configuration of the baseboard management controller. This solves the problem of poor security of the baseboard management controller caused by the easy tampering of configuration files in the configuration recovery method of the baseboard management controller in the related art, and improves the security of the baseboard management controller.
[0175] In some exemplary embodiments, the second operating system 604 is configured to obtain first verification information stored in the first external device and pass the first verification information to the first operating system 602.
[0176] The first operating system 602 is configured to receive first verification information transmitted by the second operating system 604, and verify the first verification information using a specified key stored in a one-time programmable area, wherein the one-time programmable area is only accessible to the first operating system.
[0177] In some exemplary embodiments, the specified key is generated based on the device identifier of the authorized device and a random number. The authorized device is a device that allows configuration recovery of the baseboard management controller, and the device type of the authorized device is a specified type.
[0178] The first operating system 602 is configured to, when the server connects to the second external device and the second external device is configured as an authorized device, query the programmable area once. If no data is written to the programmable area, the second operating system 604 obtains the device identifier of the second external device, generates a specified key based on the device identifier of the second external device and a random number, and writes the generated specified key into the programmable area.
[0179] The second operating system 604 is configured to obtain the device identifier of the second external device and pass the obtained device identifier of the second external device to the first operating system 602.
[0180] In some exemplary embodiments, the first operating system 602 is configured to encrypt the device identifier and current timestamp of the second external device using a specified key to obtain second verification information, and then pass the second verification information to the second operating system 604.
[0181] The second operating system 604 is configured to write the second authentication information as the device key of the second external device to the second external device for storage.
[0182] In some exemplary embodiments, the first operating system 602 is configured to receive second configuration information transmitted by the second operating system 604, encrypt the second configuration information using a specified key, and write the encrypted second configuration information to a second external device for storage via the second operating system 604, wherein the second configuration information is the configuration information of the baseboard management controller at a first moment.
[0183] The second operating system 604 is configured to transmit second configuration information to the first operating system 602; and to write the encrypted second configuration information to the second external device for storage.
[0184] In some exemplary embodiments, the first operating system 602 is configured to obtain the device model and serial number of the second external device via the second operating system 604, wherein the device identifier of the second external device includes the device model and serial number of the second external device.
[0185] The second operating system 604 is configured to obtain the device model and serial number of the second external device and pass the obtained device model and serial number of the second external device to the first operating system 602.
[0186] In some exemplary embodiments, the second operating system 604 is configured to receive a configuration instruction sent by the first configuration device when the server connects to the second external device, wherein the configuration instruction is used to instruct the second external device to be configured as an authorized device; and send a query request to the first operating system 602, wherein the query request is used to query whether an authorized device has been configured for the baseboard management controller, and the query of the programmable area is performed after receiving the query request.
[0187] In some exemplary embodiments, the first configuration device includes a display screen for displaying an interactive interface of the baseboard management controller, wherein the interactive interface is an interface for configuring an authorized device for the baseboard management controller, and configuration trigger controls are displayed on the interactive interface.
[0188] The first configuration device is configured to send configuration instructions to the baseboard management controller in response to a trigger operation performed on the configuration trigger control.
[0189] In some exemplary embodiments, the first operating system 602 is configured to, when a specified key has been written into a programmable area, obtain the second verification information stored in the second external device via the second operating system 604, and verify the second verification information using the specified key; if the second verification information is verified successfully, receive the third configuration information transmitted by the second operating system 604, encrypt the third configuration information using the specified key, and write the encrypted third configuration information to the second external device for storage via the second operating system 604, wherein the third configuration information is the configuration information of the baseboard management controller at the second moment.
[0190] The second operating system 604 is configured to obtain the second verification information stored in the second external device and write the encrypted third configuration information to the second external device for storage.
[0191] In some exemplary embodiments, the first operating system 602 is configured to send a reconfiguration confirmation request to the second configuration device via the second operating system 604, wherein the second configuration device is the device that triggers the configuration of the second external device as an authorized device; upon receiving a reconfiguration confirmation signal returned by the second configuration device in response to the reconfiguration confirmation request, the second operating system 604 sends an information acquisition request to the second external device to request the acquisition of the verification information stored in the second external device.
[0192] The second operating system 604 is configured to send a reconfiguration confirmation request to the second configuration device and to send an information retrieval request to the second external device.
[0193] In some exemplary embodiments, the specified key includes a first hash value obtained by hashing the device identifier of the authorized device, the authorized device being a device that allows configuration recovery of the baseboard management controller, and the device type of the authorized device being a specified type.
[0194] The first operating system 602 is configured to decrypt the first verification information using a specified key to obtain decrypted verification information, wherein the decrypted verification information includes a device identifier portion; the device identifier portion is hashed, and the obtained second hash value is compared with the first hash value to verify the device identifier portion.
[0195] In some exemplary embodiments, the decrypted verification information also includes a timestamp portion.
[0196] The first operating system 602 is configured to parse the timestamp portion according to a specified time format in order to verify the timestamp portion.
[0197] In some exemplary embodiments, the first operating system 602 is configured to decrypt the first configuration information using a specified key to obtain decrypted configuration information; and to send the decrypted configuration information back to the second operating system 604 so that the second operating system 604 can use the decrypted configuration information to restore the configuration of the baseboard management controller.
[0198] The second operating system 604 is configured to use decrypted configuration information to restore the configuration of the baseboard management controller.
[0199] In some exemplary embodiments, the second operating system 604 is configured to initiate a security monitoring mode call to the first operating system 602 and transmit first verification information to the first operating system 602.
[0200] In some exemplary embodiments, the first operating system 602 is configured to access a specified port and determine whether a recovery confirmation signal is detected from the specified port, wherein the recovery confirmation signal is triggered by the pressing of a specified key, and the specified port is a port that is only allowed to be accessed by the first operating system 602.
[0201] According to another aspect of the embodiments of this application, a server is also provided, which may include a baseboard management controller provided in any of the above embodiments, which has already been described and will not be repeated here. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0202] The server provided in this application embodiment includes: a baseboard management controller, on which a first operating system and a second operating system run on different hardware resources, the first operating system running in a trusted execution environment.
[0203] The first operating system is configured to verify the first external device when the server connects to a first external device of a specified type, and if the first external device is successfully verified, send a recovery confirmation request to the first external device via the second operating system. The specified type is a device type used to store configuration information of the baseboard management controller, and the recovery confirmation request is used to request confirmation of configuration recovery by pressing a specified button on the first external device. When the specified button is detected to be pressed, the second operating system obtains the first configuration information stored in the first external device, and uses the first configuration information to control the second operating system to perform configuration recovery on the baseboard management controller.
[0204] The second operating system is configured to send a recovery confirmation request to the first external device and perform configuration recovery on the baseboard management controller.
[0205] The server is configured to run computer programs to perform the steps in any of the above-described embodiments of the configuration recovery method for a baseboard management controller.
[0206] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0207] According to another aspect of the embodiments of this application, a non-volatile readable storage medium is provided, the non-volatile readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it runs.
[0208] In one exemplary embodiment, the aforementioned computer non-volatile readable storage medium may include, but is not limited to, various non-volatile storage media (non-transitory or non-transient storage media) capable of storing computer programs, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0209] According to another aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to perform the steps of any of the method embodiments described above via the computer program. In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0210] The examples in this embodiment can be referred to the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0211] According to another aspect of the embodiments of this application, a computer program product is also provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit 701, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0212] Figure 7 schematically illustrates a computer system architecture block diagram for an electronic device implementing embodiments of the present application. As shown in Figure 7, the computer system 700 includes a CPU (Central Processing Unit) 701, which can perform various appropriate actions and processes according to a program stored in ROM 702 or a program loaded from storage portion 708 into RAM 703. Random access memory 703 also stores various programs and data required for system operation. The CPU 701, ROM 702, and random access memory 703 are interconnected via a bus 704. An I / O (Input / Output) interface 705 is also connected to the bus 704.
[0213] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a CRT (Cathode Ray Tube), LCD (Liquid Crystal Display), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0214] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit 701, it performs various functions defined in the system of this application.
[0215] It should be noted that the computer system 700 of the electronic device shown in Figure 7 is only an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0216] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0217] The above are merely optional embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for restoring the configuration of a baseboard management controller, characterized in that, A first operating system and a second operating system run on different hardware resources of the baseboard management controller, wherein the first operating system runs in a trusted execution environment; the method includes: When a first external device of a specified type is connected to the server where the baseboard management controller is located, the first external device is verified through the first operating system. If the first external device is verified successfully, a recovery confirmation request is sent to the first external device through the second operating system. The specified type is a device type used to store the configuration information of the baseboard management controller. The recovery confirmation request is used to request configuration recovery by pressing a specified button on the first external device. When the designated button is detected to be pressed, the first operating system obtains the first configuration information stored in the first external device through the second operating system, and uses the first configuration information to control the second operating system to restore the configuration of the baseboard management controller.
2. The method according to claim 1, characterized in that, The verification of the first external device through the first operating system includes: The first operating system receives first verification information stored in the first external device from the second operating system; the first operating system verifies the first verification information using a specified key stored in a one-time programmable area, wherein the one-time programmable area is only accessible to the first operating system.
3. The method according to claim 2, characterized in that, The specified key is generated based on the device identifier of the authorized device and a random number. The authorized device is a device that allows configuration recovery of the baseboard management controller, and the device type of the authorized device is the specified type. Before receiving the first verification information stored in the first external device transmitted by the second operating system through the first operating system, the method further includes: When the server connects to a second external device and the second external device is configured as the authorized device, the first operating system queries the one-time programmable region. If no data is written to the programmable area, the device identifier of the second external device is obtained by the first operating system via the second operating system. Based on the device identifier of the second external device and the random number, the specified key is generated and written into the programmable area.
4. The method according to claim 3, characterized in that, After generating the designated key based on the device identifier of the second external device and the random number, the method further includes: The first operating system uses the specified key to encrypt the device identifier and current timestamp of the second external device to obtain the second verification information, and then writes the second verification information as the device key of the second external device to the second external device for storage via the second operating system.
5. The method according to claim 3, characterized in that, After generating the designated key based on the device identifier of the second external device and the random number, the method further includes: The first operating system receives the second configuration information transmitted by the second operating system, encrypts the second configuration information using the specified key, and writes the encrypted second configuration information to the second external device for storage via the second operating system. The second configuration information is the configuration information of the baseboard management controller at the first moment.
6. The method according to claim 3, characterized in that, The step of obtaining the device identifier of the second external device through the first operating system and then through the second operating system includes: The device model and serial number of the second external device are obtained through the first operating system via the second operating system, wherein the device identifier of the second external device includes the device model and the serial number of the second external device.
7. The method according to claim 3, characterized in that, The method further includes: When the server connects to the second external device, the second operating system receives a configuration instruction sent by the first configuration device, wherein the configuration instruction is used to instruct the second external device to be configured as the authorized device; The second operating system sends a query request to the first operating system, wherein the query request is used to query whether the authorized device has been configured for the baseboard management controller, and the query of the one-time programmable area is performed after receiving the query request.
8. The method according to claim 7, characterized in that, Before receiving the configuration instructions sent by the first configuration device through the second operating system, the method further includes: The interactive interface of the baseboard management controller is displayed on the display screen of the first configuration device. The interactive interface is used to configure the authorized device for the baseboard management controller, and the interactive interface displays configuration trigger controls. In response to a trigger operation performed on the configuration trigger control, the configuration instruction is sent to the baseboard management controller.
9. The method according to claim 3, characterized in that, After querying the programmable region via the first operating system, the method further includes: If the specified key has been written into the programmable area, the second verification information stored in the second external device is obtained through the first operating system via the second operating system, and the second verification information is verified using the specified key. If the second verification information is verified successfully, the third configuration information transmitted by the second operating system is received by the first operating system, the third configuration information is encrypted using the specified key, and the encrypted third configuration information is written to the second external device for storage via the second operating system. The third configuration information is the configuration information of the baseboard management controller at the second time.
10. The method according to claim 9, characterized in that, Before obtaining the second verification information stored in the second external device through the second operating system via the first operating system, the method further includes: The first operating system sends a reconfiguration confirmation request to the second configuration device via the second operating system, wherein the second configuration device is the device that triggers the configuration of the second external device as the authorized device; Upon receiving a reconfiguration confirmation signal from the second configuration device in response to the reconfiguration confirmation request, the first operating system sends an information retrieval request to the second external device via the second operating system to request the retrieval of the verification information stored on the second external device.
11. The method according to claim 2, characterized in that, The designated key includes a first hash value obtained by hashing the device identifier of the authorized device, the authorized device being a device that allows configuration recovery of the baseboard management controller, and the device type of the authorized device being the designated type; The step of verifying the first verification information using a specified key stored in a programmable area through the first operating system includes: The first operating system uses the specified key to decrypt the first verification information to obtain decrypted verification information, wherein the decrypted verification information includes a device identifier portion; The device identifier portion is hashed by the first operating system, and the obtained second hash value is compared with the first hash value to verify the device identifier portion.
12. The method according to claim 11, characterized in that, The decrypted verification information also includes a timestamp. The step of verifying the first verification information using a specified key stored in a programmable area through the first operating system further includes: The timestamp portion is parsed by the first operating system according to a specified time format to verify the timestamp portion.
13. The method according to claim 2, characterized in that, The step of using the first configuration information to control the second operating system to perform configuration restoration on the baseboard management controller includes: The first configuration information is decrypted using the specified key to obtain the decrypted configuration information; The decrypted configuration information is sent back to the second operating system, so that the second operating system can use the decrypted configuration information to restore the configuration of the baseboard management controller.
14. The method according to claim 2, characterized in that, Before verifying the first external device through the first operating system, the method further includes: The second operating system initiates a security monitoring mode call to the first operating system and transmits the first verification information to the first operating system.
15. The method according to any one of claims 1 to 14, characterized in that, After sending a recovery confirmation request to the first external device via the second operating system, the method further includes: The system accesses a designated port through the first operating system and determines whether a recovery confirmation signal is detected from the designated port. The recovery confirmation signal is triggered by the pressing of the designated key, and the designated port is a port that is only accessible to the first operating system.
16. A baseboard management controller, characterized in that, A first operating system and a second operating system run on different hardware resources of the baseboard management controller, wherein the first operating system runs in a trusted execution environment; wherein... The first operating system is configured to verify the first external device when a specified type of first external device is connected to the server where the baseboard management controller is located, and, if the first external device is successfully verified, send a recovery confirmation request to the first external device via the second operating system. The specified type is a device type used to store configuration information of the baseboard management controller, and the recovery confirmation request is used to request confirmation of configuration recovery by pressing a specified key on the first external device. Upon detecting that the specified key is pressed, the second operating system obtains the first configuration information stored on the first external device and uses the first configuration information to control the second operating system to perform configuration recovery on the baseboard management controller. The second operating system is used to send the recovery confirmation request to the first external device and to perform configuration recovery on the baseboard management controller.
17. A server, characterized in that, include: A baseboard management controller, on different hardware resources of the baseboard management controller, runs a first operating system and a second operating system, wherein the first operating system runs in a trusted execution environment; wherein... The first operating system is configured to verify the first external device when the server connects to a first external device of a specified type, and, if the first external device passes verification, send a recovery confirmation request to the first external device via the second operating system. The specified type is a device type used to store configuration information of the baseboard management controller, and the recovery confirmation request is used to request confirmation of configuration recovery by pressing a specified button on the first external device. Upon detecting that the specified button is pressed, the second operating system retrieves the first configuration information stored on the first external device and uses the first configuration information to control the second operating system to perform configuration recovery on the baseboard management controller. The second operating system is used to send the recovery confirmation request to the first external device and to perform configuration recovery on the baseboard management controller.
18. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method of any one of claims 1 to 15.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the method of any one of claims 1 to 15.
20. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 15.
