Non-intrusive access control system

By introducing login service module, business application module, session service module and user information module in the permission control system, dynamically obtaining and configuring permissions, the problem of inability to change in granularity caused by hard-coded permissions is solved, and the operational permission adjustment and non-existence are achieved Perceive the effect of expansion.

CN113139169BActive Publication Date: 2024-11-19SHANGHAI ZHONGTONGJI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110439586.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-23
Publication Date
2024-11-19
Estimated Expiration
2041-04-23

AI Technical Summary

Technical Problem

The existing permission control scheme requires hard-code permissions on the interface, which makes it impossible to change the granularity of permissions when the system is running, making it inconvenient for users to use.

Method used

Design a non-invasive permission control system, including login service module, business application module, session service module and user information module, generate tokens through user login, dynamically obtain the available interface list based on the token, determine whether to allow access to the interface, and place permissions Information is stored in the session service module and supports dynamic configuration.

Benefits of technology

It realizes the ability to modify the granularity of permissions when the system is running, improves the user experience, and achieves unaware expansion without access to the database.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113139169B_ABST
    Figure CN113139169B_ABST
Patent Text Reader

Abstract

The present application relates to a non-intrusive permission control system. The system is provided with a login service module, a business application module, a session service module and a user information module. Among them, the user information module is used to store the permission information configured by the session service module, the login service module is used to obtain the list of available interfaces and generate a token, and the business application module is used to obtain the list of available interfaces generated by the login service module from the session service module based on the token when the user requests to access the interface, and to determine whether access is allowed. In this way, the permissions and interfaces are dynamically configured, so that the permission granularity can be modified at runtime; in addition, the permission information is accessed through the session service module without accessing the database, so imperceptible expansion can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of permission control, and in particular to a non-intrusive permission control system. Background Art

[0002] In software systems, permission control is often involved, such as controlling the user's login permissions. Existing solutions require hard-coding the corresponding permissions on the interface, that is, the data needs to be directly embedded in the source code of the program. Therefore, the existing permission control solution cannot change the granularity of permissions while the system is running, which is inconvenient for users. Summary of the invention

[0003] The present application provides a non-intrusive permission control system to solve the problem that the granularity of permissions cannot be changed while the system is running, which is inconvenient for users.

[0004] The above-mentioned object of the present application is achieved through the following technical solutions:

[0005] The embodiment of the present application provides a non-intrusive permission control system, which includes: a login service module, a business application module, a session service module and a user information module; wherein:

[0006] The login service module is used to obtain the interface corresponding to the permission according to the permission obtained by the user when the user logs in, obtain the user's available interface list, store the available interface list in the session service module, and generate a token; wherein, after the user logs in, the token is passed in each time the user accesses the interface;

[0007] The business application module is used to obtain the user's available interface list from the session service module using the token each time the user accesses the interface, and determine whether to allow access to the target interface based on the available interface list;

[0008] The user information module is used to obtain and store the user's authority information transmitted by the session service module; wherein the authority information, that is, the correspondence between authority and interface, is configurable dynamic data.

[0009] Optionally, when the service application module determines whether to allow access to the target interface based on the available interface list, it is specifically used to:

[0010] Concatenate the target interface's uniform resource identifier URI with the target interface's method method;

[0011] Check the available interface list, if the available interface list contains the above splicing result, then allow access, otherwise deny access.

[0012] Optionally, in the session service module, access sessions are implemented based on the open source distributed service framework dubbo or the hypertext transfer protocol http.

[0013] Optionally, the user information module is implemented based on a non-relational database.

[0014] Optionally, the application's non-relational databases include the remote dictionary service Redis or the distributed cache system memcached.

[0015] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0016] In the non-intrusive permission control system provided in the embodiment of the present application, a login service module, a business application module, a session service module and a user information module are provided. Among them, the user information module is used to store the permission information configured by the session service module, the login service module is used to obtain the list of available interfaces and generate a token, and the business application module is used to obtain the list of available interfaces generated by the login service module from the session service module based on the token when the user requests to access the interface, and to determine whether access is allowed. With such a setting, the permissions and interfaces are dynamically configured, so that the permission granularity can be modified at runtime; in addition, the permission information is accessed through the session service module without accessing the database, so imperceptible expansion can be achieved.

[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] Figure 1 A schematic diagram of the structure of a non-intrusive permission control system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0021] As described in the background technology, the existing scheme needs to hard-code the corresponding permissions on the interface, that is, the data needs to be directly embedded in the source code of the program. Therefore, the granularity of permissions cannot be changed while the system is running in the existing permission control scheme (granularity in the computer field refers to the minimum value of the system memory expansion increment, and the level of refinement or comprehensiveness of the data stored in the data unit of the data warehouse), which is inconvenient for users. In order to solve the above problems, the embodiments of the present application provide a non-intrusive permission control system. The following is a detailed description through embodiments.

[0022] Example

[0023] Reference Figure 1 , Figure 1 This is a schematic diagram of a non-intrusive permission control system provided in an embodiment of the present application. Figure 1 As shown, the system includes: a login service module, a business application module, a session service module and a user information module; wherein,

[0024] The login service module is used to: when a user logs in, obtain the interface corresponding to the permission according to the permission obtained by the user, obtain the user's available interface list, store the available interface list in the session service module, and generate a token; wherein, after the user logs in, the token will be passed in each time the user accesses the interface;

[0025] Specifically, in computer identity authentication, token refers to a token (temporary) used as an invitation or to log in to a system. In this embodiment, after the token is generated, the token will be passed in the parameters of subsequent interface calls.

[0026] A business application module, which is used to: obtain the user's available interface list from the session service module using the token each time the user accesses the interface, and determine whether to allow access to the target interface based on the available interface list;

[0027] Specifically, Figure 1 As shown, the business application module takes out the user's available interface list from the session service module and performs authentication, and then performs authentication (that is, verifying whether the user has the right to access the system). Authentication can be achieved through regular expressions; wherein, in the session service module, access sessions can be implemented based on the open source distributed service framework dubbo or the hypertext transfer protocol http. Of course, it can also be replaced by other transmission protocols, and there is no restriction on this.

[0028] More specifically, when the business application module determines whether to allow access to the target interface based on the available interface list (that is, during authentication), it is specifically used to: splice the uniform resource identifier URI (Uniform Resource Identifier) ​​of the target interface with the method method of the target interface; check the available interface list, if the available interface list contains the result of the above splicing, allow access, otherwise deny access.

[0029] For example, taking "Add User" as an example, the interface permission control process includes:

[0030] 1. Concatenate the uri ( / api / user) of the target interface (add user) and the method (POST) of the target interface to become POST: / api / user

[0031] 2. Check the user's available interface list. If it contains POST: / api / user, access is allowed; otherwise, access is denied.

[0032] The user information module is used to obtain and store the user's permission information passed in by the session service module; wherein the permission information, namely the correspondence between permissions and interfaces, is configurable dynamic data, so the permission granularity can be modified when the system is running.

[0033] For example, in some embodiments, as shown in the table below, the permission "user management" corresponds to two interfaces (add user and delete user). If a row is added or deleted in the table, the granularity of the permission "user management" can be changed.

[0034] Permissions Interface Name Interface Path User Management Adding Users POST: / api / user User Management Deleting a User DELETE: / api / user

[0035] It should be noted that the user information module can be implemented based on a non-relational database (NoSQL, Not Only SQL), for example, it can be a remote dictionary service Redis or a distributed high-speed cache system memcached.

[0036] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0037] In the non-intrusive permission control system provided in the embodiment of the present application, a login service module, a business application module, a session service module and a user information module are provided. Among them, the user information module is used to store the permission information configured by the session service module, the login service module is used to obtain the list of available interfaces and generate a token, and the business application module is used to obtain the list of available interfaces generated by the login service module from the session service module based on the token when the user requests to access the interface, and determine whether access is allowed. With such a setting, the permissions and interfaces are dynamically configured, so that the permission granularity can be modified at runtime; in addition, the permission information is accessed through the session service module without accessing the database, so imperceptible expansion can be achieved. In addition, the above-mentioned control system is specifically low-invasive, and the function can be written first, and then the permissions can be configured in the subsequent use process, which is very convenient for users to use.

[0038] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0039] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple 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.

[0040] In addition, each functional unit in the embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0041] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0042] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", 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 application. 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 can be combined in any one or more embodiments or examples in a suitable manner.

[0043] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in the field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A non-intrusive permission control system, It is characterized in that include: Login service module, business application module, session service module and user information module; among which, The login service module is used to obtain the interface corresponding to the permission according to the permission obtained by the user when the user logs in, obtain the user's available interface list, store the available interface list in the session service module, and generate a token; wherein, after the user logs in, the token is passed in each time the user accesses the interface; The business application module is used to obtain the user's available interface list from the session service module using the token each time the user accesses the interface, and determine whether to allow access to the target interface based on the available interface list; The user information module is used to obtain and store the user's permission information passed in by the session service module; wherein the permission information, i.e., the correspondence between the permission and the interface, is configurable dynamic data; When the service application module determines whether to allow access to the target interface based on the available interface list, it is specifically used to: Concatenate the target interface's uniform resource identifier URI with the target interface's method method; Check the available interface list, if the available interface list contains the above splicing result, then allow access, otherwise deny access.

2. The system according to claim 1, It is characterized in that In the session service module, access sessions are implemented based on the open source distributed service framework dubbo or the hypertext transfer protocol http.

3. The system according to claim 1, It is characterized in that The user information module is implemented based on a non-relational database.

4. The system according to claim 3, It is characterized in that The application's non-relational databases include the remote dictionary service Redis or the distributed cache system memcached.