Chain type tracking auditing method and system based on user tags
The chain tracking audit method based on user tags solves the problem of unable to capture unauthorized operations in a multi-tenant cloud database environment, realizes full-link account audit, reduces the risk of information theft, and enhances database security.
Patent Information
- Application Number
- CN202410847990.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-17
AI Technical Summary
In a multi-tenant, multi-account cloud database environment, the existing audit system cannot effectively capture and track unauthorized operations between tenants, resulting in a high risk of information theft and the inability to implement full-link account auditing.
Adopting a chain tracking audit method based on user tags, by receiving and parsing user requests, grouping data flows, labeling and chaining end users, matching rules and conducting audits, and using hash algorithms to achieve account chain matching and permission control. Keep audit logs.
It implements full-link account auditing in multi-tenant scenarios, can quickly track and match tags on the account chain, locate potential malicious requests, reduce security losses, and enhance the transparency and accuracy of database permission auditing.
Smart Images

Figure CN118656402A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of database auditing, and in particular relates to a chain tracking auditing method and system based on user tags. Background Art
[0002] Migrating databases to the cloud has become a trend. Its high efficiency and convenience have enabled it to be quickly applied in various industries. However, the cloud environment is complex, especially in multi-tenant and multi-account scenarios. Terminal permission theft incidents occur frequently, especially at the database level. If information is stolen due to account permission issues, it will bring immeasurable losses. Therefore, a complete multi-terminal account permission audit function is particularly important.
[0003] For the current data-related audit system solutions, most of their functions focus on log storage performance, query performance, real-time monitoring, audit analysis, etc., but they lack consideration for the multi-tenant, multi-account cloud terminal scenarios of the database. The core problem that this patent mainly solves is: to open up full-link account auditing in multi-tenant scenarios, and to solve the current problem of unauthorized operations on the database between tenants, which cannot be captured by the audit system. Summary of the invention
[0004] In view of the above deficiencies in the prior art, the purpose of the invention is to provide a chain tracking audit method and system based on user tags.
[0005] A first aspect of the present invention provides a chain tracking audit method based on user tags, comprising:
[0006] S1: Receive and parse a user request to obtain request data including at least a database account;
[0007] S2: Grouping the request data according to the user request to obtain a grouped data stream;
[0008] S3: marking the packet data stream as a terminal user and chaining it to obtain chained data;
[0009] S4: performing rule matching on the front-end request through the chained data to obtain a matching result;
[0010] S5: Perform an audit based on the matching result.
[0011] According to a chain tracking audit method based on user tags provided by the present invention, the request data in step S1 includes: user request and SQL set.
[0012] According to a chain tracking audit method based on user tags provided by the present invention, in step S2, the rule for grouping the request data is: request; [database account; SQL set].
[0013] According to a chain tracking audit method based on user tags provided by the present invention, step S2 also includes:
[0014] A non-preprocessed group is established, and when there is an undirected classified SQL set in the request data, the undirected classified SQL set is grouped into the non-preprocessed group.
[0015] According to a user tag-based chain tracking audit method provided by the present invention, the packet data flow in step S2 is implemented based on a reconfigurable data flow unit.
[0016] According to a chain tracking audit method based on user tags provided by the present invention, in step S3, the step of marking the packet data flow by the terminal user further includes:
[0017] S31: polling the packet data stream to obtain polling data, where the polling data includes header data of a source file corresponding to the packet data stream, a terminal user account and cookie data;
[0018] S32: performing aggregate hash calculation on the server component server and the terminal user account to obtain a globally unique secret code;
[0019] S33: Replace all security identifiers in the packet data flow with the secret code to complete the terminal user tagging.
[0020] According to a chain tracking audit method based on user tags provided by the present invention, step S4 further includes:
[0021] S41: receiving a front-end request;
[0022] S42: Perform hash calculation on the server and the logged-in user in the front-end request to obtain a hash value to be verified;
[0023] S43: matching the hash value to be verified with the hash code in the chained data, and when the match succeeds, parsing the matched hash code and tracing back to obtain the corresponding terminal user information;
[0024] S44: Match the terminal user information with the database in the chained data, and when the match is successful, obtain a matching result, and route the front-end request to the corresponding database.
[0025] According to a chain tracking audit method based on user tags provided by the present invention, step S44 also includes:
[0026] When the terminal user information fails to match the database in the chained data, a matching result is obtained and an authority control alarm is triggered.
[0027] According to a chain tracking audit method based on user tags provided by the present invention, the matching result recording and auditing in step S5 are implemented through audit logs.
[0028] A second aspect of the present invention provides a chain tracking audit system based on user tags, which is used to execute a chain tracking audit method based on user tags as described in any one of the above items, comprising:
[0029] Parsing module: used to receive and parse user requests and obtain request data including at least a database account;
[0030] Grouping module: used for grouping the request data obtained by the parsing module according to the user request to obtain a grouped data stream;
[0031] Marking module: used for marking the packet data stream obtained by the grouping module with terminal users and chaining it to obtain chained data;
[0032] Matching module: used to match the front-end request with the chained data obtained by the marking module to obtain the matching result;
[0033] Log module: used to record the matching results obtained by the matching module and provide auditing.
[0034] The beneficial effects of the present invention are as follows:
[0035] The present invention provides a chain tracking audit method and system based on user tags, which tags the account of each calling node, and uniformly groups and stores the upstream and downstream account call chains at the audit level, so that they can be quickly tracked through the tags on the account chain when doing permission audits; and the upstream and downstream account information is labeled and chained, which is convenient for later permission matching and restriction; at the LRDU algorithm level, the binary hashing method is used to quickly group and locate the account position, and the undefined potential malicious requests are located by reverse tracking; the LRDU algorithm is also used to parse upstream requests to make the account information of each calling node transparent. The present invention provides a chain tracking audit method and system based on user tags, which generally opens up the full-link account audit in multi-tenant scenarios, and solves the problem that the current tenants cannot capture the problem of unauthorized operations on the database, which cannot be captured by the audit system. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
[0037] Figure 1 A flowchart of a chain tracking audit method based on user tags provided by an embodiment of the present invention;
[0038] Figure 2 A schematic diagram of the structure of a chain tracking audit system based on user tags provided in an embodiment of the present invention.
[0039] Reference numerals:
[0040] 100, parsing module; 200, grouping module; 300, marking module; 400, matching module; 500, logging module. DETAILED DESCRIPTION
[0041] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.
[0042] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.
[0043] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.
[0045] In order to better understand the embodiments of the present invention, the technical problem to be solved by the present invention is first described below by way of example.
[0046] In a multi-layer database management system, terminal user information is independently maintained by the upper-layer application system and is transparent to the underlying database. It is separated from the entire user call chain and poses many security risks. For example, in a multi-tenant, multi-account cloud office scenario, tenant B steals tenant A's database account information, that is, has all the database operation permissions of tenant A. During tracking, only the abnormal SQL executed by database account α of database account A can be traced, and tenant A or tenant B cannot be perceived.
[0047] In order to solve the above problems, the present invention provides a chain tracking audit method and system based on user tags. Figure 1 to Figure 2 Embodiments of the present invention are described.
[0048] A first aspect of the present invention provides a chain tracking audit method based on user tags, comprising:
[0049] S1: Receive and parse a user request to obtain request data including at least a database account;
[0050] The request data in step S1 includes: user request and SQL set.
[0051] In step S1, the database management system first obtains Request (request), DBLoginUser (DB database login user) and SQL set by parsing the request, and outputs the request data as a triplet to perform corresponding grouping in step S2.
[0052] S2: Grouping the request data according to the user request to obtain a grouped data stream;
[0053] Wherein, the packet data flow in step S2 is implemented based on a reconfigurable data flow unit.
[0054] After step S1, the database management system asynchronously pushes the triple log {Req, DBUser, SQL set}, and then composes the RDU model based on the triple components, wherein the RDU is the core of its architecture, which is the reconfigurable data flow unit (RDU). The RDU model is based on the data flow architecture and can more effectively handle the data flow in ML tasks and the changing workload requirements, thereby providing higher performance and lower latency than traditional computing architectures.
[0055] Wherein, in step S2, the rule for grouping the request data is: request; [database account; SQL set].
[0056] Wherein, step S2 also includes:
[0057] A non-preprocessed group is established, and when there is an undirected classified SQL set in the request data, the undirected classified SQL set is grouped into the non-preprocessed group.
[0058] The specific process of step S2 is as follows: first, request the chain, group the database accounts and SQL sets under the same request through the compiled encrypted file ID (cxt id), where the grouping rule is "request: {database account: SQL set}", and group the SQL sets that are not targeted and classified as "udefine", and reversely trace the requests triggered by the terminal, and finally output the grouped RDU model.
[0059] S3: marking the packet data stream as a terminal user and chaining it to obtain chained data;
[0060] In step S3, the RDU model obtained in step S2 is firstly marked with the terminal user, and then the various data elements or nodes in the data stream are connected in a certain logical order to form a chain data structure, which can be more conducive to forming an efficient, flexible and easy-to-manage chain data structure for subsequent matching.
[0061] Wherein, in step S3, the step of marking the packet data flow by the terminal user further comprises:
[0062] S31: polling the packet data stream to obtain polling data, where the polling data includes header data of a source file corresponding to the packet data stream, a terminal user account and cookie data;
[0063] S32: performing aggregate hash calculation on the server component server and the terminal user account to obtain a globally unique secret code;
[0064] The server component server mentioned above is rscHost, which represents a component that only obtains data from a data source.
[0065] S33: Replace all security identifiers in the packet data flow with the secret code to complete the terminal user tagging.
[0066] The specific process of steps S31 to S33 is to first poll the RDU model to obtain document metadata (source head), cookies, and terminal user accounts (loginUser), and then aggregate and hash the server-side component server (rscHost) and terminal user accounts to obtain a globally unique password (key c); replace the security identifier (Rsid) in the RDU model in turn; and finally chain the RDU for subsequent request matching.
[0067] S4: performing rule matching on the front-end request through the chained data to obtain a matching result;
[0068] Wherein, step S4 further comprises:
[0069] S41: receiving a front-end request;
[0070] S42: Perform hash calculation on the server and the logged-in user in the front-end request to obtain a hash value to be verified;
[0071] S43: matching the hash value to be verified with the hash code in the chained data, and when the match succeeds, parsing the matched hash code and tracing back to obtain the corresponding terminal user information;
[0072] S44: Match the terminal user information with the database in the chained data, and when the match is successful, obtain a matching result, and route the front-end request to the corresponding database.
[0073] Wherein, step S44 also includes:
[0074] When the terminal user information fails to match the database in the chained data, a matching result is obtained and an authority control alarm is triggered.
[0075] The specific process of steps S41 to S44 is as follows: first, a Request is received, and then a hash key value is calculated through the tuple [host, loginUser]. The hash key value is used to query whether there is a corresponding hash code in the LRDU. If not, the request is routed to the RDU module for temporary calculation. That is, the Request for which there is no corresponding hash code is stored through steps S1 to S3. If it exists, the hash code is parsed, and the terminal user information is traced back on the LDRU chain. The user information is then matched with the chained data in step S3 for DBUser. If the match is successful, it is routed to the corresponding DB database. If the match is unsuccessful, the permission control rule is triggered and an alarm is issued. At the same time, both the successful matching results and the unsuccessful matching results are recorded in the audit log for external auditing.
[0076] S5: Perform an audit based on the matching result.
[0077] The matching result recording and auditing in step S5 are implemented through the audit log.
[0078] A second aspect of the present invention provides a chain tracking audit system based on user tags, which is used to execute a chain tracking audit method based on user tags as described in any one of the above items, comprising:
[0079] Parsing module 100: used to receive and parse user requests, and obtain request data including at least a database account;
[0080] Grouping module 200: used to group the request data obtained by the parsing module 100 according to the user request to obtain a grouped data stream;
[0081] The marking module 300 is used to mark the packet data stream obtained by the grouping module 200 with terminal users and to chain the packet data stream to obtain chained data;
[0082] Matching module 400: used to perform rule matching on the front-end request through the chained data obtained by the marking module 300 to obtain a matching result;
[0083] Log module 500: used to record the matching results obtained by the matching module 400 and provide auditing.
[0084] The present invention provides a chain tracking audit system based on user tags. The overall solution is implemented by an Rlog unit for composing an RDU model according to ternary components, an AG Module unit for implementing terminal user tags on the RDU model and chaining it, a Match Module unit for receiving front-end requests for reverse tracking and rule matching, and an Audit Log unit for collecting matching results and providing audit output to the outside.
[0085] The present invention provides a chain tracking audit method and system based on user tags, which obtain Request, DBLoginUser and SQL by parsing the request, and calculate the RDU model as a triple, and use the marking algorithm to mark the RDU model by user, group the marked RDU model by request, and chain it, and each subsequent request to the database will be matched through LRDU, and the access permission control for the terminal user can be set at the same time. For the current cloud computing multi-tenant scenario, it can solve the defect of failing to open up the full-link account audit in the SQL audit field, and can enable the terminal user to be captured by the underlying audit component. When the database account is stolen by any other terminal account and malicious SQL is executed, the source can be traced at the audit level to reduce security losses.
[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.
Claims
1. A chain tracking audit method based on user tags, characterized in that: include: S1: Receive and parse a user request to obtain request data including at least a database account; S2: Grouping the request data according to the user request to obtain a grouped data stream; S3: marking the packet data stream as a terminal user and chaining it to obtain chained data; S4: performing rule matching on the front-end request through the chained data to obtain a matching result; S5: Perform an audit based on the matching result.
2. A chain tracking audit method based on user tags according to claim 1, characterized in that: The request data in step S1 includes: user request and SQL set.
3. A chain tracking audit method based on user tags according to claim 2, characterized in that: In step S2, the rule for grouping the request data is: request; [database account; SQL set].
4. A chain tracking audit method based on user tags according to claim 2, characterized in that: Step S2 also includes: A non-preprocessed group is established, and when there is an undirected classified SQL set in the request data, the undirected classified SQL set is grouped into the non-preprocessed group.
5. A chain tracking audit method based on user tags according to claim 1, characterized in that: The packet data flow in step S2 is implemented based on a reconfigurable data flow unit.
6. A chain tracking audit method based on user tags according to claim 1, characterized in that: In step S3, the step of marking the packet data flow with a terminal user further comprises: S31: polling the packet data stream to obtain polling data, where the polling data includes header data of a source file corresponding to the packet data stream, a terminal user account and cookie data; S32: performing aggregate hash calculation on the server component server and the terminal user account to obtain a globally unique secret code; S33: Replace all security identifiers in the packet data flow with the secret code to complete the terminal user tagging.
7. A chain tracking audit method based on user tags according to claim 1, characterized in that: Step S4 further comprises: S41: receiving a front-end request; S42: Perform hash calculation on the server and the logged-in user in the front-end request to obtain a hash value to be verified; S43: matching the hash value to be verified with the hash code in the chained data, and when the match succeeds, parsing the matched hash code and tracing back to obtain the corresponding terminal user information; S44: Match the terminal user information with the database in the chained data, and when the match is successful, obtain a matching result, and route the front-end request to the corresponding database.
8. A chain tracking audit method based on user tags according to claim 7, characterized in that: Step S44 also includes: When the terminal user information fails to match the database in the chained data, a matching result is obtained and an authority control alarm is triggered.
9. A chain tracking audit method based on user tags according to claim 1, characterized in that: The matching result recording and auditing in step S5 is implemented through the audit log.
10. A chain tracking audit system based on user tags, used to execute a chain tracking audit method based on user tags as claimed in any one of claims 1 to 9, characterized in that: include: Parsing module: used to receive and parse user requests and obtain request data including at least a database account; Grouping module: used for grouping the request data obtained by the parsing module according to the user request to obtain a grouped data stream; Marking module: used for marking the packet data stream obtained by the grouping module with terminal users and chaining it to obtain chained data; Matching module: used to match the front-end request with the chained data obtained by the marking module to obtain the matching result; Log module: used to record the matching results obtained by the matching module and provide auditing.
Citation Information
Patent Citations
Uniform safety management and comprehensive audit system
CN103326883A
Network game security management system device and method
CN108377231A
Database three-layer association auditing method and device, computer equipment and storage medium
CN113067886A
Three-layer auditing method under micro-service distributed scene
CN113986895A
Authentication system and authentication method
WO2013008352A1
