A method, device and medium for accessing BMC console

By using tokens for permission verification during access to the BMC console, the problem of lack of strict user permission authentication in the existing technology is solved, and the security of the BMC console is improved.

CN114844699BActive Publication Date: 2025-02-14JINAN INSPUR DATA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210468182.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-02-14
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

The prior art lacks strict user permission authentication when directly connecting to the bare metal substrate management controller (BMC) console, and cannot meet network security requirements.

Method used

By obtaining the access request sent by the browser, a first token corresponding to the access request is generated, and permission verification is performed based on the validity of the token. If the token is valid, get the URL of the BMC console, access the BMC console through that URL, and send the access result to the browser.

Benefits of technology

This method improves the security of the BMC console, and through the validity verification of tokens, it ensures the legitimacy of user permissions and avoids unauthorized access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114844699B_ABST
    Figure CN114844699B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and medium for accessing a BMC console, mainly relating to the field of communications. The method first obtains an access request sent by a browser, and obtains a first token corresponding to the access request according to the access request; wherein the access request is generated based on the access address of the CMP input by the user; then checks whether the first token is valid; if so, obtains the URL of the BMC console, accesses the BMC console through the URL of the BMC console, and sends the access result to the browser; if not, enters the step of obtaining the access request sent by the browser. It can be seen that the method only requires the user to enter the access address of the CMP, and does not require the use of the BMC network and BMC port, so the BMC network and port will not be exposed. In addition, the method implements user authority verification by verifying the validity of the first token, which effectively improves the security and reliability of the BMC console.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a method, device and medium for accessing a BMC console. Background Art

[0002] In the era of cloud computing, as the scale of the Internet market continues to expand, a large number of heterogeneous resources are managed uniformly through cloud management platforms (CMPs). In pursuit of extreme performance, some companies choose to use bare metal servers on the cloud.

[0003] Currently, a bare metal baseboard management controller (BMC) console is used by directly connecting to the BMC. This method not only requires opening up the BMC network, but also has no strict user authority authentication, and therefore cannot meet network security requirements.

[0004] It can be seen that how to improve the security of the BMC console is an urgent problem to be solved by those skilled in the art. Summary of the invention

[0005] The purpose of this application is to provide a method, device and medium for accessing a BMC console, so as to improve the security of the BMC console and meet network security requirements.

[0006] To solve the above technical problems, the present application provides a method for accessing a BMC console, including:

[0007] Obtaining an access request sent by the browser, and obtaining a first token corresponding to the access request according to the access request; wherein the access request is generated based on the access address of the CMP input by the user;

[0008] Check whether the first token is valid;

[0009] If yes, obtain the URL of the BMC console, access the BMC console through the URL of the BMC console, and send the access result to the browser;

[0010] If not, proceed to the step of obtaining the access request sent by the browser.

[0011] Preferably, if the first token is valid, before obtaining the URL of the BMC console, the following steps are also included:

[0012] Update the token in the storage area with the first token.

[0013] Preferably, after using the first token to update the token of the storage area and before obtaining the URL of the BMC console, the method further includes:

[0014] Check whether the storage area token is valid;

[0015] If yes, proceed to the step of obtaining the URL of the BMC console;

[0016] If not, proceed to the step of obtaining the access request sent by the browser.

[0017] Preferably, obtaining the URL of the BMC console includes:

[0018] Query the attribute information of the BMC module from the CMP database;

[0019] Query the BMC module based on the attribute information and obtain the URL of the BMC console through the BMC module.

[0020] Preferably, querying the BMC module according to the attribute information and obtaining the URL of the BMC console through the BMC module includes:

[0021] Call the Redfish protocol to log in to the authentication interface of the BMC module according to the attribute information;

[0022] Get the second token returned by the authentication interface, and use the second token to get the URL of the BMC console.

[0023] Preferably, after sending the access result to the browser, the method further includes:

[0024] Receive a connection request from a browser, and connect to the BMC console according to the connection request and the URL of the BMC console; wherein the connection request is a request generated by the browser based on a websockets library.

[0025] Preferably, before receiving the connection request from the browser, the method further includes:

[0026] Extend the websockets library.

[0027] In order to solve the above technical problems, the present application also provides a device for accessing a BMC console, including:

[0028] An acquisition module, used to acquire an access request sent by a browser, and obtain a first token corresponding to the access request according to the access request; wherein the access request is generated based on an access address of a CMP input by a user;

[0029] A verification module, used to verify whether the first token is valid; if so, the access module is triggered; if not, the acquisition module is triggered;

[0030] The access module is used to obtain the URL of the BMC console, access the BMC console through the URL of the BMC console, and send the access result to the browser.

[0031] Preferably, it also includes:

[0032] The update module is used to update the token in the storage area using the first token.

[0033] Preferably, it also includes:

[0034] A first query module is used to query the attribute information of the BMC module from the database of the CMP;

[0035] The second query module is used to query the BMC module according to the attribute information, and obtain the URL of the BMC console through the BMC module.

[0036] Preferably, it also includes:

[0037] A calling module is used to call the Redfish protocol to log in to the authentication interface of the BMC module according to the attribute information;

[0038] The module is used to obtain the second token returned by the authentication interface and obtain the URL of the BMC console through the second token.

[0039] Preferably, it also includes:

[0040] The receiving module is used to receive a connection request from a browser and connect to the BMC console according to the connection request and the URL of the BMC console; wherein the connection request is a request generated by the browser based on the websockets library.

[0041] Preferably, it also includes:

[0042] Extension module for extending the websockets library.

[0043] In order to solve the above technical problems, the present application also provides a device for accessing a BMC console, including:

[0044] Memory for storing computer programs;

[0045] The processor is used to implement the steps of the method for accessing the BMC console when executing a computer program.

[0046] In order to solve the above technical problem, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for accessing the BMC console are implemented.

[0047] The present application provides a method for accessing a BMC console, the method obtaining an access request sent by a browser, and obtaining a first token corresponding to the access request according to the access request; wherein the access request is generated based on the access address of the CMP input by the user; checking whether the first token is valid; if so, obtaining the URL of the BMC console, accessing the BMC console through the URL of the BMC console, and sending the access result to the browser; if not, entering the step of obtaining the access request sent by the browser. It can be seen that the method only requires the user to enter the access address of the CMP, and does not require the use of the BMC network and BMC port, so the BMC network and port will not be exposed. In addition, the method implements user authority verification by verifying the validity of the first token, which effectively improves the security and reliability of the BMC console.

[0048] In addition, the present application also provides a device and medium for accessing a BMC console, which have the same beneficial effects as the above-mentioned method for accessing a BMC console. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0050] Figure 1 A flowchart of a method for accessing a BMC console provided by the present application;

[0051] Figure 2 A structural diagram of a device for accessing a BMC console provided by the present application;

[0052] Figure 3 A structural diagram of another device for accessing a BMC console provided by the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] In the era of cloud computing, with the continuous expansion of the Internet market, a large number of heterogeneous resources are uniformly managed through CMP. In pursuit of extreme performance, some companies choose to use bare metal servers on the cloud. Compared with virtual machines, physical machines have no virtualization loss and more powerful performance, but they have disadvantages such as slow deployment cycle and complex operation and maintenance. The bare metal console is one of the most commonly used functions for operation and maintenance personnel. At present, major manufacturers generally use the BMC console by directly connecting to the bare metal BMC console. However, this method requires opening up the BMC network and there is no strict user authority authentication, which cannot meet network security requirements. In order to overcome the above shortcomings, the core of this application is to provide a method, device and medium for accessing the BMC console, which are used to improve the security of the BMC console and meet network security requirements.

[0055] For ease of understanding, the application scenarios to which the technical solution of the present application is applicable are introduced below.

[0056] The BMC console access system of the present application includes a browser, a CMP and a BMC module.

[0057] The browser provides the user with an input interface for querying the CMP. Specifically, the user can input the address of the CMP through the information input bar of the browser. After receiving the address of the CMP, the browser will access the CMP according to the address of the CMP to start various services of the CMP.

[0058] CMP includes the first module, the second module, the third module, the API Gateway module and the Identity and Access Management (IAM) module, which is the link between the browser and the BMC module. Among them, the first module is used to implement the BMC console agent, the second module and the IAM module are used to complete the user's permission verification, the API Gateway module is used to distribute various requests in the CMP, and the third module is used to achieve docking with the BMC module. Specifically, the service address and port of the first module are first accessed to start the first module. After the first module is started, a request is sent to the second module to obtain a first token from the second module and feed it back to the browser, and the second module and the IAM module verify the validity of the first token; if the first token is found to be valid, the second module stores the first token in the IAM module to update the token stored in the IAM module. At this time, the first module sends a request to the API Gateway module to obtain the Uniform Resource Locator (URL) of the BMC console; after receiving the request sent by the first module, the API Gateway module verifies the first token in the IAM module. If the first token is found to be valid, the request sent by the first module is forwarded to the third module, and the third module is connected to the BMC module to obtain the URL of the BMC console through the BMC module; after the third module obtains the URL of the BMC console, the URL is fed back to the first module through the API Gateway module, and the first module, as a proxy node, accesses the BMC console according to the URL of the BMC console.

[0059] The BMC module includes a BMC console, which is used to provide various data required by the browser. In this application, after the CMP accesses the BMC console, the BMC console will generate an access result and feed it back to the CMP, which will send the access result to the browser, using the CMP as a medium to achieve data interaction between the BMC module and the browser.

[0060] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0061] Figure 1 A flowchart of a method for accessing the BMC console provided by this application, such as Figure 1 As shown, the method includes:

[0062] S1: Obtain an access request sent by a browser, and obtain a first token corresponding to the access request according to the access request; wherein the access request is generated based on an access address of a CMP input by a user.

[0063] The token represents the user's authority. As sensitive information, it is not allowed to be placed in the URL, but is transmitted in the message. The Hyper Text Transfer Protocol (HTTP) adopts a request-response model and is a common protocol for web page transmission. Therefore, when the browser issues an access request, the CMP will generate a response message. At this time, the first token representing the user's authority can be obtained from the header field of the response message. Specifically, the browser will collect the address of the CMP entered by the user, and generate a corresponding access request based on the address of the CMP. The CMP can be queried and started through the access request. At this time, the first module in the CMP will send a request to the interface of the second module to obtain the first token, and after obtaining the first token, it will be fed back to the browser.

[0064] S2: Check whether the first token is valid; if so, go to S3; if not, go to S1.

[0065] After obtaining the first token, the first module will check the validity of the first token. Specifically, the filter can be used to check whether the first token is correct. If the first token is correct, it means that the first token is valid, that is, the user has access rights. At this time, step S3 can be entered to obtain the URL of the BMC console; if the first token is wrong, it means that the first token is invalid, that is, the user does not have access rights. At this time, in order to protect the BMC console, the user's current access will be terminated, and the step S1 will be returned to re-acquire the browser's access request. It should be noted that in a specific implementation, other methods can be used to verify the first token, and this embodiment does not limit the method of verifying the validity of the first token.

[0066] S3: Obtain the URL of the BMC console, access the BMC console through the URL of the BMC console, and send the access result to the browser.

[0067] After determining that the user has access rights, the first module in the CMP will send a request to the API Gateway module to obtain the URL of the BMC console, and the API Gateway module will distribute the request to the third module, which will connect with the BMC module through the third module to obtain the URL of the BMC console; after the third module obtains the URL of the BMC console, the URL of the BMC console can be fed back to the first module through the APIGateway module, and the first module will access the BMC console as a proxy node. It can be understood that after receiving the access request from the first module, the BMC console will generate a corresponding access result and feed it back to the first module. In this embodiment, the access result refers to the page frame of the browser. After receiving the access result, the first module will feed the access result back to the browser, and the browser will display the page frame as its initial page.

[0068] This embodiment provides a method for accessing the BMC console, the method obtains an access request sent by a browser, and obtains a first token corresponding to the access request according to the access request; wherein the access request is generated based on the access address of the CMP input by the user; checks whether the first token is valid; if so, obtains the URL of the BMC console, accesses the BMC console through the URL of the BMC console, and sends the access result to the browser; if not, enters the step of obtaining the access request sent by the browser. It can be seen that this method only requires the user to enter the access address of the CMP, and does not require the use of the BMC network and BMC port, so the BMC network and port will not be exposed. In addition, the method implements user authority verification by verifying the validity of the first token, which effectively improves the security and reliability of the BMC console.

[0069] Based on the above embodiment, if the first token is found to be valid, in order to prevent the first token from becoming invalid due to user operations during the CMP operation, this embodiment stores the first token before obtaining the URL of the BMC console so as to verify the first token during the CMP operation. This step includes: using the first token to update the token in the storage area.

[0070] In this embodiment, the storage area refers to the IAM module in the CMP. Each time the first token is generated, the second module will store it in the IAM module to update the last stored first token so as to perform user authority verification through the IAM module. In a specific implementation, if the user exits the browser interface during the operation of the CMP, in order to protect the BMC console, it can be determined that the first token stored in the IAM module is invalid. At this time, the CMP will interrupt the operation of obtaining the URL of the BMC console and end this access.

[0071] This embodiment uses the first token to update the token in the storage area, so as to verify the first token during the CMP operation process, thereby improving the security of the BMC console.

[0072] On the basis of the above embodiment, in order to further improve the security of the BMC console, this embodiment verifies the validity of the first token again before obtaining the URL of the BMC console. This step includes:

[0073] Check whether the storage area token is valid;

[0074] If yes, proceed to the step of obtaining the URL of the BMC console;

[0075] If not, proceed to the step of obtaining the access request sent by the browser.

[0076] It should be noted that, in order to ensure the security of the BMC console, during the operation of the CMP, the validity of the first token stored in the IAM module can be checked multiple times. As long as the test result shows that the first token is invalid, the access should be interrupted to maximize the security of the BMC console. For example, after the third module obtains the URL of the BMC console and before the first module receives the URL of the BMC console fed back by the third module, it can be checked whether the first token stored in the IAM module is invalid. If it is not invalid, the subsequent operation is performed. If it is invalid, the current process of the CMP is interrupted to prevent the leakage of the URL of the BMC console. It can be understood that this embodiment does not limit the number of times the validity of the first token is checked, which can be determined according to actual conditions.

[0077] This embodiment verifies the validity of the first token again before obtaining the URL of the BMC console, thereby effectively ensuring the security of the BMC console.

[0078] On the basis of the above embodiment, in order to ensure the accuracy of the URL of the BMC console obtained, this embodiment queries the BMC module based on the attribute information of the BMC module to obtain the URL of the BMC console. This step includes:

[0079] Query the attribute information of the BMC module from the CMP database;

[0080] Query the BMC module based on the attribute information and obtain the URL of the BMC console through the BMC module.

[0081] Specifically, after the API Gateway module forwards the request for obtaining the URL of the BMC console sent by the first module to the third module, the third module can query the IP address, port, user name, password and other attribute information of the BMC module in the CMP database according to the ID of the BMC module, find the authentication interface of the BMC module through the attribute information of the BMC module to achieve docking with the authentication interface of the BMC module, and log in to the BMC module to obtain the URL of the BMC console.

[0082] This embodiment queries the attribute information of the BMC module from the CMP database, queries the BMC module according to the attribute information of the BMC module, and obtains the URL of the BMC console through the BMC module to ensure the accuracy of the obtained URL of the BMC console.

[0083] On the basis of the above embodiment, in order to facilitate the acquisition of the URL of the BMC console, as a preferred implementation method, this embodiment obtains the URL of the BMC console by calling the Redfish (a management standard based on HTTPs service) protocol to connect with the authentication interface of the BMC module. This step includes:

[0084] Call the Redfish protocol to log in to the authentication interface of the BMC module according to the attribute information;

[0085] Get the second token returned by the authentication interface, and use the second token to get the URL of the BMC console.

[0086] Specifically, the third module can call the Redfish protocol to achieve the authentication interface of the BMC module through the Restful interface; since the web page transmission adopts the HTTP protocol, when logging in to the authentication interface of the BMC module according to the attribute information of the BMC module, the BMC module will return a response message, and the second token in the header field of the response message can be obtained at this time; after obtaining the second token, the user can set the key of the BMC console through the obtained second token, and splice the URL of the BMC console according to the set key to obtain the URL of the BMC console. It should be noted that in order to improve the security of the BMC console, the URL can be generated according to the minimization principle, and the generated URL will become invalid after being used once.

[0087] This embodiment calls the Redfish protocol to log in to the authentication interface of the BMC module according to the attribute information of the BMC module. Since the Redfish protocol can implement device management through the Restful interface, it can effectively reduce the operation complexity and facilitate the login to the authentication interface of the BMC module.

[0088] Based on the above embodiment, since the browser displays the initial page, i.e., the page frame, after receiving the access result, data rendering is required to display the complete browser page. Based on this, this embodiment uses CMP as a medium to build a data interaction channel between the browser and the BMC module, so that the browser can obtain the data sent by the BMC module. This step includes:

[0089] Receive a connection request from a browser, and connect to the BMC console according to the connection request and the URL of the BMC console; wherein the connection request is a request generated by the browser based on a websockets library.

[0090] Specifically, after receiving the access result feedback from the first module in the CMP, the browser will initiate a websocket (TCP-based application layer protocol) connection to the first module to achieve full-duplex communication between the browser and the first module in the CMP; after receiving the connection request sent by the browser, the first module in the CMP will proxy the websocket connection to the BMC node, and build a data interaction channel between the browser and the BMC module using the first module in the CMP as a medium, so that the BMC module can transmit data to the browser through the first module in the CMP. At this time, the browser can render the received data on the browser's initial page to display the complete browser page.

[0091] This embodiment uses CMP as a medium to build a data interaction channel between the browser and the BMC module, so that the browser can obtain the data transmitted by the BMC module, and render the data on the initial page of the browser to display the complete page. In addition, since CMP is used to forward the browser's connection request, the BMC network and port will not be exposed, which greatly improves the security of the BMC module.

[0092] On the basis of the above embodiment, since the current websockets library has minimal support for HTTP and only supports get requests, and cannot perform post requests to complete complex interface calls, based on this, this embodiment expands the websockets library before receiving the browser's connection request.

[0093] In a specific implementation, the websockets library can be extended to support post requests, thereby calling a complex interface to build a data interaction channel between the browser and the BMC module. In addition, the websockets library can be extended to enable it to connect to the IAM module in the CMP, so that each request generated based on the websockets library can enter the IAM module for user authority identification, thereby ensuring that each request forwarded by the CMP meets the user authority requirements, that is, it has user authority. It should be noted that in a specific implementation, the websockets library can be extended according to actual needs so that it can implement corresponding functions, and this embodiment does not limit this.

[0094] This embodiment extends the websockets library so that the websockets library can support requests of multiple methods such as get and post of the proxy BMC console to implement complex interface calls, and the websockets library can be extended to enable it to connect to the IAM module in the CMP to ensure that each request forwarded by the CMP has user permissions.

[0095] In the above embodiments, the method for accessing the BMC console is described in detail, and the present application also provides an embodiment corresponding to the device for accessing the BMC console. It should be noted that the present application describes the embodiments of the device part from two perspectives, one is based on the perspective of the functional module, and the other is based on the perspective of the hardware.

[0096] Figure 2 A structural diagram of a device for accessing a BMC console provided by this application, such as Figure 2 As shown, the device comprises:

[0097] The acquisition module 10 is used to acquire the access request sent by the browser and obtain a first token corresponding to the access request according to the access request; wherein the access request is generated based on the access address of the CMP input by the user;

[0098] The verification module 11 is used to verify whether the first token is valid; if so, the access module 12 is triggered; if not, the acquisition module 10 is triggered;

[0099] The access module 12 is used to obtain the URL of the BMC console, access the BMC console through the URL of the BMC console, and send the access result to the browser.

[0100] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0101] The device for accessing the BMC console provided in this embodiment obtains the access request sent by the browser through the acquisition module, and obtains the first token corresponding to the access request according to the access request; wherein the access request is generated based on the access address of the CMP input by the user; the first token is checked whether it is valid through the verification module; if so, the access module is triggered; if not, the acquisition module is triggered; the URL of the BMC console is obtained through the access module, the BMC console is accessed through the URL of the BMC console, and the access result is sent to the browser. It can be seen that the device only requires the user to enter the access address of the CMP, and does not need to use the BMC network and BMC port, so the BMC network and port will not be exposed. In addition, the device implements user authority verification by verifying the validity of the first token, which effectively improves the security and reliability of the BMC console.

[0102] Figure 3 A structural diagram of another device for accessing the BMC console provided by this application, such as Figure 3 As shown, the device comprises: a memory 20 for storing a computer program;

[0103] The processor 21 is configured to implement the steps of the method for accessing the BMC console mentioned in the above embodiment when executing a computer program.

[0104] The device for accessing the BMC console provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0105] Among them, the processor 21 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 21 may be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0106] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the method for accessing the BMC console disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to the first token.

[0107] In some embodiments, the device for accessing the BMC console may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .

[0108] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation on the device for accessing the BMC console, and may include more or less components than those shown in the figure.

[0109] The device for accessing the BMC console provided in this embodiment includes a memory and a processor. When the processor executes a program stored in the memory, the method for accessing the BMC console can be implemented, and the effect is the same as above.

[0110] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for accessing the BMC console as recorded in the above method embodiment are implemented.

[0111] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0112] The computer-readable storage medium provided in this embodiment includes the above-mentioned method for accessing the BMC console, and the effect is the same as above.

[0113] The above is a detailed introduction to the method, device and medium for accessing the BMC console provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0114] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A method for accessing a BMC console, characterized in that: Applications in CMP include: Obtaining an access request sent by the browser, and obtaining a first token corresponding to the access request according to the access request; wherein the access request is generated based on the access address of the CMP input by the user; Check whether the first token is valid; If so, obtain the URL of the BMC console, access the BMC console through the URL of the BMC console, and send the access result to the browser, wherein the access result is a page frame of the browser, and the browser is used to display the initial page of the page frame according to the access result; wherein the URL is generated according to the minimization principle and becomes an invalid URL after being used once; If not, proceed to the step of obtaining the access request sent by the browser; Wherein, if the first token is valid, before obtaining the URL of the BMC console, the method further includes: saving the first token to a storage area to update the token in the storage area; checking whether the token in the storage area is valid; if so, entering the step of obtaining the URL of the BMC console; if not, entering the step of obtaining the access request sent by the browser; the storage area is specifically the IAM module in the CMP; the first token in the storage area is verified multiple times during the operation of the CMP; The obtaining of the URL of the BMC console comprises: querying the attribute information of the BMC module from the database of the CMP; querying the BMC module according to the attribute information, and obtaining the URL of the BMC console through the BMC module; the attribute information comprises one or more combinations of the IP address, port, user name, and password of the BMC module; The querying the BMC module according to the attribute information and obtaining the URL of the BMC console through the BMC module includes: calling the Redfish protocol to log in to the authentication interface of the BMC module according to the attribute information; obtaining the second token returned by the authentication interface, and obtaining the URL of the BMC console through the second token; The obtaining the URL of the BMC console through the second token includes: determining a key of the BMC console according to the second token, and splicing out the URL of the BMC console according to the key; After sending the access result to the browser, the method further includes: receiving a connection request from the browser, and connecting to the BMC console according to the connection request and the URL of the BMC console; receiving target data fed back by the BMC console, and feeding back the target data to the browser, so that the browser displays a browser page on the initial page; wherein the connection request is a request generated by the browser based on the websockets library after receiving the access result; Before receiving the connection request from the browser, the method further includes: extending the websockets library so that the websockets library can be connected to the IAM module.

2. A device for accessing a BMC console, characterized in that: Applications in CMP include: An acquisition module, used to acquire an access request sent by a browser, and obtain a first token corresponding to the access request according to the access request; wherein the access request is generated based on an access address of a CMP input by a user; A verification module, used to verify whether the first token is valid; if so, trigger the access module; if not, trigger the acquisition module; The access module is used to obtain the URL of the BMC console, access the BMC console through the URL of the BMC console, and send the access result to the browser, wherein the access result is a page frame of the browser, and the browser is used to display the initial page of the page frame according to the access result; wherein the URL is generated according to the minimization principle and is converted into an invalid URL after being used once; The device is also used for, if the first token is valid, saving the first token to a storage area to update the token in the storage area before obtaining the URL of the BMC console; checking whether the token in the storage area is valid; if so, entering the step of obtaining the URL of the BMC console; if not, entering the step of obtaining the access request sent by the browser; the storage area is specifically the IAM module in the CMP; the first token in the storage area is verified multiple times during the operation of the CMP; The device is specifically used to query the attribute information of the BMC module from the database of the CMP; query the BMC module according to the attribute information, and obtain the URL of the BMC console through the BMC module; the attribute information includes one or more combinations of the IP address, port, user name, and password of the BMC module; The device is specifically used to call the Redfish protocol to log in to the authentication interface of the BMC module according to the attribute information; obtain the second token returned by the authentication interface, and obtain the URL of the BMC console through the second token; The device is specifically used to determine the key of the BMC console according to the second token, and to assemble the URL of the BMC console according to the key; The device is also used for receiving a connection request from the browser after sending the access result to the browser, and connecting to the BMC console according to the connection request and the URL of the BMC console; receiving target data fed back by the BMC console, and feeding back the target data to the browser, so that the browser displays a browser page on the initial page; wherein the connection request is a request generated by the browser based on the websockets library after receiving the access result; The device is also used to expand the websockets library before receiving the connection request from the browser, so that the websockets library can be connected to the IAM module.

3. A device for accessing a BMC console, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the method for accessing the BMC console as claimed in claim 1 when executing the computer program.

4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for accessing the BMC console according to claim 1 are implemented.

Citation Information

Patent Citations

  • BMC connection management method, system and device and storage medium

    CN110535940A

  • BMC Web automatic detection method and system based on web crawler and medium

    CN113065048A

  • Server remote management method and device

    CN113407286A