Dynamic authorization access control method, device, equipment and computer storage medium

By searching for basic and dynamic authorization codes in the access control system, and combining multiple environments and privilege dimensions for authorization matching, the problem of single authorization reference dimension and low security in the existing technology is solved, and dynamic authorization and efficient authorization adjustment are achieved. , improving system security and operational efficiency.

CN114254279BActive Publication Date: 2024-10-29MIGU MUSIC CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111494619.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2024-10-29
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

The existing access control method has a single authorization reference dimension and cannot achieve dynamic authorization, resulting in low security. It is also difficult to make comprehensive manual authorization changes when the user's identity changes, affecting system security.

Method used

By receiving user authorization application requests, searching the system permission database to determine the basic authorization code and dynamic authorization code, and performing authorization matching based on multiple environmental dimensions and privilege dimensions to achieve dynamic authorization control and avoid single authorization reference dimensions and static authorization.

Benefits of technology

It improves the security and operational efficiency of the system, realizes multi-dimensional dynamic authorization, can automatically adjust authorization according to the environment and privileges, and ensures the real-time and flexibility of authorization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114254279B_ABST
    Figure CN114254279B_ABST
Patent Text Reader

Abstract

The present invention discloses a dynamic authorization access control method, device, equipment and computer storage medium, the method comprising: receiving a user's authorization application request, the authorization application request comprising a user identifier and a permission identifier to be accessed; searching a system permission library according to the user identifier, determining a basic authorization code and a dynamic authorization code corresponding to the user's current account permission, the basic authorization code being determined by a pre-set user authorization configuration, and the dynamic authorization code being determined according to an environment authorization library including multiple environment dimensions and a privilege authorization library including multiple privilege dimensions; determining the authorization result for the user according to the matching status of the permission identifier to be accessed with the basic authorization code and the dynamic authorization code, wherein when the permission identifier to be accessed matches the basic authorization code and the dynamic authorization code respectively, determining the authorization result of the user as a successful authorization. The present invention avoids the single authorization reference dimension of the access control method, realizes dynamic authorization, and improves the security of access.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to a dynamic authorization access control method, device, equipment and computer storage medium. Background Art

[0002] For enterprises operating large-scale information systems, they usually deploy a unified access control platform to manage various permissions in the system. The principle of the current access control method is to map the permissions managed by the access control platform to users one by one. However, there are the following shortcomings: 1. The mapping process usually occurs when the user account is created or the permissions are changed. The coupling degree between the user account and the permissions is high. Once the user's responsibilities change or there is a temporary need to change permissions urgently, in order to meet the relevant security and audit compliance requirements, it is necessary to submit a work order for multi-level approval, which affects the real-time nature of authorization. 2. The reference dimension for permission control is single, and authorization is only performed through the user (or the role to which the user belongs). The authorization method is simple, and it is difficult to implement periodic authorization and multi-conditional authorization scenarios. Summary of the invention

[0003] The main purpose of the present invention is to provide a dynamic authorization access control method, device, equipment and computer storage medium, aiming to solve the technical problem that the current access control method has a single authorization reference dimension and can only perform static authorization, resulting in low security.

[0004] To achieve the above object, the present invention provides a dynamic authorization access control method, comprising the following steps:

[0005] Receive a user's authorization application request, wherein the authorization application request includes a user identifier and an identifier of the permission to be accessed;

[0006] Searching the system authority library according to the user identifier to determine the basic authorization code and dynamic authorization code corresponding to the user's current account authority, wherein the basic authorization code is determined by a preset user authorization configuration, and the dynamic authorization code is determined according to an environment authorization library including multiple environment dimensions and a privilege authorization library including multiple privilege dimensions;

[0007] The authorization result for the user is determined based on the matching status of the permission identifier to be accessed with the basic authorization code and the dynamic authorization code, wherein when the permission identifier to be accessed matches the basic authorization code and the dynamic authorization code, the authorization result for the user is determined to be successful.

[0008] Optionally, the step of determining a dynamic authorization code corresponding to the user's current account authority includes:

[0009] Determine an environment authorization library of multiple environment dimensions, and calculate a dynamic environment authorization code corresponding to the environment authorization library;

[0010] A privilege authorization library of multiple privilege dimensions is determined, and a dynamic privilege authorization code corresponding to the privilege authorization library is calculated, and a dynamic authorization code is determined according to the dynamic environment authorization code and the dynamic privilege authorization code.

[0011] Optionally, the step of calculating the dynamic environment authorization code corresponding to the environment authorization library includes:

[0012] Converting all system permission codes in the system permission library into a first matrix;

[0013] Determine all environment authorization codes in the environment authorization library, and construct a second matrix according to each of the environment authorization codes and each of the environment dimensions;

[0014] A dynamic environment authorization code is determined according to the first matrix and the second matrix.

[0015] Optionally, the step of determining a dynamic environment authorization code according to the first matrix and the second matrix includes:

[0016] Transposing the matrix product of the first matrix and the second matrix to obtain a third matrix;

[0017] All authorization code bytes in the third matrix are determined, and the authorization code bytes are combined to obtain a dynamic environment authorization code.

[0018] Optionally, the step of determining a dynamic environment authorization code according to the first matrix and the second matrix includes:

[0019] Transposing the matrix product of the first matrix and the second matrix to obtain a third matrix;

[0020] All authorization code bytes in the third matrix are determined, and the authorization code bytes are combined to obtain a dynamic environment authorization code.

[0021] Optionally, the step of converting all system permission codes in the system permission library into a first matrix includes:

[0022] All system permission codes in the system permission library are constructed into a system permission matrix, and the system permission matrix is ​​transposed to obtain a first matrix.

[0023] Optionally, the step of calculating the dynamic privilege authorization code corresponding to the privilege authorization library includes:

[0024] Converting all system permission codes in the system permission library into a first matrix;

[0025] Determine all privilege authorization codes in the privilege authorization library, and construct a fourth matrix according to each of the privilege authorization codes and each of the privilege dimensions;

[0026] A transposed product matrix between the first matrix and the fourth matrix is ​​calculated, and all authorization code bytes in the transposed product matrix are merged to obtain a dynamic privilege authorization code.

[0027] Optionally, the step of determining the authorization result for the user according to the matching status of the permission identifier to be accessed with the basic authorization code and the dynamic authorization code respectively includes:

[0028] Determine the access permission code corresponding to the access permission identifier to be accessed, and detect whether the access permission code to be accessed matches the basic authorization code;

[0029] If the access permission code matches the basic authorization code, then checking whether the access permission code matches the dynamic authorization code;

[0030] If the access permission code matches the dynamic authorization code, it is determined that the authorization result of the user is successful.

[0031] In addition, to achieve the above object, the present invention also provides a dynamic authorization access control device, comprising:

[0032] A receiving module, used to receive a user's authorization application request, wherein the authorization application request includes a user identifier and an identifier of the permission to be accessed;

[0033] A determination module, used to search the system permission library according to the user identifier, and determine the basic authorization code and the dynamic authorization code corresponding to the user's current account permission, wherein the basic authorization code is determined by a preset user authorization configuration, and the dynamic authorization code is determined according to an environment authorization library including multiple environment dimensions and a privilege authorization library including multiple privilege dimensions;

[0034] A matching module is used to determine the authorization result for the user according to the matching status of the permission identifier to be accessed with the basic authorization code and the dynamic authorization code, wherein when the permission identifier to be accessed matches the basic authorization code and the dynamic authorization code, the authorization result of the user is determined to be successful.

[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a dynamic authorization access control device, which includes a memory, a processor, and a dynamic authorization access control program stored in the memory and executable on the processor. When the dynamic authorization access control program is executed by the processor, the steps of the dynamic authorization access control method as described above are implemented.

[0036] In addition, to achieve the above purpose, the present invention also provides a computer storage medium, on which a dynamic authorization access control program is stored. When the dynamic authorization access control program is executed by a processor, the steps of the dynamic authorization access control method as described above are implemented.

[0037] The present invention searches the system permission library according to the user identifier in the received authorization application request to determine the basic authorization code and the dynamic authorization code, and determines the authorization result for the user according to the matching status of the permission identifier to be accessed in the authorization application request and the basic authorization code and the dynamic authorization code. This avoids the phenomenon of a single authorization reference dimension, and realizes consideration from multiple angles and dimensions when performing authorization. And because dynamic authorization judgment is performed from multiple dimensions, it also avoids the existing technology that can only perform static authorization. If the user identity changes, it is difficult to ensure a comprehensive manual authorization change, resulting in a phenomenon of low system security, thereby improving the security of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a schematic diagram of the terminal\device structure of the hardware operating environment involved in the embodiment of the present invention;

[0039] Figure 2 A schematic diagram of a flow chart of a first embodiment of a dynamic authorization access control method of the present invention;

[0040] Figure 3 A schematic diagram of a device module of a dynamic authorization access control device of the present invention;

[0041] Figure 4 A schematic diagram of a system permission library in the dynamic authorization access control method of the present invention;

[0042] Figure 5 A schematic diagram of the process of obtaining a basic authorization code set in the dynamic authorization access control method of the present invention;

[0043] Figure 6 The figure is a flow chart of the dynamic authorization access control method of the present invention.

[0044] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0045] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0046] like Figure 1 As shown, Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.

[0047] The terminal in the embodiment of the present invention is a dynamic authorization access control device.

[0048] like Figure 1 As shown, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0049] Optionally, the terminal may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. Among them, the sensors include light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light, and the proximity sensor may turn off the display screen and / or backlight when the terminal device is moved to the ear. Of course, the terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

[0050] Those skilled in the art will understand that Figure 1 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0051] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a dynamic authorization access control program.

[0052] exist Figure 1 In the terminal shown, the network interface 1004 is mainly used to connect to the backend server and communicate data with the backend server; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; and the processor 1001 can be used to call the dynamic authorization access control program stored in the memory 1005 and perform the following operations:

[0053] Reference Figure 2The present invention provides a dynamic authorization access control method. In a first embodiment of the dynamic authorization access control method, the dynamic authorization access control method includes the following steps:

[0054] Step S10, receiving an authorization application request from a user, wherein the authorization application request includes a user identifier and an identifier of the authority to be accessed;

[0055] Since the current access control method is to map the permissions managed by the access control platform to users one by one, the mapping process usually occurs when the user account is created or the permissions are changed. The coupling degree between the user account and the permissions is high. Once the user's responsibilities change or there is a temporary need to change permissions urgently, in order to meet the relevant security and audit compliance requirements, it is necessary to submit a work order for multi-level approval, which prolongs the authorization implementation time and affects the real-time nature of authorization. In serious cases, it may affect customer complaint response and system function cutover. In addition, its reference dimension is single, and authorization judgment is only made based on the user dimension, and authorization cannot be automatically adjusted according to factors such as space and special events. Therefore, in order to avoid this phenomenon, in this embodiment, dynamic permission access control is performed, including the first authorization judgment calculation, environmental authorization calculation, privileged authorization calculation, overall authorization judgment calculation, and the intermediate calculation process required for judgment. That is, this embodiment can evolve multi-level permission access control according to the number of managed permissions and the level of permissions, and only needs to increase the retrieval of hierarchical permissions.

[0056] In addition, this embodiment can achieve more flexible permission matching. The traditional access control method is based on user identity or role, and user authorization needs to be approved by work orders. The process is relatively complicated. Once the user authorization needs to be changed frequently, the efficiency will become very low. However, this embodiment can achieve the purpose of changing the actual authorization without changing the user's fixed authorization, which improves operational efficiency and realizes multi-dimensional dynamic authorization. The authorization can automatically change with the pre-made configuration conditions, and the user's authorization status is no longer fixed; while traditional access control can only perform static authorization, and the authority and the user are a tightly coupled relationship. Once the user identity changes or other emergency situations occur, it is difficult to ensure a comprehensive manual authorization change, which poses a huge security risk to the system; while this embodiment does not need to change the authorization of a single user, only a small amount of environmental authorization adjustment is required to ensure the robustness of the system.

[0057] Therefore, in this embodiment, each permission is mapped to a bit in a system permission code (m-bit string) to form a system permission library. That is, all permissions in the system are sorted. If there are m permission items to be managed in total, each permission is mapped to a bit in an m-bit string. The m-bit string representing a specific permission is a system permission code; a permission mapping table, i.e., a system permission library, is formed. Figure 4As shown, in the system permission library, permission 1 corresponds to permission code 1; permission 2 corresponds to permission code 2; and permission m corresponds to permission code m.

[0058] After the system permission library is built, the basic authorization library needs to be built based on the system permission library.

[0059] According to user authorization, configure the system permission code in the system permission library to form a user basic authorization library. That is, first initialize the user basic authorization code set: read the user authorization (that is, the preset authorization configuration), find all the permission codes in the system permission library according to the user authorization, such as p_code1, ..., p_coden, execute p_code 1 |p_code 2 |...|p_code n The result is formed into a user basic authorization code set, and the user basic authorization code set is added to the preset user basic authorization library to obtain a basic authorization library. Figure 5 As shown, when the user successfully logs in, the user authorization configuration is obtained, the user authorization set is obtained, and the user basic authorization code set corresponding to the user authorization set in the system permission library is determined, and the basic authorization library is constructed according to the user basic authorization code set.

[0060] In this embodiment, when a user successfully logs in to the access control platform using an account and password, if an authorization application request from the user is received, the access permission p of the user account at the current moment, that is, the user's current account permission, is determined, and the access permission can be determined based on the user identifier contained in the authorization application request, and a subsequent permission code is queried based on the permission identifier to be accessed in the authorization application request.

[0061] Step S20, searching the system permission library according to the user identifier to determine the basic authorization code and dynamic authorization code corresponding to the user's current account permission, wherein the basic authorization code is determined by a preset user authorization configuration, and the dynamic authorization code is determined according to an environment authorization library including multiple environment dimensions and a privilege authorization library including multiple privilege dimensions;

[0062] The access permission code p_code of the user's current account permission in the system permission library is queried in the system permission library. The access permission code is the system permission code in the system permission library corresponding to the user's current account permission. And because the authorization application request includes the user ID and the permission ID to be accessed, the access permission code can be directly queried in the system permission library according to the permission ID to be accessed and the user ID.

[0063] According to the permission identifier to be accessed, the basic authorization code a_b_code corresponding to the user's current account permission is queried in the basic authorization library, that is, all the authorization codes associated with the user's current account in the basic authorization library can be used as the basic authorization code obtained this time. Then make the first judgment, execute the calculation of a_b_code&p_code, get the calculation result, and determine whether the access permission code matches the basic authorization code based on this calculation result. Among them, the basic authorization code is the permission code corresponding to the user's current account in the basic authorization library, and is determined by the pre-set user authorization configuration. If the calculation result is 0, it is determined that the access permission code and the basic authorization code do not match. At this time, the authorization result can be directly determined as a rejection of authorization, and the authorization process ends. However, if the calculation result is not 0, it is determined that the access permission code and the basic authorization code match.

[0064] When it is determined that the access permission code and the basic authorization code match, it can be determined that the judgment result from the user dimension passes. At this time, judgments in other dimensions such as the environment space are also required. Therefore, the dynamic authorization code corresponding to the current account permission of the user can be determined based on the environment authorization library of multiple environment dimensions and the privilege authorization library of multiple privilege dimensions.

[0065] For example, the authority can be determined based on the environment type and privilege type, that is, the environment authorization library can be built based on the system authority code of all dimensions of the environment type, and the privilege authorization library can be built based on the system authority code of all dimensions of the privilege type. Then the authorization result of the user's current account authority is determined based on the environment authorization library and the privilege authorization library. Therefore, after building other authorization libraries based on the system authority library, such as the environment authorization library and the privilege authorization library, the dynamic authorization code can be calculated based on the constructed authorization library, and the permission identifier to be accessed can be detected to match the dynamic authorization code, and different operations can be performed based on different detection results.

[0066] Among them, determining a first permission set of all environmental dimensions, and building an environmental authorization library based on the first permission set and the system permission library;

[0067] According to the environment authorization strategy, determine the permission set for each environment dimension, match the corresponding system permission code in the system permission library, and form an environment authorization library. And use the system permission code in the environment authorization library as the environment authorization code. That is, the access control platform can read the preset environment authorization strategy and obtain the available permission set under each environment dimension according to the current environment conditions, that is, the first permission set. Then, according to the permissions in the first permission set, find the corresponding system permission code in the system permission library and use it as the environment authorization code. For example, p_code1,…,p_coden, execute: p_code 1 |p_code 2 |...|p_code n, the result is the environment authorization code set under the environment dimension. All environment authorization code sets form an environment authorization library. One environment authorization code set includes at least one environment authorization code. And it should be noted that in this embodiment, multiple environment authorization libraries can be constructed, but only one environment authorization library is active at the same time.

[0068] wherein, determining a second permission set of all privilege dimensions, and constructing a privilege authorization library according to the second permission set and the system permission library;

[0069] According to the privilege authorization policy, determine the permission set for each privilege dimension, match the corresponding system permission code in the system permission library, and form a privilege authorization library. And use the system permission code in the privilege authorization library as the privilege authorization code. That is, the access control platform reads the platform privilege authorization policy and generates a privilege authorization code set for each privilege dimension. The generation method is the same as the method for generating the environment authorization code set mentioned above, which will not be elaborated here. Then form each privilege authorization code set into a privilege authorization library. Among them, if there are multiple privilege authorization libraries, only one privilege authorization library is active at the same time.

[0070] Step S30, determining the authorization result for the user according to the matching status of the permission identifier to be accessed with the basic authorization code and the dynamic authorization code, wherein when the permission identifier to be accessed matches the basic authorization code and the dynamic authorization code, the authorization result of the user is determined to be successful.

[0071] After determining the basic authorization code and dynamic authorization code corresponding to the user's current account permissions, the permission identifier to be accessed in the authorization application request can be directly matched with the basic authorization code and the dynamic authorization code, and the corresponding matching status can be obtained. Only when the permission identifier to be accessed matches the basic authorization code and the dynamic authorization code, the user's authorization result can be directly determined as successful authorization, otherwise the user's authorization result is determined as failed authorization.

[0072] And when the dynamic authorization code is a dynamic environment authorization code and a dynamic privilege authorization code, it is necessary to compare the permission identifier to be accessed with the dynamic environment authorization code and the dynamic privilege authorization code respectively, and determine the authorization result according to the comparison result. Therefore, when the user's current account permissions are obtained, it will be comprehensively judged whether the user's current account permissions are legal. If they are legal, the authorization result is determined to be authorization. If they are not legal, the authorization result is determined to be authorization rejection. The dynamic environment authorization code can be calculated based on the environment authorization library, and the dynamic privilege authorization code can be calculated based on the privilege authorization library. And before judging the dynamic environment authorization code and the dynamic privilege authorization code, the user dimension is judged first, that is, the judgment is made through the basic authorization library. After the judgment is passed, the dynamic environment authorization code and the dynamic privilege authorization code are judged to determine the authorization result of the user's current account permissions.

[0073] And if it is determined that the access permission code corresponding to the user's current account permission is p_code; the basic authorization code is a_b_code; the dynamic environment authorization code is a_e_code; and the dynamic privilege authorization code is a_s_code. Input the dynamic environment authorization code a_e_code and the dynamic privilege authorization code a_s_code into the preset authorization result calculation formula for calculation to obtain the authorization result, and determine whether the user's current account permission matches the dynamic environment authorization code and the dynamic privilege authorization code based on the authorization result. Among them, the authorization result calculation formula can be:

[0074] result=[a_b_code&(a_e_code|a_s_code)]&p_code;

[0075] Then the authorization result is judged according to result. If result=0, the authorization result is determined to be authorization failure. If result=1, the authorization result is determined to be authorization success.

[0076] In addition, to assist in understanding the principle of the dynamic authorization access control method in this embodiment, an example is given below.

[0077] For example, Figure 6As shown, after the dynamic authorization access control platform receives the user's application permission p, its access control module will first query the system permission library to determine the system permission code p_code corresponding to the application permission p; then query the user basic permission library to obtain the basic permission code a_b_code corresponding to the application permission p; determine whether a_b_code&p_code is equal to 0, if so, determine that the authorization result is denied authorization. If not, search the system permission library to calculate the matrix P_matrix; search the environment authorization library to calculate the matrix E_matrix; use E_matrix and P_matrix to calculate a_e_code; search the privilege authorization library to calculate the matrix S_matrix; use S_matrix and P_matrix to calculate a_s_code; then use a_e_code, a_s_code, and a_b_code to calculate result, and determine whether result is equal to 0. If so, determine that the authorization result is denied authorization. If not, determine that the authorization result is successful authorization.

[0078] In this embodiment, the system permission library is searched according to the user identifier in the received authorization application request to determine the basic authorization code and the dynamic authorization code, and the authorization result for the user is determined according to the matching status of the permission identifier to be accessed in the authorization application request with the basic authorization code and the dynamic authorization code. This avoids the phenomenon of a single authorization reference dimension, and realizes consideration from multiple angles and dimensions when performing authorization. And because dynamic authorization judgment is performed from multiple dimensions, it also avoids the existing technology that can only perform static authorization. If the user identity changes, it is difficult to ensure a comprehensive manual authorization change, resulting in a phenomenon of low system security, thereby improving the security of the system.

[0079] Further, based on the first embodiment of the present invention, a second embodiment of the dynamic authorization access control method of the present invention is proposed. In this embodiment, the refinement of the step S20 of the above embodiment, determining the dynamic authorization code corresponding to the current account authority of the user, includes:

[0080] Step a, determining an environment authorization library of multiple environment dimensions, and calculating a dynamic environment authorization code corresponding to the environment authorization library;

[0081] In this embodiment, the dynamic authorization code may include a dynamic environment authorization code and a dynamic privilege authorization code. Therefore, when calculating the dynamic authorization code, the dynamic environment authorization code and the dynamic privilege authorization code may be directly calculated. That is, the environment authorization library of multiple environment dimensions may be determined first, and the first permission set of all environment dimensions may be determined, and the environment authorization library may be constructed based on the first permission set and the system permission library. Then all environment authorization codes in the environment authorization library may be determined, and the dynamic environment authorization code a_e_code may be calculated based on each environment authorization code.

[0082] Step b: determining a privilege authorization library of multiple privilege dimensions, and calculating a dynamic privilege authorization code corresponding to the privilege authorization library, and determining a dynamic authorization code according to the dynamic environment authorization code and the dynamic privilege authorization code.

[0083] In addition, system permission codes belonging to different dimensions of privilege types can be determined in the system permission library, that is, the second permission set of all privilege dimensions is determined, and a privilege authorization library is constructed based on the second permission set and the system permission library. All privilege authorization codes in the privilege authorization library are then determined, and the dynamic privilege authorization code a_s_code is calculated based on each privilege authorization code. In this embodiment, the time sequence of calculating the dynamic privilege authorization code and the dynamic environment authorization code is not limited here, and only one of the methods is used as an example in this embodiment.

[0084] In this embodiment, the dynamic environment authorization code is calculated according to the environment authorization library of multiple environment dimensions, and the dynamic privilege authorization code is calculated according to the privilege authorization library of multiple privilege dimensions, and then the dynamic authorization code is determined according to the dynamic environment authorization code and the dynamic privilege authorization code, thereby ensuring the accuracy and validity of the obtained dynamic authorization code.

[0085] Specifically, the step of calculating the dynamic environment authorization code corresponding to the environment authorization library includes:

[0086] Step g, converting all system authority codes in the system authority library into a first matrix;

[0087] When calculating the dynamic environment authorization code in this embodiment, it is necessary to first read all system permission codes in the system permission library to form an m*m-order matrix, and then transpose the matrix to obtain the first matrix P_matrix.

[0088] Step h, determining all environment authorization codes in the environment authorization library, and constructing a second matrix according to each of the environment authorization codes and each of the environment dimensions;

[0089] The activated environment authorization library is determined in each environment authorization library. If the activated environment authorization library contains n-dimensional environment dimensions, when all environment authorization codes in the environment authorization library are read, an n*m second matrix E_matrix will be formed. The determination of the environment dimensions can be determined by first obtaining all environment authorization codes in the environment authorization library and determining them according to the permission dimensions corresponding to each environment authorization code.

[0090] Step i: determining a dynamic environment authorization code according to the first matrix and the second matrix.

[0091] After obtaining the first matrix P_matrix and the second matrix E_matrix, the product between the first matrix P_matrix and the second matrix E_matrix can be directly calculated to obtain the matrix product, and then the dynamic environment authorization code is obtained through the matrix product.

[0092] In this embodiment, a first matrix is ​​constructed according to the system permission library, and a second matrix is ​​constructed according to the environment authorization code and environment dimension in the environment authorization library, and then the dynamic environment authorization code is determined according to the first matrix and the second matrix, thereby ensuring the accuracy and validity of the obtained dynamic environment authorization code.

[0093] Specifically, the step of determining the dynamic environment authorization code according to the first matrix and the second matrix includes:

[0094] Step j, transposing the matrix product of the first matrix and the second matrix to obtain a third matrix;

[0095] After calculating the matrix product between the first matrix P_matrix and the second matrix E_matrix, it is also necessary to transpose the matrix product, that is, to perform matrix transposition processing, and use the matrix product after transposition processing as the third matrix, that is, the third matrix E_temp_matrix:

[0096] E_temp_matrix=(E_matrix×P_matrix) T ; Where T is the matrix transpose.

[0097] The third matrix E_temp_matrix calculated at this time is an m*n order matrix, as shown below:

[0098]

[0099] Among them, e_temp_code n , n∈[1,m], is an n-bit vector, that is, [e_temp_code 1 , ..., e_temp_code n ].

[0100] Step k: determine all authorization code bytes in the third matrix, and merge the authorization code bytes to obtain a dynamic environment authorization code.

[0101] When calculating the dynamic environment authorization code, first determine all the authorization code bytes a_e_code_bit in the third matrix; then combine each authorization code byte a_e_code_bit to obtain the dynamic environment authorization code a_e_code. That is, a_e_dode = [a_e_code_bit1 ,...,a_e_code_bit m ],. The calculation of the authorization code byte a_e_code_bit can be calculated as follows, namely:

[0102]

[0103] In this embodiment, the third matrix is ​​obtained by transposing the matrix product of the first matrix and the second matrix, and then all the authorization code bytes in the third matrix are merged to obtain the dynamic environment authorization code, thereby ensuring the accuracy and validity of the obtained dynamic environment authorization code.

[0104] Specifically, the step of converting all system permission codes in the system permission library into a first matrix includes:

[0105] Step 1: construct all system permission codes in the system permission library into a system permission matrix, and transpose the system permission matrix to obtain a first matrix.

[0106] In this embodiment, when constructing the first matrix, after all system permission codes in the system permission library are obtained and the system permission matrix is ​​constructed according to each system permission code, it is also necessary to perform a transposition process on the system permission matrix, that is, a matrix transposition process, to obtain the first matrix.

[0107] In this embodiment, all system permission codes in the system permission library are constructed into a system permission matrix and transposed to obtain a first matrix, thereby ensuring the validity of the obtained first matrix.

[0108] Furthermore, the step of calculating the dynamic privilege authorization code corresponding to the privilege authorization library includes:

[0109] Step m, converting all system permission codes in the system permission library into a first matrix;

[0110] In this embodiment, when calculating the dynamic privilege authorization code, it is also necessary to convert all system permission codes in the system permission library into the first matrix. The specific conversion details refer to the above part and are not elaborated here.

[0111] Step n, determining all privilege authorization codes in the privilege authorization library, and constructing a fourth matrix according to each privilege authorization code and each privilege dimension;

[0112] Then, the privileged authorization library in the activated state is determined in each pre-set privileged authorization library. If the privileged authorization library in the activated state contains a total of k dimensions of privileged dimensions, when all the privileged authorization codes in the privileged authorization library are read, a fourth matrix S_matrix of k*m will be formed. The determination of the privileged dimension can be to first obtain all the privileged authorization codes in the privileged authorization library and determine it according to the permission dimension corresponding to each privileged authorization code.

[0113] Step p: calculate the transposed product matrix between the first matrix and the fourth matrix, and merge all authorization code bytes in the transposed product matrix to obtain a dynamic privilege authorization code.

[0114] After obtaining the first matrix corresponding to the system permission library and the fourth matrix corresponding to the privilege authorization library, the product between the first matrix and the fourth matrix can be calculated and transposed to obtain the transposed product matrix. That is, S_temp_matrix = (S_matrix × P_matrix) T ; Where T is the matrix transpose.

[0115] Then determine all the authorization code bytes in the transposed product matrix and merge them to obtain the dynamic privilege authorization code a_s_code. The merging method is the same as the dynamic environment privilege authorization code. That is, all the authorization code bytes a_s_code_bit in the transposed product matrix are calculated by the following formula.

[0116]

[0117] In this embodiment, a fourth matrix is ​​constructed according to the privileged authorization codes and privileged dimensions in the privileged authorization library, the fourth matrix is ​​calculated with the first matrix corresponding to the system permission library to obtain a transposed product matrix, and the authorization code bytes in the transposed product matrix are merged to obtain a dynamic privileged authorization code, thereby ensuring the accuracy and validity of the obtained dynamic privileged authorization code.

[0118] In addition, in this embodiment, the authorization process for the user's current account permissions is a single-level permission authorization process. It can also be applied to multi-level permission authorization processes (i.e., the authorization of the second-level permission is based on the first-level permission, and the second-level permission is determined only when the first-level permission is successfully granted to the user). Therefore, the method in this embodiment can be used when performing second-level or higher authorization.

[0119] Further, in another embodiment, the step of determining the authorization result for the user according to the matching status of the permission identifier to be accessed with the basic authorization code and the dynamic authorization code respectively includes:

[0120] Step x, determining the access permission code corresponding to the permission identifier to be accessed, and detecting whether the access permission code to be accessed matches the basic authorization code;

[0121] In this embodiment, after obtaining the authorization application request and determining the permission identifier to be accessed in the authorization application request, the corresponding access permission code to be accessed can be obtained in the system permission library according to the permission identifier to be accessed, and the access permission code to be accessed can be matched with the basic authorization code.

[0122] Step y: if the access permission code matches the basic authorization code, then checking whether the access permission code matches the dynamic authorization code;

[0123] If it is found that the access permission code matches the basic authorization code, it can be determined that the detection from the user side has passed, and then it can continue to detect whether the access permission code matches the dynamic authorization code. However, if the access permission code does not match the basic authorization code, it can be directly determined that the user's authorization result is authorization failure, and the subsequent permission verification ends.

[0124] Step z: If the access permission code matches the dynamic authorization code, the authorization result of the user is determined to be successful.

[0125] When it is found that the access permission code matches the dynamic authorization code, that is, the access permission code matches both the basic authorization code and the dynamic authorization code, then the user's authorization result can be determined to be successful. However, if the access permission code does not match the dynamic authorization code, then the user's authorization result can be determined to be unsuccessful.

[0126] In this embodiment, by determining the access permission code corresponding to the permission identifier to be accessed, and when the access permission code matches both the basic authorization code and the dynamic authorization code, the authorization result can be directly determined to be successful, thereby ensuring the accuracy and validity of the obtained authorization result.

[0127] In addition, refer to Figure 3 The embodiment of the present invention further provides a dynamic authorization access control device, comprising:

[0128] The receiving module A10 is used to receive an authorization application request from a user, wherein the authorization application request includes a user identifier and an identifier of the permission to be accessed;

[0129] A determination module A20 is used to search the system permission library according to the user identifier to determine the basic authorization code and the dynamic authorization code corresponding to the user's current account permission, wherein the basic authorization code is determined by a preset user authorization configuration, and the dynamic authorization code is determined according to an environment authorization library including multiple environment dimensions and a privilege authorization library including multiple privilege dimensions;

[0130] The matching module A30 is used to determine the authorization result for the user according to the matching status of the permission identifier to be accessed with the basic authorization code and the dynamic authorization code, respectively. When the permission identifier to be accessed matches the basic authorization code and the dynamic authorization code, respectively, the authorization result of the user is determined to be successful.

[0131] Optionally, the determination module A20 is used to:

[0132] Determine an environment authorization library of multiple environment dimensions, and calculate a dynamic environment authorization code corresponding to the environment authorization library;

[0133] A privilege authorization library of multiple privilege dimensions is determined, and a dynamic privilege authorization code corresponding to the privilege authorization library is calculated, and a dynamic authorization code is determined according to the dynamic environment authorization code and the dynamic privilege authorization code.

[0134] Optionally, the determination module A20 is used to:

[0135] Converting all system permission codes in the system permission library into a first matrix;

[0136] Determine all environment authorization codes in the environment authorization library, and construct a second matrix according to each of the environment authorization codes and each of the environment dimensions;

[0137] A dynamic environment authorization code is determined according to the first matrix and the second matrix.

[0138] Optionally, the determination module A20 is used to:

[0139] Transposing the matrix product of the first matrix and the second matrix to obtain a third matrix;

[0140] All authorization code bytes in the third matrix are determined, and the authorization code bytes are combined to obtain a dynamic environment authorization code.

[0141] Optionally, the determination module A20 is used to:

[0142] All system permission codes in the system permission library are constructed into a system permission matrix, and the system permission matrix is ​​transposed to obtain a first matrix.

[0143] Optionally, the determination module A20 is used to:

[0144] Converting all system permission codes in the system permission library into a first matrix;

[0145] Determine all privilege authorization codes in the privilege authorization library, and construct a fourth matrix according to each of the privilege authorization codes and each of the privilege dimensions;

[0146] A transposed product matrix between the first matrix and the fourth matrix is ​​calculated, and all authorization code bytes in the transposed product matrix are merged to obtain a dynamic privilege authorization code.

[0147] Optionally, the matching module A30 is used to:

[0148] Determine the access permission code corresponding to the access permission identifier to be accessed, and detect whether the access permission code to be accessed matches the basic authorization code;

[0149] If the access permission code matches the basic authorization code, then checking whether the access permission code matches the dynamic authorization code;

[0150] If the access permission code matches the dynamic authorization code, it is determined that the authorization result of the user is successful.

[0151] The steps implemented by the functional modules of the dynamic authorization access control device may refer to the various embodiments of the dynamic authorization access control method of the present invention, and will not be described in detail here.

[0152] In addition, the present invention also provides a dynamic authorization access control device, which includes: a memory, a processor and a dynamic authorization access control program stored on the memory; the processor is used to execute the dynamic authorization access control program to implement the steps of each embodiment of the above-mentioned dynamic authorization access control method.

[0153] The present invention also provides a computer storage medium, which may be a computer-readable storage medium. The computer-readable storage medium stores one or more programs, and the one or more programs may also be executed by one or more processors to implement the steps of each embodiment of the above-mentioned dynamic authorization access control method.

[0154] The specific implementation of the computer-readable storage medium of the present invention is basically the same as the above-mentioned embodiments of the dynamic authorization access control method, and will not be repeated here.

[0155] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0156] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0158] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A dynamic authorization access control method, characterized in that: The dynamic authorization access control method comprises the following steps: Receive a user's authorization application request, wherein the authorization application request includes a user identifier and an identifier of the permission to be accessed; Search the system permission library according to the user identifier to determine the basic authorization code and dynamic authorization code corresponding to the user's current account permission, the basic authorization code is determined by a preset user authorization configuration, and the dynamic authorization code is determined according to an environment authorization library including multiple environment dimensions and a privilege authorization library including multiple privilege dimensions; the dynamic authorization code includes a dynamic environment authorization code and a dynamic privilege authorization code, the environment authorization library includes multiple environment authorization codes, and the privilege authorization library includes multiple privilege authorization codes, wherein all system permission codes in the system permission library are converted into a first matrix, a second matrix is ​​constructed according to each of the environment authorization codes and each of the environment dimensions, the matrix product of the first matrix and the second matrix is ​​transposed to obtain a third matrix, all authorization code bytes in the third matrix are merged to obtain a dynamic environment authorization code; a fourth matrix is ​​constructed according to each of the privilege authorization codes and each of the privilege dimensions, a transposed product matrix between the first matrix and the fourth matrix is ​​calculated, and all authorization code bytes in the transposed product matrix are merged to obtain a dynamic privilege authorization code; Determine the authorization result of the user according to the matching status of the permission identifier to be accessed with the basic authorization code and the dynamic authorization code, wherein when the permission identifier to be accessed matches the basic authorization code and the dynamic authorization code, the authorization result of the user is determined to be successful; The authorization result calculation formula is: result = [a_b_code & (a_e_code | a_s_code)] & p_code; Among them, a_b_code is the basic authorization code, a_e_code is the dynamic environment authorization code, a_s_code is the dynamic privilege authorization code, and p_code is the access permission code corresponding to the permission identifier to be accessed. Among them, if result=1, the permission identifier to be accessed matches the basic authorization code and the dynamic authorization code respectively, and the authorization result is determined to be successful.

2. The dynamic authorization access control method according to claim 1, characterized in that: The step of determining the dynamic authorization code corresponding to the user's current account authority includes: Determine an environment authorization library of multiple environment dimensions, and calculate a dynamic environment authorization code corresponding to the environment authorization library; A privilege authorization library of multiple privilege dimensions is determined, and a dynamic privilege authorization code corresponding to the privilege authorization library is calculated, and a dynamic authorization code is determined according to the dynamic environment authorization code and the dynamic privilege authorization code.

3. The dynamic authorization access control method according to claim 1, characterized in that: The step of converting all system permission codes in the system permission library into a first matrix comprises: All system permission codes in the system permission library are constructed into a system permission matrix, and the system permission matrix is ​​transposed to obtain a first matrix.

4. The dynamic authorization access control method according to any one of claims 1 to 3, characterized in that: The step of determining the authorization result for the user according to the matching status of the permission identifier to be accessed with the basic authorization code and the dynamic authorization code respectively comprises: Determine the access permission code corresponding to the access permission identifier to be accessed, and detect whether the access permission code to be accessed matches the basic authorization code; If the access permission code matches the basic authorization code, then checking whether the access permission code matches the dynamic authorization code; If the access permission code matches the dynamic authorization code, it is determined that the authorization result of the user is successful.

5. A dynamic authorization access control device, characterized in that: The dynamic authorization access control device comprises: A receiving module, used to receive a user's authorization application request, wherein the authorization application request includes a user identifier and an identifier of the permission to be accessed; A determination module is used to search the system permission library according to the user identifier, and determine the basic authorization code and dynamic authorization code corresponding to the user's current account permission, wherein the basic authorization code is determined by a preset user authorization configuration, and the dynamic authorization code is determined according to an environment authorization library including multiple environment dimensions and a privilege authorization library including multiple privilege dimensions; the dynamic authorization code includes a dynamic environment authorization code and a dynamic privilege authorization code, the environment authorization library includes multiple environment authorization codes, and the privilege authorization library includes multiple privilege authorization codes, wherein all system permission codes in the system permission library are converted into a first matrix, a second matrix is ​​constructed according to each of the environment authorization codes and each of the environment dimensions, a matrix product of the first matrix and the second matrix is ​​transposed to obtain a third matrix, and all authorization code bytes in the third matrix are merged to obtain a dynamic environment authorization code; a fourth matrix is ​​constructed according to each of the privilege authorization codes and each of the privilege dimensions, a transposed product matrix between the first matrix and the fourth matrix is ​​calculated, and all authorization code bytes in the transposed product matrix are merged to obtain a dynamic privilege authorization code; A matching module, used to determine the authorization result of the user according to the matching status of the permission identifier to be accessed with the basic authorization code and the dynamic authorization code, wherein when the permission identifier to be accessed matches the basic authorization code and the dynamic authorization code, the authorization result of the user is determined to be successful; The authorization result calculation formula is: result = [a_b_code & (a_e_code | a_s_code)] & p_code; Among them, a_b_code is the basic authorization code, a_e_code is the dynamic environment authorization code, a_s_code is the dynamic privilege authorization code, and p_code is the access permission code corresponding to the permission identifier to be accessed. Among them, if result=1, the permission identifier to be accessed matches the basic authorization code and the dynamic authorization code respectively, and the authorization result is determined to be successful.

6. A dynamic authorization access control device, characterized in that: The dynamic authorization access control device includes: a memory, a processor, and a dynamic authorization access control program stored in the memory and executable on the processor. When the dynamic authorization access control program is executed by the processor, the steps of the dynamic authorization access control method according to any one of claims 1 to 4 are implemented.

7. A computer storage medium, characterized in that: The computer storage medium stores a dynamic authorization access control program, which implements the steps of the dynamic authorization access control method according to any one of claims 1 to 4 when executed by the processor.

Citation Information

Patent Citations

  • A dynamic access permission control method and system

    CN109918924A