Management and control method, device and equipment of Web console and computer program product
Through the Web console management method executed by the proxy server, the complexity and security issues of Web console management in large Hadoop clusters are solved, and simplified access process and improved security are achieved.
Patent Information
- Application Number
- CN202411885177.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-12-20
AI Technical Summary
In large Hadoop clusters, managing a large number of web consoles is complex and has problems such as network management, security risks, inability to record access requests, and inability to unified exports.
Through the proxy server, the web console control method is executed, the user's access request is received, the user's access request is parsed and forwarded to the target service node, the response data is received and the analysis is performed, and the access address is rewrited according to the address rewriting strategy to achieve unified transit and control.
It simplifies the access process of the Web console, improves security, realizes the recording and audit of access requests, avoids the opening of multiple ports, and provides a centralized access port.
Smart Images

Figure CN119922175A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data service technology, and in particular to a method, device, equipment and computer program product for managing and controlling a Web console. Background Art
[0002] In a large Hadoop cluster, due to the huge size of the cluster, hundreds or even thousands of machines may be deployed. Each machine usually hosts multiple Hadoop service components, such as HDFS, YARN or HBase, and each service component usually has its own independent web console interface to monitor and manage the running status and performance indicators of the component. This makes the entire cluster have a large number of web consoles, which makes management extremely complex.
[0003] In daily operations, administrators usually obtain the overall status information of the cluster and perform cluster management by accessing the Web UI interface of the master node (such as NameNode or ResourceManager). The web console of the master node will display an overview of the cluster, such as data storage status, task scheduling information, health status, and system performance. When an administrator or user needs to view detailed information about a specific machine or service node, the web console of the master node provides a convenient link that can jump directly to the web interface of the node. This jump process directly accesses the target node through a link, so that the administrator does not need to remember the IP address and web interface port of each node, which greatly simplifies the management process. However, this management method also has some disadvantages:
[0004] 1) For daily users, in the case of network control, the user's terminal needs to open the network policy of each big data node.
[0005] 2) Directly exposing the web console access address of each node may bring potential security risks because it may become a target for attackers.
[0006] 3) Big data nodes are usually accessed through host names, and the user's terminal needs to configure the mapping relationship between host names and IP addresses in hosts.
[0007] 4) There are security issues, and it is impossible to record access requests and conduct security audits.
[0008] 5) Unable to unify the export. Each big data node provides a part of the web console function. If you want to have full external access, you need to open multiple ports. Summary of the invention
[0009] In order to solve at least one of the above-mentioned technical problems, the embodiments of the present application provide a method, apparatus, device and computer program product for managing and controlling a Web console to improve the convenience and security of accessing the Web console.
[0010] The present application embodiment adopts the following technical solutions:
[0011] In a first aspect, an embodiment of the present application provides a method for controlling a Web console, wherein the Web console is provided by a service node, and the method for controlling the Web console is executed by a proxy server, and the method for controlling the Web console includes:
[0012] Receive a first access request from a user terminal and parse it to obtain address information of a first target service node, wherein the first access request is configured as a request including address information of a proxy server and address information of the first target service node;
[0013] forwarding the first access request to the first target service node according to the address information of the first target service node;
[0014] Receiving and parsing the response data returned by the first target service node to obtain access address information of the Web console;
[0015] The access address information of the Web console is rewritten according to the address rewriting policy corresponding to the access address information of the Web console and the address information of the proxy server to obtain the rewritten access address information of the Web console.
[0016] Optionally, rewriting the address information in the response data by using the address rewriting strategy corresponding to the parsing result of the response data includes:
[0017] Identify whether the parsing result of the response data contains absolute address information;
[0018] In the case where the absolute address information is included, the absolute address information is rewritten according to the address information of the proxy server to obtain first rewritten address information.
[0019] Optionally, rewriting the address information in the response data by using the address rewriting strategy corresponding to the parsing result of the response data includes:
[0020] Identify whether the parsing result of the response data contains redirection address information;
[0021] In the case where the redirection address information is included, the redirection address information is rewritten according to the address information of the proxy server to obtain second rewritten address information.
[0022] Optionally, rewriting the address information in the response data by using the address rewriting strategy corresponding to the parsing result of the response data includes:
[0023] Identify whether the parsed result of the response data contains host name information;
[0024] In the case where the host name information is included, determining the IP address information corresponding to the host name information according to the mapping relationship between the host name and the IP address;
[0025] The IP address information corresponding to the host name information is rewritten according to the address information of the proxy server to obtain third rewritten address information.
[0026] Optionally, rewriting the address information in the response data by using the address rewriting strategy corresponding to the parsing result of the response data includes:
[0027] Identify whether the parsing result of the response data contains dynamic splicing address information;
[0028] In the case where dynamic splicing address information is included, identifying the original IP address information corresponding to the dynamic splicing address information;
[0029] The original IP address information corresponding to the dynamically spliced address information is rewritten according to the address information of the proxy server to obtain fourth rewritten address information.
[0030] Optionally, after rewriting the access address information of the Web console according to the address rewriting policy corresponding to the access address information of the Web console and the address information of the proxy server to obtain the rewritten access address information of the Web console, the Web console management and control method further includes:
[0031] Receive a first jump request from a user, where the first jump request is configured as a request including the rewritten access address information of the Web console, where the rewritten access address information of the Web console includes the address information of the proxy server and the address information of the second target service node;
[0032] Jump to the Web console of the second target service node according to the first jump request.
[0033] Optionally, the first target service node is divided into a main service node and a sub-service node, and the management and control method of the Web console further includes:
[0034] receiving a second access request from a user terminal, wherein the access request is configured as a request including address information of a proxy server;
[0035] providing the access address information of the primary service node to the user terminal according to the second access request, so that the user terminal can access the Web console of the primary service node through the proxy server;
[0036] receiving a second redirect request from the user terminal on the Web console of the primary service node, wherein the second redirect request is configured as a request including address information of a proxy server and address information of a sub-service node;
[0037] Jump to the Web console of the sub-service node according to the second jump request.
[0038] In a second aspect, an embodiment of the present application further provides a control device for a Web console, wherein the Web console is provided by a service node, and the control device for the Web console is applied to a proxy server, and the control device for the Web console includes:
[0039] A first receiving unit, configured to receive a first access request from a user terminal and parse it to obtain address information of a first target service node, wherein the first access request is configured as a request including address information of a proxy server and address information of the first target service node;
[0040] a forwarding unit, configured to forward the first access request to the first target service node according to the address information of the first target service node;
[0041] A second receiving unit is used to receive and parse the response data returned by the first target service node to obtain access address information of the Web console;
[0042] The rewriting unit is used to rewrite the access address information of the Web console according to the address rewriting policy corresponding to the access address information of the Web console and the address information of the proxy server to obtain the rewritten access address information of the Web console.
[0043] In a third aspect, an embodiment of the present application further provides a device, including:
[0044] A processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes any of the aforementioned Web console management and control methods.
[0045] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program / instruction stored thereon, wherein the computer program / instruction, when executed by a processor, implements any of the aforementioned Web console management and control methods.
[0046] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements any of the aforementioned Web console management and control methods.
[0047] At least one of the above technical solutions adopted in the embodiment of the present application can achieve the following beneficial effects: the control method of the Web console in the embodiment of the present application is executed by a proxy server, first receiving a first access request from the user end and parsing it to obtain the address information of the first target service node, the first access request is configured as a request containing the address information of the proxy server and the address information of the first target service node; then forwarding the first access request to the first target service node according to the address information of the first target service node; then receiving the response data returned by the first target service node and parsing it to obtain the access address information of the Web console; finally, rewriting the access address information of the Web console according to the address rewriting strategy corresponding to the access address information of the Web console and the address information of the proxy server to obtain the access address information of the rewritten Web console. The control method of the Web console in the embodiment of the present application uses the proxy server as a unified transit node between the user end and the Web console provided by the service node, realizes a centralized Web console access entrance, simplifies the complexity of accessing service nodes across big data systems, uses the proxy server as an effective isolation layer between the Web console and the user, and improves the cluster access security. In addition, the non-intrusive design does not require any modifications to the service node itself, maintaining the original operating status of the node, ensuring the ease of system maintenance and seamless integration with existing workflows, and providing system administrators with a low-risk, easy-to-operate solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0049] Figure 1 A flowchart of a method for controlling a Web console in an embodiment of the present application;
[0050] Figure 2 A flowchart of a method for controlling a Web console in an embodiment of the present application;
[0051] Figure 3 This is a schematic diagram of the structure of a control device of a Web console in an embodiment of the present application;
[0052] Figure 4 This is a schematic diagram of the structure of a device in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. 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 making creative work are within the scope of protection of the present application.
[0054] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0055] The main technical terms involved in this application are:
[0056] 1) Big Data Service Node: A big data service node usually refers to a server or computer that performs specific functions in a big data processing architecture. Hadoop, Spark, Flink, and HBase are all common frameworks or systems in big data processing. They run on big data service nodes and each performs different functions.
[0057] 2) Web console: The web console of the big data service node is a web interface provided by the big data service framework (such as Hadoop, Spark, etc.) for monitoring, managing and configuring the cluster. Through the web console, users can intuitively view information such as cluster status, resource usage, task execution status, and can also perform node management, configuration adjustment and other operations. For Hadoop clusters, the web console usually includes the web interface of the NameNode and the web interface of the ResourceManager. The web interface of the NameNode provides detailed information about the HDFS (distributed file system), such as file browsing, block information, data node status, etc. The web interface of the ResourceManager provides information about YARN (resource manager), including application queues, application status, resource usage, etc. In order to access these web consoles, users usually need to enter a specific URL in the browser, which is usually the IP address of a node in the cluster plus the default port number. For example, for a Hadoop cluster, the default NameNode web interface port number is usually 50070.
[0058] 3) Reverse proxy server: The reverse proxy server is located between the user and the target server. For the user, the reverse proxy server is equivalent to the target server. The user can directly access the reverse proxy server to obtain the resources of the target server without knowing the real address of the target server. The working principle of the reverse proxy is: the proxy server receives the network access connection request from the user, and then forwards the request to the business server (i.e., the back-end server) that actually works in the network according to the predetermined rules and load balancing strategy, and returns the result processed by the business server to the client that initiated the connection request on the network.
[0059] The present application embodiment provides a method for controlling a Web console, such as Figure 1 As shown, a flow chart of a method for controlling a Web console in an embodiment of the present application is provided. The Web console is provided by a service node, and the method for controlling the Web console is executed by a proxy server. The method for controlling the Web console at least includes the following steps S110 to S140:
[0060] Step S110, receiving a first access request from a user terminal and parsing it to obtain address information of a first target service node, wherein the first access request is configured as a request including address information of a proxy server and address information of the first target service node.
[0061] Combination Figure 2 , provides a flow chart of a method for controlling a Web console in an embodiment of the present application. The method for controlling a Web console in an embodiment of the present application is executed by a proxy server, specifically a reverse proxy server, which is deployed between a user terminal and a service node of a big data cluster as a unified transfer station between the user terminal and the Web console provided by the service node.
[0062] When a user needs to access the Web console of a service node in a big data cluster, he needs to first initiate a unified access request to the proxy server. The unified access request is configured to include the address information of the proxy server and the address information of the target service node that the user actually wants to access. The address information of the proxy server may include information such as the IP address and port number of the proxy server, and the address information of the target service node may include information such as the IP address and port number of the target server. Therefore, the unified access request may be expressed as follows:
[0063] "http: / / proxy server IP:proxy server port / [target server IP]:[target server port](actual node to be accessed) / [specific request path]".
[0064] In this way, after the user initiates the access request in the above unified format, the proxy server will first receive the user's access request, and then parse the access request to obtain the address information of the target service node contained therein.
[0065] Step S120: forwarding the first access request to the first target service node according to the address information of the first target service node.
[0066] After obtaining the address information of the target service node, the user's access request needs to be accurately forwarded to the target service node based on the target service node's IP address and port number and other information, and the target service node responds to and processes the user's access request.
[0067] Step S130: receiving and parsing the response data returned by the first target service node to obtain access address information of the Web console.
[0068] After the target service node has finished processing, it will send the processed response data back to the proxy server. The response data of the target service node may include the target service node's Web console page and links from the target service node's Web console page to other service nodes' Web console pages. The proxy server needs to further parse the target service node's response data to parse out the access address information of other service nodes' Web consoles contained in the response data.
[0069] Step S140, rewriting the access address information of the Web console according to the address rewriting policy corresponding to the access address information of the Web console and the address information of the proxy server to obtain the rewritten access address information of the Web console.
[0070] In order to achieve a non-intrusive design, the embodiment of the present application does not require changes to the service nodes in the big data cluster. The target service node can still return response data such as the access address of the Web console page of other service nodes according to the original user-side access process. The proxy server only needs to rewrite the access address of the Web console page of other nodes returned by the target service node in combination with the address information of the proxy server itself. The purpose of the rewrite is to ensure that the user-side access to all Web console pages of the big data cluster node will be forwarded through the proxy server, thereby realizing unified transfer, control and recording functions.
[0071] The specific rewriting address strategy mainly depends on the access address type of the parsed Web console. It is necessary to adopt corresponding address rewriting strategies for different types of access addresses and rewrite them uniformly into the access request format given in the aforementioned step S110 to cover various types of interactions between the user terminal and the big data cluster nodes.
[0072] The Web console management and control method of the embodiment of the present application uses the proxy server as a unified transit node between the user end and the Web console provided by the service node, realizes a centralized Web console access portal, simplifies the complexity of accessing cross-big data system service nodes, and uses the proxy server as an effective isolation layer between the Web console and the user, thereby improving the cluster access security. In addition, the non-intrusive design does not require any modification to the service node itself, maintains the original operating status of the node, ensures the simplicity of system maintenance and seamless connection with the existing workflow, and provides a low-risk, easy-to-operate solution for system administrators.
[0073] In some embodiments of the present application, rewriting the address information in the response data using the address rewriting strategy corresponding to the parsing result of the response data includes: identifying whether the parsing result of the response data contains absolute address information; if it contains absolute address information, rewriting the absolute address information according to the address information of the proxy server to obtain first rewritten address information.
[0074] Continue to refer Figure 2 The address rewriting strategy of the embodiment of the present application may include an absolute address rewriting strategy, where an absolute address refers to a URL containing a complete protocol (such as Http or Https), a domain name or IP address, a port number (if any), and a resource path. Compared with a relative address, an absolute address does not depend on the location of the current page and can be directly accessed by a browser or other user end.
[0075] Based on the parsing result of the response data, determine whether the parsed address information contains an absolute path URL. If it contains an absolute path URL in a standard format, the absolute path URL can be directly extracted by parsing the HTML DOM structure, and then the absolute path URL is rewritten according to the address information of the proxy server. In this way, when the user clicks on the absolute path URL on the response page returned by the proxy server, the address of the absolute path URL will be changed to a new address via the proxy server, thereby realizing that the communication between the user terminal and the big data service node is managed by the proxy server.
[0076] For example, the absolute path URL containing "http: / / xx.xx.xx.xx:port / certain path" in the parsed result needs to be rewritten as "http: / / proxy server IP:proxy server port / xx.xx.xx.xx:port / certain path" according to the address information of the proxy server.
[0077] In some embodiments of the present application, rewriting the address information in the response data using the address rewriting strategy corresponding to the parsing result of the response data includes: identifying whether the parsing result of the response data contains redirection address information; if it contains redirection address information, rewriting the redirection address information according to the address information of the proxy server to obtain second rewritten address information.
[0078] Continue to refer Figure 2 The address rewriting strategy of the embodiment of the present application may also include a rewriting strategy for redirection address information. The redirection address refers to a response message sent by the server to the user terminal during the Http communication process, which contains a command instructing the user terminal to redirect (i.e., relocate to another URL). It is used to tell the user terminal that the requested resource has been temporarily or permanently moved to a new location, and the user terminal will use the new URL to access the resource.
[0079] When parsing the response data, the proxy server will pay attention to those responses that contain redirection commands. In the HTTP protocol, redirection is usually represented by a status code (such as 301, 302, 307, etc.) and a Location header field. The proxy server will check whether there is such a Location header field in the response data and whether the field contains the redirection address information.
[0080] If the response data returned by the target server contains a redirection command, such as an Http redirection response containing a "Location:" header, the proxy server will also replace these addresses accordingly. For example, rewrite "Location:http: / / xx.xx.xx.xx:port / a certain path" to "Location:http: / / proxy server IP:proxy server port / xx.xx.xx.xx:port / a certain path". This new address will retain the resource path of the original redirection address. By rewriting the redirection address information, the proxy server can ensure that even if the target server returns a redirection command, the user can still access the final target resource through the proxy server.
[0081] In some embodiments of the present application, rewriting the address information in the response data using the address rewriting strategy corresponding to the parsing result of the response data includes: identifying whether the parsing result of the response data contains host name information; if it contains host name information, determining the IP address information corresponding to the host name information based on the mapping relationship between the host name and the IP address; and rewriting the IP address information corresponding to the host name information based on the address information of the proxy server to obtain third rewritten address information.
[0082] Continue to refer Figure 2 The address rewriting strategy of the embodiment of the present application may also include an address rewriting strategy for host name information. The host name refers to the name used to identify a device or service in the network, such as "http: / / www.example.com". In the embodiment of the present application, it mainly refers to the name of each service node in the big data cluster. In the URL, the host name is usually located between the protocol (such as http or https) and the resource path, and is separated by a colon and the port number (if any).
[0083] If the response data returned by the target server contains a URL represented by a host name, such as "http: / / a certain host name:port / a certain path", the proxy server also needs to perform replacement processing to ensure that all links containing the host name can still be forwarded through the proxy server. For example, rewrite "http: / / a certain host name:port / a certain path" to the format of "http: / / proxy server IP:proxy server port / xx.xx.xx.xx:port / a certain path".
[0084] It should be noted here that the "xx.xx.xx.xx" in the above rewritten address refers to the IP address corresponding to the host name of a service node. The proxy server needs to maintain the mapping relationship between the master node and the IP address of all service nodes, and replace the host name information contained in the response data returned by the target server with the IP address of the corresponding service node based on the mapping relationship. In addition, in order to facilitate the subsequent expansion and addition of hosts, the proxy server can also provide an addition interface for dynamically adding the mapping relationship between the host name and the IP address to ensure that the addition of the expansion host does not affect the proxy server's request jump.
[0085] In some embodiments of the present application, rewriting the address information in the response data using the address rewriting strategy corresponding to the parsing result of the response data includes: identifying whether the parsing result of the response data contains dynamically spliced address information; if it contains dynamically spliced address information, identifying the original IP address information corresponding to the dynamically spliced address information; and rewriting the original IP address information corresponding to the dynamically spliced address information according to the address information of the proxy server to obtain fourth rewritten address information.
[0086] Continue to refer Figure 2 The address rewriting strategy of the embodiment of the present application may also include a rewriting strategy for dynamically splicing addresses. In JavaScript, splicing addresses generally refers to combining multiple string values together to form a complete URL or path. This operation is very common in Web development, especially when links need to be dynamically generated based on user input, variable values, or program logic.
[0087] Based on the analysis results of the response data, it is necessary to identify such special links. For example, by capturing packets and analyzing which JS file on which page such special links exist, custom rules can be written for this JS file to replace it, so as to realize the identification and replacement of different types of dynamic splicing addresses.
[0088] For example, the response data returned by the target server contains a page that initiates a request directly from an address dynamically spliced by JavaScript, such as "var a="datanode"; var b="8080", var c="http: / / "+a+b". The original IP address information in the address needs to be identified. The variables and logic in the JavaScript code can be parsed to determine which parts constitute the real IP address of the target server or are related to the real IP address (such as host name information). Then, the corresponding JavaScript code is replaced according to the address information of the proxy server, and the spliced address is rewritten in the form of "http: / / proxy server IP:proxy server port / xx.xx.xx.xx:port / certain path".
[0089] In some embodiments of the present application, after the access address information of the Web console is rewritten according to the address rewriting policy corresponding to the access address information of the Web console and the address information of the proxy server to obtain the rewritten access address information of the Web console, the management and control method of the Web console also includes: receiving a first jump request from a user, the first jump request being configured as a request including the rewritten access address information of the Web console, the rewritten access address information of the Web console including the address information of the proxy server and the address information of the second target service node; and jumping to the Web console of the second target service node according to the first jump request.
[0090] As mentioned above, the rewritten address information includes the address information of the proxy server and the address information of the target service node, so when a user accesses the Web console, the request will first be directed to the proxy server, and then forwarded to the target service node by the proxy server.
[0091] After the address rewriting is completed based on the address rewriting strategies of the above embodiments, when the user clicks any jump link on the page returned by the proxy server, that is, when requesting to jump to the Web console of other target service nodes, the addresses of these links will be changed to new addresses through the proxy server, such as "http: / / proxy server IP:proxy server port / [target server IP]:[target server port] / [specific request path]". This ensures that all external requests and data flows are carried out through the centralized proxy server, enhancing security and simplifying the user's operation process.
[0092] In some embodiments of the present application, the first target service node is divided into a main service node and a sub-service node, and the management and control method of the Web console also includes: receiving a second access request from a user terminal, the access request being configured as a request including address information of a proxy server; providing the access address information of the main service node to the user terminal according to the second access request, so that the user terminal accesses the Web console of the main service node through the proxy server; receiving a second jump request from the user terminal on the Web console of the main service node, the second jump request being configured as a request including address information of the proxy server and address information of the sub-service node; and jumping to the Web console of the sub-service node according to the second jump request.
[0093] As mentioned above, under the big data cluster architecture, big data service nodes can be divided into main service nodes and sub-service nodes. The web console of the main service node is mainly used to display an overview of the cluster, such as data storage status, task scheduling information, health status, and system performance. When administrators or users need to view detailed information about a specific machine or service node, the web console of the main service node provides a convenient link to directly jump to the web interface of the node. This jump process directly accesses the target node through the link, so that administrators or users do not need to remember the IP address and web interface port of each node, simplifying the management process.
[0094] Based on this, the embodiment of the present application provides another jump method implemented with the help of a proxy server on the basis of the functions implemented by the above-mentioned main service node. Specifically, when initiating an access request, the user terminal can only initiate a request to access the proxy server, that is, the request only needs to include the address information of the proxy server. After the proxy server receives the access request from the user terminal, it can provide the user terminal with a jump link page containing the main service node. After the user terminal clicks the jump link page of the main service node, it can enter the Web console page of the main service node through the proxy server. The Web console page of the main service node provides links that can jump to other sub-service nodes. The user terminal can click to jump to the Web console page of any sub-service node according to its own needs.
[0095] The above jump process is uniformly forwarded and managed by the proxy server, and the user end does not need to remember the IP address and port information of each service node, which simplifies the management process.
[0096] In summary, the key points of the Web console control method of this application mainly include:
[0097] 1) Reverse Proxy: This application introduces reverse proxy technology into the management and control of the big data cluster Web console, and optimizes the access and management of the Web console of each service node in the big data environment through highly automated and configurable proxy strategies.
[0098] 2) Rewrite strategy: This application implements a URL rewrite strategy to ensure that all requests initiated from a single entry can be properly mapped and forwarded to the correct service node. In essence, this covers the ability of intelligent routing. When a user enters a unified URL address, the proxy server will parse the request and route it to the correct node in the cluster.
[0099] 3) Security: This application creates a centralized web console access portal and makes the reverse proxy server an effective isolation layer between the web console and the user. This design enables the reverse proxy service to effectively serve as a security barrier, which integrates a variety of advanced security policies. For example, strict permission management is ensured by using access control lists (ACLs) and role-based access control (RBAC); at the same time, the SSL / TLS protocol is used to encrypt data during transmission, and IP whitelist policies can be deployed to further restrict access to service nodes. Only requests from trusted sources can be processed. These advanced security features provide strong protection measures for big data systems in the face of external threats. While ensuring data security, it also enhances the stability of the system and greatly avoids the possibility of data leakage and unauthorized access.
[0100] 4) Non-intrusiveness: While improving system security, this application also focuses on maintaining the original architecture and performance stability of the big data system. The non-intrusive design means that it can be fully integrated into the existing big data environment without making any modifications to the service node itself, maintaining the original operating status of the node. This enhanced transparency ensures the ease of system maintenance and seamless integration with existing workflows, providing system administrators with a low-risk, easy-to-operate solution.
[0101] The control method of the Web console of this application has achieved at least the following technical effects:
[0102] 1) Simplified access method: Through the unified reverse proxy, users only need to access a unified address to access the Web console of all nodes in the Hadoop cluster. This method greatly simplifies the user's access process and improves the user experience.
[0103] 2) Enhanced security: The reverse proxy server acts as a security barrier for the Web console. It can configure various security policies, such as access control and encrypted transmission, to ensure that only authorized users can access the Web console, thereby enhancing the security of the system.
[0104] 3) Easy to manage and maintain: The unified reverse proxy allows administrators to centrally manage the Web console of all nodes without having to configure and maintain each node separately. This reduces management costs and improves management efficiency.
[0105] 5) Hide the backend architecture: Through the reverse proxy, the specific architecture and configuration details of the Hadoop cluster backend can be hidden, and only a unified interface is exposed to the outside world. This helps to protect the security of the cluster and prevent potential security risks.
[0106] The present application also provides a Web console control device 300, such as Figure 3 As shown, a schematic diagram of the structure of a control device of a Web console in an embodiment of the present application is provided. The Web console is provided by a service node. The control device 300 of the Web console is applied to a proxy server. The control device 300 of the Web console includes: a first receiving unit 310, a forwarding unit 320, a second receiving unit 330 and a rewriting unit 340, wherein:
[0107] A first receiving unit 310 is configured to receive a first access request from a user terminal and parse it to obtain address information of a first target service node, wherein the first access request is configured as a request including address information of a proxy server and address information of the first target service node;
[0108] A forwarding unit 320, configured to forward the first access request to the first target service node according to the address information of the first target service node;
[0109] The second receiving unit 330 is used to receive and parse the response data returned by the first target service node to obtain the access address information of the Web console;
[0110] The rewriting unit 340 is used to rewrite the access address information of the Web console according to the address rewriting policy corresponding to the access address information of the Web console and the address information of the proxy server to obtain the rewritten access address information of the Web console.
[0111] In some embodiments of the present application, the rewriting unit 340 is specifically used to: identify whether the parsing result of the response data contains absolute address information; if it contains absolute address information, rewrite the absolute address information according to the address information of the proxy server to obtain first rewritten address information.
[0112] In some embodiments of the present application, the rewriting unit 340 is specifically used to: identify whether the parsing result of the response data contains redirection address information; if it contains redirection address information, rewrite the redirection address information according to the address information of the proxy server to obtain second rewritten address information.
[0113] In some embodiments of the present application, the rewrite unit 340 is specifically used to: identify whether the parsing result of the response data contains host name information; if it contains host name information, determine the IP address information corresponding to the host name information according to the mapping relationship between the host name and the IP address; rewrite the IP address information corresponding to the host name information according to the address information of the proxy server to obtain third rewritten address information.
[0114] In some embodiments of the present application, the rewriting unit 340 is specifically used to: identify whether the parsing result of the response data contains dynamic splicing address information; if it contains dynamic splicing address information, identify the original IP address information corresponding to the dynamic splicing address information; rewrite the original IP address information corresponding to the dynamic splicing address information according to the address information of the proxy server to obtain fourth rewritten address information.
[0115] In some embodiments of the present application, the management and control device 300 of the Web console also includes: a third receiving unit, used to rewrite the access address information of the Web console according to the address rewriting policy corresponding to the access address information of the Web console and the address information of the proxy server, and after obtaining the rewritten access address information of the Web console, receive a first jump request from the user, the first jump request being configured as a request containing the access address information of the rewritten Web console, the access address information of the rewritten Web console containing the address information of the proxy server and the address information of the second target service node; a first jump unit, used to jump to the Web console of the second target service node according to the first jump request.
[0116] In some embodiments of the present application, the first target service node is divided into a main service node and a sub-service node, and the management and control device 300 of the Web console also includes: a fourth receiving unit, used to receive a second access request from a user terminal, and the access request is configured as a request including address information of a proxy server; a providing unit, used to provide the access address information of the main service node to the user terminal according to the second access request, so that the user terminal accesses the Web console of the main service node through the proxy server; a fifth receiving unit, used to receive a second jump request from the user terminal on the Web console of the main service node, and the second jump request is configured as a request including address information of the proxy server and address information of the sub-service node; a second jump unit, used to jump to the Web console of the sub-service node according to the second jump request.
[0117] It can be understood that the above-mentioned Web console control device can implement the various steps of the Web console control method provided in the above-mentioned embodiments. The relevant explanations about the Web console control method are applicable to the Web console control device and will not be repeated here.
[0118] Figure 4 Schematic diagram of the structure of a device in the embodiment of the present application. Figure 4 As shown, the device includes one or more processors (or processing units), may further include one or more memories coupled to the processors, and may further include a communication module coupled to the processors.
[0119] The communication module can be used to communicate with other devices or apparatuses, such as the transmission or reception of data and / or signals. The communication module can have at least one communication module for communication. The communication module can include any interface necessary for communicating with other devices. Exemplarily, the communication module can be a transceiver, a circuit, a bus, a module, or other types of communication modules.
[0120] The processor may include, but is not limited to, at least one of the following: a general-purpose computer, a special-purpose computer, a microcontroller, a digital signal controller (DSP), or one or more of a controller-based multi-core controller architecture. The device may have multiple processors, such as application-specific integrated circuit chips, which are time-dependent and synchronized with a clock of a main processor.
[0121] The memory may include one or more non-volatile memories and one or more volatile memories. Examples of non-volatile memories include, but are not limited to, at least one of the following: read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, hard disk, compact disc (CD), digital video disk (DVD), or other magnetic storage and / or optical storage. Examples of volatile memories include, but are not limited to, at least one of the following: random access memory (RAM), or other volatile memories that do not persist during the duration of a power outage.
[0122] The computer program includes computer executable instructions executed by an associated processor. The program can be stored in ROM. The processor can perform any suitable actions and processes by loading the program into RAM.
[0123] The possible implementation of the present application can be implemented by means of a program, so that the device can perform any process discussed in the above embodiments. The possible implementation of the present application can also be implemented by hardware or by a combination of software and hardware.
[0124] In some embodiments, the program may be tangibly contained in a computer-readable storage medium, which may be included in the device (such as in a memory) or other storage device accessible by the device. The program may be loaded from the computer-readable storage medium to the RAM for execution. The computer-readable storage medium may include any type of tangible non-volatile memory, such as ROM, EPROM, flash memory, hard disk, CD, DVD, etc.
[0125] The present application embodiment also provides a computer-readable storage medium, on which computer instructions or program codes are stored, and when the processor runs the instructions or the program codes, the processor executes the methods and functions involved in any of the above embodiments. Computer-readable media can be any tangible medium containing or storing programs for or related to instruction execution systems, devices or equipment. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or devices, or any suitable combination thereof. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrations. More detailed examples of computer-readable storage media include electrical connections with one or more wires, magnetic media (e.g., disks, floppy disks, hard disks, tapes, magnetic storage devices), optical media (e.g., optical storage devices, DVDs), semiconductor media (e.g., solid-state hard drives), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), or any suitable combination thereof, etc.
[0126] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The embodiment of the present application also provides at least one computer program product tangibly stored on a non-temporary computer-readable storage medium. The computer program product includes one or more computer executable instructions, such as instructions included in a program module, which are executed in a device on a real or virtual processor of the target to perform the process, method and function involved in any of the above embodiments. When the computer program instruction is loaded and executed on a computer, a process or function according to an embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.
[0127] The present application embodiment also proposes a computer program product, including a computer program or instruction, when the computer program or instruction is run on a computer, the computer is made to perform the process, method and function in the above-mentioned embodiment. Usually, a program module includes routines, programs, libraries, objects, classes, components, data structures, etc. that perform specific tasks or realize specific abstract data types. In various embodiments, the functions of program modules can be combined or divided between program modules as needed. Machine executable instructions for program modules can be executed in local or distributed devices. In distributed devices, program modules can be located in local and remote storage media.
[0128] In general, various embodiments of the present application may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software, which may be performed by a controller, microprocessor, or other computing device. Although various aspects of the embodiments of the present disclosure are shown and described as block diagrams, flow charts, or using some other graphical representations, it should be understood that the boxes, devices, systems, techniques, or methods described herein may be implemented as, for example, non-limiting examples, hardware, software, firmware, dedicated circuits or logic, general hardware or controllers or other computing devices, or some combination thereof.
[0129] It should be noted that although the embodiments of the present application are described above in conjunction with the accompanying drawings, the above embodiments are not independent of each other, and they can also be combined to obtain other embodiments. The division of the modes, situations, categories and embodiments in the embodiments of the present application is only for the convenience of description and should not constitute a special limitation. The features in the various modes, categories, situations and embodiments can be combined with each other in a logical manner. The various implementation methods of the present application can be combined arbitrarily to achieve different technical effects. The embodiments of the present application no longer list various combinations.
[0130] In addition, although the operation of the method of the present disclosure is described in a particular order in the accompanying drawings, this does not require or imply that these operations must be performed in this particular order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flow chart can change the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution. It should also be noted that the features and functions of two or more devices according to the present disclosure can be embodied in one device. Conversely, the features and functions of a device described above can be further divided into being embodied by multiple devices.
[0131] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0132] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for controlling a Web console, characterized in that: The Web console is provided by a service node, and the control method of the Web console is executed by a proxy server. The control method of the Web console includes: Receive a first access request from a user terminal and parse it to obtain address information of a first target service node, wherein the first access request is configured as a request including address information of a proxy server and address information of the first target service node; forwarding the first access request to the first target service node according to the address information of the first target service node; Receiving and parsing the response data returned by the first target service node to obtain access address information of the Web console; The access address information of the Web console is rewritten according to the address rewriting policy corresponding to the access address information of the Web console and the address information of the proxy server to obtain the rewritten access address information of the Web console.
2. The method for controlling the Web console according to claim 1, characterized in that: The rewriting of the address information in the response data by using the address rewriting strategy corresponding to the parsing result of the response data comprises: Identify whether the parsing result of the response data contains absolute address information; In the case where the absolute address information is included, the absolute address information is rewritten according to the address information of the proxy server to obtain first rewritten address information.
3. The method for controlling the Web console according to claim 1, characterized in that: The rewriting of the address information in the response data by using the address rewriting strategy corresponding to the parsing result of the response data comprises: Identify whether the parsing result of the response data contains redirection address information; In the case where the redirection address information is included, the redirection address information is rewritten according to the address information of the proxy server to obtain second rewritten address information.
4. The method for controlling the Web console according to claim 1, characterized in that: The rewriting of the address information in the response data by using the address rewriting strategy corresponding to the parsing result of the response data comprises: Identify whether the parsed result of the response data contains host name information; In the case where the host name information is included, determining the IP address information corresponding to the host name information according to the mapping relationship between the host name and the IP address; The IP address information corresponding to the host name information is rewritten according to the address information of the proxy server to obtain third rewritten address information.
5. The method for controlling the Web console according to claim 1, characterized in that: The rewriting of the address information in the response data by using the address rewriting strategy corresponding to the parsing result of the response data comprises: Identify whether the parsing result of the response data contains dynamic splicing address information; In the case where dynamic splicing address information is included, identifying original IP address information corresponding to the dynamic splicing address information; The original IP address information corresponding to the dynamically spliced address information is rewritten according to the address information of the proxy server to obtain fourth rewritten address information.
6. The method for controlling the Web console according to claim 1, characterized in that: After rewriting the access address information of the Web console according to the address rewriting policy corresponding to the access address information of the Web console and the address information of the proxy server to obtain the rewritten access address information of the Web console, the Web console management and control method further includes: Receive a first jump request from a user, where the first jump request is configured as a request including the rewritten access address information of the Web console, where the rewritten access address information of the Web console includes the address information of the proxy server and the address information of the second target service node; Jump to the Web console of the second target service node according to the first jump request.
7. The method for controlling the Web console according to claim 1, characterized in that: The first target service node is divided into a main service node and a sub-service node, and the management and control method of the Web console further includes: receiving a second access request from a user terminal, wherein the access request is configured as a request including address information of a proxy server; providing the access address information of the primary service node to the user terminal according to the second access request, so that the user terminal can access the Web console of the primary service node through the proxy server; receiving a second redirect request from the user terminal on the Web console of the primary service node, wherein the second redirect request is configured as a request including address information of a proxy server and address information of a sub-service node; Jump to the Web console of the sub-service node according to the second jump request.
8. A Web console control device, characterized in that: The Web console is provided by a service node, and the control device of the Web console is applied to a proxy server. The control device of the Web console includes: A first receiving unit, configured to receive a first access request from a user terminal and parse it to obtain address information of a first target service node, wherein the first access request is configured as a request including address information of a proxy server and address information of the first target service node; a forwarding unit, configured to forward the first access request to the first target service node according to the address information of the first target service node; A second receiving unit is used to receive and parse the response data returned by the first target service node to obtain access address information of the Web console; The rewriting unit is used to rewrite the access address information of the Web console according to the address rewriting policy corresponding to the access address information of the Web console and the address information of the proxy server to obtain the rewritten access address information of the Web console.
9. A device comprising: processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes the Web console management and control method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the method for controlling the Web console of any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method for realizing WEB reverse proxy
CN101753606A
Proxy access method based on URL (Uniform Resource Locator) rewriting technique
CN102624918A
Web service proxy method, apparatus, device, and storage medium
CN109067914A
Proxy access method, user equipment, storage medium, device and system
CN110808897A
Cluster access method and device, electronic equipment and readable storage medium
CN113806008A