A multi-server authorization control method and device

By obtaining server identification information, generating digital digests and setting authorization information in the local area network, self-authorization verification and dynamic authorization management are achieved, solving the problem of authorization control in a multi-server environment and ensuring the security and reliability of services.

CN111797410BActive Publication Date: 2024-09-20BEIJING CSSCA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010419414.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-18
Publication Date
2024-09-20
Estimated Expiration
2040-05-18

AI Technical Summary

Technical Problem

In a local area network environment, it is difficult to achieve effective unified management of multi-server authorization control, especially due to the separation of the intranet and the wide area network, the forgery of virtual servers, and the difficulty in controlling the number of servers.

Method used

By obtaining the identification information of the server, generating a digital summary to form an identification code, setting the authorization information and encrypting the storage, it can realize self-authorization verification and dynamic authorization management, ensure that only valid servers are running, and automatically switch when the authorization management server is replaced.

Benefits of technology

It realizes dynamic authorization management in a multi-server environment, avoids the reliability problems of a single authorization management server and the risk of virtual server forgery, and ensures the security and effective operation of services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111797410B
    Figure CN111797410B
Patent Text Reader

Abstract

The present invention discloses a multi-server authorization control method and device. The method comprises: obtaining the identification information of the server, and calculating to form a server identification code, setting the authorization information of the server, obtaining the server identification code and authorization information of each authorized server, and encrypting and storing them as authorization data, deploying the authorization data to each authorized server, and performing self-authorization verification during operation. If all authorized servers pass, they vote to generate the current authorization management server, and the authorization management server notifies other servers of its identity as the authorization management server. Other authorized servers perform secondary authorization verification. If the verification is successful, the service can be officially run. If the verification fails, the service stops running, and the authorization management server is replaced regularly. The present invention focuses on solving the dynamic authorization management control mechanism in a multi-server environment, avoiding the reliability and effectiveness problems of a single authorization management server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and in particular relates to a multi-server authorization control method and device. Background Art

[0002] With the development of cloud services today, service developers have an urgent need for authorization and licensing control of service systems. Safe and reliable authorization and licensing control is very important for maintaining the rights and interests of service developers. Especially in the intranet environment, that is, the authorization and licensing control of multiple servers in an independent network environment is more urgent. The main contents of authorization and licensing control include: obtaining identification information of the server, verifying the server authorization and licensing, the service function scope of each server authorization and licensing, and the number of servers that can run with the same service function license.

[0003] In a wide area network (Internet) environment, service developers can effectively manage authorization through the authorization server they manage, record the identification information of the authorized server on the authorization management server, and when the authorized server is running, it will uniformly access the authorization management server for authorization verification. Only when the authorization verification passes can the service function be provided normally. Once the authorization verification fails, the service will stop running. This method is very reliable in a wide area network.

[0004] In a local area network (intranet) environment, a closed operation is formed, and the server can only perform authorization management by itself. Self-authorization management faces several difficulties:

[0005] 1. It is impossible to connect to the wide area network for effective authorization control because the intranet and the wide area network are completely separated.

[0006] 2. Due to the widespread use of virtual servers, virtual servers can be created by cloning, which makes it easy to identify forgery.

[0007] 3. In a clustered service environment, the same service functions need to run on multiple servers, which faces the problem of controlling the number of servers.

[0008] The present invention aims at a network service environment where it is difficult to perform authorization control through a unified authorization management server, and allows multiple servers to be controlled in a dynamic management manner. Summary of the invention

[0009] The technical problem solved by the present invention is to provide a multi-server authorization control method and device.

[0010] Technical solution: In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:

[0011] In a first aspect, the present invention provides a multi-server authorization control method, comprising:

[0012] Obtaining identification information of the server, and performing digital digest calculation on the obtained identification information of the server to form a server identification code;

[0013] Setting the authorization information of the server, the authorization information includes a unique authorization identification code, server name, a list of permitted service functions, and the number of servers with the same functions;

[0014] Obtaining the server identification code and authorization information of each authorized server, and encrypting and storing the server identification code and authorization information as authorization data;

[0015] Deploying the authorization data to each authorized server;

[0016] When each server is running, it performs self-authorization verification to confirm whether the authorization data is valid;

[0017] If the self-authorization verification is passed, all authorized servers vote to generate the current authorization management server, and the authorization management server notifies other servers of its identity as the authorization management server. Other authorized servers send their own authorization data to the authorization management server for secondary authorization verification. If the verification is successful, the service can be officially run. If the verification fails, the service stops running.

[0018] Set a replacement period for the authorization management server. After the expiration, the authorization management server will automatically abandon its identity and give a negative response to subsequent authorization verification requests until the next server announces the emergence of a new authorization management server.

[0019] Furthermore, when other authorized servers perform secondary authorization verification and if a request fails or a response is invalid, a new authorization management server is generated by voting again.

[0020] Furthermore, the identification information of the server includes CPU information, network hardware information and operating system information.

[0021] Furthermore, the network hardware information includes the physical address and IP address of the network card, and the operating system information mainly includes the name, type and version of the operating system.

[0022] Furthermore, the authorization information also includes the validity period of the license execution and the licensed network IP range.

[0023] In a second aspect, the present invention further provides a multi-server authorization control device, comprising:

[0024] An acquisition module, used to acquire identification information of a server and perform digital summary calculation on the acquired identification information of the server to form a server identification code;

[0025] A setting module, used to set the authorization information of the server, wherein the authorization information includes a unique authorization identification code, a server name, a list of permitted service functions, and the number of servers with the same function;

[0026] A storage module, used to obtain the server identification code and authorization information of each authorized server, and encrypt and store the server identification code and authorization information as authorization data;

[0027] A deployment module, used to deploy the authorization data to each authorized server;

[0028] The self-verification module is used to perform self-authorization verification when each server is running to confirm whether the authorization data is valid;

[0029] The voting and secondary verification module is used to vote to generate the current authorization management server when the self-authorization verification passes. The authorization management server notifies other servers of its identity as the authorization management server. Other authorized servers send their own authorization data to the authorization management server for secondary authorization verification. If the verification succeeds, the service can be officially run. If the verification fails, the service stops running.

[0030] The setting module is used to set the replacement period of the authorization management server. After the expiration, the authorization management server will automatically abandon the identity and give a negative response to subsequent authorization verification requests until the next server announces the generation of a new authorization management server.

[0031] Furthermore, it also includes a detection module for detecting whether a request failure or invalid response event occurs when other authorized servers perform secondary authorization verification. If so, the event is sent to the voting and secondary verification module so that the voting and secondary verification module votes again to generate a new authorization management server.

[0032] Furthermore, the identification information of the server includes CPU information, network hardware information and operating system information.

[0033] Furthermore, the network hardware information includes the physical address and IP address of the network card, and the operating system information mainly includes the name, type and version of the operating system.

[0034] Furthermore, the authorization information also includes the validity period of the license execution and the licensed network IP range.

[0035] Beneficial effects: Compared with the prior art, the present invention has the following advantages:

[0036] 1. The present invention is applicable to the operating environment with only one authorized server, but the authorization verification at this time only performs a self-authorization verification process because there is no authorization management server. It is also applicable to a single or multi-server environment running in a wide area network.

[0037] 2. The generation of the server identification code and the generation of the authorization data of the present invention can be completed by running independent programs, which is more convenient.

[0038] 3. The present invention focuses on solving the dynamic authorization management control mechanism in a multi-server environment, avoiding the shortcomings of a single authorization management server: reliability issues (downtime, server replacement, etc.) and effectiveness issues (possible tampering, counterfeiting). BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the process of generating authorization data in a multi-server authorization control method;

[0040] Figure 2 It is a flowchart of authorization verification in a multi-server authorization control method;

[0041] Figure 3 It is a principle block diagram of a multi-server authorization control device. DETAILED DESCRIPTION

[0042] The present invention is further illustrated below in conjunction with specific examples. The examples are implemented based on the technical solutions of the present invention. It should be understood that these examples are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0043] like Figure 1 and 2 As shown, a multi-server authorization control method according to an embodiment of the present invention includes:

[0044] Obtain the identification information of the server, and perform digital summary calculation on the obtained server identification information to form a server identification code. In general, the identification information that can be obtained includes CPU information, network hardware information, and operating system information. The CPU information is solidified in the CPU and can be obtained through instructions. Moreover, this information is stable for the current server, and the same model CPU information of the same batch may be the same. Network hardware information mainly includes the physical address and IP address (Internet Protocol Address) of the network card. Generally speaking, the physical address is unique, and the IP address is unique within the subnet. The operating system information mainly includes the name, category, and version of the operating system. The server identification code can be formed using a summary algorithm such as SHA256, and the server identification code serves as the identifier of the server.

[0045] Set the authorization information of the server. The required authorization information includes the unique authorization identification code, server name, list of permitted service functions and the number of servers with the same function. Other authorization information that can be considered include: the validity period of the license execution, the permitted network IP range, etc. The composition of the authorization information can be expanded as necessary according to actual needs. The unique authorization identification code is a unique identifier for each authorized server made by the service developer. It is only used for authorization control and cannot be disclosed to the public. During authorization verification, it is necessary to ensure that only one server has the authorization identification code. The server name can be obtained through the program code. The service function list is composed of the authorized service function identification names. The service function identification names are defined by the service developer to ensure the uniqueness of each service function.

[0046] Obtain the server identification code and authorization information of each authorized server, and encrypt and store the server identification code and authorization information as authorization data. The authorization data can be stored in a lightweight, small database or data file. Regardless of how it is stored, the server identification code and authorization information need to be encrypted as necessary. The encryption algorithm can be selected according to actual needs to prevent direct reading or tampering.

[0047] Deploy the authorization data to each authorized server. That is, each server stores a copy of the same authorization data, which contains the identification codes and authorization information of all servers.

[0048] When each server is running, it performs self-authorization verification to confirm whether the authorization data is valid. Specifically, when each server is running, it first obtains its own identification code and compares it with the authorization data stored on this server. If it exists in the authorization data, then the identity is confirmed to be valid, otherwise it is illegal and the service operation is interrupted. After the self-identity is confirmed to be valid, it will check the authorization information by itself and check the authorization information item by item. If the authorization information is invalid, the service execution will also be interrupted. Note that each service function must be verified one by one here. Only service functions that have been verified to be valid can provide services, and service functions that have been verified to be invalid cannot provide services.

[0049] If the self-authorization verification is passed, all authorized servers vote to generate the current authorization management server. The authorization management server notifies other servers of its identity as the authorization management server. Other authorized servers send their own authorization data to the authorization management server for secondary authorization verification. If the verification is successful, the service can be officially run. If the verification fails, the service stops running. The voting method can be various ways. Here is a simple and effective way: each authorized server can know how many servers are running in total by querying the local authorization data, and know the address of each server. It will be round-robin according to the order of servers in the authorization data, starting from the first server. Here, the server currently being round-robin is called the "round-robin server"; everyone sends a request to the round-robin server, asking it to be the authorization management server. If the round-robin server makes a positive reply, it will be the current authorization management server, and at the same time notify other servers to announce its identity as the authorization management server; if the round-robin server makes a negative reply, it will continue to round-robin the next server until a server makes a positive reply. Other voting methods can also be used as long as dynamic control can be achieved.

[0050] Set the authorization management server replacement period. After the expiration, the authorization management server will automatically give up the identity and give a negative response to subsequent authorization verification requests until the next server announces the generation of a new authorization management server. For example, if it is set to be replaced once a day (that is, 24 hours), the authorization management server will automatically give up the identity after one day, give a negative response to subsequent authorization verification requests, and re-vote to generate a new authorization management server.

[0051] When other authorized servers perform secondary authorization verification and the request fails or the response is invalid, a new authorization management server will be voted again. For example, if the authorization management server goes down, other authorization servers will inevitably fail or the response is invalid when performing authorization verification. In this case, a new authorization management server will be elected again to avoid other authorization servers being affected and unable to operate normally.

[0052] like Figure 3 As shown, based on the above embodiments, those skilled in the art can understand that the present invention also provides a multi-server authorization control device, which includes: an acquisition module 1, a setting module 2, a storage module 3, a deployment module 4, a self-verification module 5, a voting and secondary verification module 6 and a setting module 7.

[0053] Among them, the acquisition module 1 is used to obtain the identification information of the server, and perform digital summary calculation on the obtained identification information of the server to form a server identification code. In general, the identification information that can be obtained includes CPU information, network hardware information and operating system information. The CPU information is solidified in the CPU and can be obtained through instructions, and this information is stable for the current server, and the same model CPU information of the same batch may be the same. The network hardware information is mainly the physical address and IP address (Internet Protocol Address) of the network card. Generally speaking, the physical address is unique, and the IP address is unique within the subnet. The operating system information is mainly the name, category and version of the operating system. The server identification code can be formed by using a SHA256 summary algorithm, and the server identification code is used as the identification of the server.

[0054] Setting module 2 is used to set the authorization information of the server. The required authorization information includes a unique authorization identification code, a server name, a list of permitted service functions, and the number of servers with the same function. Other authorization information that may be considered include: the validity period of the license execution, the permitted network IP range, etc. The composition of the authorization information can be expanded as necessary according to actual needs. The unique authorization identification code is a unique identifier made by the service developer for each authorized server. It is only used for authorization control and therefore cannot be disclosed to the public. During authorization verification, it is necessary to ensure that only one server has the authorization identification code. The server name can be obtained through the program code. The service function list is composed of the authorized service function identification names. The service function identification names are defined by the service developer to ensure the uniqueness of each service function.

[0055] The storage module 3 is used to obtain the server identification code and authorization information of each authorized server, and encrypt and store the server identification code and authorization information as authorization data. The authorization data can be stored in a lightweight, small database or data file. Regardless of how it is stored, the server identification code and authorization information need to be encrypted as necessary, and the encryption algorithm can be selected according to actual needs to prevent direct reading or tampering.

[0056] The deployment module 4 is used to deploy the authorization data to each authorized server. That is to say, each server stores a copy of the authorization data with the same content, which includes the identification codes and authorization information of all servers.

[0057] The self-verification module 5 is used to perform self-authorization verification when each server is running to confirm whether the authorization data is valid. Specifically, when each server is running, it first obtains its own identification code and compares it with the authorization data stored in the storage module 3 on this server. If it exists in the authorization data, then the identity is confirmed to be valid, otherwise it is illegal, and the service operation is interrupted. After the self-identity is confirmed to be valid, the authorization information is checked by itself, and the authorization information is checked item by item. If the authorization information is invalid, the service execution is also interrupted. Note that each service function must be verified one by one here. Only service functions that are verified to be valid can provide services, and service functions that are verified to be invalid cannot provide services.

[0058] The voting and secondary verification module 6 is used to vote to generate the current authorization management server when the self-authorization verification is passed. The authorization management server notifies other servers of its identity as the authorization management server. Other authorized servers send their own authorization data to the authorization management server for secondary authorization verification. If the verification is successful, the service can be officially run. If the verification fails, the service stops running. The voting method can be various ways. Here, a simple and effective way is shown: each authorized server can know how many servers are running in total by querying the local authorization data, and know the address of each server. According to the order of servers in the authorization data, it starts from the first server. Here, the server currently being rotated is called a "rotating server"; everyone sends a request to the rotating server, asking it to be the authorization management server. If the rotating server makes an affirmative reply, it is the current authorization management server, and notifies other servers to announce its identity as the authorization management server; if the rotating server makes a negative reply, it continues to rotate the next server until a server replies affirmatively. Other voting methods can also be used as long as dynamic control can be achieved.

[0059] The setting module 7 is used to set the replacement period of the authorization management server. After the expiration, the authorization management server will automatically give up the identity and give a negative response to the subsequent authorization verification request until the next server announces the generation of a new authorization management server. For example, it is set to be replaced once a day (that is, 24 hours). After one day, the authorization management server will automatically give up the identity, give a negative response to the subsequent authorization verification request, and re-vote to generate a new authorization management server.

[0060] The embodiment of the present invention also includes a detection module 8, which is used to detect whether a request failure or invalid response event occurs when other authorized servers perform secondary authorization verification. If so, the event is sent to the voting and secondary verification module 6, so that the voting and secondary verification module 6 votes again to generate a new authorization management server.

[0061] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A multi-server authorization control method, characterized in that: include: Obtaining identification information of the server, and performing digital digest calculation on the obtained identification information of the server to form a server identification code; Setting the authorization information of the server, the authorization information includes a unique authorization identification code, server name, a list of permitted service functions, and the number of servers with the same functions; Obtaining the server identification code and authorization information of each authorized server, and encrypting and storing the server identification code and authorization information as authorization data; Deploying the authorization data to each authorized server; When each server is running, it performs self-authorization verification to confirm whether the authorization data is valid; If the self-authorization verification is passed, all authorized servers vote to generate the current authorization management server, and the authorization management server notifies other servers of its identity as the authorization management server. Other authorized servers send their own authorization data to the authorization management server for secondary authorization verification. If the verification is successful, the service can be officially run. If the verification fails, the service stops running. Set a replacement period for the authorization management server. After the expiration, the authorization management server will automatically give up its identity and give a negative response to subsequent authorization verification requests until the next server announces the emergence of a new authorization management server; When other authorized servers perform secondary authorization verification, if the request fails or the response is invalid, a new authorization management server will be voted again.

2. The multi-server authorization control method according to claim 1, characterized in that: The identification information of the server includes CPU information, network hardware information and operating system information.

3. The multi-server authorization control method according to claim 2, characterized in that: The network hardware information includes the physical address and IP address of the network card, and the operating system information mainly includes the name, type and version of the operating system.

4. The multi-server authorization control method according to claim 1, characterized in that: The authorization information also includes the validity period of the license execution and the permitted network IP range.

5. A multi-server authorization control device, characterized in that: include: An acquisition module, used to acquire identification information of a server and perform digital summary calculation on the acquired identification information of the server to form a server identification code; A setting module, used to set the authorization information of the server, wherein the authorization information includes a unique authorization identification code, a server name, a list of permitted service functions, and the number of servers with the same function; A storage module, used to obtain the server identification code and authorization information of each authorized server, and encrypt and store the server identification code and authorization information as authorization data; A deployment module, used to deploy the authorization data to each authorized server; The self-verification module is used to perform self-authorization verification when each server is running to confirm whether the authorization data is valid; The voting and secondary verification module is used to vote to generate the current authorization management server when the self-authorization verification passes. The authorization management server notifies other servers of its identity as the authorization management server. Other authorized servers send their own authorization data to the authorization management server for secondary authorization verification. If the verification succeeds, the service can be officially run. If the verification fails, the service stops running. The setting module is used to set the replacement period of the authorization management server. After the expiration, the authorization management server will automatically give up the identity and give a negative response to the subsequent authorization verification request until the next server announces the generation of a new authorization management server; It also includes a detection module for detecting whether a request failure or invalid response event occurs when other authorized servers perform secondary authorization verification. If so, the event is sent to the voting and secondary verification module so that the voting and secondary verification module votes again to generate a new authorization management server.

6. The multi-server authorization control device according to claim 5, characterized in that: The identification information of the server includes CPU information, network hardware information and operating system information.

7. The multi-server authorization control device according to claim 6, characterized in that: The network hardware information includes the physical address and IP address of the network card, and the operating system information mainly includes the name, type and version of the operating system.

8. The multi-server authorization control device according to claim 5, characterized in that: The authorization information also includes the validity period of the license execution and the permitted network IP range.