Role and attribute mixing-based database access control method and device

Through a database access control method based on a mixed role and attribute, data is divided and access permissions are calculated in a fine-grained manner, which solves the problem that traditional access control methods are difficult to meet complex needs, and realizes efficient and flexible data access control, adapts to complex environments and processes permissions conflict.

CN119004505AInactive Publication Date: 2024-11-22SHENZHEN SANLIANG TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411089814.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional access control methods are difficult to meet complex and changeable business needs and security requirements. The RBAC model that relies solely on roles is not detailed enough when dynamic attribute access control is controlled, while ABAC is complex in configuration and high management costs, resulting in low data access security and efficiency. .

Method used

A database access control method based on a mix of roles and attributes is adopted to divide database data through fine-grained classification, access permissions are calculated based on user roles, attributes and security policies, and role conflicts and priority are handled in permission verification, achieving dual control.

Benefits of technology

It improves the security and efficiency of data access, flexibly adjusts access control policies, adapts to complex environments, solves the problems of low data access security and efficiency, and responds flexibly in permission conflicts to ensure that users access resources with appropriate permissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119004505A_ABST
    Figure CN119004505A_ABST
Patent Text Reader

Abstract

The invention provides a database access control method and device based on role and attribute mixing, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the steps that a corresponding target database needing to be accessed is called, fine-grained division is carried out on data in the target database according to service requirements and security policies, and a unique identifier and a corresponding access permission are distributed to each data item or data set; when the target user accesses the target database, calculating an access permission corresponding to the target user based on the role and the attribute of the target user and a preset security policy; and when the user tries to access the database resources, verifying whether the corresponding access authority meets the requirement, determining whether to authorize access according to the verification result, and if the verification is successful, authorizing the target user to access. According to the method and the device, the problem that the security and the access efficiency of data access are not high in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a database access control method, device, electronic device and storage medium based on a mixture of roles and attributes. Background Art

[0002] With the rapid development and widespread application of information technology, enterprises, governments and other organizations have an increasing demand for data security and access control. Traditional access control methods, such as discretionary access control (DAC) and mandatory access control (MAC), have gradually become unable to meet complex and changing business needs and security requirements. Although DAC is flexible, it is difficult to implement a unified security policy; while MAC is strict, it is complex to configure and difficult to adapt to a dynamically changing environment.

[0003] In this context, role-based access control (RBAC) has gradually become the mainstream technology in the field of access control due to its flexibility and easy management. RBAC achieves centralized management of user access rights by assigning users to different roles, each of which is given a set of predefined permissions. However, with the complexity of application scenarios, the RBAC model that relies solely on roles is not detailed and flexible enough in some cases, especially when access control is required based on the dynamic attributes of users or resources; at the same time, attribute-based access control (ABAC), as an emerging access control model, introduces the dimension of attributes to make access control policies more detailed and dynamic. ABAC evaluates user access rights based on the real-time attributes of users, resources, and the environment, greatly improving the flexibility and adaptability of access control. However, ABAC also has problems such as complex configuration and high management costs, and may be difficult to intuitively understand and manage in some cases.

[0004] In view of the above problems, how to improve the security and efficiency of data access remains to be solved. Summary of the invention

[0005] The present application provides a database access control method, device, electronic device and storage medium based on a combination of roles and attributes, which can solve the problems of data access security and low access efficiency in related technologies. The technical solution is as follows: According to one aspect of the present application, a database access control method based on a mixture of roles and attributes includes: calling a target database that needs to be accessed, and dividing the data in the target database into fine-grained groups according to business requirements and security policies, wherein each data item or data set is assigned a unique identifier and corresponding access rights; when a target user accesses a target database, the access rights corresponding to the target user are calculated based on the target user's role, attributes, and preset security policies; when a user attempts to access a database resource, verifying whether the corresponding access rights meet the requirements, and deciding whether to authorize access based on the verification result; if the verification is successful, the target user is authorized to access.

[0006] In an exemplary embodiment, during the process of verifying whether the corresponding access rights meet the requirements, the method further includes: Retrieve the target user, and if the target user has multiple role identities, determine the target access data based on the role identity with the highest identity; Determine whether other role identities of the target user have permission conflicts with the target access data; If it does not exist, the target access data is retrieved and displayed to the target user.

[0007] In an exemplary embodiment, the method further comprises: If there is a permission conflict between the other role identities of the target user and the target access data, determine the conflicting role attributes; Retrieving priority data, wherein the priority data is used to automatically select a higher priority permission or condition when a conflict occurs; Determine the highest access permission based on the highest role identity of the target user; Based on the priorities of the highest access right and the conflicting role attribute in the priority data, if the priority of the highest access right is higher than the priority of the conflicting role attribute, it is determined that access is allowed, otherwise the data in the target database cannot be accessed.

[0008] In an exemplary embodiment, during the process of calculating the access rights corresponding to the target user, the method further includes: Retrieving the permission calculation model, wherein the training process of the permission calculation model includes: obtaining role data corresponding to various roles, various types of attribute data corresponding to each role data, a user may include multiple role data, one role data corresponds to multiple attribute data, each attribute data corresponds to a preset access right, determining a training data set based on the mapping relationship between the role data, the attribute data and the access right, inputting the training data set into the calculation training model, and determining the corresponding permission calculation model after the calculation training model training converges; Determine corresponding target role data and target attribute data based on the target user; The target role data and the target attribute data are input into a permission calculation model to determine corresponding access rights.

[0009] In an exemplary embodiment, the method further comprises: Retrieve the preset security policy; Determining, based on the received modification policy, a permission level for inputting the modification policy; Determine whether to modify the security policy based on the permission level, and if satisfied, modify the security policy based on the modification strategy.

[0010] In an exemplary embodiment, after each modification of the security policy or the access rights corresponding to the role, the method further includes: The permission calculation model is retrieved, and the modified security policy or access rights corresponding to the role are input into the permission calculation model training.

[0011] In an exemplary embodiment, if the target user needs to perform mandatory access, the method further includes: Acquire the execution work data of the target user; Based on the work attribute corresponding to the execution work data, judging whether the work data corresponds to a special attribute; If so, the target user is authorized to forcibly access the corresponding data.

[0012] According to one aspect of the present application, a database access control device based on a mixture of roles and attributes includes: A data retrieval module is used to retrieve the target database that needs to be accessed, and divide the data in the target database into fine-grained divisions according to business requirements and security policies, wherein each data item or data set is assigned a unique identifier and corresponding access rights; The access permission calculation module is used to calculate the access permission corresponding to the target user based on the role, attributes and preset security policy of the target user when the target user accesses the target database; The authorization module verifies whether the corresponding access rights meet the requirements when a user attempts to access database resources, and decides whether to authorize access based on the verification results. If the verification is successful, it is used to authorize the target user to access.

[0013] According to one aspect of the present application, an electronic device includes at least one processor and at least one memory, wherein the memory stores computer-readable instructions; the computer-readable instructions are executed by one or more of the processors, so that the electronic device implements the database access control method based on a mixture of roles and attributes as described above.

[0014] According to one aspect of the present application, a storage medium stores computer-readable instructions thereon, and the computer-readable instructions are executed by one or more processors to implement the above-mentioned database access control method based on a mixture of roles and attributes.

[0015] According to one aspect of the present application, a computer program product includes computer-readable instructions, which are stored in a storage medium. One or more processors of an electronic device read the computer-readable instructions from the storage medium, load and execute the computer-readable instructions, so that the electronic device implements the role-and-attribute hybrid database access control method as described above.

[0016] The beneficial effects of the technical solution provided by this application are: In the above technical solution, the target database that needs to be accessed can be retrieved first, and the data in the target database can be finely divided according to business needs and security policies; when the target user accesses the target database, the corresponding access rights of the target user are calculated based on the role, attributes and preset security policies of the target user; when the user tries to access the database resources, the corresponding access rights are verified to be in compliance with the requirements, and whether to authorize access is determined based on the verification results. If the verification is successful, the target user is authorized to access. Through the above solution, dual control of user access rights can be achieved. This dual control not only retains the convenience of RBAC in role allocation and authority aggregation, but also makes full use of ABAC's ability to dynamically evaluate based on user, resource and environmental attributes. Therefore, it is possible to flexibly adjust the access control strategy according to actual business scenarios and needs, and adapt to complex and changing environments, thereby effectively solving the problems of data access security and low access efficiency existing in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.

[0018] Figure 1 It is a schematic diagram of the implementation environment involved in this application; Figure 2 is a flow chart showing a database access control method based on a mixture of roles and attributes according to an exemplary embodiment; Figure 3 is a structural block diagram of a database access control device based on a mixture of roles and attributes according to an exemplary embodiment; DETAILED DESCRIPTION The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0019] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present disclosure refers to the presence of the features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0020] Glossary: Security policy is a set of rules for all security-related activities within a security zone (usually a set of processing and communication resources belonging to an organization). These rules are established by the security authority established in the security zone and described, implemented or realized by the security control organization. Security policy is an action strategy formulated by the network administrator or CIO based on the risks and security goals of the organization, designed to protect the organization's assets from unauthorized access, use, disclosure, interruption, modification or destruction.

[0021] User attributes may include identity information, organization information, security attributes, business attributes, and network status. The following is a detailed explanation of each attribute.

[0022] Identity information: Username / User ID: the name or identifier that uniquely identifies the user; Real name: the user's real name; Email address: the user's contact email address.

[0023] Organizational information: Department: the department or organizational unit to which the user belongs; Position / Role: the user's position or role in the organization (note that the role here may be different from the role concept in RBAC, it refers more to the user's position or responsibilities in the organizational structure); Workplace: the user's work place or geographical location.

[0024] Security attributes: Authentication method: the authentication method used by users to log into the system (such as password, two-factor authentication, etc.); Authentication level: the user's authentication security level or strength; Security checklist: whether the user has passed specific security training or audits.

[0025] Business attributes: Business permissions: the permissions a user has in a specific business area or application; Project associations: the projects or tasks a user is involved in; Scope of responsibilities: the tasks or operations a user is allowed or prohibited to perform based on his or her responsibilities.

[0026] Dynamic attributes: Time / Date: The time or date when the access request occurs, which can be used to implement time-based access control; Location: The user's current location information, such as the geographic location obtained through IP address, GPS, etc.; Network status: The type of network the user is connected to (such as internal network, VPN, public Wi-Fi, etc.) or status (such as online, offline).

[0027] As can be seen from the above, the related technologies still have defects in data access security and low access efficiency.

[0028] To this end, the database access control method based on a mixture of roles and attributes provided by the present application can effectively improve the accuracy of the database access control based on a mixture of roles and attributes. Accordingly, the database access control method based on a mixture of roles and attributes is applicable to a database access control device based on a mixture of roles and attributes. The database access control device based on a mixture of roles and attributes can be deployed in an electronic device. In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0029] Figure 1 The schematic diagram of the implementation environment involved in a database access control method based on a combination of roles and attributes includes a collection end and a service end.

[0030] See also Figure 2 The embodiment of the present application provides a database access control method based on a combination of roles and attributes. The method is applicable to an electronic device, which may be Figure 1 The server side in the implementation environment is shown.

[0031] In the following method embodiments, for ease of description, the execution subject of each step of the method is taken as an electronic device as an example for illustration, but this does not constitute a specific limitation.

[0032] like Figure 2 As shown, the method may include the following steps: S100, calling the target database that needs to be accessed, and dividing the data in the target database into fine-grained divisions according to business requirements and security policies.

[0033] Among them, each data item or data set is assigned a unique identifier and corresponding access rights. For different management departments, different enterprises and different user groups, when the target user logs in to the corresponding database, the target database that needs to be controlled can be determined based on the database logged in by the target user.

[0034] Here, "fine-grained division" refers to a more detailed and specific division of the data in the database to support more sophisticated access control policies. This division method is based on business needs and security policies, breaking down the data in the database into smaller units (such as single data items, records, data sets, etc.) in order to assign a unique identifier and corresponding access rights to each such unit.

[0035] S110, when a target user accesses a target database, the access rights corresponding to the target user are calculated based on the role, attributes and preset security policy of the target user.

[0036] It should be noted here that the preset security policy can be modified. The specific modification process includes the following steps: S111, retrieve the preset security policy.

[0037] S112: Determine the permission level for inputting the modification policy based on the received modification policy.

[0038] Among them, the modification strategy may be a modification instruction issued by a user with higher database management permissions, or it may be a modification instruction issued by the system based on long-term usage records. Each time the access permissions and security policies are modified, it is necessary to judge the permission level corresponding to the received modification instructions, and record the relevant data after each modification.

[0039] S113, judging whether to modify the security policy based on the authority level, and if satisfied, modifying the security policy based on the modification strategy.

[0040] When the modification permission level is met, the system can modify the data that needs to be modified immediately. When it is not met, a prompt indicating that the permission is not met can be displayed.

[0041] In addition, in the solution of the present application, in the process of calculating the access rights corresponding to the target user, the method specifically includes: S114, retrieve the pre-trained permission calculation model.

[0042] Among them, the training process of the permission calculation model includes: obtaining role data corresponding to various roles, various attribute data corresponding to each role data, a user can include multiple role data, one role data corresponds to multiple attribute data, each attribute data corresponds to a preset access right, and a training data set is determined based on the mapping relationship between role data, attribute data and access rights, and the training data set is input into the calculation training model. After the calculation training model converges, the corresponding permission calculation model is determined; for the permission calculation model trained in advance, it is only calculated based on the currently input role data and attribute data.

[0043] S115, determining corresponding target role data and target attribute data based on the target user; Among them, when accessing the database, the role with the highest access rights of the target user is generally selected as the target role data.

[0044] S116, inputting the target role data and the target attribute data into the permission calculation model to determine the corresponding access rights.

[0045] By selecting a pre-trained permission calculation model, the user's access rights can be accurately calculated at the first time every time a user accesses the database, thereby improving the efficiency of the user's access to the database.

[0046] S120, when a user attempts to access a database resource, verify whether the corresponding access permission meets the requirements, and decide whether to authorize access based on the verification result. If the verification is successful, the target user is authorized to access.

[0047] It should be pointed out here that since the target user may have multiple roles, some of the roles or corresponding attributes may conflict with the data to be accessed, that is, when a user is assigned to multiple roles, and these roles have different access rights to the same database, a permission conflict may occur; in attribute-based access control (ABAC), if multiple attribute conditions set contradictory requirements for access rights to the same database, permission conflicts may also occur. For example, a user's time attribute (such as non-working hours) may not meet the conditions for accessing a certain resource, but his role attribute (such as senior administrator) grants him access to the resource. In order to solve the problems encountered as soon as possible when the above situation occurs, taking the situation of role conflict as an example, that is, in the process of verifying whether the corresponding access rights meet the requirements, the method also includes: S121, retrieve the target user, and if the target user has multiple role identities, determine the target access data based on the role identity with the highest identity.

[0048] S122, determining whether other role identities of the target user have permission conflicts with the target access data.

[0049] Among them, if a user is both a project manager (with broad access rights to the project) and a data protection officer (with special restricted access rights to certain sensitive data), the permissions of the two roles may conflict with each other when accessing certain specific data.

[0050] S123: If it does not exist, the target access data is retrieved and displayed to the target user.

[0051] If it is determined that there is no conflict, the user can be authorized to access. If other role identities of the target user have a permission conflict with the target access data, the method also includes: S124, identify conflicting roles; S125, retrieve priority data.

[0052] Among them, the priority data is used to automatically select a higher priority permission or condition when a conflict occurs; S126, determining the highest access permission based on the highest role identity of the target user; S127, based on the priority of the highest access right and the priority of the conflicting role in the priority data, if the priority of the highest access right is higher than the priority of the conflicting role, it is determined that access is allowed, otherwise the data of the target database cannot be accessed.

[0053] Through the above process, if there is a conflict of permissions during database access, in some cases, the user can make a choice and present the conflict situation to the user, and the user can choose the appropriate access permission according to his own judgment. Through the preset priority rules or user selection, the system can flexibly deal with various complex permission conflicts and ensure that users can access the required resources according to the appropriate permissions.

[0054] It should be pointed out here that each time the relevant data in the database is modified, the permission calculation model needs to be trained and learned accordingly. For example, each time the security policy is modified or the access rights corresponding to the role are modified, the method also includes: calling the permission calculation model, and inputting the modified security policy or the access rights corresponding to the role into the permission calculation model training to ensure that the computing power of the permission calculation model can be updated as soon as possible.

[0055] In addition, if the target user needs to perform mandatory access, the method also includes: S116, obtaining the target user's execution work data.

[0056] S117, based on the work attribute corresponding to the execution work data, judging whether the work data corresponds to a special attribute; It should be pointed out here that if the user is performing some specific types of work, during this time, the system is set with access permissions that are different from previous regular work.

[0057] S118: If yes, authorize the target user to forcibly access the corresponding data.

[0058] The following is an embodiment of the device of the present application, which can be used to execute the database access control method based on role and attribute mixing involved in the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the method embodiment of the database access control method based on role and attribute mixing involved in the present application.

[0059] See also Figure 3 In the embodiment of the present application, a database access control device based on a mixture of roles and attributes is provided, including but not limited to: The data retrieval module 200 is used to retrieve the target database that needs to be accessed, and divide the data in the target database into fine-grained divisions according to business requirements and security policies, wherein each data item or data set is assigned a unique identifier and corresponding access rights; The access permission calculation module 210 is used to calculate the access permission corresponding to the target user based on the role, attribute and preset security policy of the target user when the target user accesses the target database; The authorization module 220 verifies whether the corresponding access rights meet the requirements when the user attempts to access the database resources, and decides whether to authorize the access based on the verification result. If the verification is successful, it is used to authorize the target user to access.

[0060] In an exemplary embodiment, the device further includes but is not limited to: The target access data determination module retrieves the target user. If the target user has multiple roles, the highest role is used to determine the target access data. The permission conflict judgment module is used to judge whether other role identities of the target user have permission conflicts with the target access data; If it does not exist, the target access data is retrieved and displayed to the target user.

[0061] In an exemplary embodiment, the device further includes but is not limited to: The conflicting role determination module is used to determine the conflicting role if the other role identities of the target user conflict with the target access data; A priority data module, used to retrieve priority data, wherein the priority data is used to automatically select a higher priority permission or condition when a conflict occurs; The highest access permission determination module is used to determine the highest access permission based on the highest role identity of the target user; The access determination module is based on the priority of the highest access right and the conflicting role in the priority data. If the priority of the highest access right is higher than the priority of the conflicting role, it is used to determine whether access can be made. Otherwise, the data in the target database cannot be accessed.

[0062] In an exemplary embodiment, the device further includes but is not limited to: The permission calculation model calling module is used to call the permission calculation model, wherein the training process of the permission calculation model includes: obtaining role data corresponding to various roles, various attribute data corresponding to each role data, a user can include multiple role data, one role data corresponds to multiple attribute data, each attribute data corresponds to a preset access right, based on the mapping relationship between the role data, attribute data and access right, the training data set is determined, the training data set is input into the calculation training model, and the corresponding permission calculation model is determined after the calculation training model training converges; A data determination module, used to determine corresponding target role data and target attribute data based on the target user; The access permission determination module inputs the target role data and the target attribute data into the permission calculation model to determine the corresponding access permission.

[0063] In an exemplary embodiment, the device further includes but is not limited to: A security policy retrieval module is used to retrieve preset security policies; an authority level determination module, based on the received modification policy and used to determine the authority level of the input modification policy; The permission level judgment module is used to judge whether to modify the security policy based on the permission level. If the permission level is met, the security policy is modified based on the modification strategy.

[0064] In an exemplary embodiment, the device further includes but is not limited to: The model secondary training module calls the permission calculation model and inputs the access rights corresponding to the modified security policy or role into the permission calculation model for training.

[0065] In an exemplary embodiment, the device further includes but is not limited to: An execution work data acquisition module is used to acquire the execution work data of the target user; A special attribute judgment module is used to judge whether the work attribute corresponding to the executed work data corresponds to a special attribute based on the work data; The mandatory access authorization module, if yes, is used to authorize the target user to mandatory access the corresponding data.

[0066] It should be noted that the database access control device based on a mixture of roles and attributes provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when performing database access control based on a mixture of roles and attributes. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the database access control device based on a mixture of roles and attributes will be divided into different functional modules to complete all or part of the functions described above.

[0067] In addition, the database access control device based on a mixture of roles and attributes and the database access control method based on a mixture of roles and attributes provided in the above embodiments belong to the same concept, and the specific manner in which each module performs operations has been described in detail in the method embodiments and will not be repeated here.

[0068] According to one aspect of the present application, an electronic device includes at least one processor and at least one memory, wherein the memory stores computer-readable instructions; the computer-readable instructions are executed by one or more of the processors, so that the electronic device implements the database access control method based on a mixture of roles and attributes as described above.

[0069] In addition, an embodiment of the present application provides a storage medium on which computer-readable instructions are stored. The computer-readable instructions are executed by one or more processors to implement the database access control method based on a mixture of roles and attributes as described above.

[0070] In an embodiment of the present application, a computer program product is provided, which includes computer-readable instructions. The computer-readable instructions are stored in a storage medium. One or more processors of an electronic device read the computer-readable instructions from the storage medium, load and execute the computer-readable instructions, so that the electronic device implements the database access control method based on a mixture of roles and attributes as described above.

[0071] Compared with the related technologies, the target database that needs to be accessed can be retrieved first, and the data in the target database can be finely divided according to business needs and security policies; when the target user accesses the target database, the corresponding access rights of the target user are calculated based on the role, attributes and preset security policies of the target user; when the user tries to access the database resources, the corresponding access rights are verified to meet the requirements, and whether to authorize access is determined based on the verification results. If the verification is successful, the target user is authorized to access. Through the above scheme, dual control of user access rights can be achieved. This dual control not only retains the convenience of RBAC in role allocation and permission aggregation, but also makes full use of ABAC's ability to dynamically evaluate based on user, resource and environmental attributes. Therefore, according to actual business scenarios and needs, the access control strategy can be flexibly adjusted to adapt to complex and changing environments, so as to effectively solve the problems of data access security and low access efficiency in related technologies; and in the stage of permission conflicts, through preset priority rules or user selection, the system can flexibly respond to various complex permission conflicts to ensure that users can access the required resources according to appropriate permissions.

[0072] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0073] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A database access control method based on a mixture of roles and attributes, characterized in that: include: Retrieve the target database that needs to be accessed, and divide the data in the target database into fine-grained divisions according to business requirements and security policies, wherein each data item or data set is assigned a unique identifier and corresponding access rights; When the target user accesses the target database, the target user's corresponding access rights are calculated based on the target user's role, attributes, and preset security policies; When a user attempts to access a database resource, the corresponding access permission is verified to see if it meets the requirements, and a decision is made based on the verification result whether to authorize access. If the verification is successful, the target user is authorized to access.

2. The method according to claim 1, characterized in that In the process of verifying whether the corresponding access rights meet the requirements, the method further includes: Retrieve the target user, and if the target user has multiple role identities, determine the target access data based on the role identity with the highest identity; Determine whether other role identities of the target user have permission conflicts with the target access data; If it does not exist, the target access data is retrieved and displayed to the target user.

3. The method according to claim 2, characterized in that in, The method also includes: If there is a permission conflict between the other role identities of the target user and the target access data, determine the conflicting role; Retrieving priority data, wherein the priority data is used to automatically select a higher priority permission or condition when a conflict occurs; Determine the highest access permission based on the highest role identity of the target user; Based on the highest access right and the priority of the conflicting role in the priority data, if the priority of the highest access right is higher than the priority of the conflicting role, it is determined that access is allowed, otherwise the data in the target database cannot be accessed.

4. The method according to claim 1, characterized in that In the process of calculating the access rights corresponding to the target user, the method further includes: Retrieving the permission calculation model, wherein the training process of the permission calculation model includes: obtaining role data corresponding to various roles, various types of attribute data corresponding to each role data, a user may include multiple role data, one role data corresponds to multiple attribute data, each attribute data corresponds to a preset access right, determining a training data set based on the mapping relationship between the role data, the attribute data and the access right, inputting the training data set into the calculation training model, and determining the corresponding permission calculation model after the calculation training model training converges; Determine corresponding target role data and target attribute data based on the target user; The target role data and the target attribute data are input into a permission calculation model to determine corresponding access rights.

5. The method according to claim 4, characterized in that The method further comprises: Retrieve the preset security policy; Determining, based on the received modification policy, a permission level for inputting the modification policy; Determine whether to modify the security policy based on the permission level, and if satisfied, modify the security policy based on the modification strategy.

6. The method according to claim 5, characterized in that After each modification of the security policy or the access rights corresponding to the role, the method further includes: The permission calculation model is retrieved, and the modified security policy or access rights corresponding to the role are input into the permission calculation model training.

7. The method according to claim 1, characterized in that If the target user needs to perform mandatory access, the method further includes: Acquire the execution work data of the target user; Based on the work attribute corresponding to the execution work data, judging whether the work data corresponds to a special attribute; If so, the target user is authorized to forcibly access the corresponding data.

8. A database access control device based on a mixture of roles and attributes, characterized in that: include: A data retrieval module is used to retrieve the target database that needs to be accessed, and divide the data in the target database into fine-grained divisions according to business requirements and security policies, wherein each data item or data set is assigned a unique identifier and corresponding access rights; The access permission calculation module is used to calculate the access permission corresponding to the target user based on the role, attributes and preset security policy of the target user when the target user accesses the target database; The authorization module verifies whether the corresponding access rights meet the requirements when a user attempts to access database resources, and decides whether to authorize access based on the verification results. If the verification is successful, it is used to authorize the target user to access.

9. An electronic device, characterized in that: include: at least one processor and at least one memory, wherein: The memory has computer-readable instructions stored thereon; The computer-readable instructions are executed by one or more of the processors, so that the electronic device implements the database access control method based on a mixture of roles and attributes as described in any one of claims 1 to 7.

10. A storage medium having computer-readable instructions stored thereon, characterized in that: The computer-readable instructions are executed by one or more processors to implement the database access control method based on a combination of roles and attributes as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Access control method and system based on attribute and role

    CN104243453A

  • Permission control method of database, computer equipment and storage medium

    CN110941853A

Cited By

  • Two-stage user access authentication authorization method based on network twinning

    CN120602149A