CN118260774A - Server starting method and device, storage medium and electronic equipment - Google Patents

Server starting method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN118260774A
CN118260774A CN202410696749.8A CN202410696749A CN118260774A CN 118260774 A CN118260774 A CN 118260774A CN 202410696749 A CN202410696749 A CN 202410696749A CN 118260774 A CN118260774 A CN 118260774A
Authority
CN
China
Prior art keywords
target
server
authentication
starting
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410696749.8A
Other languages
Chinese (zh)
Inventor
宁兆男
张炳会
李博
陈闯
王淑贤
杨霖
王东清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Publication of CN118260774A publication Critical patent/CN118260774A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the application provides a method and a device for starting a server, a storage medium and electronic equipment, wherein the method comprises the following steps: receiving a target request sent by a target account number to start a target server; under the condition that the target account number has calling authority to the target server, calling target authentication information corresponding to the target account number from the trusted platform module, and calling target authentication file corresponding to the target account number from the target server; decrypting and authenticating the target authentication file by adopting a target authentication mode indicated by the target authentication information to obtain target starting information; performing data verification on target starting data indicated by the target starting information; and under the condition that the target starting data passes the verification, starting the target server by using the target starting data. The method and the device solve the problem of lower safety of the server operation environment in the related technology, and achieve the effect of improving the safety of the server operation environment.

Description

Server starting method and device, storage medium and electronic equipment
Technical Field
The embodiment of the application relates to the field of computers, in particular to a method and a device for starting a server, a storage medium and electronic equipment.
Background
A server is a type of computer that runs faster, is more loaded, and is more expensive than a normal computer. The server provides computing or application services for other clients in the network, such as PC (Personal Computer) machines, smart phones, ATM (Automated TELLER MACHINE) terminals, and even large devices such as train systems. During the starting process of the server, the BIOS (Basic Input/Output System) initializes all hardware devices and prepares for a starting environment, which is known as a bridge connecting the hardware devices and the operating System, and belongs to the most important component in the server. In the absence of security protection, viruses, trojan programs, etc. easily destroy the integrity of the BIOS code, resulting in a series of serious losses. In order to ensure the safety and reliability of the running environment of the server, manufacturers put forward the protection function of the server, such as Boot Guard provided by Intel and other safety functions, the Boot Guard introduces a package called ACM, namely, the function is added on the processor, the starting data of the server BIOS is stored in advance, then when the server needs to be started later, the BIOS checks the obtained starting data for the processor and runs after the verification is passed, the scheme can ensure the safety of the running environment of the server to a certain extent, but the mode is completely dependent on the processor, the trust root of the trust chain of the safety link is also derived from the processor manufacturer, the safety of the running environment of the server cannot be perceived and determined for users using the server, and a great safety hidden danger still exists in the running environment of the server for some users with safety requirements.
Disclosure of Invention
The embodiment of the application provides a method and a device for starting a server, a storage medium and electronic equipment, which are used for at least solving the problem of lower safety of a server running environment in the related technology.
According to an embodiment of the present application, there is provided a method for starting up a server, applied to a basic input output system, where the basic input output system and a trusted platform module are deployed on a target server, and the basic input output system is connected to the trusted platform module, where the method includes: receiving a target request sent by a target account number to start the target server; under the condition that the target account number has calling authority to the target server, calling target authentication information corresponding to the target account number from the trusted platform module, and calling target authentication files corresponding to the target account number from the target server, wherein the target authentication files are obtained by encrypting and authenticating starting information of the target server by using a target authentication mode indicated by the target authentication information by the target account number, and the starting information is used for indicating starting data used for starting the target server; decrypting and authenticating the target authentication file by adopting the target authentication mode indicated by the target authentication information to obtain target starting information; performing data verification on target starting data indicated by the target starting information; and under the condition that the target starting data passes the verification, starting the target server by using the target starting data.
Optionally, the retrieving, from the trusted platform module, the target authentication information corresponding to the target account number includes:
Acquiring a target service function of the target server requested to be invoked by the target request;
And the target authentication information configured for the target service function by the target account number is called from the trusted platform module.
Optionally, the retrieving, from the trusted platform module, the target authentication information configured by the target account number for the target service function includes:
Determining one or more target starting data required for realizing the target service function, wherein a starting mode of corresponding hardware equipment deployed on the target server is recorded in each target starting data;
And the target authentication information of the target account corresponding to the target starting data is called from the trusted platform module.
Optionally, the retrieving, from the trusted platform module, the target authentication information of the target account corresponding to the target startup data includes:
Determining a target storage position corresponding to the target authentication information from the authentication information with the corresponding relation and a storage area in the trusted platform module;
Sending a target acquisition request to the trusted platform module, wherein the target acquisition request is used for requesting to acquire authentication information stored in the target storage location;
and receiving the target authentication information returned by the trusted platform module in response to the target acquisition request.
Optionally, a central processor is disposed on the target server motherboard, and the central processor is respectively connected with the basic input/output system and the trusted platform module through a serial peripheral interface bus,
The sending a target acquisition request to the trusted platform module includes:
Generating a target instruction in a serial peripheral interface protocol format;
And sending the target instruction to the central processing unit through the serial peripheral interface bus, wherein the target instruction is used for instructing the central processing unit to send the target acquisition request in the serial peripheral interface protocol format to the trusted platform module.
Optionally, the retrieving, from the target server, the target authentication file corresponding to the target account number includes:
Acquiring a target service function of the target server requested to be invoked by the target request;
And screening one or more target authentication files corresponding to the target service function from a plurality of reference authentication files stored in the server, wherein each reference authentication file is obtained by encrypting reference starting information for the target account, the reference starting information is used for indicating data content recorded by reference starting data used for starting the target server, and a starting mode of corresponding hardware equipment deployed on the target server is recorded in each reference starting data.
Optionally, a baseboard management controller is disposed on the target server motherboard, the baseboard management controller is connected with the basic input/output system,
The screening the one or more target authentication files corresponding to the target service function from the multiple reference authentication files stored in the server includes:
Screening out a target authentication file corresponding to the target account calling the target service function from the account, the service function and the authentication file with the corresponding relation;
Determining a target storage position for storing the target authentication file from a plurality of storage positions of the baseboard management controller, wherein the storage position in the baseboard management controller and the reference authentication file have a meaning corresponding relation;
And extracting the target authentication file from the target storage location.
Optionally, the determining, from a plurality of storage locations of the baseboard management controller, a target storage location for storing the target authentication file includes:
Acquiring a memory mapping table of the baseboard management controller, wherein the memory mapping table is used for indicating the memory space allocation condition of the baseboard management controller;
And searching the target storage position for storing the target authentication file in the memory of the baseboard management controller from the memory mapping table.
Optionally, before the obtaining the memory mapping table of the trusted platform module, the method further includes:
receiving the reference authentication file sent by a reference server, wherein the reference server is a server for maintaining the running state of the target server;
Screening a reference storage position in an unoccupied state from the content space of the baseboard management controller;
And storing the reference authentication file in the reference storage position, and updating the corresponding relation between the reference storage position and the reference authentication file into the memory mapping table.
Optionally, the decrypting and authenticating the target authentication file by using the target authentication mode indicated by the target authentication information to obtain target starting information includes:
Converting a decryption key corresponding to the target authentication file according to the target authentication information;
and decrypting the target authentication file by using the decryption key to obtain the target starting information.
Optionally, the decrypting the target authentication file using the decryption key to obtain the target start information includes:
decrypting the target authentication file by using an account public key of the target account to obtain a candidate authentication file, wherein the target authentication file is obtained by encrypting the candidate authentication file by using an account private key corresponding to the account public key by the target account, and the decryption key comprises the account public key;
obtaining a server public key of a reference server for the candidate authentication file from the trusted platform module, wherein the reference server is a server for maintaining the running state of the target server, and is used for encrypting the target starting information by using a server private key corresponding to the server public key and sending the encrypted candidate authentication file to the target account for authentication;
And decrypting the candidate authentication file by using the server public key to obtain the target starting information.
Optionally, the converting, according to the target authentication information, the decryption key corresponding to the target authentication file includes one of the following:
Determining the account public key as the decryption key under the condition that the target authentication information is the account public key of the target account;
Determining a decryption mode corresponding to the target encryption mode under the condition that the target authentication information is information indicating the target encryption mode adopted by the target account number for the target authentication file; and generating the decryption key for decrypting the target authentication file according to the decryption mode.
Optionally, before the target authentication file corresponding to the target service function called by the target account is screened out from the account, the service function and the authentication file with the corresponding relation, the method further includes:
Detecting a communication state between the baseboard management controller and the basic input output system;
And under the condition that the communication state is used for indicating that the basic input and output system is in the disconnection state, screening the target authentication file corresponding to the target service function from a plurality of initial authentication files stored in a buffer area corresponding to the basic input and output system, wherein the plurality of initial authentication files are authentication files used by the basic input and output system for starting the target server for the target account in a reference time period before the current moment.
Optionally, after the target authentication file corresponding to the target service function is screened out from the plurality of initial authentication files stored in the buffer area corresponding to the basic input/output system, the method further includes:
extracting a plurality of the reference authentication files stored in the baseboard management controller in the case where recovery communication between the basic input output system and the baseboard management controller is detected;
updating the initial authentication file by using the reference authentication file.
Optionally, the performing data verification on the target startup data indicated by the target startup information includes:
Matching the target starting information with target starting data in the target server;
Under the condition that the target starting information is matched with the target starting data, determining that the target starting data passes verification;
And under the condition that the target starting information is inconsistent with the target starting data in matching, determining that the target starting data is not checked.
Optionally, the matching the target startup information with the target startup data in the target server includes:
calculating the target starting data by using a message digest algorithm to obtain candidate message digests, wherein the candidate message digests are used for indicating data contents carried by the target starting data;
Matching the candidate information abstract with a target information abstract, wherein the target starting information comprises the target information abstract;
under the condition that the target information abstract and the candidate information abstract are the same, determining that the target starting data and the target starting information are matched and consistent;
And under the condition that the target information abstract and the candidate information abstract are different, determining that the target starting data and the target starting information are inconsistent in matching.
According to another embodiment of the present application, there is provided a startup device of a server, applied to a basic input output system, on which a target server is deployed, the basic input output system and a trusted platform module, the basic input output system being connected to the trusted platform module, the device including:
The receiving module is used for receiving a target request sent by a target account number so as to start the target server; the invoking module is used for invoking target authentication information corresponding to the target account from the trusted platform module and invoking target authentication files corresponding to the target account from the target server under the condition that the target account has invoking authority on the target server, wherein the target authentication files are obtained by encrypting and authenticating starting information of the target server by using a target authentication mode indicated by the target authentication information by the target account, and the starting information is used for indicating starting data used for starting the target server; the authentication module is used for decrypting and authenticating the target authentication file by adopting the target authentication mode indicated by the target authentication information to obtain target starting information; the verification module is used for carrying out data verification on the target starting data indicated by the target starting information; and the starting module is used for starting the target server by using the target starting data under the condition that the target starting data passes the verification.
According to a further embodiment of the application, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the application there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to a further embodiment of the application, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the method embodiments described above.
According to the application, the trusted platform module with a connection relation with the basic input and output system is deployed on the target server, the trusted platform module stores the authentication information of the account number with the calling authority of the target server, the authentication information of the account number for decrypting and authenticating the target authentication file is also imported on the target server, and the authentication mode indicated by the authentication information is used for encrypting the authentication information after the verification of the starting information of the target server is passed, so that the data content of the starting data used for starting the target server is authenticated by the account number of the using server, the authentication mode for authenticating the starting data is mastered by the account number of the using server, and further, after a target request is received, the target authentication information of the target account number is retrieved from the trusted platform module, and the target authentication file corresponding to the target account number is retrieved from the server, and the decryption and authentication are carried out on the target authentication file by the target authentication mode indicated by the target authentication information, thereby obtaining the starting information, the starting data operation server is used for verifying the target starting data after the authentication by the private authentication mode is used, the starting data operation server is prevented from being used for realizing the operation of the server according to the starting data after the target authentication mode, the safety environment is guaranteed, the safety of the operation environment is improved, and the safety environment is guaranteed.
Drawings
Fig. 1 is a hardware block diagram of a server device of a method for starting up a server according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of starting up a server according to an embodiment of the application;
FIG. 3 is a schematic diagram of an alternative server system according to an embodiment of the application;
FIG. 4 is a schematic illustration of information interaction according to an embodiment of the application;
FIG. 5 is a schematic diagram of an alternative server hardware connection according to an embodiment of the application;
FIG. 6 is an alternative startup data verification flow diagram in accordance with an embodiment of the present application;
fig. 7 is a block diagram of a configuration of a startup device of a server according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a server apparatus or similar computing device. Taking the operation on the server device as an example, fig. 1 is a block diagram of a hardware structure of the server device of a method for starting up a server according to an embodiment of the present application. As shown in fig. 1, the server device may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU, a programmable logic device FPGA, or the like processing means) and a memory 104 for storing data, wherein the server device may further include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those of ordinary skill in the art that the architecture shown in fig. 1 is merely illustrative and is not intended to limit the architecture of the server apparatus described above. For example, the server device may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for starting a server in an embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104, thereby performing various functional applications and data processing, that is, implementing the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located with respect to the processor 102, which may be connected to the server device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, a method for starting a server is provided, and fig. 2 is a flowchart of a method for starting a server according to an embodiment of the present application, as shown in fig. 2, applied to a basic input/output system, where a target server is deployed with the basic input/output system and a trusted platform module, where the basic input/output system is connected to the trusted platform module, the trusted platform module stores authentication information of a reference account number with a call authority for the target server, where the authentication information is used to indicate an authentication manner in which the reference account number performs encryption authentication on data, and where an authentication file obtained by using the authentication manner to perform encryption authentication on the start information after the start information of the target server is verified by the reference account number is imported into the target server, where the start information is used to indicate start data used for starting the target server, where the process includes the following steps:
step S202, receiving a target request sent by a target account to start the target server;
step S204, under the condition that the target account has calling authority to the target server, target authentication information corresponding to the target account is called from the trusted platform module, and a target authentication file corresponding to the target account is called from the target server, wherein the target authentication file is obtained by encrypting and authenticating starting information of the target server by using a target authentication mode indicated by the target authentication information by the target account, and the starting information is used for indicating starting data used for starting the target server;
step S206, adopting the target authentication mode indicated by the target authentication information to decrypt and authenticate the target authentication file to obtain target starting information;
step S208, data verification is carried out on the target starting data indicated by the target starting information;
Step S210, when the target startup data passes the verification, starting the target server by using the target startup data.
Through the steps, the trusted platform module with the connection relation with the basic input and output system is deployed on the target server, the trusted platform module stores the authentication information of the account number with the calling authority of the target server, the authentication file obtained by encrypting the start information by using the authentication mode indicated by the authentication information after the account number is verified, is also imported on the target server, so that the data content of the start data used by the target server is authenticated by the account number of the use server, the authentication mode for authenticating the start data is mastered by the account number of the use server, and further, after a target request is received, the target authentication information of the target account number is acquired from the trusted platform module, the target authentication file corresponding to the target account number is acquired from the server, and the decryption authentication is carried out on the target authentication file by using the target authentication mode indicated by the target authentication information, thereby obtaining the start information.
Optionally, in the embodiment of the present application, authentication information of a reference account number with a call authority for the target server is stored in the trusted platform module, the authentication information is used for indicating an authentication mode of encrypting and authenticating data by the reference account number, an authentication file obtained by encrypting and authenticating the start information of the target server by using the authentication mode after information verification of the start information of the target server by the reference account number is introduced into the target server, and the start information is used for indicating start data used for starting the target server.
Optionally, in the embodiment of the present application, during a startup process of the server, the trusted platform module (TPM, trusted Platform Module) is a secure storage module that is allowed to be accessed by the bios, so as to ensure that authentication information stored in the trusted platform module is not stolen according to a secure storage characteristic of the trusted platform module.
Optionally, in the embodiment of the present application, the authentication information stored in the trusted platform module may be stored in the trusted platform module by a reference server for maintaining the operation of the target server, or may also be stored in the trusted platform module by a user according to a requirement for use of the target server, for example, the reference server configures the authentication information for an account number of the use server, and stores the authentication information in the trusted platform module, or may also be a request for sending the authentication information used by the reference server to the reference server for verification, and after the verification passes, the reference server stores the authentication information in the trusted platform module. Or the account number of the server may be stored in the trusted platform module, for example, the reference account number sends a call request for requesting to call the target server to the reference server, the target server verifies that the call request is passed, authorization information is issued to the target account number, the authorization information is used for indicating that the reference account number has call authority to the target server, the reference account number uses the authorization information to access the trusted platform module, and authentication information used by the reference account number is stored in the trusted platform module, which is not limited by the scheme.
Optionally, in the embodiment of the present application, the authentication information may include, but is not limited to, an encryption key for encrypting and authenticating data by referring to the account, a decryption key corresponding to the encryption key, a key generation manner for generating the encryption key for authenticating data by referring to the account, a key generation manner for generating the decryption key, and the like, which are not limited in this scheme.
Optionally, in the embodiment of the present application, the startup data is used to indicate a startup manner of starting the server, and the startup manners indicated by different startup data are used to implement different service functions of the server, for example, the startup data may be data for starting a corresponding hardware device deployed on the service, which is not limited in this scheme.
In the embodiment provided in step S202, the target request may, but is not limited to, carry a service function for calling the service handled by the server, that is, in the server, the startup data of the server may be divided according to the service function, so that different startup data may be called according to different service functions. Or the server can further segment the starting data of the server according to a certain granularity according to the type of the service function to be realized, and further, under the condition of requesting to call the target service function of the server, the starting data in the server is screened, so that the set of the starting data for realizing the target service function of the server is obtained.
Optionally, in the embodiment of the present application, the target account is an account registered on the server and having a login relationship with the target server, that is, the target account may be an account logged in a server client corresponding to the target server; or the target account number can also be an account number logged in on a web page bound with the target server; or the target account number may also be an account number logged in a candidate server having a binding relationship with the target server, where the candidate server is used to call a related service function on the server to complete the service function of the candidate server, which is not limited in this scheme.
In the embodiment provided in step S204, the trusted platform module may provide an API interface for other modules (such as a basic input/output system) to call to obtain the target authentication information corresponding to the target account number. The caller may request the target authentication information by sending a specific request parameter, such as a target account ID or a user name.
Optionally, in the embodiment of the present application, the authentication file may be stored in the server in correspondence with the corresponding start data, that is, the authentication file and the start data having a correspondence are stored in the same location in the server, so that candidate data call is convenient, for example, the authentication file and the start data having a correspondence may be stored in BMC (Baseboard Management Controller) of the server, so that the BMC candidate call the start data is convenient to perform the start operation on the server.
In the embodiment provided in step S206, the startup information may be obtained by using the target account of the target server and the maintainer for maintaining the target server to perform a common signature authentication, so that the security reliability of the authentication file is ensured, for example, the maintainer of the target server uses the private key of the maintainer to perform encryption authentication on the startup information to obtain an authenticated authentication file, the maintainer sends the authentication file to the target account, and the target account uses the private key of the target account to perform signature authentication on the authentication file to obtain the target authentication file, and at this time, decryption of the target authentication file is performed by using the decryption key of the target account and the decryption key of the maintainer, so that the corresponding decryption key can be converted through the authentication information, thereby performing decryption authentication on the target authentication file.
In the embodiment provided in step S208, the target startup information is startup information obtained by pre-authenticating the target account, and startup data used for starting the server and passed by the target account authentication is recorded in the startup information, so that security of the target startup data to be invoked in the server startup process is avoided by verifying the target startup data by using the target startup information, and the server is prevented from executing startup operation by using the tampered startup data.
The application adopts a method which does not depend on a processor to protect the static area of the BIOS of the server firmware. And verifying the BIOS static area by using the characteristics of the high-quality trusted platform module TPM and a developed verification algorithm. The aim of safe starting is achieved, and invasion of viruses such as Trojan horse is avoided. FIG. 3 is a schematic diagram of an alternative server system according to an embodiment of the present application, where the system includes a target server, a target account using the target server, and a reference server for maintaining the target server, where the target account is registered on the server and has a login relationship with the target server, that is, the target account may be an account logged in a server client corresponding to the target server, as shown in FIG. 3; or the target account number can also be an account number logged on a webpage bound with the target server; or the target account number can also be an account number logged in a candidate server with binding relation with the target server, wherein the candidate server is used for calling the related service function on the server to complete the service function of the candidate server. Before the server is started, the reference server sends starting information for indicating the data content of starting data used for starting the server to the target account number for authentication, after the target account number passes through the authentication of the starting information, the starting information is encrypted and authenticated by using a target account number authentication mode to obtain an authentication file, the authentication file is stored in the reference server, further, after a subsequent target account number sends a target request for calling the server, the authentication file and the authentication information stored in the server can be called, the authentication file is decoded through the authentication information to obtain the starting information, and therefore the starting data to be called by the server is verified by using the starting information.
FIG. 4 is a schematic diagram of information interaction according to an embodiment of the present application, as shown in FIG. 4, in order to ensure the security of startup information, two sets of keys may be set in the present application to encrypt and authenticate authentication information, and a user (using a reference account of a target server) generates a set of keys as a root key pair, which is a trust root for secure startup and is responsible for encrypting certificates of a secondary key; the server vendor (reference server for the memory maintenance of the target server) generates a set of keys as a secondary key pair, responsible for encrypting the BIOS static region (boot data). In order to ensure the security of the public key, the public keys of the root key and the secondary key are stored Yu Kexin in the platform module TPM. The private key of the root secret key is stored in the user terminal, and the private key of the secondary secret key is stored in the server manufacturer terminal. The root secret key is the source of the trust root of the scheme, and is controlled by the user, so that the security requirement of the client is met. The user is supported to customize the BIOS encryption area (starting data), and the user is centered around everything, so that the user selects important areas, and the important areas may be the BIOS kernel code area, the code area of the user customizing function and the like. After a user customizes a BIOS encryption area, a reference server selects private keys of different secondary keys according to the area type selected by the user to encrypt the secondary keys into corresponding secondary certificates, then all the secondary certificates are transmitted to the user, the user encrypts all the secondary certificates into corresponding root certificates by using the private keys of the root keys and then transmits the root certificates to the reference server, and then the reference server writes all the root certificates into a BMC in an out-of-band mode, and simultaneously writes public keys of the root keys provided by the user into a trusted platform module TPM.
As an optional embodiment, the retrieving, from the trusted platform module, the target authentication information corresponding to the target account number includes:
Acquiring a target service function of the target server requested to be invoked by the target request;
And the target authentication information configured for the target service function by the target account number is called from the trusted platform module.
Optionally, in the embodiment of the present application, the target account may use a fixed authentication information to authenticate the startup information of all service functions of the server.
Optionally, in the embodiment of the present application, different authentication information may be configured for different service functions by the target account, that is, different authentication information may be used to authenticate starting information of different service functions of the server, so that different authentication information may be set according to importance degrees of the service functions, the higher the importance degree of the service functions is, the higher the security level of an authentication mode indicated by the authentication information is, the higher the complexity of performing the authentication operation is, the lower the importance degree of the service functions is, the security level of the authentication mode indicated by the authentication service is also lower, and the complexity of performing the authentication operation is relatively lower.
Through the above, by configuring the corresponding authentication information for different service functions, the target account is prevented from using the same authentication mode to encrypt and authenticate the starting information corresponding to different service functions, the accuracy of the authentication file is ensured, the file content of the authentication file is prevented from being stolen or tampered, and the safety of the running environment of the server is further ensured.
As an optional embodiment, the retrieving, from the trusted platform module, the target authentication information configured by the target account number for the target service function includes:
Determining one or more target starting data required for realizing the target service function, wherein a starting mode of corresponding hardware equipment deployed on the target server is recorded in each target starting data;
And the target authentication information of the target account corresponding to the target starting data is called from the trusted platform module.
Optionally, in the embodiment of the present application, the authentication information may be generated according to the data content of the corresponding startup data, for example, a key generation algorithm is used to calculate the data content of the startup data, so as to obtain key information for signing and authenticating the startup information corresponding to the startup data, where the authentication information includes the key information, and the scheme is not limited thereto.
Through the steps, the starting data in the server are split according to a certain granularity, and the corresponding authentication modes are configured for the starting data, so that different starting information is prevented from being authenticated by using the same authentication mode, and the risk that the starting information is stolen or deciphered and tampered is reduced.
As an optional embodiment, the retrieving, from the trusted platform module, the target authentication information of the target account number corresponding to the target startup data includes:
determining a target storage area corresponding to the target authentication information from the authentication information with the corresponding relation and the storage area in the trusted platform module;
Sending a target acquisition request to the trusted platform module, wherein the target acquisition request is used for requesting to acquire authentication information stored in the target storage area;
and receiving the target authentication information returned by the trusted platform module in response to the target acquisition request.
Optionally, in the embodiment of the present application, the storage area of the authentication information in the trusted platform module may be continuous, or the same authentication information may also be stored in a plurality of discontinuous storage areas in the trusted platform module, when the authentication information stored in the trusted platform module is acquired, if the acquired authentication information is sub-authentication information of the plurality of storage areas, the sub-authentication information may be spliced according to the sequence of the storage areas in the trusted platform module, so as to obtain the target authentication information, and the scheme is not limited thereto.
Through the above, through the division and the distribution to the storage space of trusted platform module to on the one hand can realize the effective utilization to the storage space of trusted platform module, on the other hand can improve the storage efficiency to authentication information, avoid authentication information's storage to trade disorder, make things convenient for follow-up utilization.
As an alternative embodiment, the target server motherboard is further provided with a central processor, the central processor is respectively connected with the basic input/output system and the trusted platform module through a serial peripheral interface bus,
The sending a target acquisition request to the trusted platform module includes:
Generating a target instruction in a serial peripheral interface protocol format;
And sending the target instruction to the central processing unit through the serial peripheral interface bus, wherein the target instruction is used for instructing the central processing unit to send the target acquisition request in the serial peripheral interface protocol format to the trusted platform module.
As an alternative embodiment, before said sending the target acquisition request to the trusted platform module, the method further comprises:
acquiring a target authorization value stored in the basic input and output system, wherein the target authorization value is used for indicating the access authority of the basic input and output system to the trusted platform module;
And sending a right verification request carrying the target authorization value to the trusted platform module, wherein the right verification request is used for requesting the trusted platform module to verify the data access right of the basic input and output system based on the target authorization value.
Optionally, in the embodiment of the present application, the target authorization value characterizes a read authority of the basic input/output system to the trusted platform module, and the basic input/output system may use a fixed authorization value to access the trusted platform module, or on the trusted platform module, different authorization values are provided for different stored authentication information, and the basic input/output system needs to use a corresponding authorization value to access a storage area in the trusted platform module for storing the corresponding authentication information.
Through the above, the authorization value is set for the basic input/output system on the trusted platform module, so that before the basic input/output system requests authentication information from the trusted platform module, the authentication is performed by using the authorization value, thereby ensuring the safe storage of the authentication information by the trusted authentication platform and avoiding the theft of the authentication information in the trusted platform module.
As an optional embodiment, the retrieving, from the target server, the target authentication file corresponding to the target account number includes:
Acquiring a target service function of the target server requested to be invoked by the target request;
And screening one or more target authentication files corresponding to the target service function from a plurality of reference authentication files stored in the server, wherein each reference authentication file is obtained by encrypting reference starting information for the target account, the reference starting information is used for indicating data content recorded by reference starting data used for starting the target server, and a starting mode of corresponding hardware equipment deployed on the target server is recorded in each reference starting data.
Optionally, in the embodiment of the present application, the reference startup data is obtained by dividing the startup data deployed in the server according to a certain granularity, for example, dividing the startup data according to a device type of a hardware device started by the startup data, or dividing the startup data according to a service function implemented by the hardware device started by the startup data.
Through the steps, the starting data in the server are divided into a plurality of reference starting data, so that the management flexibility of the starting data of the server is ensured, the corresponding reference starting data can be added by a maintainer of the server according to the requirements, the starting data set for realizing the corresponding service function is obtained by assembling and splicing the plurality of reference starting information, the maintenance amount of maintainers on the data is reduced, and in addition, the reference starting data can be flexibly combined, so that the server supports different service functions, and the service function flexibility of the server is improved.
As an alternative embodiment, the target server motherboard is provided with a baseboard management controller, the baseboard management controller is connected with the basic input/output system,
The screening the one or more target authentication files corresponding to the target service function from the multiple reference authentication files stored in the server includes:
Screening out a target authentication file corresponding to the target account calling the target service function from the account, the service function and the authentication file with the corresponding relation;
Determining a target storage position for storing the target authentication file from a plurality of storage positions of the baseboard management controller, wherein the storage position in the baseboard management controller and the reference authentication file have a meaning corresponding relation;
And extracting the target authentication file from the target storage location.
Through the above, by dividing the storage positions of the baseboard management controller, the corresponding storage positions of the corresponding authentication files are configured in the baseboard management controller, so that on one hand, effective utilization of the storage positions of the baseboard management controller is ensured, on the other hand, storage efficiency of the authentication files is improved, and on the other hand, subsequent authentication files are read.
As an alternative embodiment, the determining, from a plurality of storage locations of the baseboard management controller, a target storage location for storing the target authentication file includes:
Acquiring a memory mapping table of the baseboard management controller, wherein the memory mapping table is used for indicating the memory space allocation condition of the baseboard management controller;
And searching the target storage position for storing the target authentication file in the memory of the baseboard management controller from the memory mapping table.
As an optional embodiment, before the obtaining the memory mapping table of the trusted platform module, the method further includes:
receiving the reference authentication file sent by a reference server, wherein the reference server is a server for maintaining the running state of the target server;
Screening a reference storage position in an unoccupied state from the content space of the baseboard management controller;
And storing the reference authentication file in the reference storage position, and updating the corresponding relation between the reference storage position and the reference authentication file into the memory mapping table.
Alternatively, in the embodiment of the present application, the storage locations occupied by the authentication file in the baseboard management controller may be consecutive storage locations, or the authentication file may also occupy a plurality of discontinuous storage locations in the baseboard management controller.
Through the above, the authentication file is stored in the baseboard management controller by screening the unoccupied storage position in the baseboard management controller, so that the authentication file is stored in the unoccupied storage position, thereby ensuring the effective occupation of the storage space of the baseboard management controller and avoiding the waste of the storage space.
As an optional embodiment, the decrypting and authenticating the target authentication file by using the target authentication mode indicated by the target authentication information to obtain target start information includes:
Converting a decryption key corresponding to the target authentication file according to the target authentication information;
and decrypting the target authentication file by using the decryption key to obtain the target starting information.
Optionally, in the embodiment of the present application, the target authentication information may be a decryption key that carries decrypting the authentication information, or may also be a key generation manner that stores and generates the decryption key.
As an optional embodiment, the decrypting the target authentication file using the decryption key, to obtain the target startup information includes:
decrypting the target authentication file by using an account public key of the target account to obtain a candidate authentication file, wherein the target authentication file is obtained by encrypting the candidate authentication file by using an account private key corresponding to the account public key by the target account, and the decryption key comprises the account public key;
obtaining a server public key of a reference server for the candidate authentication file from the trusted platform module, wherein the reference server is a server for maintaining the running state of the target server, and is used for encrypting the target starting information by using a server private key corresponding to the server public key and sending the encrypted candidate authentication file to the target account for authentication;
And decrypting the candidate authentication file by using the server public key to obtain the target starting information.
Through the steps, the target account of the target server and the reference server maintaining the running function of the target server perform encryption authentication on the starting information together, namely the reference server performs encryption authentication on the starting information first and sends an authentication file after the encryption authentication to the target account for authentication, so that the target account receives an encrypted version of the starting information, the problem of starting information leakage caused by sending a starting information clear code of the server to a target user is avoided, and the safety of the starting information of the server is ensured.
As an optional embodiment, the converting the decryption key corresponding to the target authentication file according to the target authentication information includes one of the following:
Determining the account public key as the decryption key under the condition that the target authentication information is the account public key of the target account;
Determining a decryption mode corresponding to the target encryption mode under the condition that the target authentication information is information indicating the target encryption mode adopted by the target account number for the target authentication file; and generating the decryption key for decrypting the target authentication file according to the decryption mode.
As an optional embodiment, before the screening the target authentication file corresponding to the target account calling the target service function from the account, the service function and the authentication file with the correspondence, the method further includes:
Detecting a communication state between the baseboard management controller and the basic input output system;
And under the condition that the communication state is used for indicating that the basic input and output system is in the disconnection state, screening the target authentication file corresponding to the target service function from a plurality of initial authentication files stored in a buffer area corresponding to the basic input and output system, wherein the plurality of initial authentication files are authentication files used by the basic input and output system for starting the target server for the target account in a reference time period before the current moment.
Through the steps, the authentication file used by the target account number is cached in the cache area of the basic input/output system and is used for verifying the starting data after the connection between the basic input/output system and the baseboard management controller is lost, so that the operation stability of the server system is improved, and the influence of the link disconnection between the basic input/output system and the baseboard management controller on the starting of the server is avoided.
As an optional embodiment, after the target authentication file corresponding to the target service function is screened from the plurality of initial authentication files stored in the buffer area corresponding to the basic input output system, the method further includes:
extracting a plurality of the reference authentication files stored in the baseboard management controller in the case where recovery communication between the basic input output system and the baseboard management controller is detected;
updating the initial authentication file by using the reference authentication file.
Through the steps, after the communication is restored between the basic input and output system and the baseboard management controller, the reference authentication file in the baseboard management controller is called to update the authentication file stored in the buffer area of the basic input and output system, and the accuracy of the authentication file stored in the buffer area of the basic input and output system is ensured by storing the authentication file.
As an optional embodiment, the performing data verification on the target startup data indicated by the target startup information includes:
Matching the target starting information with target starting data in the target server;
Under the condition that the target starting information is matched with the target starting data, determining that the target starting data passes verification;
And under the condition that the target starting information is inconsistent with the target starting data in matching, determining that the target starting data is not checked.
As an optional embodiment, said matching the target startup information with the target startup data in the target server includes:
calculating the target starting data by using a message digest algorithm to obtain candidate message digests, wherein the candidate message digests are used for indicating data contents carried by the target starting data;
Matching the candidate information abstract with a target information abstract, wherein the target starting information comprises the target information abstract;
under the condition that the target information abstract and the candidate information abstract are the same, determining that the target starting data and the target starting information are matched and consistent;
And under the condition that the target information abstract and the candidate information abstract are different, determining that the target starting data and the target starting information are inconsistent in matching.
As an alternative embodiment, after said determining that the target boot data check fails, the method further comprises:
Controlling the target server to downtime, and generating a target notification message for indicating that the target starting data is tampered;
and sending the target notification message to a reference server for maintaining the target server, wherein the reference server is used for maintaining starting data of the target server according to the target notification message.
Optionally, in the embodiment of the present application, the operation of maintaining the start data of the reference server on the start data of the target server may include, but is not limited to, reconfiguring the start data, and re-acquiring the target authentication file obtained by authenticating the start information of the start data by the target account.
Through the above, after the target starting data on the server is detected to be tampered, the server is firstly subjected to downtime treatment, so that the data which is caused by the running of the server in an incorrect running environment is prevented from being stolen, and further, the starting data maintenance is requested to the target server by sending the target notification message to the reference server, so that the server is enabled to recover to normal running as soon as possible, and the running stability of the server is improved.
FIG. 5 is a schematic diagram of an alternative server hardware connection, as shown in FIG. 5, where the SPI bus of the CPU connects the BIOS and TPM, and the ePI bus connects the BMC from a hardware perspective, in accordance with an embodiment of the present application. From the software perspective, the ESPI bus connection between the BIOS and BMC is successful. Initializing Host to bridge equipment hung under the BMC during enumeration, and then performing data interaction by using MMIO resources of the equipment, wherein in the scheme, the root certificate of each area is written into the BMC in advance, and the BIOS can read the root certificate of each area written into the BMC in an MMIO mode during the starting stage of the server; the BIOS and the TPM use SPI commands to conduct data interaction before, in the scheme, the public key of the root key is written into the TPM in advance, and the BIOS can read the public key of the root key written into the TPM in a mode of using the SPI commands in a server starting stage.
Fig. 6 is an optional boot data verification flow chart according to an embodiment of the present application, as shown in fig. 6, after the boot-up, the BIOS may read the root certificate of each encryption area from the BMC side, and at the same time, the BIOS may also read the root certificate of each encryption area (boot data) from its own chip NVRAM, compare the root certificates of each encryption area read from the BMC and the NVRAM of the BIOS, and if they are inconsistent, save the root certificate of each encryption area read from the BMC to the NVRAM of the BIOS, that is, the BMC side has a higher priority than the NVRAM of the BIOS. The method is characterized in that the root certificate of each encryption area can be obtained from the BMC end due to the fact that normal communication with the BMC is not possible in the starting process is stored in the NVRAM of the BIOS, and the root certificate of each encryption area can be obtained from the NVRAM of the BIOS under the condition that communication with the BMC fails.
The BIOS acquires the public keys of the root secret key and the secondary secret key from the trusted platform module TPM, and the public key acquired from the TPM can guarantee the authenticity and the security of the public key. The public key of the root key is used for decrypting the root certificate of each encryption area to the secondary certificate of each encryption area, and then the public key of the secondary key is used for decrypting the secondary certificate of each encryption area to obtain the Hash value of each encryption area. For example, the Hash value of area 1 is 1_a, the Hash value of area 2 is 2_A, the Hash value of area 3 is 3_A … …, and so on, the Hash value of area N is n_a. Meanwhile, before the BIOS runs the encryption area code, the Hash value of the encryption area 1 is 1_B, the Hash value of the area 2 is 2_B, the Hash value of the area 3 is 3_B … …, and the Hash value of the area N is N_B. Comparing Hash values of the same area, for example, comparing 1_A and 1_B of the area 1, comparing 2_A and 2_B of the area 2, wherein the Hash values are the same and represent that verification passes, allowing the operation of the encrypted area code, otherwise, the verification fails, recording a verification failure log for a user to check, triggering a server downtime mechanism, and avoiding a series of serious losses caused by the operation of the code tampered by viruses or trojans.
The application supports a plurality of sets of secondary certificates for adapting users to select different encryption areas, thereby meeting different customized package requirements of the users. For example, the user customizes 3 packages, and the application scenario of each package is different, so that the combination of the encryption areas focused by the user is inconsistent. The scheme provides a secondary certificate for each encryption area, for example, 1 to 10, 10 encryption areas are provided for 10 secondary certificates, and package 1 of users needs encryption areas 1,3,5 and 7 and is named as secondary certificate combination 1; package 2 requires encryption zones 1,2,3,4,5, named secondary certificate combination 2; package 3 requires encryption areas 2,4,6,8, named secondary certificate combination 3; different encryption area combinations are selected to form different secondary certificate combinations, the scheme does not limit the number of the secondary certificate combinations, and all the scheme is configured with customer requirements as centers. At shipment, if the user orders package 1 this time, the secondary certificate combination 1 is written into the TPM. If the user orders package 2 this time, the secondary certificate combination 2 is written to the TPM. If the user orders package 3 this time, the secondary certificate combination 3 is written to the TPM.
The method for safely starting the server provided by the embodiment can help the server to detect and prevent the invasion of malicious software and viruses during starting. The invention has the advantages that the invention has an excellent safe implementation scheme, gets rid of the limit of server processor chip manufacturers, and simultaneously surrounds all centers with clients, and ensures the safety of the BIOS static area based on the requirements of the users.
The method gets rid of the limitation of server processor chip manufacturers, can realize cross-platform scheme unification, can realize code unification, saves development and test manpower, and is easy to know and use for users.
The encryption of the root and the second level is adopted, the security is enhanced, meanwhile, the random customized encryption region combination is supported, and the security encryption and verification of different regions adopted by different packages of users are realized. The scheme meets the requirements of different package application scenes of clients, is convenient to customize, and only needs to write public keys of different secondary keys into the TPM when delivering, so that the release time and the self-time of release of different package repeated versions are saved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
The embodiment also provides a device for starting the server, which is used for implementing the above embodiment and the preferred implementation, and the description is omitted herein. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 7 is a block diagram of a startup device of a server according to an embodiment of the present application, which is applied to a basic input output system, and a trusted platform module disposed on a target server, where the basic input output system is connected to the trusted platform module, and as shown in fig. 7, the device includes:
The receiving module is used for receiving a target request sent by a target account number so as to start the target server;
The invoking module is used for invoking target authentication information corresponding to the target account from the trusted platform module and invoking target authentication files corresponding to the target account from the target server under the condition that the target account has invoking authority on the target server, wherein the target authentication files are obtained by encrypting and authenticating starting information of the target server by using a target authentication mode indicated by the target authentication information by the target account, and the starting information is used for indicating starting data used for starting the target server;
the authentication module is used for decrypting and authenticating the target authentication file by adopting the target authentication mode indicated by the target authentication information to obtain target starting information;
the verification module is used for carrying out data verification on the target starting data indicated by the target starting information;
and the starting module is used for starting the target server by using the target starting data under the condition that the target starting data passes the verification.
Through the above, the trusted platform module with a connection relation with the basic input/output system is deployed on the target server, the trusted platform module stores the authentication information of the account number with the calling authority of the target server, the target authentication information of the target server is further imported on the target server, the authentication mode indicated by the authentication information is used for encrypting the authentication file obtained after the account number is verified, so that the data content of the used authentication data is authenticated by the account number of the use server, the authentication mode for authenticating the start data is mastered by the account number of the use server, further, after a target request is received, the target authentication information of the target account number is retrieved from the trusted platform module, the target authentication file corresponding to the target account number is retrieved from the server, and the decryption authentication is carried out on the target authentication file by using the target authentication mode indicated by the target authentication information, thereby obtaining the start information, the authentication method is used for verifying the target start data, the start data operation server is realized, the use of the used data operation server is prevented from being tampered with the account number when the target authentication mode is used, the safety environment is guaranteed, and the safety environment is improved.
Optionally, the calling module includes:
The first acquisition unit is used for acquiring the target service function of the target server requested to be invoked by the target request;
And the calling unit is used for calling the target authentication information configured for the target service function by the target account number from the trusted platform module.
Optionally, the calling unit is configured to:
Determining one or more target starting data required for realizing the target service function, wherein a starting mode of corresponding hardware equipment deployed on the target server is recorded in each target starting data;
And the target authentication information of the target account corresponding to the target starting data is called from the trusted platform module.
Optionally, the calling unit is configured to:
determining a target storage area corresponding to the target authentication information from the authentication information with the corresponding relation and the storage area in the trusted platform module;
Sending a target acquisition request to the trusted platform module, wherein the target acquisition request is used for requesting to acquire authentication information stored in the target storage area;
and receiving the target authentication information returned by the trusted platform module in response to the target acquisition request.
Optionally, a central processor is disposed on the target server motherboard, and the central processor is respectively connected with the basic input/output system and the trusted platform module through a serial peripheral interface bus,
The calling unit is used for:
Generating a target instruction in a serial peripheral interface protocol format;
And sending the target instruction to the central processing unit through the serial peripheral interface bus, wherein the target instruction is used for instructing the central processing unit to send the target acquisition request in the serial peripheral interface protocol format to the trusted platform module.
Optionally, the apparatus further includes:
The acquisition module is used for acquiring a target authorization value stored in the basic input/output system before the target acquisition request is sent to the trusted platform module, wherein the target authorization value is used for indicating the access authority of the basic input/output system to the trusted platform module;
and the sending module is used for sending an authority verification request carrying the target authorization value to the trusted platform module, wherein the authority verification request is used for requesting the trusted platform module to verify the data access authority of the basic input and output system based on the target authorization value.
Optionally, the calling module includes:
the second acquisition unit is used for acquiring the target service function of the target server requested to be invoked by the target request;
The screening unit is configured to screen one or more target authentication files corresponding to the target service function from multiple reference authentication files stored in the server, where each reference authentication file is obtained by encrypting reference startup information for the target account, the reference startup information is used to indicate data content recorded by reference startup data used for startup of the target server, and a startup mode of a corresponding hardware device deployed on the target server is recorded in each reference startup data.
Optionally, a baseboard management controller is disposed on the target server motherboard, the baseboard management controller is connected with the basic input/output system,
The screening unit is used for:
Screening out a target authentication file corresponding to the target account calling the target service function from the account, the service function and the authentication file with the corresponding relation;
Determining a target storage position for storing the target authentication file from a plurality of storage positions of the baseboard management controller, wherein the storage position in the baseboard management controller and the reference authentication file have a meaning corresponding relation;
And extracting the target authentication file from the target storage location.
Optionally, the screening unit is configured to:
Acquiring a memory mapping table of the baseboard management controller, wherein the memory mapping table is used for indicating the memory space allocation condition of the baseboard management controller;
And searching the target storage position for storing the target authentication file in the memory of the baseboard management controller from the memory mapping table.
Optionally, the apparatus further includes:
the receiving module is used for receiving the reference authentication file sent by a reference server before the memory mapping table of the trusted platform module is obtained, wherein the reference server is a server for maintaining the running state of the target server;
A first screening module, configured to screen a reference storage location in an unoccupied state from a content space of the baseboard management controller;
And the updating module is used for storing the reference authentication file in the reference storage position and updating the corresponding relation between the reference storage position and the reference authentication file into the memory mapping table.
Optionally, the authentication module includes:
The conversion unit is used for converting the decryption key corresponding to the target authentication file according to the target authentication information;
and the decryption unit is used for decrypting the target authentication file by using the decryption key to obtain the target starting information.
Optionally, the decryption unit is configured to:
decrypting the target authentication file by using an account public key of the target account to obtain a candidate authentication file, wherein the target authentication file is obtained by encrypting the candidate authentication file by using an account private key corresponding to the account public key by the target account, and the decryption key comprises the account public key;
obtaining a server public key of a reference server for the candidate authentication file from the trusted platform module, wherein the reference server is a server for maintaining the running state of the target server, and is used for encrypting the target starting information by using a server private key corresponding to the server public key and sending the encrypted candidate authentication file to the target account for authentication;
And decrypting the candidate authentication file by using the server public key to obtain the target starting information.
Optionally, the conversion unit is configured to perform one of the following operations:
Determining the account public key as the decryption key under the condition that the target authentication information is the account public key of the target account;
Determining a decryption mode corresponding to the target encryption mode under the condition that the target authentication information is information indicating the target encryption mode adopted by the target account number for the target authentication file; and generating the decryption key for decrypting the target authentication file according to the decryption mode.
Optionally, the apparatus further includes:
the first detection module is used for detecting the communication state between the baseboard management controller and the basic input and output system before the target authentication file corresponding to the target business function called by the target account is screened out from the account, business function and authentication file with corresponding relation;
And the second screening module is used for screening the target authentication file corresponding to the target service function from a plurality of initial authentication files stored in a buffer area corresponding to the basic input/output system under the condition that the communication state is used for indicating that the basic input/output system is in an open circuit state, wherein the plurality of initial authentication files are authentication files used by the basic input/output system for starting the target server for the target account in a reference time period before the current moment.
Optionally, the apparatus further includes:
A second detection module, configured to extract, after the target authentication file corresponding to the target service function is screened from a plurality of initial authentication files stored in a buffer area corresponding to the basic input/output system, a plurality of reference authentication files stored in the baseboard management controller when recovery communication between the basic input/output system and the baseboard management controller is detected;
and the updating module is used for updating the initial authentication file by using the reference authentication file.
Optionally, the verification module includes:
The matching unit is used for matching the target starting information with the target starting data in the target server;
the first determining unit is used for determining that the target starting data passes verification under the condition that the target starting information is matched with the target starting data;
And the second determining unit determines that the target starting data is not checked under the condition that the target starting information is inconsistent with the target starting data in matching.
Optionally, the matching unit is configured to:
calculating the target starting data by using a message digest algorithm to obtain candidate message digests, wherein the candidate message digests are used for indicating data contents carried by the target starting data;
Matching the candidate information abstract with a target information abstract, wherein the target starting information comprises the target information abstract;
under the condition that the target information abstract and the candidate information abstract are the same, determining that the target starting data and the target starting information are matched and consistent;
And under the condition that the target information abstract and the candidate information abstract are different, determining that the target starting data and the target starting information are inconsistent in matching.
Optionally, the apparatus further includes:
The processing module is used for controlling the target server to downtime after the target starting data is determined to pass the verification, and generating a target notification message for indicating that the target starting data is tampered;
The sending module is used for sending the target notification message to a reference server for maintaining the target server, wherein the reference server is used for maintaining the starting data of the target server according to the target notification message.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; or the above modules may be located in different processors in any combination.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic device may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Embodiments of the application also provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of any of the method embodiments described above.
Embodiments of the present application also provide another computer program product comprising a non-volatile computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the method embodiments described above.
Embodiments of the present application also provide a computer program comprising computer instructions stored on a computer readable storage medium; the processor of the computer device reads the computer instructions from the computer readable storage medium and the embedder executes the computer instructions to cause the computer device to perform the steps of any of the method embodiments described above.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application should be included in the protection scope of the present application.

Claims (20)

1. A method for starting up a server is characterized in that,
The method is applied to a basic input/output system, the basic input/output system and a trusted platform module are deployed on a target server, the basic input/output system is connected with the trusted platform module, and the method comprises the following steps:
receiving a target request sent by a target account number to start the target server;
Under the condition that the target account number has calling authority to the target server, calling target authentication information corresponding to the target account number from the trusted platform module, and calling target authentication files corresponding to the target account number from the target server, wherein the target authentication files are obtained by encrypting and authenticating starting information of the target server by using a target authentication mode indicated by the target authentication information by the target account number, and the starting information is used for indicating starting data used for starting the target server;
decrypting and authenticating the target authentication file by adopting the target authentication mode indicated by the target authentication information to obtain target starting information;
performing data verification on target starting data indicated by the target starting information;
And under the condition that the target starting data passes the verification, starting the target server by using the target starting data.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The step of retrieving the target authentication information corresponding to the target account number from the trusted platform module includes:
Acquiring a target service function of the target server requested to be invoked by the target request;
And the target authentication information configured for the target service function by the target account number is called from the trusted platform module.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
The step of retrieving the target authentication information configured by the target account number for the target service function from the trusted platform module includes:
Determining one or more target starting data required for realizing the target service function, wherein a starting mode of corresponding hardware equipment deployed on the target server is recorded in each target starting data;
And the target authentication information of the target account corresponding to the target starting data is called from the trusted platform module.
4. The method of claim 3, wherein the step of,
The retrieving, from the trusted platform module, the target authentication information of the target account number corresponding to the target startup data includes:
determining a target storage area corresponding to the target authentication information from the authentication information with the corresponding relation and the storage area in the trusted platform module;
Sending a target acquisition request to the trusted platform module, wherein the target acquisition request is used for requesting to acquire authentication information stored in the target storage area;
and receiving the target authentication information returned by the trusted platform module in response to the target acquisition request.
5. The method of claim 4, wherein the step of determining the position of the first electrode is performed,
The target server is also provided with a central processing unit which is respectively connected with the basic input and output system and the trusted platform module through a serial peripheral interface bus,
The sending a target acquisition request to the trusted platform module includes:
Generating a target instruction in a serial peripheral interface protocol format;
And sending the target instruction to the central processing unit through the serial peripheral interface bus, wherein the target instruction is used for instructing the central processing unit to send the target acquisition request in the serial peripheral interface protocol format to the trusted platform module.
6. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The step of retrieving the target authentication file corresponding to the target account number from the target server includes:
Acquiring a target service function of the target server requested to be invoked by the target request;
And screening one or more target authentication files corresponding to the target service function from a plurality of reference authentication files stored in the server, wherein each reference authentication file is obtained by encrypting reference starting information for the target account, the reference starting information is used for indicating data content recorded by reference starting data used for starting the target server, and a starting mode of corresponding hardware equipment deployed on the target server is recorded in each reference starting data.
7. The method of claim 6, wherein the step of providing the first layer comprises,
The target server is provided with a baseboard management controller which is connected with the basic input and output system,
The screening the one or more target authentication files corresponding to the target service function from the multiple reference authentication files stored in the server includes:
Screening out a target authentication file corresponding to the target account calling the target service function from the account, the service function and the authentication file with the corresponding relation;
Determining a target storage position for storing the target authentication file from a plurality of storage positions of the baseboard management controller, wherein the storage position in the baseboard management controller and the reference authentication file have a meaning corresponding relation;
And extracting the target authentication file from the target storage location.
8. The method of claim 7, wherein the step of determining the position of the probe is performed,
The determining a target storage location for storing the target authentication file from a plurality of storage locations of the baseboard management controller includes:
Acquiring a memory mapping table of the baseboard management controller, wherein the memory mapping table is used for indicating the memory space allocation condition of the baseboard management controller;
And searching the target storage position for storing the target authentication file in the memory of the baseboard management controller from the memory mapping table.
9. The method of claim 8, wherein the step of determining the position of the first electrode is performed,
Before the memory mapping table of the trusted platform module is obtained, the method further includes:
receiving the reference authentication file sent by a reference server, wherein the reference server is a server for maintaining the running state of the target server;
Screening a reference storage position in an unoccupied state from the content space of the baseboard management controller;
And storing the reference authentication file in the reference storage position, and updating the corresponding relation between the reference storage position and the reference authentication file into the memory mapping table.
10. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The method for decrypting and authenticating the target authentication file by adopting the target authentication mode indicated by the target authentication information to obtain target starting information comprises the following steps:
Converting a decryption key corresponding to the target authentication file according to the target authentication information;
and decrypting the target authentication file by using the decryption key to obtain the target starting information.
11. The method of claim 10, wherein the step of determining the position of the first electrode is performed,
The decrypting the target authentication file by using the decryption key to obtain the target starting information includes:
decrypting the target authentication file by using an account public key of the target account to obtain a candidate authentication file, wherein the target authentication file is obtained by encrypting the candidate authentication file by using an account private key corresponding to the account public key by the target account, and the decryption key comprises the account public key;
obtaining a server public key of a reference server for the candidate authentication file from the trusted platform module, wherein the reference server is a server for maintaining the running state of the target server, and is used for encrypting the target starting information by using a server private key corresponding to the server public key and sending the encrypted candidate authentication file to the target account for authentication;
And decrypting the candidate authentication file by using the server public key to obtain the target starting information.
12. The method of claim 10, wherein the step of determining the position of the first electrode is performed,
The decryption key corresponding to the target authentication file is converted according to the target authentication information, and the decryption key comprises one of the following steps:
Determining the account public key as the decryption key under the condition that the target authentication information is the account public key of the target account;
Determining a decryption mode corresponding to the target encryption mode under the condition that the target authentication information is information indicating the target encryption mode adopted by the target account number for the target authentication file; and generating the decryption key for decrypting the target authentication file according to the decryption mode.
13. The method of claim 7, wherein the step of determining the position of the probe is performed,
Before the target authentication file corresponding to the target service function called by the target account is screened out from the account, the service function and the authentication file with the corresponding relation, the method further comprises the following steps:
Detecting a communication state between the baseboard management controller and the basic input output system;
And under the condition that the communication state is used for indicating that the basic input and output system is in the disconnection state, screening the target authentication file corresponding to the target service function from a plurality of initial authentication files stored in a buffer area corresponding to the basic input and output system, wherein the plurality of initial authentication files are authentication files used by the basic input and output system for starting the target server for the target account in a reference time period before the current moment.
14. The method of claim 13, wherein the step of determining the position of the probe is performed,
After the target authentication file corresponding to the target service function is screened out from the plurality of initial authentication files stored in the buffer area corresponding to the basic input/output system, the method further comprises:
extracting a plurality of the reference authentication files stored in the baseboard management controller in the case where recovery communication between the basic input output system and the baseboard management controller is detected;
updating the initial authentication file by using the reference authentication file.
15. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The data verification for the target starting data indicated by the target starting information comprises the following steps:
Matching the target starting information with target starting data in the target server;
Under the condition that the target starting information is matched with the target starting data, determining that the target starting data passes verification;
And under the condition that the target starting information is inconsistent with the target starting data in matching, determining that the target starting data is not checked.
16. The method of claim 15, wherein the step of determining the position of the probe is performed,
The matching the target starting information with the target starting data in the target server comprises the following steps:
calculating the target starting data by using a message digest algorithm to obtain candidate message digests, wherein the candidate message digests are used for indicating data contents carried by the target starting data;
Matching the candidate information abstract with a target information abstract, wherein the target starting information comprises the target information abstract;
under the condition that the target information abstract and the candidate information abstract are the same, determining that the target starting data and the target starting information are matched and consistent;
And under the condition that the target information abstract and the candidate information abstract are different, determining that the target starting data and the target starting information are inconsistent in matching.
17. A starting device of a server is characterized in that,
The device is applied to a basic input/output system, the basic input/output system and a trusted platform module are deployed on a target server, the basic input/output system is connected with the trusted platform module, and the device comprises:
The receiving module is used for receiving a target request sent by a target account number so as to start the target server;
The invoking module is used for invoking target authentication information corresponding to the target account from the trusted platform module and invoking target authentication files corresponding to the target account from the target server under the condition that the target account has invoking authority on the target server, wherein the target authentication files are obtained by encrypting and authenticating starting information of the target server by using a target authentication mode indicated by the target authentication information by the target account, and the starting information is used for indicating starting data used for starting the target server;
the authentication module is used for decrypting and authenticating the target authentication file by adopting the target authentication mode indicated by the target authentication information to obtain target starting information;
the verification module is used for carrying out data verification on the target starting data indicated by the target starting information;
and the starting module is used for starting the target server by using the target starting data under the condition that the target starting data passes the verification.
18. A computer-readable storage medium comprising,
The computer readable storage medium has stored therein a computer program, wherein the computer program when executed by a processor implements the steps of the method of any of claims 1 to 16.
19. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that,
The processor, when executing the computer program, implements the steps of the method as claimed in any one of claims 1 to 16.
20. A computer program product comprising a computer program, characterized in that,
Which computer program, when being executed by a processor, carries out the steps of the method as claimed in any one of claims 1 to 16.
CN202410696749.8A 2024-05-31 Server starting method and device, storage medium and electronic equipment Pending CN118260774A (en)

Publications (1)

Publication Number Publication Date
CN118260774A true CN118260774A (en) 2024-06-28

Family

ID=

Similar Documents

Publication Publication Date Title
CN108810894B (en) Terminal authorization method, device, computer equipment and storage medium
US11258792B2 (en) Method, device, system for authenticating an accessing terminal by server, server and computer readable storage medium
CN107463838B (en) Method for safety monitoring, device, system and storage medium based on SGX
US8171295B2 (en) Information processing apparatus, a server apparatus, a method of an information processing apparatus, a method of a server apparatus, and an apparatus executable process
US20220209951A1 (en) Authentication method, apparatus and device, and computer-readable storage medium
WO2021219086A1 (en) Data transmission method and system based on blockchain
US20100229242A1 (en) Program execution control system, program execution control method and computer program for program execution control
CN110737897B (en) Method and system for starting measurement based on trusted card
JP2016158270A (en) Validation of inclusion of platform within data center
CN110688660B (en) Method and device for safely starting terminal and storage medium
US20200074122A1 (en) Cryptographic operation processing method, apparatus, and system, and method for building measurement for trust chain
CN109842616B (en) Account binding method and device and server
CN111460410A (en) Server login method, device and system and computer readable storage medium
CN112765637A (en) Data processing method, password service device and electronic equipment
KR20170089352A (en) Firmware integrity verification for performing the virtualization system
CN111177709A (en) Execution method and device of terminal trusted component and computer equipment
CN112632573A (en) Intelligent contract execution method, device and system, storage medium and electronic equipment
CN111585995A (en) Method and device for transmitting and processing safety wind control information, computer equipment and storage medium
US9692641B2 (en) Network connecting method and electronic device
CN114662150A (en) Data acquisition method and device and electronic equipment
CN112966254B (en) Secure communication method and system for host and trusted cryptographic module
US20160352522A1 (en) User Terminal For Detecting Forgery Of Application Program Based On Signature Information And Method Of Detecting Forgery Of Application Program Using The Same
CN113127844A (en) Variable access method, device, system, equipment and medium
WO2021004636A1 (en) Apparatus and method for disk attestation
US20240113898A1 (en) Secure Module and Method for App-to-App Mutual Trust Through App-Based Identity

Legal Events

Date Code Title Description
PB01 Publication