Access control method, device, system, server and storage medium
By integrating role-based and attribute-based access control methods, the access control of business servers is unifiedly managed, which solves the problem of difficulty and confusion in authorization during business integration and improves the accuracy of access control and data security.
Patent Information
- Application Number
- CN202110007728.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-05
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-01-05
AI Technical Summary
With the expansion of enterprise scale and business integration, when different access control methods are used to manage permissions, authorization difficulties and confusion are prone to occur, and the security of business data cannot be effectively guaranteed.
Adopt a preset hybrid access control method formed by the fusion of role-based access control and attribute-based access control. By receiving target user information, determine the target function-level permission information and target data-level permission information, and uniformly manage access to business servers. control.
It realizes unified rights management of business servers, avoids authorization difficulties and confusion, and improves the accuracy of access control and the security of business data.
Smart Images

Figure CN113761552B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to computer technology, and in particular to an access control method, device, system, server and storage medium. Background Art
[0002] With the rapid development of computer technology, data security has become a focus of more and more companies when setting up business servers.
[0003] At present, each business server of an enterprise has its own access control module to protect its own data security, and different access control modules are usually used to handle different security issues.
[0004] However, in the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0005] As the scale of enterprises expands and their businesses continue to integrate, there will be many disadvantages in using different access control methods to manage permissions, such as authorization difficulties and confusion, and the inability to effectively ensure the security of business data. Summary of the invention
[0006] The embodiments of the present invention provide an access control method, device, system, server and storage medium to achieve unified access control of all business servers and improve the accuracy of access control.
[0007] In a first aspect, an embodiment of the present invention provides an access control method, which is applied to a control server, comprising:
[0008] Receiving target user information sent by the current service server, where the target user information is obtained by the current service server based on the received data access request;
[0009] According to a preset hybrid access control mode and the target user information, determining the target function-level permission information corresponding to the target user information and the target data-level permission information corresponding to the target function-level permission information, wherein the preset hybrid access control mode is formed by integrating a role-based access control mode and an attribute-based access control mode;
[0010] The target function-level permission information and the target data-level permission information are sent to the current business server, so that the current business server responds to the data access request based on the target function-level permission information and the target data-level permission information.
[0011] In a second aspect, an embodiment of the present invention further provides an access control device, which is integrated in a control server and includes:
[0012] A target user information receiving module, used to receive target user information sent by the current business server, wherein the target user information is obtained by the current business server based on the received data access request;
[0013] A permission information determination module, used to determine the target function-level permission information corresponding to the target user information and the target data-level permission information corresponding to the target function-level permission information according to a preset hybrid access control mode and the target user information, wherein the preset hybrid access control mode is formed by integrating a role-based access control mode and an attribute-based access control mode;
[0014] The permission information sending module is used to send the target function-level permission information and the target data-level permission information to the current business server, so that the current business server responds to the data access request based on the target function-level permission information and the target data-level permission information.
[0015] In a third aspect, an embodiment of the present invention further provides an access control system, the system comprising: a control server, a plurality of service clients and a service server corresponding to each service client;
[0016] Wherein, each of the business clients is used to send a data access request to a corresponding business server;
[0017] Each of the business servers is used to obtain target user information based on the received data access request, and send the target user information to the control server;
[0018] The control server is used to implement the access control method provided by any embodiment of the present invention.
[0019] In a fourth aspect, an embodiment of the present invention further provides a server, the server comprising:
[0020] one or more processors;
[0021] A memory for storing one or more programs;
[0022] When the one or more programs are executed by the one or more processors, the one or more processors implement the access control method provided by any embodiment of the present invention.
[0023] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the access control method provided by any embodiment of the present invention.
[0024] The embodiments of the above invention have the following advantages or beneficial effects:
[0025] By using a separately deployed control server, unified access control can be performed on each business server, achieving unified authority management of business servers, avoiding authorization difficulties and confusion during business integration, and effectively ensuring the security of business data. Moreover, by using a preset hybrid access control method formed by the fusion of a role-based access control method and an attribute-based access control method and the target user information sent by the current business server, the target function-level authority information corresponding to the target user information and the target data-level authority information corresponding to the target function-level authority information can be determined, so that the current business server can respond to the received data access request based on the target function-level authority information and the target data-level authority information, making the control granularity of authority management finer, thereby improving the accuracy of access control. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a flow chart of an access control method provided by Embodiment 1 of the present invention;
[0027] Figure 2 This is an example of a preset hybrid access control method involved in the first embodiment of the present invention;
[0028] Figure 3 is a flow chart of an access control method provided by Embodiment 2 of the present invention;
[0029] Figure 4 This is an example of the relationship between tables in a control database involved in the second embodiment of the present invention;
[0030] Figure 5 is a schematic diagram of the structure of an access control device provided by Embodiment 3 of the present invention;
[0031] Figure 6 is a schematic diagram of the structure of an access control system provided by Embodiment 4 of the present invention;
[0032] Figure 7 It is a structural diagram of a server provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0033] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0034] Embodiment 1
[0035] Figure 1This is a flowchart of an access control method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of performing access control on business data in a business server. The method can be executed by an access control device, which can be implemented by software and / or hardware and integrated in a control server. Figure 1 As shown, the method specifically comprises the following steps:
[0036] S110: Receive target user information sent by the current service server, where the target user information is obtained by the current service server based on a received data access request.
[0037] Among them, the business server may refer to a server with a certain business processing function. There may be multiple business servers. Each business server is connected to the control server for data interaction, so that the control server can perform unified access control on each business server, realize unified authority management of the business server, avoid authorization difficulties and confusion during business integration, and effectively ensure the security of business data. The current business server may refer to any business server that needs access control at the current moment. The data access request may refer to a request sent by the business client to access business data in the business server. The target user information may refer to the user information logged in on the business client.
[0038] Specifically, when the current business client detects a user trigger operation, such as a click operation, a touch operation, etc., it can generate a data access request corresponding to the trigger operation based on the currently logged-in target user information, and send the data access request to the current business server. When the current business server receives the data access request, it can parse the data access request, obtain the target user information in the data access request, and send the target user information to the control server, so that the control server can perform access control on the business data accessed by the data access request based on the received target user information.
[0039] S120. Determine the target function-level permission information corresponding to the target user information and the target data-level permission information corresponding to the target function-level permission information according to a preset hybrid access control method and target user information, wherein the preset hybrid access control method is formed by integrating a role-based access control method and an attribute-based access control method.
[0040] Among them, the role-based access control method refers to a control method that associates users with permissions through roles, so that when assigning permissions to users, only the corresponding roles of the users need to be assigned, so as to simplify the user's permission management. The attribute-based access control method refers to a control method that sets the data attribute information accessible to users, so that users can only access business data with specific data attribute information, thereby controlling permissions at a finer granularity. The preset hybrid access control method can refer to a hybrid access control method that is role-centric and attribute-assisted, so that permissions have clear certainty and visualization, and achieve more precise access control purposes.
[0041] in, Figure 2 An example of a preset hybrid access control method is given. Figure 2 As shown, the operation rights of the business client to the business server can be divided into function-level permission information and data-level permission information. Function-level permission information can be expressed as specific operations performed on business data resources in the business server. Usually, business data resources exist in the form of data entity objects, so that function-level permission information can also be expressed as the corresponding relationship between data entity objects and specific operations. For example, function-level permission information can refer to a project object or a menu bar object that a user can access. In this embodiment, the function-level permission information is bound to the role. The target function-level permission information can refer to the data entity object to which the target user has access rights. The data-level permission information can refer to the data attribute information in the data entity object to which the user has access rights, so that the entity data corresponding to the data attribute information in the data entity object can be accessed, so as to control the amount of resource data accessible to the user. For example, the data-level permission information can refer to the specific project information accessible to the user in the project object, or the specific menu data item accessible to the user in the menu bar. The data attribute information can include but is not limited to at least one of the object data attribute information, action attribute information and environment attribute information corresponding to the business server. The object data attribute information can be used to characterize each entity data contained in each data entity object in the business server. Action attribute information can be used to characterize the user operations allowed for each entity data, such as deletion, modification, addition, etc. Environment attribute information can be used to characterize the display environment of each entity data, for example, only displaying a certain entity data in some business servers and not displaying the entity data in other business servers.
[0042] Specifically, Figure 2As shown, based on the role-based access control method in the preset hybrid access control method, the target function-level permission information corresponding to the target user information can be determined by using the role as an intermediate bridge, and the attribute-based access control method can be used to determine the target data-level permission information corresponding to the target function-level permission information based on the pre-set attribute strategy, thereby obtaining permission information with finer access control granularity.
[0043] S130: Send the target function-level permission information and the target data-level permission information to the current business server, so that the current business server responds to the data access request based on the target function-level permission information and the target data-level permission information.
[0044] Specifically, the control server sends both the target function-level permission information and the target data-level permission information to the current business server. When processing the data access request, the current business server can obtain more accurate response data that matches the target function-level permission information and the target data-level permission information, and send the response data to the current business client, so that the target user can perform related operations based on the granted permissions in the current business client. By responding to the data access request based on the target data-level permission information, the target user can be prevented from accessing all entity data corresponding to the target function-level permission information, making the control granularity of permission management finer, thereby improving the accuracy of access control.
[0045] The technical solution of this embodiment can perform unified access control on each business server by using a separately deployed control server, thereby realizing unified authority management of business servers, avoiding problems such as authorization difficulties and confusion during business integration, and effectively ensuring the security of business data. Moreover, by using a preset hybrid access control method formed by the fusion of a role-based access control method and an attribute-based access control method and the target user information sent by the current business server, the target function-level authority information corresponding to the target user information and the target data-level authority information corresponding to the target function-level authority information can be determined, so that the current business server can respond to the received data access request based on the target function-level authority information and the target data-level authority information, making the control granularity of authority management finer, thereby improving the accuracy of access control.
[0046] Based on the above technical solution, "the current business server responds to the data access request based on the target function-level authority information and the target data-level authority information" in S130 may include: responding to the data access request based on the target function-level authority information, and obtaining the accessible entity object in the current business server; obtaining the accessible entity data in the accessible entity object that matches the target data-level authority information, and sending the accessible entity data as response data to the current business client.
[0047] Specifically, when the current business server responds to the data access request, it can obtain all accessible entity objects corresponding to the target function-level permission information, and filter all entity data in the accessible entity objects based on the target data-level permission information, obtain accessible entity data that matches the target data-level permission information, and send all accessible entity data as response data to the current business client. The current business client can display the response data, so that the target user can perform relevant operations on the displayed response data based on the granted permissions, thereby completing the data access control process and ensuring the security of business data.
[0048] Embodiment 2
[0049] Figure 3 This is a flowchart of the access control method provided by Embodiment 2 of the present invention. Based on the above embodiments, this embodiment describes in detail the access control process of the preset hybrid access control mode. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.
[0050] See also Figure 3 The access control method provided in this embodiment specifically includes the following steps:
[0051] S310: Receive target user information sent by the current business server, where the target user information is obtained by the current business server based on a received data access request.
[0052] S320: Determine a target role identifier and a target user role association identifier corresponding to the target user information according to the preset user table and the preset user role association table in the control database and the target user information.
[0053] The control database may refer to a database used by the control server. The preset user table may be pre-configured based on the personnel information of the business system. The business system is a system composed of a business client and a business server. Figure 4 An example of controlling the relationship between tables in a database is given. Figure 4 As shown, the preset user table (i.e. Figure 4The User in the preset user table can be used to store the information of each user who logs into the business system, such as the assigned identifier (Id), the original user identifier (UserID), the user name (UserName), the password (Password) and the user account (UserNumber). The users in the preset user table are only operation objects and do not have the right to log in to the control system. The control system is a system composed of a control client and a control server. In this embodiment, the personnel information of each business system can be stored in a corresponding preset user table, or the personnel information of each business system can be stored in the same preset user table, so that each business system can share a preset user table, avoiding repeated storage of the same user's information, thereby reducing the memory space occupancy rate.
[0054] The preset user role association table may be pre-configured based on business requirements, the preset user table and the preset role table. The preset user role association table may be used to store the correspondence between users and roles, that is, the roles granted to each user. Figure 4 As shown, the preset user role association table (i.e. Figure 4 The UserRole in the UserRole table can use the user assigned identifier (UserId) and the role identifier (RoleId) to establish the corresponding relationship between users and roles. Each user can correspond to one or more roles. Figure 4 The role in the target role can be used to store the information of each role pre-created based on business needs and scenarios, so as to indirectly connect users with function-level permissions through roles. The target role identifier can refer to the identifier of the role granted to the target user, such as Figure 4 The target user role association identifier may refer to the identifier assigned to each group of users and roles, such as Figure 4 The ID in the preset user role association table UserRole.
[0055] Specifically, the target user information can be matched in the preset user table to determine the target user allocation identifier corresponding to the target user information, that is, Figure 4 The target user assignment identifier UserId is matched in the preset user role association table to determine the target role identifier RoleId and the target user role association identifier UserRoleId corresponding to the target user assignment identifier UserId.
[0056] S330: Determine the target functional level permission information corresponding to the target user information according to the preset role permission association table and the preset functional level permission table and the target role identifier in the control database.
[0057] The preset function level permission table may include various operation permissions of the business client to the business server. Figure 4 As shown, the preset function level permission table (i.e. Figure 4 Function in the business server can be used to store specific operation information for each business data resource, that is, data entity object in the business server. The preset role permission association table can be pre-configured based on business requirements, preset role table and preset function-level permission table. The preset role permission association table can be used to store the correspondence between roles and function-level permissions, that is, the function-level permissions granted to each role. Figure 4 As shown, the preset role permission association table (i.e. Figure 4 The RoleFunction in the PHPClientClient can use the role identifier (RoleId) and the function-level permission identifier (FunctionId) to establish the corresponding relationship between the role and the function-level permission. Each role can correspond to one or more function-level permissions.
[0058] It should be noted that a preset role permission association table and a preset function level permission table may be established for each business server, or a common preset role permission association table and a preset function level permission table may be established for all business servers to save memory space.
[0059] Exemplarily, S330 may include: matching the target role identifier in the preset role authority association table in the control database to determine the target function level authority identifier corresponding to the target role identifier; matching the target function level authority identifier in the preset function level authority table in the control database to determine the target function level authority information corresponding to the target user information.
[0060] Specifically, the target role identifier RoleId can be matched in the preset role permission association table RoleFunction to obtain the target function-level permission identifier FunctionId corresponding to the target role identifier RoleId. If each business server corresponds to a preset function-level permission table, the target function-level permission identifier can be matched in the current preset function-level permission table corresponding to the current business server to obtain the target function-level permission information corresponding to the target function-level permission identifier, thereby determining the target function-level permission information of the target user.
[0061] Exemplarily, for the case where the preset function-level permission table in the control database includes function-level permission information corresponding to each business server, that is, each business server shares a preset function-level permission table, "matching the target function-level permission identifier in the preset function-level permission table in the control database to determine the target function-level permission information corresponding to the target user information" may include: matching the target function-level permission identifier in the preset function-level permission table in the control database to obtain each candidate function-level permission information corresponding to the target user information; determining the target function-level permission information corresponding to the target user information from each candidate function-level permission information according to the current business server identifier corresponding to the current business server and the business server identifier corresponding to each candidate function-level permission information.
[0062] Specifically, when each business server shares a preset function-level permission table, each function-level permission information in the preset function-level permission table includes: the business server identifier to which the function-level permission is applicable. By matching the target function-level permission identifier in the preset function-level permission table, all candidate function-level permission information corresponding to the target user information can be obtained, and based on the current business server identifier corresponding to the current business server and the business server identifier corresponding to each candidate function-level permission information, all candidate function-level permission information is screened to obtain each target function-level permission information applicable to the current business server, thereby obtaining the target function-level permission information possessed by the target user.
[0063] S340: Determine the target data level permission information corresponding to the target function level permission information according to the preset attribute policy table and the target user role association identifier in the control database.
[0064] The preset attribute policy table may be pre-configured based on business requirements and various data attribute information in the business server. The preset attribute policy table may be used to store data attribute information accessible to each user. Figure 4 As shown, the preset attribute strategy table (i.e. Figure 4 The Parameter in the data attribute information can use the attribute type (ParameterType) in the data attribute information and the user role association identifier (UserRoleId) to establish a corresponding relationship between the user and the data attribute information. By adding attribute policies for users, the amount of resource data that users can access can be effectively controlled to prevent users from accessing all accessible entity data corresponding to the role, thereby making the granularity of permission management finer and improving the accuracy of permission control.
[0065] Exemplarily, S340 may include: matching the target user role association identifier in the preset attribute policy table in the control database, determining the target data attribute information corresponding to the target user role association identifier, and using the target data attribute information as the target data level authority information corresponding to the target functional level authority information; wherein the target data attribute information may include but is not limited to at least one of the object data attribute information, action attribute information and environment attribute information corresponding to the business server.
[0066] Specifically, by matching the target user role association identifier UserRoleId in the preset attribute policy table Parameter, the target data attribute information ParameterType corresponding to the target user role association identifier UserRoleId can be obtained, and the target data attribute information can be used as the target data-level permission information corresponding to the target functional-level permission information, so that the target user can only access the specific business data corresponding to the target data attribute information, thereby controlling the amount of resource data that the target user can access, thereby improving the accuracy of permission control.
[0067] S350: Send the target function-level permission information and the target data-level permission information to the current business server, so that the current business server responds to the data access request based on the target function-level permission information and the target data-level permission information.
[0068] The technical solution of this embodiment is that the control server determines the target role identifier and the target user role association identifier corresponding to the target user information according to the preset user table and the preset user role association table in the control database and the target user information, and determines the target function-level permission information corresponding to the target user information according to the preset role permission association table and the preset function-level permission table in the control database and the target role identifier; determines the target data-level permission information corresponding to the target function-level permission information according to the preset attribute policy table and the target user role association identifier in the control database, so that the various tables in the control database can be used to implement a hybrid access control method with role as the center and attribute as the auxiliary, so that the control granularity of permission management is finer, thereby improving the accuracy of access control.
[0069] On the basis of the above scheme, the preset user table, preset role table, preset function-level permission table, preset user role association table, preset role permission association table and preset attribute policy table in the control database are all configured and generated by the administrator in advance on the control client based on business needs. In authorization management, the administrator is responsible for assigning corresponding roles to users, assigning corresponding function-level permissions to roles, and using data attribute information to narrow user permissions. It is also necessary to maintain user information, role information and data attribute information parsing and formatting passed from the business server to ensure data accuracy. In rule management, the administrator needs to maintain the interaction information between the control server and each business server to ensure data interaction between the two servers, and is also responsible for communicating and negotiating with the developers of the business server to establish function-level permission information that matches the functions of the business server.
[0070] For example, for the configuration of preset user tables, preset role tables, and preset function-level permission tables, the administrator can create the corresponding tables on the control client by entering the information of each user, the information of each created role, and the information of each function-level permission of the business server. The administrator can also create the corresponding tables at one time by importing user data, role data, resource links and other data, thereby improving configuration efficiency.
[0071] Exemplarily, before S320, it may also include: receiving user role assignment information sent by the control client, wherein the user role assignment information is configured and generated by the administrator in the control client based on a preset user table and a preset role table in the control database; mapping the user role assignment information to a first data transmission object, and storing the user role assignment information in a preset user role association table in the control database through the first data transmission object.
[0072] Specifically, for the configuration of the preset user role association table, the administrator can assign a corresponding role identifier to each user identifier in the control client based on business needs, the user identifier in the preset user table, and the role identifier in the preset role table, thereby configuring the role identifier corresponding to each user identifier and obtaining user role assignment information. The control client can send the user role assignment information configured by the administrator to the control server, and the control server maps the received user role assignment information to the first data transfer object (Data Transfer Object, DTO), and verifies the user role assignment information through the first data transfer object to ensure the validity of the user role assignment information, and stores the verified user role assignment information in the preset user role association table, thereby completing the assignment of user roles.
[0073] Exemplarily, before S320, it may also include: receiving role authority allocation information sent by the control client, wherein the role authority allocation information is configured and generated by the administrator based on a preset role table and a preset function-level authority table in the control database; mapping the role authority allocation information to a second data transmission object, and storing the role authority allocation information in a preset role authority association table in the control database through the second data transmission object.
[0074] Specifically, for the configuration of the preset role permission association table, the administrator can assign a corresponding functional-level permission identifier to each role identifier in the control client based on business needs, the role identifier in the preset role table, and the functional-level permission identifier in the preset functional-level permission table, thereby configuring the functional-level permission identifier corresponding to each role identifier and obtaining role permission allocation information. The control client can send the role permission allocation information configured by the administrator to the control server, and the control server maps the received role permission allocation information to the second data transmission object DTO, and verifies the role permission allocation information through the second data transmission object to ensure the validity of the role permission allocation information, and stores the successfully verified role permission allocation information in the preset role permission association table, thereby completing the allocation of role permissions.
[0075] For example, Figure 4 As shown, the control database may also include a preset interface table (MajorAPI) of the business server. The interface table may be used to store the interface between the business server and the control server, so that the control server may obtain data attribute information of the business server through the interface. The business server in this embodiment may also obtain the target function level permission information and target data level permission information determined by the control server through the corresponding interface.
[0076] Exemplarily, before S320, it may also include: obtaining various data attribute information in the current business server through a preset interface, and displaying each data attribute information on the control client; receiving role attribute allocation information sent by the control client, the role attribute allocation information is configured and generated by the administrator based on the preset user role association table in the control database and the displayed various data attribute information; storing the role attribute allocation information in the preset attribute policy table in the control database.
[0077] Specifically, for the configuration of the preset attribute policy table, the preset interface corresponding to the current business server can be obtained from the preset interface table MajorAPI, and each data attribute information in the current business server can be obtained through the preset interface, and each data attribute information can be displayed on the control client, so that the administrator can select the required data attribute information from each data attribute information for each user role based on business needs, and the control client can generate corresponding role attribute allocation information based on the attribute type corresponding to the selected data attribute information and the user role association identifier in the preset user role association table. The control client can send the role attribute allocation information configured by the administrator to the control server, and the control server can store the received role attribute allocation information in the preset attribute policy table, thereby completing the configuration of the attribute policy.
[0078] The following is an embodiment of an access control device provided by an embodiment of the present invention. The device and the access control methods of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the access control device, reference can be made to the embodiments of the above access control methods.
[0079] Embodiment 3
[0080] Figure 5 This is a schematic diagram of the structure of an access control device provided in Embodiment 3 of the present invention. This embodiment is applicable to the case of performing access control on business data in a business server. The device is integrated in the control server. Figure 5 As shown, the device specifically includes: a target user information receiving module 510, a permission information determining module 520 and a permission information sending module 530.
[0081] Among them, the target user information receiving module 510 is used to receive the target user information sent by the current business server, and the target user information is obtained by the current business server based on the received data access request; the permission information determination module 520 is used to determine the target function-level permission information corresponding to the target user information and the target data-level permission information corresponding to the target function-level permission information according to the preset hybrid access control method and the target user information, wherein the preset hybrid access control method is formed by the fusion of the role-based access control method and the attribute-based access control method; the permission information sending module 530 is used to send the target function-level permission information and the target data-level permission information to the current business server, so that the current business server responds to the data access request based on the target function-level permission information and the target data-level permission information.
[0082] Optionally, the authority information determination module 520 includes:
[0083] An identifier determination unit, used to determine a target role identifier and a target user role association identifier corresponding to the target user information according to a preset user table and a preset user role association table in a control database and the target user information;
[0084] A target function level authority information determination unit, used to determine the target function level authority information corresponding to the target user information according to the preset role authority association table and the preset function level authority table and the target role identifier in the control database;
[0085] The target data level permission information determination unit is used to determine the target data level permission information corresponding to the target function level permission information according to the preset attribute policy table and the target user role association identifier in the control database.
[0086] Optionally, the target function level authority information determination unit is specifically used to: match the target role identifier in the preset role authority association table in the control database to determine the target function level authority identifier corresponding to the target role identifier; match the target function level authority identifier in the preset function level authority table in the control database to determine the target function level authority information corresponding to the target user information.
[0087] Optionally, the preset function level permission table in the control database includes function level permission information corresponding to each business server;
[0088] The target function level authority information determination unit is also specifically used to: match the target function level authority identifier in the preset function level authority table in the control database to obtain each candidate function level authority information corresponding to the target user information; determine the target function level authority information corresponding to the target user information from each candidate function level authority information based on the current business server identifier corresponding to the current business server and the business server identifier corresponding to each candidate function level authority information.
[0089] Optionally, the target data level authority information determination unit is specifically used to: match the target user role association identifier in the preset attribute policy table in the control database, determine the target data attribute information corresponding to the target user role association identifier, and use the target data attribute information as the target data level authority information corresponding to the target function level authority information; wherein the target data attribute information includes at least one of the object data attribute information, action attribute information and environment attribute information corresponding to the business server.
[0090] Optionally, the device further comprises:
[0091] A preset user role association table configuration module is used to: before determining the target role identifier and the target user role association identifier corresponding to the target user information based on the preset user table and the preset user role association table in the control database and the target user information, receive the user role assignment information sent by the control client, wherein the user role assignment information is configured and generated by the administrator in the control client based on the preset user table and the preset role table in the control database; map the user role assignment information to a first data transmission object, and store the user role assignment information in the preset user role association table in the control database through the first data transmission object.
[0092] Optionally, the device further comprises:
[0093] The preset attribute policy table configuration module is used to: before determining the target role identifier and the target user role association identifier corresponding to the target user information based on the preset user table and the preset user role association table in the control database and the target user information, obtain various data attribute information in the current business server through the preset interface, and display the various data attribute information on the control client; receive the role attribute allocation information sent by the control client, the role attribute allocation information is configured and generated by the management personnel based on the preset user role association table in the control database and the various data attribute information displayed; store the role attribute allocation information in the preset attribute policy table in the control database.
[0094] Optionally, the current business server is specifically used to: respond to data access requests based on target functional level authority information to obtain accessible entity objects in the current business server; obtain accessible entity data in the accessible entity object that matches the target data level authority information, and send the accessible entity data as response data to the current business client.
[0095] The access control device provided in the embodiment of the present invention can execute the access control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the access control method.
[0096] It is worth noting that in the above-mentioned embodiment of the access control device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0097] Embodiment 4
[0098] Figure 6 This is a schematic diagram of the structure of an access control system provided by Embodiment 4 of the present invention. Figure 6The system includes: a control server 610, a plurality of service clients 620 and a service server 630 corresponding to each service client.
[0099] Among them, each business client 620 is used to send a data access request to the corresponding business server 630; each business server 630 is used to obtain target user information based on the received data access request, and send the target user information to the control server 610; the control server 610 is used to implement the access control method provided by any embodiment of the present invention.
[0100] In this embodiment, each service server 630 is in communication connection with the control server 610 to achieve information interaction.
[0101] The working process of the access control system provided in this embodiment is as follows:
[0102] For each business client and corresponding business server, the current business client 620 can generate a data access request corresponding to the user trigger operation according to the target user information currently logged in, and send the data access request to the current business server 630. The current business server 630 can parse the received data access request, obtain the target user information in the data access request, and send the target user information to the control server 610. The control server 610 determines the target function level permission information corresponding to the target user information and the target data level permission information corresponding to the target function level permission information according to the preset hybrid access control mode, and sends the target function level permission information and the target data level permission information to the current business server 630. When processing the data access request, the current business server 630 can obtain more accurate response data matching the target function level permission information and the target data level permission information, and send the response data to the current business client 620, so that the target user can perform related operations based on the granted permissions in the current business client 620, so that the control granularity of permission management is finer, thereby improving the accuracy of access control.
[0103] The access control system in this embodiment can perform unified access control on each business server by using a separately deployed control server, thereby realizing unified authority management of business servers, avoiding problems such as authorization difficulties and confusion during business integration, and effectively ensuring the security of business data. Moreover, by using a preset hybrid access control method formed by the fusion of a role-based access control method and an attribute-based access control method and the target user information sent by the current business server, the target function-level authority information corresponding to the target user information and the target data-level authority information corresponding to the target function-level authority information can be determined, so that the current business server can respond to the received data access request based on the target function-level authority information and the target data-level authority information, making the control granularity of authority management finer, thereby improving the accuracy of access control.
[0104] Embodiment 5
[0105] Figure 7 A schematic diagram of the structure of a server provided in Embodiment 5 of the present invention. Figure 7 A block diagram of an exemplary server 12 suitable for use in implementing embodiments of the present invention is shown. Figure 7 The server 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0106] like Figure 7 As shown, the server 12 is in the form of a general purpose computing device. The components of the server 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0107] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0108] The server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the server 12, including volatile and non-volatile media, removable and non-removable media.
[0109] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The server 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 7 not shown, usually called a "hard drive"). Although Figure 7 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0110] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0111] The server 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the server 12, and / or may communicate with any device that enables the server 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. In addition, the server 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the server 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the server 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0112] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing an access control method provided by the embodiment of the present invention, the method comprising:
[0113] Receiving target user information sent by the current business server, where the target user information is obtained by the current business server based on the received data access request;
[0114] According to a preset hybrid access control mode and target user information, determine the target function-level permission information corresponding to the target user information and the target data-level permission information corresponding to the target function-level permission information, wherein the preset hybrid access control mode is formed by integrating the role-based access control mode and the attribute-based access control mode;
[0115] The target function-level permission information and the target data-level permission information are sent to the current business server, so that the current business server responds to the data access request based on the target function-level permission information and the target data-level permission information.
[0116] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the access control method provided by any embodiment of the present invention.
[0117] Embodiment 6
[0118] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the access control method provided in any embodiment of the present invention are implemented. The method includes:
[0119] Receiving target user information sent by the current business server, where the target user information is obtained by the current business server based on the received data access request;
[0120] According to a preset hybrid access control mode and target user information, determine the target function-level permission information corresponding to the target user information and the target data-level permission information corresponding to the target function-level permission information, wherein the preset hybrid access control mode is formed by integrating the role-based access control mode and the attribute-based access control mode;
[0121] The target function-level permission information and the target data-level permission information are sent to the current business server, so that the current business server responds to the data access request based on the target function-level permission information and the target data-level permission information.
[0122] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0123] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0124] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0125] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0126] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0127] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. An access control method, It is characterized in that Applied to control servers, including: Receiving target user information sent by the current service server, where the target user information is obtained by the current service server based on the received data access request; Determine the target role identifier and the target user role association identifier corresponding to the target user information according to the preset user table and the preset user role association table in the control database and the target user information; Matching the target role identifier in the preset role authority association table in the control database to determine the target function level authority identifier corresponding to the target role identifier; Matching the target function level permission identifier in a preset function level permission table in the control database to determine the target function level permission information corresponding to the target user information; Matching the target user role association identifier in the preset attribute policy table in the control database, determining the target data attribute information corresponding to the target user role association identifier, and using the target data attribute information as the target data level authority information corresponding to the target function level authority information; The target function-level permission information and the target data-level permission information are sent to the current business server, so that the current business server responds to the data access request based on the target function-level permission information and the target data-level permission information.
2. The method according to claim 1, It is characterized in that The preset function level permission table in the control database includes function level permission information corresponding to each business server; The step of matching the target function level permission identifier in the preset function level permission table in the control database to determine the target function level permission information corresponding to the target user information includes: Matching the target function level permission identifier with a preset function level permission table in the control database to obtain each candidate function level permission information corresponding to the target user information; According to the current business server identifier corresponding to the current business server and the business server identifier corresponding to each of the candidate function level authority information, the target function level authority information corresponding to the target user information is determined from each of the candidate function level authority information.
3. The method according to claim 1, It is characterized in that The target data attribute information includes at least one of object data attribute information, action attribute information and environment attribute information corresponding to the business server.
4. The method according to claim 1, It is characterized in that Before determining the target role identifier and the target user role association identifier corresponding to the target user information according to the preset user table and the preset user role association table in the control database and the target user information, the method further includes: Receiving user role allocation information sent by the control client, wherein the user role allocation information is generated by the administrator through configuration in the control client based on a preset user table and a preset role table in the control database; The user role assignment information is mapped onto a first data transmission object, and the user role assignment information is stored in a preset user role association table in the control database via the first data transmission object.
5. The method according to claim 1, It is characterized in that Before determining the target role identifier and the target user role association identifier corresponding to the target user information according to the preset user table and the preset user role association table in the control database and the target user information, the method further includes: Acquire each data attribute information in the current business server through a preset interface, and display each data attribute information on the control client; Receiving role attribute allocation information sent by the control client, wherein the role attribute allocation information is generated and configured by a management personnel based on a preset user role association table in the control database and various data attribute information displayed; The role attribute allocation information is stored in a preset attribute strategy table in the control database.
6. The method according to any one of claims 1 to 5, It is characterized in that The current business server responds to the data access request based on the target function-level authority information and the target data-level authority information, including: Based on the target function level permission information, respond to the data access request and obtain the accessible entity object in the current business server; Obtain accessible entity data in the accessible entity object that matches the target data-level authority information, and send the accessible entity data as response data to the current business client.
7. An access control device, It is characterized in that Integrated into the control server, including: A target user information receiving module, used to receive target user information sent by the current business server, wherein the target user information is obtained by the current business server based on the received data access request; The permission information determination module is used to determine the target role identifier and the target user role association identifier corresponding to the target user information according to the preset user table and the preset user role association table in the control database and the target user information; match the target role identifier in the preset role permission association table in the control database to determine the target function-level permission identifier corresponding to the target role identifier; match the target function-level permission identifier in the preset function-level permission table in the control database to determine the target function-level permission information corresponding to the target user information; match the target user role association identifier in the preset attribute policy table in the control database to determine the target data attribute information corresponding to the target user role association identifier, and use the target data attribute information as the target data-level permission information corresponding to the target function-level permission information; The permission information sending module is used to send the target function-level permission information and the target data-level permission information to the current business server, so that the current business server responds to the data access request based on the target function-level permission information and the target data-level permission information.
8. An access control system, It is characterized in that The system comprises: a control server, a plurality of service clients and a service server corresponding to each service client; Wherein, each of the business clients is used to send a data access request to a corresponding business server; Each of the business servers is used to obtain target user information based on the received data access request, and send the target user information to the control server; The control server is used to implement the access control method described in any one of claims 1-6.
9. A server, It is characterized in that The server comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the access control method as described in any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the access control method as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method for solving access control in authority management
CN101478536A
Method and device for access control based on roles and data items
CN105187365A
