Application authorization method, system and readable storage medium

Through encryption and verification technology, combined with code obfuscation, the security problem of locally deployed applications is solved, the legality and validity period of authorized files are ensured, cracking and decompilation are prevented, and the security of applications is improved.

CN115795438BActive Publication Date: 2024-10-01EASTCOMPEACE TECH
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202211639623.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-20
Publication Date
2024-10-01
Estimated Expiration
2042-12-20

AI Technical Summary

Technical Problem

There are security issues with locally deployed applications, such as the inability to control the validity period, tampering with permissions, copying and decompilation of programs, etc., resulting in the authorization scope being jumped out.

Method used

The target information and authorization information are encrypted with the private key to generate the first authorization file, and the public key is used to verify the second authorization file, combined with code obfuscation technology to ensure the security of the application.

Benefits of technology

It improves the security of the application, prevents cracking and decompilation, ensures the legality and validity period of the authorization file, and avoids application copying and permission tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115795438B_ABST
    Figure CN115795438B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system and readable storage medium for application authorization, the method comprising: the authorization application obtains target information, encrypts the target information and the authorization information in the authorization application by a private key to obtain a first authorization file and sends the first authorization file and the target application to a front-end interface; the user application obtains a first verification request sent from the front-end interface, verifies whether a second authorization file exists, obtains a first return result and returns it to the front-end interface; the user application obtains a second authorization file sent from the front-end interface, verifies the second authorization file by a public key, obtains a second return result and returns it to the front-end interface; the target application obtains initialization information sent from the front-end interface for initialization, obtains a third return result and sends it to the front-end interface. This improves the security of applications in local deployment. It can be applied to the field of application authorization in local deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of application authorization, and in particular to a method, system and readable storage medium for application authorization. Background Art

[0002] At present, local deployment is used by major enterprises, but there are also many problems. For example, after local deployment, the validity period of the application cannot be controlled, permissions are tampered with, programs are copied, and other problems. In addition, after local deployment, problems such as tampering with system permissions through decompilation programs and jumping out of the authorization scope are often encountered. Therefore, how to improve the security of applications is an urgent problem that needs to be solved. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a method, system and readable storage medium for application authorization to improve the security of applications in local deployment.

[0004] The first aspect of the present invention provides a method for application authorization, including: the authorization application obtains target information, encrypts the target information and the authorization information in the authorization application through a private key to obtain a first authorization file, and sends the first authorization file and the target application to a front-end interface, wherein the target information is information provided by the user through the front-end interface, including the server physical information and identity information of the deployed server, and the target application is the application to be deployed; the user application obtains a first verification request sent from the front-end interface, verifies whether a second authorization file exists based on the first verification request to obtain a first return result, and returns the first return result to the front-end interface, wherein the first verification request is a user request to access the target application through the front-end interface after installing and starting the target application, and the first return result is used to prompt whether the second authorization file already exists , the second authorization file is a file imported by the user through the front-end interface; the user application obtains the second authorization file sent from the front-end interface, verifies the second authorization file through the public key to obtain a second return result, returns the second return result to the front-end interface, and the second return result is used to prompt the user whether the second authorization file is legal; the target application obtains the initialization information sent from the front-end interface for initialization, obtains the third return result and sends it to the front-end interface, wherein the initialization information is the first time the user imports the first authorization file as the second authorization file to the user application, and the second return result is the identity information entered by the user in the front-end interface after verification of legality, and the third return result is used to prompt whether the user has the right to access the target application; wherein the private key in the authorization application and the public key in the user application are a pair of public-private keys.

[0005] According to some embodiments of the present invention, the authorization application obtains target information, and encrypts the target information and the authorization information in the authorization application through a private key, including: the authorization application encrypts the authorization function point through the MD5 algorithm, wherein the authorization information includes the authorization function point; the authorization application signs the target information and the authorization information based on the private key to obtain a first signature value.

[0006] According to some embodiments of the present invention, the user application obtains a second authorization file sent from the front-end interface, parses and verifies the second authorization file through a public key to obtain a second return result, and returns the second return result to the front-end interface, including: the user application verifies the first signature value of the second authorization file based on the public key to obtain the second return result.

[0007] According to some embodiments of the present invention, the user application obtains a second authorization file sent from the front-end interface, verifies the second authorization file through a public key to obtain a second return result, and returns the second return result to the front-end interface, and also includes: the user application obtains server physical information of the deployed server, compares the server physical information in the second authorization file to determine whether they are consistent to obtain a first judgment result; the user application obtains the system time of the deployed server, compares the validity period in the second authorization file, and determines whether it is within the validity period to obtain a second judgment result; and obtains the second return result based on the first judgment result and the second judgment result.

[0008] According to some embodiments of the present invention, before sending the first authorization file and the target application to the front-end interface, the step includes: the authorization application performing code obfuscation on the target application.

[0009] According to some embodiments of the present invention, the authorized application performs code obfuscation on the target application, including: the authorized application obfuscates the implementation layer, timer, interceptor, and stream class files in the target application by configuring the project object model based on the architecture of the target application.

[0010] Another aspect of the present invention provides a system for application authorization, including: an authorized application device, used to obtain target information, encrypt the target information and the authorization information in the authorized application with a private key to obtain a first authorization file, and send the first authorization file and the target application to a front-end interface, wherein the target information is information provided by a user through the front-end interface, including server physical information and identity information of the server to be deployed, and the target application is the application to be deployed; a user application device, used to obtain a first verification request sent from the front-end interface, verify whether a second authorization file exists based on the first verification request to obtain a first return result, and return the first return result to the front-end interface, wherein the first verification request is a user requesting access to the target application through the front-end interface after installing and starting the target application, and the first return result is used to prompt whether the second authorization file already exists; obtain information from A second authorization file sent by the front-end interface, the second authorization file is verified by the public key to obtain a second return result, and the second return result is returned to the front-end interface, wherein the second authorization file is a file imported through the front-end interface when the user determines that the first return result is the second authorization file does not exist, and the second return result is used to prompt the user whether the second authorization file is legal; a target application device, used to obtain the initialization information sent from the front-end interface for initialization, obtain a third return result and send it to the front-end interface, wherein the initialization information is the first time the user imports the first authorization file as the second authorization file to the user application, and the second return result is the identity information entered by the user in the front-end interface after verification of legality, and the third return result is used to prompt whether the user has the right to access the target application; wherein the private key in the authorization application and the public key in the user application are a pair of public-private keys.

[0011] Another aspect of the present invention provides an electronic device, comprising a processor and a memory; the memory is used to store a program; the processor executes the program to implement any one of the above-mentioned methods for authorizing an application program.

[0012] The electronic device according to the embodiment of the present invention has at least the same beneficial effects as the above-mentioned method for authorizing application programs.

[0013] Another aspect of the present invention provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement any of the above-mentioned methods for authorizing an application program.

[0014] The computer-readable storage medium according to the embodiment of the present invention has at least the same beneficial effects as the above-mentioned method for authorizing application programs.

[0015] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0016] The embodiment of the present invention separates the public key for verifying the authorized private key in different applications and does not exist in the target application, so that the application does not include the relevant toolkit when deployed locally, avoids the risk of the application being cracked, and improves security. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A flowchart of the steps of the method for authorizing an application program provided by an embodiment of the present invention;

[0019] Figure 2 The file format of the authorization file provided for the specific embodiment of the present invention;

[0020] Figure 3 A schematic diagram of a system for authorizing an application program provided by an embodiment of the present invention;

[0021] Figure 4 A schematic block diagram of a device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0023] Localized deployment means deploying the server of the software application on a server within the enterprise. Users can operate the software by accessing the server within the company, and the data is stored on the company's own server. Based on the customer's own server deployment, the data is stored in the local service and cannot be obtained by third parties. The security of private data is more guaranteed. In addition, because it is through the intranet, integration is relatively easy. The transmission of data between systems will be faster. Localized deployment deploys the system on a server local to the enterprise, and the data is stored within the enterprise and belongs to the enterprise. However, after local deployment, there may be problems such as copying the program, continuing to use after the authorization expires, cracking the program, and accessing functional permissions that exceed the authorized permissions. The present application proposes a method, system and readable storage medium for application authorization to improve the security of application use.

[0024] refer to Figure 1 , Figure 1 The flowchart of the method for authorizing an application program provided in an embodiment of the present invention includes steps S110 to S140:

[0025] Step S110, the authorized application obtains target information, encrypts the target information and the authorization information in the authorized application through a private key to obtain a first authorization file, and sends the first authorization file and the target application to the front-end interface, wherein the target information is information provided by the user through the front-end interface, including the server physical information and identity information of the deployed server, and the target application is the application to be deployed.

[0026] Specifically, the authorization application obtains the target information provided by the user through the front-end interface. Specifically, the target information is the information provided by the user through the front-end interface, including but not limited to the physical information of the server corresponding to the server that the user needs to deploy, such as: server IP, MAC, CPU, etc., and also includes identity information, such as basic enterprise information, application system usage time, business boundaries, etc. The user sends the relevant target information of these application applications to the authorization application in the system through the front-end interface. After the authorization application obtains the target information, the authorization application obtains the authorization information, including but not limited to: License validity period, system version number, License type, authorized function point, and encrypts the target information and authorization information based on the private key to generate a signature value. Specifically, the authorization function point is encrypted by the authorization application through the MD5 algorithm, wherein the authorization information includes the authorized function point; the authorization application signs the target information and authorization information based on the private key, and generates a first authorization file by collecting the SDK, wherein the first authorization file includes a first signature value. And through the authorization SDK, the authorization file is generated using the encrypted and signed data, wherein the authorization file is an exemplary license authorization file. Reference Figure 2, provides a file format of a license authorization file in a specific embodiment, the authorization file includes a first authorization file and a second authorization file, according to Figure 2 It can be seen that the file includes but is not limited to the supplier, user, generation time, validity period, software installation serial number, system version number, server information including: server IP address, mac address, cpu serial number, authorized function point, signature value, etc. It should be noted that the authorization SDK only exists in the authorization application and is only used to generate authorization files. The authorization application provides two ways to save public and private keys: database and encryption machine. One storage method is adopted according to actual needs. More specifically, the signature algorithm: SM2.sign (private key, validity period + supplier + user + MD5 (authorized function point) + server information) = signature value. First, the authorized function point is encrypted by the MD5 algorithm to obtain the encryption result. Then, the encryption machine or database private key is used to encrypt the entire data through the SM2 algorithm. The first authorization file is generated through the authorization SDK, and the first authorization file and the relevant information and data for installation and startup of the target application that the user needs to deploy are displayed on the front-end interface.

[0027] In another embodiment, before sending the first authorization file and the target application to the front-end interface, the process includes:

[0028] Authorize the application to obfuscate the target application.

[0029] Specifically, in order to assist the local deployment of applications to prevent decompilation, avoid tampering with system files after the program is cracked, and skip the license verification, Allatori technology is used to confuse the code: Based on the application SpringBoot architecture, the code obfuscation content and scope are configured through the Maven configuration file POM. In this application, the implementation layer, timer, interceptor, and flow class files are obfuscated. Code obfuscation has powerful obfuscation functions such as naming obfuscation, flow obfuscation, string obfuscation, and watermark technology. Therefore, it is almost impossible to reverse engineer the obfuscated code, and it allows the application that needs to obfuscate the code to add an expiration date. The code obfuscation effect is very strong and the operation is simple. When the application is compiled based on JAVA, due to the compilation characteristics of the JAVA language, the application must be compiled before deployment, and the program cracking problem cannot be controlled. The application is processed by code obfuscation, which reduces the readability of the application and the program cannot be reversed, solving the problem of application cracking; based on the JAVA language compilation mode, code obfuscation reduces the risk of program decompilation and improves application security. It should be noted that the corresponding operations can also be completed using server-side programming languages ​​such as go, c, C#, .net, and python.

[0030] Step S120, the user application obtains a first verification request sent from the front-end interface, verifies whether the second authorization file exists based on the first verification request to obtain a first return result, and returns the first return result to the front-end interface, wherein the first verification request is a request for access to the target application through the front-end interface after the user installs and starts the target application, and the first return result is used to prompt whether the second authorization file already exists, and the second authorization file is a file imported by the user through the front-end interface.

[0031] Specifically, after the user enters the target information on the front-end interface and sees that the front-end interface displays relevant information of the first authorization file and the target application, the user immediately installs the target application and requests to start it. During the startup request, the front-end interface will send a first verification request to the user application in the system. After the user application in the system receives the first verification request sent by the front-end interface, the user application verifies whether the second authorization file exists based on the first verification request, where the second authorization file is the file uploaded by the user through the front-end interface. A first return result is obtained based on whether it exists, and the first return result is sent to the front-end interface.

[0032] Step S130, the user application obtains the second authorization file sent from the front-end interface, verifies the second authorization file through the public key to obtain a second return result, and returns the second return result to the front-end interface. The second return result is used to prompt the user whether the second authorization file is legal.

[0033] Specifically, the user sees the first return result on the front-end interface. If the first return result is that the authorization file does not exist, the user uploads the second authorization file to the back-end system through the front-end interface. After the user application in the system obtains the second authorization file sent by the front-end interface, it verifies the second authorization file through the public key to obtain the second return result. The user application verifies the signature value in the second authorization file through the public key. More specifically, SM2.verify (public key, validity period + supplier + user + MD5 (function list) + server information), obtains the signature value and compares it with the signature value in the authorization file to obtain the second return result. Furthermore, the judgment of the second return result also includes: verifying the server physical information, comparing it with the server physical information in the second authorization file to see if it is consistent; verifying the server system time, and judging whether it is within the validity period with the validity period in the second authorization file; based on the above judgment, the final second return result is obtained, requiring that all the judgment results meet the conditions, such as the signature value is consistent, the server physical information is consistent, and it is within the validity period. At this time, the second return result is that the authorization file is legal and displayed on the page. It should be noted that the user application verifies the authorization file through the verification SDK, and the verification SDK only exists in the user application. When generating the user system file, the authorization SDK in the authorization application file will be filtered out. It can be seen that the authorization file production and verification are encapsulated into different SDK toolkits, which have the ability to be quickly transplanted. Users only need to expand the upper-level logic to achieve authorization and protection; and the license signature is implemented in a public-private key manner. The authorization file is generated by the private key and the public key is verified. The generation and verification are divided into two toolkits. The application does not contain the generation toolkit when it is deployed locally to avoid the risk of the application being cracked. It is suitable for system local deployment scenarios. Local application deployment is authorized by the root application. It is mostly used in management products. The root application integrates the authorization SDK. After the access rights, server physical information, validity period and other information are passed to the SDK, the authorization file is generated. The local deployment application accesses the verification SDK, specifies the authorization file path and verification frequency, and the SDK sends the verification result including the authorization data range to the application. The generated License authorization file is signed using the national secret algorithm SM2. The private key is used to sign and the private key only exists in the root server. The public key is used to verify the legitimacy of the authorization file. The authorization file contains application permissions, validity period, authorization server physical information, etc. When accessing the application, the system verifies the legitimacy of the authorization file and verifies the signature through the public key information built into the application. After the verification is passed, the application obtains the validity period, permissions, server and other information from the authorization file. When the authorization file is tampered with, the verification link cannot be completed, thereby solving problems such as validity period, access rights, and copying.

[0034] In step S140, the target application obtains the initialization information sent from the front-end interface for initialization, obtains the third return result and sends it to the front-end interface, wherein the initialization information is the first time the user imports the first authorization file as the second authorization file into the user application, and the second return result is the identity information entered by the user in the front-end interface after verification of legality, and the third return result is used to prompt whether the user has the authority to access the target application.

[0035] Specifically, after the front-end interface determines that the back-end system's judgment on the authorization file is legal, it will automatically jump to the initialization interface, prompting the user to enter the initialization information such as operation and maintenance organization information, user information, and automatically fill in the role information. The page sends the initialization information to the target application. After entry, the system will send a third return result to the front-end interface, indicating that the security verification work is completed and prompting the user to have the right to access the target application deployment server. It should be noted that when the first return result is non-existent, or when the second return result is illegal, in addition to displaying these results, the page will automatically jump to the initialization interface, or the authorization file update interface. Update means regenerating the authorization file. It can be understood that only when the second authorization file imported into the user application is the first authorization file generated by the authorization application, will the result that the user has the right to access the target application be obtained.

[0036] refer to Figure 3 , Figure 3 A schematic diagram of a system for application authorization provided by an embodiment of the present invention, wherein the system for application authorization includes: an authorization application device 210, a user application device 220, and a target application device 230:

[0037] The authorization application device 210 is used to obtain target information, encrypt the target information and the authorization information in the authorization application by a private key to obtain a first authorization file, and send the first authorization file and the target application to the front-end interface, wherein the target information is information provided by the user through the front-end interface, including the server physical information and identity information of the server to be deployed, and the target application is the application to be deployed;

[0038] The user application device 220 is used to obtain a first verification request sent from the front-end interface, verify whether the second authorization file exists based on the first verification request to obtain a first return result, and return the first return result to the front-end interface, wherein the first verification request is a request for access to the target application through the front-end interface after the user installs and starts the target application, and the first return result is used to prompt whether the second authorization file already exists; obtain the second authorization file sent from the front-end interface, verify the second authorization file through the public key to obtain a second return result, and return the second return result to the front-end interface, wherein the second authorization file is a file imported through the front-end interface when the user determines that the first return result is that the second authorization file does not exist, and the second return result is used to prompt the user whether the second authorization file is legal;

[0039] The target application device 230 is used to obtain the initialization information sent from the front-end interface for initialization, obtain the third return result and send it to the front-end interface, wherein the initialization information is the first time that the user imports the first authorization file as the second authorization file into the user application, the second return result is the identity information entered by the user in the front-end interface after verification of legality, and the third return result is used to prompt whether the user has the authority to access the target application;

[0040] It should be noted that the front-end page is also used to receive the first authorization file and the target application, and for the user to input the target information; send the first verification request, receive the first return result, send the second authorization file, receive the second return result; send the initialization information for initialization, and receive the third return result. It can be understood that the front-end page refers to the user deploying his own enterprise server through the front-end page, and the target application device 230, the authorized application device 210, and the application device are all applied on the server side for deployment.

[0041] Reference Figure 4, this embodiment provides an electronic device, including a processor and a memory coupled to the processor, the memory stores program instructions that can be executed by the processor, and the processor implements the above-mentioned target risk website detection method when executing the program instructions stored in the memory. Among them, the processor can also be called a CPU (Central Processing Unit). The processor may be an integrated circuit chip with signal processing capabilities. The processor can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor, or the general-purpose processor can also be any conventional processor, etc. The memory can include various components (e.g., machine-readable media), including but not limited to random access memory components, read-only components and any combination thereof. The memory 520 can also include: instructions (e.g., software) (e.g., stored in one or more machine-readable media); the instructions implement the target risk website detection method in the above-mentioned embodiment. The electronic device has the function of carrying and running the software system for target risk website detection provided by the embodiment of the present invention, for example, a personal computer (PC), a mobile phone, a smart phone, a personal digital assistant (PDA), a wearable device, a Pocket PC (PPC), a tablet computer, etc.

[0042] The embodiment of the present invention also discloses a computer program product or a computer program, wherein the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes Figure 1 The method shown.

[0043] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0044] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0045] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0046] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0047] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0048] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0049] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0050] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0051] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A method for application authorization, characterized in that: include: The authorization application obtains target information, encrypts the target information and the authorization information in the authorization application by a private key to obtain a first authorization file, and sends the first authorization file and the target application to the front-end interface, wherein the target information is information provided by the user through the front-end interface, including server physical information and identity information of the deployed server, and the target application is the application to be deployed; The user application obtains a first verification request sent from the front-end interface, verifies whether the second authorization file exists based on the first verification request to obtain a first return result, and returns the first return result to the front-end interface, wherein the first verification request is a request to access the target application through the front-end interface after the user installs and starts the target application, and the first return result is used to prompt whether the second authorization file already exists, and the second authorization file is a file imported by the user through the front-end interface; The user application obtains the second authorization file sent from the front-end interface, verifies the second authorization file by using the public key to obtain a second return result, and returns the second return result to the front-end interface, where the second return result is used to prompt the user whether the second authorization file is legal; The target application obtains the initialization information sent from the front-end interface for initialization, obtains the third return result and sends it to the front-end interface, wherein the initialization information is the first time the user imports the first authorization file as the second authorization file into the user application, and the second return result is the identity information entered by the user on the front-end interface after verification of legality, and the third return result is used to prompt whether the user has the authority to access the target application; The private key in the authorization application and the public key in the user application form a pair of public and private keys; The authorization application obtains target information, and encrypts the target information and the authorization information in the authorization application by using a private key, including: the authorization application encrypts the authorization function point by using an MD5 algorithm, wherein the authorization information includes the authorization function point; the authorization application signs the target information and the authorization information based on the private key to obtain a first signature value; The user application obtains a second authorization file sent from the front-end interface, parses and verifies the second authorization file through a public key to obtain a second return result, and returns the second return result to the front-end interface, including: the user application verifies the second authorization file and the first signature value based on the public key to obtain the second return result.

2. According to the method for application authorization in claim 1, the user application obtains a second authorization file sent from the front-end interface, verifies the second authorization file by a public key to obtain a second return result, and returns the second return result to the front-end interface, further comprising: The user application obtains server physical information of the deployed server, and compares the server physical information in the second authorization file to determine whether they are consistent to obtain a first determination result; The user application obtains the system time of the deployed server, compares it with the validity period in the second authorization file, and determines whether a second determination result is obtained within the validity period; The second return result is obtained according to the first judgment result and the second judgment result.

3. The method for application authorization according to claim 1, before sending the first authorization file and the target application to the front-end interface, comprising: The authorized application performs code obfuscation on the target application.

4. The method for application authorization according to claim 3, wherein the authorized application performs code obfuscation on the target application, comprising: The authorization application program confuses the implementation layer, timer, interceptor, and flow class files in the target application program by configuring a project object model based on the architecture of the target application program.

5. A system for application authorization, characterized in that: include: The authorization application device is used to obtain target information, encrypt the target information and the authorization information in the authorization application by a private key to obtain a first authorization file, and send the first authorization file and the target application to the front-end interface, wherein the target information is information provided by the user through the front-end interface, including server physical information and identity information of the server to be deployed, and the target application is the application to be deployed; A user application device is used to obtain a first verification request sent from a front-end interface, verify whether a second authorization file exists based on the first verification request to obtain a first return result, and return the first return result to the front-end interface, wherein the first verification request is a request for access to the target application through the front-end interface after the user installs and starts the target application, and the first return result is used to prompt whether the second authorization file already exists; obtain the second authorization file sent from the front-end interface, verify the second authorization file through a public key to obtain a second return result, and return the second return result to the front-end interface, wherein the second authorization file is a file imported by the user through the front-end interface, and the second return result is used to prompt the user whether the second authorization file is legal; The target application device is used to obtain the initialization information sent from the front-end interface for initialization, obtain the third return result and send it to the front-end interface, wherein the initialization information is the first time that the user imports the first authorization file as the second authorization file into the user application, and the second return result is the identity information entered by the user in the front-end interface after verification of legality, and the third return result is used to prompt whether the user has the authority to access the target application; The private key in the authorization application and the public key in the user application form a pair of public and private keys; The authorization application obtains target information, and encrypts the target information and the authorization information in the authorization application by using a private key, including: the authorization application encrypts the authorization function point by using an MD5 algorithm, wherein the authorization information includes the authorization function point; the authorization application signs the target information and the authorization information based on the private key to obtain a first signature value; The user application obtains a second authorization file sent from the front-end interface, parses and verifies the second authorization file through a public key to obtain a second return result, and returns the second return result to the front-end interface, including: the user application verifies the second authorization file and the first signature value based on the public key to obtain the second return result.

6. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Authentication and authorization method and system applied to client platform

    CN102624739A

  • Smart card based software protection method and system

    CN104850764A

  • Application Internet on-line real-time authorization method and system

    CN105933358A

  • Authorization verification method under micro-service architecture, server, terminal and medium

    CN110213276A

  • Service processing method and device, terminal, server and storage medium

    CN110838010A