A method and system for intelligent verification and anomaly warning of account permissions
By combining API call relationships and authentication subjects after account permission changes, the system can pinpoint deviations in account permission calls, solving the problem of difficulty in accurately locating abnormal account permissions in existing technologies and achieving more accurate permission verification and anomaly warning.
Patent Information
- Application Number
- CN202611290247.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-10
AI Technical Summary
Existing technologies struggle to accurately verify and locate abnormal account permissions, especially in multi-level API call relationships. When account permissions change, it is difficult to detect permission anomalies caused by indirect calls, leading to inaccurate identification of the cause of the anomaly and affecting permission risk warnings and subsequent processing.
By obtaining the interface operation authorization results before and after the target account permission change, invalid operations are identified. Combined with the interface call relationship and authentication subject, the retained entry point and actual path are determined. The actual authentication subject and execution result of each level of call are verified step by step to locate the authorization deviation call and generate abnormal results.
It improves the accuracy and reliability of account permission verification and anomaly warning, and can detect indirect permission anomalies that are difficult to identify through direct permission verification alone. It can accurately locate permission deviations, generate anomaly results in a timely manner, and provide a basis for permission risk warning and configuration correction of application systems.
Smart Images

Figure CN123069402A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer information security technology, and in particular to a method and system for intelligent verification of account permissions and abnormal warning. Background Technology
[0002] As application systems become increasingly complex, account access control typically involves multiple interface operations, call chains, and authentication entities. When account roles, organizational affiliations, or permission configurations change, the system needs to synchronously adjust the corresponding interface access permissions to prevent accounts whose permissions have been revoked from continuing to access restricted resources. Existing permission verification methods usually match the account's current permission information with interface access rules, or verify whether the permission configuration is effective by sending an access request to the target interface, thereby identifying whether an account is engaging in access behavior beyond its current permission scope.
[0003] However, in application systems with multi-level interface call relationships, an interface operation directly triggered by an account may continue to call multiple downstream interfaces, and different levels of calls may use different authentication entities. When account permissions change, even if the account's direct access to a failed operation has been correctly denied, it may still enter the downstream call chain through other interfaces that remained accessible before and after the permission change, and successfully execute the failed operation during the call process due to the change in authentication entity. Therefore, verifying only the results of direct account access or static permission configuration is insufficient to detect such permission anomalies caused by indirect calls.
[0004] Furthermore, existing permission verification methods often struggle to analyze abnormal call processes step-by-step by combining the actual call path, the authentication entities at each level of the call, and the execution results. When permission deviations exist in the actual call chain, it is difficult to accurately determine the point where the target account's permissions begin to deviate from the actual execution permissions, leading to inaccurate anomaly localization and affecting permission risk warnings and subsequent processing. Therefore, an account permission verification method is needed that can combine permission change status and the actual interface call process to verify direct access results and indirect call results, and locate the point of authorization deviation in the actual call path. Summary of the Invention
[0005] The purpose of this application is to solve the problem of difficulty in accurately verifying and locating abnormal account permissions.
[0006] According to one aspect of this application, a method for intelligent verification and anomaly warning of account permissions is provided, applied to an application system where account permissions have changed, including: Obtain the authorization results of interface operations before and after the change of permissions for the target account, and identify interface operations whose authorization results change from allowed to denied as invalid operations; Obtain the interface call relationship and the authentication subject of each call configuration. From the interface operations that are allowed before and after the permission change, determine the interface operation that corresponds to the invalid operation in the last level call of the downstream call chain and has at least one set of adjacent calls with different authentication subjects as the reserved entry point. Obtain the changed account authentication information and the corresponding account authentication subject, initiate the invalidation operation with the account authentication information and obtain the direct authorization result; if rejected, trigger the reserved entry with the account authentication information. Obtain the call record triggered by the reserved entry point. If there is a target call that successfully executes the failed operation, determine the actual path from the reserved entry point to the target call based on the call record, and obtain the actual authentication subject and execution result of each level of call. The actual authentication subject is filtered according to the actual path sequence, and calls that are different from the account authentication subject are selected. The corresponding target account authorization result is determined according to the current permission information of the target account and the access rules of each filtered call. From the filtered calls where the authorization result for the target account is denied and the execution result is successful, the call that is first in the actual path order is identified as the authorization deviation call, and an abnormal result is generated.
[0007] Preferably, the determination of the authorized deviance call includes: From the filtered calls, calls where the target account authorization result is rejected and the execution result is successful are selected to obtain deviation candidate calls; Obtain the previous call of each of the deviation candidate calls in the actual path, and obtain the access rule corresponding to each of the previous calls to obtain the previous access rule; Based on the current permission information of the target account and each of the previous access rules, determine the previous authorization result corresponding to each previous call; From the candidate calls for deviation that are allowed according to the previous authorization result, the call that is first in the actual path order is determined as the authorized deviation call, and the call relationship between the corresponding previous call and the authorized deviation call is determined as the authorized deviation boundary.
[0008] Preferably, the determination of the previous authorization result and the target account authorization result includes: Each previous call and each deviation candidate call are determined as calls to be judged, and each previous access rule and each access rule corresponding to the deviation candidate call are determined as the judgment access rule corresponding to each call to be judged. Obtain the call parameters of each of the calls to be determined and the actual permission information associated with the corresponding actual authentication subject; Extract the parameter items involved in the authorization determination from each of the access determination rules, and extract the parameter values from the corresponding call parameters according to the parameter items to obtain the call condition data; The actual permission information and the corresponding call condition data are input into the corresponding access judgment rule to obtain the actual rule authorization result; If the actual rule authorization result is allowed, keep the corresponding call condition data and the access judgment rule unchanged, replace the actual permission information with the current permission information of the target account, re-perform the authorization judgment, and obtain the replacement authorization result; The replacement authorization result corresponding to each of the previous calls is determined as the previous authorization result, and the replacement authorization result corresponding to each of the deviation candidate calls is determined as the target account authorization result.
[0009] Preferably, the determination of the access rules and the call condition data includes: Obtain the rule version identifier and parameter snapshot corresponding to each call to be judged from the call record; Obtain the corresponding access rule snapshot according to the rule version identifier, and determine the access rule snapshot as the corresponding judgment access rule; The call parameters are obtained from the parameter snapshot, the parameter items participating in the authorization determination are extracted from the access rule snapshot, and the parameter values are extracted from the corresponding call parameters according to the parameter items to obtain the call condition data; Keeping the access rule snapshot and the invocation condition data unchanged, authorization determination is performed based on the actual permission information and the current permission information of the target account, respectively, to obtain the actual rule authorization result and the replacement authorization result.
[0010] Preferably, determining the target call includes: Obtain the operation identifier and access object identifier corresponding to the invalidation operation initiated with the account authentication information, and determine them as the invalidation operation identifier and target object identifier, respectively; Obtain the record operation identifier, record object identifier, and record execution result corresponding to each of the aforementioned call records; From each of the call records, select the call records where the record operation identifier matches the failed operation identifier, the record object identifier matches the target object identifier, and the record execution result is successful, and determine the corresponding call as the target call.
[0011] Preferably, the determination of the actual path includes: Obtain the entry call identifier corresponding to the reserved entry from the call record, and obtain the call identifier and parent call identifier corresponding to each call record; Starting with the call identifier corresponding to the target call, the parent call is determined level by level according to the parent call identifier until the call with the entry call identifier is determined; The determined calls are arranged according to the call order from the reserved entry point to the target call to obtain a candidate call sequence, and the actual path is determined based on the candidate call sequence.
[0012] Preferably, the determination of the actual path further includes: Obtain the first permission configuration version identifier and the first rule version identifier corresponding to the invalidation operation initiated with the account authentication information, and obtain the second permission configuration version identifier and the second rule version identifier corresponding to the target call occurring; Determine whether the first permission configuration version identifier and the second permission configuration version identifier are consistent, and determine whether the first rule version identifier and the second rule version identifier are consistent; If all are consistent, the candidate call sequence is determined as the actual path.
[0013] Preferably, obtaining the interface operation authorization result includes: Obtain the first account permission information before the target account permission change, the second account permission information after the permission change, and the interface access rules corresponding to each interface operation; Based on the first account permission information and the second account permission information, authorization determination is performed in conjunction with the access rules of each interface to obtain the first authorization result and the second authorization result corresponding to each interface operation. The first authorization result and the second authorization result are respectively determined as the interface operation authorization results before and after the permission change.
[0014] Preferably, determining the reserved inlet includes: Candidate entry points are determined from interface operations where both the first and second authorization results are allowed; Based on the interface call relationship, downstream calls are determined step by step from each of the candidate entry points until the candidate call chain corresponding to the failed operation of the final call is obtained; Obtain the authentication configuration corresponding to each call in each of the candidate call chains, extract the authentication subject from each authentication configuration, and obtain the candidate authentication subject corresponding to each call; Determine whether there are different candidate authentication subjects in adjacent calls in each of the candidate call chains. If so, determine the corresponding candidate entry as the reserved entry.
[0015] This application also provides an intelligent account permission verification and anomaly warning system, which, when running, executes the intelligent account permission verification and anomaly warning method as described in any of the above claims, including: The data management module is used to obtain account permission data, interface call data and authentication data from the application system, and output the obtained data to the verification module; The verification module, connected to the data management module, is used to receive the account permission data, the interface call data and the authentication data, determine the invalidation operation and the reserved entry corresponding to the permission change, and output the verification data and call records to the analysis module. The analysis module, connected to the verification module, is used to receive the verification data and the call record, determine the actual path and authorized deviation call, and generate abnormal results.
[0016] This application offers the following advantages: By obtaining the interface operation authorization results before and after the target account's permission changes, invalid operations whose permissions have been revoked are identified. Combined with the interface call relationships and the authentication subjects configured for each call, reserved entry points that can indirectly reach the invalid operations and have changed authentication subjects are determined from the interfaces that remain accessible after the permission changes. After confirming that the target account's direct execution of the invalid operation is rejected, the reserved entry point is triggered using the same account's authentication information. The actual path between the reserved entry point and the target call that successfully executes the invalid operation is determined based on the actual call records. Furthermore, by combining the actual authentication subjects, execution results, the target account's current permission information, and access rules at each level of the call, the authorization results of the target account are determined step by step, and the first authorization deviation call in the actual path that should have been rejected by the target account but was actually successfully executed is located. Therefore, indirect permission anomalies that are difficult to identify through direct permission verification or static permission configuration alone can be detected, and the location of permission deviations can be accurately pinpointed, improving the accuracy and reliability of account permission verification and anomaly warnings. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a logic block diagram of the intelligent account permission verification and anomaly warning method described in one embodiment of this application. Detailed Implementation
[0019] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of this application.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0021] Please refer to Figure 1 One embodiment of this application provides a method for intelligent verification and anomaly warning of account permissions, applied to an application system where account permissions have changed, including: S10. Obtain the interface operation authorization results before and after the target account permission change, and determine the interface operation whose authorization result changes from allowed to denied as invalid operation.
[0022] In this step, it's important to note that the target account can be a user account within the application system. Changes in permissions can be caused by actions such as role adjustments, organizational changes, job title changes, permission group adjustments, or the revocation of individual permissions. The interface operation authorization result indicates whether the target account is permitted to execute the corresponding interface operation under the given permission status. This can be determined based on the account permission information and the access rules corresponding to the interface operation, or obtained from the authorization determination results already generated by the permission system. A comparison is made between the same interface operation before and after the permission change. Interface operations that were allowed before the change but are denied after the change are identified as invalid operations. This ensures that subsequent verification focuses on the operations actually revoked during this permission change, rather than indiscriminately checking all interfaces of the application system. For example, if the target account originally had data export permissions, and the corresponding data export operation changes from allowed to denied after the permission adjustment, then this data export operation can be identified as invalid.
[0023] S20. Obtain the interface call relationship and the authentication subject of each call configuration. From the interface operations that are allowed before and after the permission change, determine the interface operations that are invalidated corresponding to the last level call in the downstream call chain and at least one set of adjacent calls with different authentication subjects as reserved entry points.
[0024] In this step, it's important to note that the interface call relationship characterizes the upstream and downstream call relationships between different interface operations within the application system. This can be obtained based on application configuration, service dependencies, or existing interface relationship data. The authentication subject represents the identity used when accessing downstream interfaces. This can be the user subject corresponding to the current account, the application service account, the system service subject, or other authentication subjects with independent permission configurations. The reserved entry point itself remains allowed before and after permission changes, but its downstream call chain can reach the invalidated operation, and there is a change in the authentication subject within the call chain. Therefore, this entry point constitutes a detection entry point that may still indirectly reach the invalidated operation after permission changes. For example, the target account can still execute the "Generate Report" operation, which sequentially calls the report service and the data service. The user subject switches to the service subject after entering the report service, and the data service's final call corresponds to the invalidated data export operation. Therefore, the "Generate Report" operation can be identified as a reserved entry point. By simultaneously limiting access to "still accessible," "able to reach the invalidated operation," and "having a change in the authentication subject," testing of call chains unrelated to permission anomalies can be reduced.
[0025] S30. Obtain the changed account authentication information and the corresponding account authentication subject, initiate an invalidation operation with the account authentication information and obtain the direct authorization result. If rejected, trigger the reserved entry with the account authentication information.
[0026] In this step, it's important to note that the account authentication information refers to the valid authentication information used by the target account to access the application system after the permission change. This includes things like login sessions, access tokens, or other information that uniquely identifies the target account's current authentication status. The account authentication subject is the target account subject corresponding to this authentication information. This step first directly initiates an invalidation operation and only triggers the reserved entry point if the direct authorization result is a denial. This confirms that the target account's permission changes have actually taken effect in the direct access path. If direct access is still allowed, this is more likely because the permission configuration itself has not yet taken effect, and it will not proceed to the subsequent verification process for indirect call permission deviations. Using the same account authentication information after the permission change to complete both direct access and reserved entry point triggering can also reduce verification errors caused by different test account states. For example, after a direct request for the aforementioned data export operation results in a denial, a request for the still allowed report generation operation can be made using the same account session, ensuring that the subsequent call process is based on the premise that the target account can no longer directly execute the data export operation.
[0027] S40. Obtain the call record triggered by the reserved entry point. If there is a target call that successfully executes the invalidation operation, determine the actual path from the reserved entry point to the target call based on the call record, and obtain the actual authentication subject and execution result of each level of call.
[0028] In this step, it's important to note that the call log is the execution record generated after the reserved entry point is actually triggered. It should at least reflect the relationships between calls, the corresponding operations, the actual authentication subject, and the execution result. The target call is the call that successfully executes the failed operation during this actual call process. Only when the target call actually occurs after the reserved entry point is triggered is the actual path further formed to avoid inferring permission anomalies solely based on static interface dependencies. The actual path represents the continuous call sequence that is actually generated by the reserved entry point request and ultimately reaches the target call. For example, it could be represented as "user entry call → business service call → internal service call → failed operation call". The actual authentication subject for each level of call is taken from the authentication identity used during the actual execution of the call, rather than being inferred solely from the interface's preset configuration. This allows for simultaneous acquisition of runtime information such as "which calls were actually performed," "what subject executed each level of call," and "whether each level of call was successfully executed," providing a basis for subsequently determining the location of permission deviations.
[0029] S50. Filter calls whose actual authentication subject differs from the account authentication subject according to the actual path order, and determine the corresponding target account authorization result according to the target account's current permission information and the access rules of each filtered call.
[0030] In this step, it's important to note that calls where the actual authentication subject matches the account's authentication subject are still directly constrained by the target account's own permissions. However, calls where the two differ represent calls after a change in authentication identity, and therefore, permission verification is prioritized for these calls. The target account's current permission information represents the actual effective permission status after the permission change. Access rules are used to determine whether the corresponding interface operation is allowed to execute under given permission conditions. For each filtered call, the target account's current permission information is substituted into the corresponding access rule to obtain the target account's authorization result if the call were still executed by the target account itself. This distinguishes between "the actual subject used for the call" and "the original target account's permissions at the same call location." For example, if an intermediate call is actually successfully executed by the reporting service subject, but the target account's current permission information indicates that the call is still allowed, then this location cannot yet be determined as a permission deviation. If a subsequent data service call is successfully executed by another service subject, but the target account's authorization result for that operation is now rejected, it indicates that a difference has begun to appear between the actual execution permission and the target account's current permission.
[0031] S60. From the filtered calls where the target account authorization result is denied and the execution result is successful, the call that is first in the actual path order is identified as the authorization deviation call and an abnormal result is generated.
[0032] In this step, it's important to note that if the target account's authorization result is "denied" but the corresponding call is actually executed successfully, it indicates that the call can complete an operation that the target account itself no longer has the authority to perform, thanks to the actual authenticated entity. Determining the call that first exhibits this state according to the actual path sequence allows the anomaly to be located at the point in the call chain where the permission state first deviates, rather than simply identifying the last-level call that ultimately successfully executes the invalidated operation as the anomaly location. For example, if the actual path includes four levels of calls, where the first two levels are still allowed under the target account's permissions, the third level onwards is denied under the target account's permissions but is successfully executed by the service entity, and the fourth level continues to successfully execute the invalidated operation, then the third-level call is identified as an authorization deviation call. The anomaly result can include information such as the target account, invalidated operation, reserved entry point, authorization deviation call, actual authenticated entity, and corresponding execution result to characterize the indirect permission anomaly that occurred after this permission change.
[0033] The technical solution implemented in this embodiment can, after an account permission change, first determine the invalidation operation whose permission was actually revoked by comparing the authorization results before and after the permission change, and then identify the reserved entry point from the interfaces that remain accessible and can reach the invalidation operation through changes in the authentication subject. After confirming that the target account's direct execution of the invalidation operation has been rejected, the reserved entry point is triggered using the same changed account authentication information, enabling subsequent verification to target scenarios where "direct permissions have taken effect, but indirect calls may still bypass permission restrictions." By obtaining the call records actually triggered by the reserved entry point and combining the actual call path, the actual authentication subject of each level of call, the execution result, and the target account's current permission status for hierarchical authorization judgment, it is possible to avoid judging anomalies solely based on static permission configuration or the final execution result. Furthermore, by determining the first authorization deviation call that should have been rejected by the target account but was actually successfully executed according to the actual path, it is possible to improve the accuracy of identifying indirect permission anomalies and the precision of anomaly location, thereby generating corresponding anomaly results in a timely manner and providing a basis for permission risk warnings and permission configuration corrections in the application system.
[0034] In one specific embodiment, the determination of the authorized deviance call includes: From the filtered calls, calls whose target account authorization result is denied and whose execution result is successful are selected to obtain the off-target candidate calls.
[0035] In this step, it's important to note that deviation candidate calls are used to characterize calls that should not be allowed to execute under the target account's current permission status, but are successfully executed during the actual call process. During filtering, the authorization and execution results of the target account corresponding to each filtered call are read sequentially according to the call order in the actual path. Only calls that simultaneously satisfy the condition of a denied authorization result and a successful execution result are retained. This excludes normal calls where the target account still has execution permissions, as well as intercepted calls that, although lacking execution permissions, failed to execute successfully. Deviation candidate calls thus focus on reflecting abnormal calls caused by inconsistencies between the execution permissions of the actual authenticated entity and the target account's current permissions. For example, if the actual path includes calls A, B, C, and D in sequence, where the target account authorization result for call B is allowed, and the target account authorization results for calls C and D are both denied, but calls C and D are actually executed successfully, then calls C and D are identified as deviation candidate calls.
[0036] Obtain the previous call of each deviation candidate call in the actual path, and obtain the access rule corresponding to each previous call to obtain the previous access rule.
[0037] In this step, it's important to note that the previous call is the call directly adjacent to and upstream of the deviation candidate call along the actual call path. There is a direct call relationship between the previous call and the corresponding deviation candidate call. By determining one level of calls ahead for each deviation candidate call, subsequent verification no longer only checks for permission anomalies in a single call, but further determines whether there are changes in authorization status between adjacent calls before and after the anomaly occurred. The previous access rule is the rule used when the previous call was executed to determine whether the access request was allowed. It can include matching relationships between role conditions, resource access scope, operation type, organizational scope, or corresponding permission items. For example, when call C is a deviation candidate call, call B is determined as the previous call of call C; when call D is a deviation candidate call, call C is determined as the previous call of call D, thus forming two sets of adjacent call relationships: call B to call C and call C to call D.
[0038] Based on the target account's current permission information and the previous access rules, determine the previous authorization result corresponding to each previous call.
[0039] In this step, it should be noted that the previous authorization result is used to characterize whether the target account still has the right to execute the corresponding previous call under the current permission status of the target account. The determination is based on the same permission status as the target account's authorization result to reduce boundary misjudgments caused by inconsistent permission statuses. In a specific embodiment, the target account's current role, permission items, and resource access scope can be matched with the previous access rule. If all the permission items required by the previous access rule are included in the target account's current permission information and the accessed object is within the allowed range, the previous authorization result is determined to be allowed; otherwise, it is determined to be denied. Therefore, for the aforementioned call relationship from call B to call C, if the previous authorization result for call B is allowed, while the target account's authorization result for call C is denied, it indicates that the target account's permission constraint changes from being executable between call B and call C to being inexecutable. If both call C and call D are denied for the target account, then call C to call D is merely a continuation of the abnormal state, not the first occurrence of the abnormality.
[0040] From the candidate calls that are allowed according to the previous authorization result, the call that is the first in the actual path order is determined as the authorized deviation call, and the call relationship between the corresponding previous call and the authorized deviation call is determined as the authorized deviation boundary.
[0041] In this step, it's important to clarify that an authorization deviation call is not simply a call where the target account's authorization result is denied and the call is successfully executed. Instead, it requires that the previous call was still permitted for the target account. This ensures that the authorization deviation call is the first successful call after the target account's permission status has changed from permitted to denied. If multiple calls meet this condition, the earliest call is determined according to the order of the actual path from the reserved entry point to the target call, uniquely identifying the location where the authorization deviation first occurs during this call process. The authorization deviation boundary is the call relationship between this authorization deviation call and its previous call. It characterizes the actual call process moving from a call segment currently permitted by the target account's permissions to a call segment currently denied by the target account's permissions, but still successfully executed by another actually authenticated entity. For example, in the actual path of calling A→calling B→calling C→calling D, the target account grants permission to both calls A and B, and denies permission to both calls C and D. However, both calls C and D are actually executed successfully. In this case, call C is determined to be an authorization deviation call, and call B→calling C is determined to be an authorization deviation boundary call. Instead of determining the subsequent call D as the first deviation position, it is not determined to be the first deviation position.
[0042] The technical solution implemented in this embodiment can, based on the identification of abnormal calls that should have been rejected by the target account but were actually successfully executed, further determine the adjacent call relationships of permission changes by combining the previous call and its authorization status of each abnormal call. This elevates the judgment of authorization anomalies from a single call level to the permission status transition level in the call path. By requiring that the previous call of the authorization deviation call is still allowed for the target account, and selecting the call that first meets the conditions according to the actual path order, the location of the first occurrence of permission anomalies can be distinguished from the continuous propagation location of subsequent abnormal calls. This avoids taking the final-level failure operation or multiple consecutive abnormal calls as the starting point of the anomaly, thereby more accurately locating the call boundary where the permission constraints did not continue to take effect for the first time after the authentication subject changed, improving the accuracy of permission anomaly location and the interpretability of the anomaly results.
[0043] In one specific embodiment, determining the previous authorization result and the target account authorization result includes: Each previous call and each deviation candidate call are identified as calls to be judged, and each previous access rule and each deviation candidate call's corresponding access rule are identified as the judgment access rule for each call to be judged.
[0044] In this step, it's important to note that the calls to be judged include those that require re-verification of the target account's permission status on both sides of the authorization deviation boundary. The previous call is upstream of the deviation candidate call, which is a call that was actually executed successfully but is initially deemed rejected under the target account's current permissions. By unifying both types of calls as calls to be judged, the same authorization judgment process can be used to obtain the permission status before and after the boundary. The access judgment rule is a permission judgment rule that corresponds one-to-one with the specific call to be judged. The previous call corresponds to the previous access rule, and the deviation candidate call corresponds to its own access rule. For example, if call B and call C are the previous call and the deviation candidate call, respectively, both are treated as calls to be judged, and a correspondence of "Call B - Rule RB" and "Call C - Rule RC" is established respectively to avoid incorrectly mixing access rules between different calls.
[0045] Obtain the call parameters for each call to be judged, as well as the actual permission information associated with the corresponding actual authentication subject.
[0046] In this step, it's important to note that the call parameters are the data carried and used in access control judgment during the actual execution of the call to be judged. These parameters may include the operation type, resource identifier, organization, data scope, request source, or business status. The actual permission information refers to the permissions possessed by the authentication entity used in the call during execution, which may include roles, permission items, resource access scope, and organizational scope. For example, if the actual authentication entity for a call is a reporting service entity, and its call parameters include the operation type "EXPORT," resource identifier "R1024," and organization identifier "D08," then the actual call parameters and the corresponding permission information for the reporting service entity are obtained. Both the call parameters and the actual permission information correspond to the specific call to be judged to reconstruct the conditions under which the call was actually authorized for execution.
[0047] Extract the parameter items that participate in the authorization determination from each access rule, and extract the parameter values from the corresponding call parameters based on the parameter items to obtain the call condition data.
[0048] In this step, it's important to note that the parameters used in the authorization determination for different access rules are not entirely the same. Therefore, it's unnecessary to include all data from the call parameters in subsequent re-determinations. Instead, the actual parameter items referenced by each rule are determined based on the access rule, and the corresponding parameter values are retrieved from the corresponding call parameters. The call condition data is formed by the parameter values participating in this authorization determination and is used to characterize the actual call conditions affecting the authorization result, excluding the permission subject. For example, if the rule RC specifies "operation type is EXPORT, resource organization is consistent with permission organization, and resource level is not higher than allowed level," then the operation type, resource organization, and resource level are extracted from the call parameters to form the corresponding call condition data. This reduces interference from parameters unrelated to permission determination and ensures that subsequent comparisons of different permission information are made under the same call conditions.
[0049] Input the actual permission information and the corresponding calling condition data into the corresponding access control rule to obtain the actual rule authorization result.
[0050] In this step, it's important to note that the actual rule authorization result is used to verify whether the corresponding call to be judged has execution permissions under its real authentication subject, real call conditions, and corresponding access rules. Specifically, the actual permission information corresponding to the call to be judged is substituted into the access rules along with the call condition data, and authorization calculations are performed based on the permission items, resource scope, and parameter conditions in the rules to obtain the actual rule authorization result of allowing or denying. For example, if the reporting service subject has EXPORT permissions and is allowed to access data in organization D08, and the resource corresponding to the call condition data also belongs to organization D08, then the actual rule authorization result is allowed. This result, combined with the actual execution status of the call, confirms whether the call was successful based on the corresponding authentication subject's permissions, rather than directly inferring the authentication subject's permissions from successful execution.
[0051] If the actual rule authorization result is allowed, keep the corresponding call condition data and access judgment rules unchanged, replace the actual permission information with the current permission information of the target account, re-perform the authorization judgment, and obtain the replacement authorization result.
[0052] In this step, it's important to note that after confirming that the actual authenticated entity has execution permissions according to the corresponding access rules, subsequent re-evaluations do not change the business conditions and rule conditions corresponding to the call; only the permission information involved in the permission determination is changed. Specifically, the call condition data and access rules corresponding to the same call to be determined are retained, the actual permission information associated with the original actual authenticated entity is replaced with the current permission information of the target account, and the same authorization determination process is executed again. Therefore, the difference between the actual rule authorization result and the replacement authorization result mainly corresponds to the difference in permission status between the actual authenticated entity and the target account. For example, if the operation type, resource identifier, and organization identifier remain unchanged, and the service entity has resource export permissions while the target account has lost these permissions after the permission change, the former will receive an allowed result, while the replacement will receive a denied result. This process avoids the incomparability of permission results due to changes in access objects, request parameters, etc.
[0053] The replacement authorization result corresponding to each previous call is determined as the previous authorization result, and the replacement authorization result corresponding to each deviation candidate call is determined as the target account authorization result.
[0054] In this step, it should be noted that since both the previous call and the deviation candidate call use the same replacement determination method to obtain the replacement authorization result, the results can be directly categorized according to the type of call to be determined. The replacement authorization result corresponding to the previous call is used to characterize whether the target account still has continued access rights at the call location, and it is determined as the previous authorization result; the replacement authorization result corresponding to the deviation candidate call is used to characterize whether the target account has the corresponding rights at the abnormal call location, and it is determined as the target account authorization result. For example, if call B replaces the target account's current permission information and is still determined as allowed, while call C replaces it and is determined as denied, then the previous authorization result for call B is allowed and the target account authorization result for call C is denied, respectively, providing a basis for further determining whether there is an authorization deviation boundary between call B and call C.
[0055] The technical solution implemented in this embodiment can establish a unified permission re-determination mechanism for calls before and after authorization deviation from the boundary. By obtaining the actual call parameters, the actual permission information corresponding to the actual authenticated subject, and the judgment access rules corresponding to each call, the judgment conditions when each call was actually authorized can be restored. After confirming that the actual authenticated subject has execution permission, the call condition data and judgment access rules remain unchanged, and only the actual permission information is replaced with the current permission information of the target account for re-determination. This makes the actual rule authorization result and the replacement authorization result directly comparable, thereby reducing the interference of differences in call parameters, access objects, and rules on the permission comparison results, and accurately obtaining the authorization status of the target account at adjacent call positions. This provides a reliable basis for identifying the permission deviation process from the target account allowing access to the target account denying access but still successfully executing.
[0056] In one specific embodiment, determining the access rules and invocation condition data includes: Retrieve the rule version identifier and parameter snapshots corresponding to each call to be judged from the call log.
[0057] In this step, it's important to note that the rule version identifier uniquely corresponds to the access rule version used when the call to be judged is actually executed, and the parameter snapshot records the status of the parameters actually involved in request processing during the call execution. The call record synchronously saves the rule version identifier and parameter snapshot when the call occurs, enabling subsequent permission reassessment to restore the rule environment and request conditions at the time of the call, rather than directly using access rules or parameter values that may have been updated at the time of verification. The parameter snapshot can include data such as operation type, access object identifier, organization identifier, resource attributes, and business status. For example, if call C occurs using rule version V12 and carries resource identifier R1024, organization identifier D08, and operation type EXPORT, then the corresponding call record will save the rule version identifier V12 and a parameter snapshot containing the aforementioned parameter values.
[0058] Obtain the corresponding access rule snapshot based on the rule version identifier, and determine the access rule snapshot as the corresponding judgment access rule.
[0059] In this step, it's important to note that the access rule snapshot represents the rule content of the corresponding rule version at the time the call to be judged occurred, and it is distinct from the currently effective access rule. The system can retrieve the corresponding version from historical rule data based on the rule version identifier, or it can save an immutable copy of the rule when it is published to form an access rule snapshot. The access rule snapshot can include permission requirements, resource scope constraints, organizational scope constraints, and parameter matching conditions. For example, if rule version V12 requires the calling entity to have EXPORT permission, and the organization to which the accessed object belongs is within the scope of organizations allowed by the entity, then subsequent permission judgments for this call will still use the aforementioned rule corresponding to V12, rather than the V13 rule updated after the call occurred. This ensures that the access rule judgment remains consistent with the rule state at the time the call to be judged actually occurred.
[0060] The call parameters are obtained from the parameter snapshot, the parameter items involved in the authorization determination are extracted from the access rule snapshot, and the parameter values are extracted from the corresponding call parameters based on the parameter items to obtain the call condition data.
[0061] In this step, it's important to note that while the parameter snapshot may contain multiple call data items, access rules typically only reference a subset of these parameters. Therefore, the parameters actually involved in the authorization judgment of the rule are first determined based on the access rule snapshot, and then the corresponding parameter values are extracted from the call parameters restored from the corresponding parameter snapshot. The call condition data consists of these parameter values directly related to the authorization judgment, restoring the judgment conditions other than the authentication subject and its permission information during the actual permission judgment of this call. For example, if the parameter snapshot contains the request time, terminal identifier, resource identifier R1024, organization identifier D08, operation type EXPORT, and multiple business parameters, while the access rule snapshot only references the resource identifier, organization identifier, and operation type, then R1024, D08, and EXPORT are extracted to form the call condition data. Determining parameter items through rule-based reverse determination avoids adding data unrelated to authorization to the re-judgment process.
[0062] Keep the access rule snapshot and calling condition data unchanged, and make authorization judgments based on the actual permission information and the current permission information of the target account to obtain the actual rule authorization result and the replacement authorization result.
[0063] In this step, it's important to note that both authorization decisions use the same access rule snapshot and call condition data corresponding to the call to be judged, only changing the permission information of the input access rule snapshot. The first input is the actual permission information associated with the actual authentication subject to obtain the actual rule authorization result, used to restore whether the actual authentication subject met the corresponding permission conditions when the call occurred. The second input is the current permission information of the target account to obtain the replacement authorization result, used to determine the authorization result that should occur if the call is judged by the current permission status of the target account under the same rule version and the same call conditions. For example, if the rule version V12, resource R1024, organization D08, and operation type EXPORT remain unchanged, the actual service subject has EXPORT permissions and receives an allowed result, while the target account no longer has EXPORT permissions after the permission change, so the replacement authorization result is denied. Therefore, the difference between the two results corresponds to changes in permission information without being additionally affected by changes in rule version or call parameters.
[0064] The technical solution implemented in this embodiment can restore the corresponding access rules and actual call conditions based on the rule version identifier and parameter snapshot recorded when the call to be judged is actually executed. While keeping the access rule snapshot and call condition data unchanged, authorization judgment is performed using the actual authentication subject's permissions and the target account's current permissions, respectively, so that the two authorization results are established under consistent rule environment and call conditions. This can reduce the interference caused by permission rule updates, resource attribute changes, or request parameter changes on the re-judgment results, and make the difference between the actual rule authorization result and the replacement authorization result more accurately reflect the permission difference between the actual authentication subject and the target account, thereby improving the accuracy and reproducibility of authorization deviation judgment.
[0065] In one specific embodiment, determining the target invocation includes: Obtain the operation identifier and access object identifier corresponding to the invalidation operation initiated with account authentication information, and determine them as the invalidation operation identifier and target object identifier, respectively.
[0066] In this step, it's important to note that the operation identifier uniquely identifies the executed interface operation, while the access object identifier uniquely identifies the target resource, business object, or data object that the interface operation actually affects. By obtaining both the operation identifier and the access object identifier when the target account directly initiates a failure operation, a matching benchmark can be established to identify whether subsequent indirect calls actually execute the same failure operation, rather than relying solely on the interface name or call result. For example, if the target account directly requests to execute a data export operation, the corresponding operation identifier is OP_EXPORT, and the access object identifier is R1024. Therefore, OP_EXPORT and R1024 are identified as the failure operation identifier and the target object identifier, respectively. Consequently, only subsequent calls pointing to the same operation and the same access object have a basis for comparison with the direct access result.
[0067] Retrieve the record operation identifier, record object identifier, and record execution result corresponding to each call record.
[0068] In this step, it's important to note that the record operation identifier is used to characterize the actual interface operation executed by the call corresponding to the record, the record object identifier is used to characterize the object actually accessed by the call, and the record execution result is used to characterize whether the call completed the corresponding operation. Each call record originates from the actual execution process formed after the account authentication information triggers the reserved entry point; therefore, the above information can reflect the true execution status of each level of the indirect call chain. The record execution result can include states such as success, failure, or rejection. For example, if a reserved entry point triggers calls A, B, and C, and call C has a record operation identifier of OP_EXPORT, a record object identifier of R1024, and a record execution result of success, then this indicates that the call actually completed the data export operation for the target object R1024.
[0069] Filter the call records from each call record to find the call record whose operation identifier matches the failed operation identifier, whose record object identifier matches the target object identifier, and whose execution result is successful, and determine the corresponding call as the target call.
[0070] In this step, it's important to note that a target call must simultaneously satisfy three conditions: consistent operation, consistent access object, and successful execution. Consistent operation confirms that the indirect call executes the same failed operation as the direct test; consistent access object eliminates authorization differences arising from acting on different resources; and successful execution confirms that the failed operation was not merely triggered by the call chain but has actually been completed. Meeting any one of these conditions is insufficient to determine if it's a target call. For example, call B, although corresponding to OP_EXPORT, has access to R2048, so it cannot be determined as a target call; call C corresponds to both OP_EXPORT and R1024, but the execution result is recorded as failure, so it is also uncertain whether it's a target call; only calls where all three conditions—operation, object, and execution status—are met are determined as target calls. Therefore, a correspondence can be established between the rejection result obtained by the target account directly accessing the failed operation and the successful execution result for the same operation and object in the indirect call chain.
[0071] The technical solution implemented in this embodiment can use the operation identifier and access object identifier when the target account directly initiates an invalid operation as a matching benchmark, and combine it with the actual execution result in the call record to accurately identify the target call that is consistent with the direct access object and operation and has been successfully executed from the call chain triggered by the reserved entry point. This avoids misjudging calls with similar names but different operations, access objects, or those that are only triggered but not successfully executed as abnormal targets. As a result, subsequent actual path reconstruction and authorization deviation analysis are based on the real execution result of the same operation and the same access object, improving the accuracy of indirect permission anomaly verification.
[0072] In one specific embodiment, determining the actual path includes: Retrieve the entry call identifier corresponding to the reserved entry point from the call record, and retrieve the call identifier and parent call identifier corresponding to each call record.
[0073] In this step, it's important to note that the entry call identifier uniquely identifies the initial call triggered by the account authentication information and the reserved entry point. The call identifier uniquely identifies each level of call within the current call process, and the parent call identifier records which upstream call directly triggered the current call. By establishing the correspondence between call identifiers and parent call identifiers, multiple calls generated after a single reserved entry point trigger can be associated according to their actual parent-child relationship, rather than simply inferring the call order based on the call occurrence time. In a specific embodiment, the entry call corresponds to call identifier T100, and subsequent calls correspond to T101, T102, and T103, respectively. Since the parent call identifier for T101 is T100, the parent call identifier for T102 is T101, and the parent call identifier for T103 is T102, a continuous call association can be formed. For other concurrent calls that do not belong to the upstream link of the target call, even if their execution times are similar, they will not be included in the corresponding path due to a mismatch in parent call identifiers.
[0074] Starting with the call identifier corresponding to the target call, the parent call is determined level by level according to the parent call identifier until the call with the entry call identifier is determined.
[0075] In this step, it's important to note that determining the path by backtracking from the target call to the reserved entry point allows for direct filtering of the actual associated upstream calls around the target call that has already been confirmed to have successfully executed the failed operation. Specifically, the parent call identifier in the target call record is read, and this parent call identifier is matched against the call identifier of another call record to obtain the direct superior call of the target call. The parent call identifier of the determined superior call is then repeatedly read until an entry call identifier is matched. In one specific embodiment, the target call identifier is T103, and its parent call identifiers are sequentially backtracked to obtain T102, T101, and T100. Since T100 is the entry call identifier, T100, T101, T102, and T103 are determined to belong to the same actual call branch. If, during the backtracking process, a parent call identifier cannot correspond to an existing call record, the determination of that call branch as a complete candidate path can be stopped to reduce erroneous paths caused by missing logs or the mixing of different request call records.
[0076] The determined calls are arranged according to the call order from the reserved entry point to the target call to obtain a candidate call sequence, and the actual path is determined based on the candidate call sequence.
[0077] In this step, it's important to note that the calls obtained from the reverse backtracking are first restored to a forward call order from the reserved entry point to the target call, based on parent-child call relationships, thus obtaining a candidate call sequence. The candidate call sequence includes at least the entry call, intermediate calls between the entry call and the target call, and the target call itself, with direct parent-child call relationships between adjacent calls. The candidate call sequence represents the complete call process where the target call is indeed triggered level by level by the current reserved entry point, and serves as the path basis for further verification of the consistency of permission and rule states. For example, if the reverse backtracking result is T103←T102←T101←T100, then rearranging the sequence yields the candidate call sequence T100→T101→T102→T103. After determining the actual path based on the candidate call sequence, the actual authentication subject, execution result, and permission determination data for each level of the call can be read according to this path order. This ensures that the determination of subsequent authorization deviation positions is based on the same real call branch, unaffected by other parallel calls generated simultaneously by the application system.
[0078] The technical solution implemented in this embodiment can establish the actual parent-child call relationship between the reserved entry point and the target call using the entry call identifier, call identifier, and parent call identifier. It can also trace back from the target call that has successfully executed the failed operation to the entry call level by level, thereby excluding concurrent calls or other business calls that have no direct causal relationship with the target call from a large number of call records. Furthermore, by restoring the candidate call sequence from the reserved entry point to the target call according to the real parent-child relationship, it can provide a continuous and traceable call basis for determining the actual path, so that the subsequent analysis of the actual authentication subject and the location of authorization deviation are both based on the same actual call branch, thereby improving the accuracy of identifying indirect permission abnormal call paths.
[0079] In one specific embodiment, determining the actual path further includes: Obtain the first permission configuration version identifier and the first rule version identifier corresponding to the invalidation operation initiated with account authentication information, and obtain the second permission configuration version identifier and the second rule version identifier corresponding to the target call.
[0080] In this step, it should be noted that the first permission configuration version identifier is used to characterize the target account permission configuration state adopted by the application system when the target account directly initiates the invalidation operation, and the second permission configuration version identifier is used to characterize the target account permission configuration state corresponding to the actual occurrence of the target call; the first rule version identifier and the second rule version identifier are used to characterize the access rule version adopted by the invalidation operation corresponding to the two calls, respectively. The permission configuration version can be updated when the account role, permission item, resource scope, or organizational scope changes, and the rule version can be updated when the interface access rule is added, deleted, or modified. Since the aforementioned target call and the directly initiated invalidation operation correspond to the same operation and the same access object, by further obtaining the permission configuration version and rule version corresponding to the two calls, it can be confirmed whether the direct rejection result and the indirect success result are generated in the same permission and rule environment. For example, after the target account permission is adjusted, a permission configuration version P26 is formed, and the invalidation operation adopts rule version R12. When the invalidation operation is directly initiated, P26 and R12 are recorded; when the entry point triggers the target call, the permission configuration version and rule version corresponding to that moment are also recorded for subsequent consistency comparison.
[0081] Determine whether the first permission configuration version identifier and the second permission configuration version identifier are consistent, and determine whether the first rule version identifier and the second rule version identifier are consistent.
[0082] In this step, it's important to note that consistent permission configuration versions indicate that the target account's permissions did not change again between the direct initiation of the invalidation operation and the occurrence of the target call, thus avoiding any impact on the verification. Consistent rule versions indicate that the access rules corresponding to the invalidation operation remained unchanged between the two calls. Comparing these two types of versions separately eliminates differences in execution results caused by adjustments to account permissions or updates to access rules between direct and indirect access. For example, if both the first and second permission configuration version identifiers are P26, and both the first and second rule version identifiers are R12, it indicates that the two calls are under the same target account permission configuration and access rule state. If either version is inconsistent, direct rejection and indirect success may be affected by version changes, and the corresponding candidate call sequence will not be directly used as the actual path for this permission deviation analysis.
[0083] If all are consistent, the candidate call sequence is determined as the actual path.
[0084] In this step, it's important to note that the candidate call sequence, recovered from the entry call identifier, call identifier, and parent call identifier, is only determined as the actual path when both the permission configuration version and the rule version are identical. This ensures that the path not only satisfies the true parent-child call relationship but also that the direct permission verification and indirect execution processes are in the same permission configuration and rule state. Therefore, when comparing the actual authentication subject, target account authorization results, and execution results at each level of the call along the actual path, the difference between direct access denial and indirect call success can be primarily attributed to changes in the authentication subject and its permissions during the call process, reducing interference from permission configuration updates or access rule changes. For example, in the candidate call sequence T100→T101→T102→T103, where T103 is the target call, if both the direct test and T103 occur corresponding to permission configuration version P26 and rule version R12, then this candidate call sequence is determined as the actual path, and authorization deviation calls are further located along this path.
[0085] The technical solution implemented in this embodiment can, on the basis of restoring the candidate call sequence based on the real parent-child call relationship, further utilize the permission configuration version identifier and rule version identifier to verify the permission and rule status of direct access and indirect calls, and exclude call data of different statuses caused by account permission readjustment or access rule update during the test; the actual path is confirmed only when the permission configuration and access rules are consistent, so that the subsequent direct rejection and indirect success results have a unified comparison basis, and improve the accuracy and reliability of authorized deviation call and authorized deviation boundary positioning.
[0086] In one specific embodiment, obtaining the interface operation authorization result includes: Obtain the permission information of the first account before the change of permissions for the target account, the permission information of the second account after the change of permissions, and the interface access rules corresponding to each interface operation.
[0087] In this step, it's important to note that the first account permission information represents the target account's effective permission status before the permission change, while the second account permission information represents the target account's effective permission status after the permission change. Both can include role information, permission items, organizational scope, resource access scope, and interface operation scope. Interface access rules are used to limit the permission conditions required to execute corresponding interface operations. Different interface operations can be configured with separate interface access rules. For example, before the permission change, the target account had role R1 with corresponding permissions including READ, EXPORT, and EDIT. After the permission change, the account became role R2 with only READ and EDIT permissions. For the data export interface, its interface access rules require the calling account to have EXPORT permission and the accessed object to be within the allowed resource scope. By simultaneously obtaining the account permission status before and after the permission change, as well as the rules corresponding to the same interface operation, a data foundation can be provided for subsequently comparing the authorization results before and after permission changes according to unified rules.
[0088] Based on the first account permission information and the second account permission information, authorization is determined by combining the access rules of each interface, and the first authorization result and the second authorization result corresponding to each interface operation are obtained.
[0089] In this step, it's important to note that for the same interface operation, the first and second authorization results are determined using the account permission information before and after the permission change, respectively. The interface access rules remain consistent with the interface operation, ensuring that the primary variable between the two authorization decisions is the target account's permission status. Specifically, role conditions, permission item conditions, organizational scope conditions, and resource access conditions are read from the interface access rules and matched against the first and second account permission information, respectively. If the corresponding rule is met, an "allow" result is obtained; otherwise, a "reject" result is obtained. For example, if a data export interface requires EXPORT permission, and the first account permission information includes this permission item, the first authorization result is "allow"; if the second account permission information no longer includes this permission item, the second authorization result is "reject." For a query interface, if the account permission information before and after the permission change both meet the READ permission requirement, then both the first and second authorization results are "allow." This allows for paired authorization results for the same interface operation before and after the permission change.
[0090] The first authorization result and the second authorization result are respectively determined as the interface operation authorization results before and after the permission change.
[0091] In this step, it's important to note that establishing a correspondence between the first and second authorization results for each interface operation, based on the interface operation itself, generates authorization status change data corresponding to the target account's current permission change. Specifically, an interface operation with a first authorization result of "allow" and a second authorization result of "deny" indicates that its access permission has been revoked due to this permission change; an interface operation with both first and second authorization results of "allow" indicates that it remains accessible after the permission change. Subsequently, these two types of authorization statuses can be used to determine invalidated operations and retained entry points, thus focusing the verification scope on the interface operations actually affected by this permission change and those that can still form indirect call entry points, without needing to repeatedly verify all interfaces in the application system.
[0092] The technical solution implemented in this embodiment can perform authorization determination separately based on two sets of account permission information before and after the change of target account permissions, while keeping the corresponding interface access rules for each interface operation consistent. This results in an interface operation authorization result that directly reflects the impact of the permission change. By comparing the authorization status of the same interface operation before and after the permission change, it is possible to accurately distinguish between interface operations whose permissions have been revoked and interface operations that remain allowed after the permission change. This provides a unified data foundation for subsequently identifying invalid operations, filtering and retaining entry points, and conducting targeted indirect permission verification. At the same time, it reduces the processing redundancy caused by interfaces unrelated to the current permission change participating in subsequent detection.
[0093] In one specific embodiment, determining the reserved entry point includes: Candidate entry points are determined from interface operations where both the first and second authorization results are allowed.
[0094] In this step, it's important to note that candidate entry points are interface operations that the target account has access to both before and after the permission change. Specifically, the corresponding interface operation's authorization result is "allowed" under both the first and second account permission information. Since candidate entry points can still be triggered normally by the target account after the permission change, they can serve as the actual entry point for detecting whether the failed operation can still be indirectly reached after the permission change. For interface operations where the first authorization result is "allowed" but the second authorization result is "denied," they are already considered failed operations with revoked permissions and are not considered candidate entry points. Similarly, interface operations that were already "denied" before the permission change are also not included in the candidate entry points. For example, if the target account still has report generation and data query permissions after the permission change, but the data export permission has been revoked, then the report generation interface and the data query interface can be identified as candidate entry points to narrow down the scope of subsequent call relationship analysis.
[0095] Based on the interface call relationship, downstream calls are determined step by step from each candidate entry point until the candidate call chain corresponding to the failed operation of the final level call is obtained.
[0096] In this step, it's important to note that the interface call relationship describes the static association between one interface operation and other interface operations in the application system. It records the caller, callee, and call direction. Starting from each candidate entry point, subsequent calls are determined level by level down the call direction. When the final call of a certain call branch corresponds to a failed operation, the continuous call relationship from that candidate entry point to that final call is determined as a candidate call chain; call branches that do not reach the failed operation are not considered candidate call chains. For example, if candidate entry point A calls interface B and interface C sequentially, and interface C corresponds to a determined data export failed operation, then a candidate call chain A→B→C is formed. If the downstream calls of another candidate entry point D only include D→E→F, and neither E nor F corresponds to a failed operation, then this call branch is not retained. This allows subsequent authentication subject analysis to focus on call chains that theoretically can still reach the failed operation from the currently accessible entry point.
[0097] Obtain the authentication configuration corresponding to each call in each candidate call chain, extract the authentication subject from each authentication configuration, and obtain the candidate authentication subject corresponding to each call.
[0098] In this step, it's important to note that the authentication configuration describes the authentication method and subject used when accessing the next interface. This configuration can originate from the interface configuration, service call configuration, or the application system's authentication policy. Candidate authentication subjects can be the user subject corresponding to the target account, or a business service subject, system service account, or other subject with independent permissions. For the same candidate call chain, candidate authentication subjects are obtained for each level of the call in order to form an authentication subject sequence. For example, in the candidate call chain A→B→C, when A accesses B, it uses account authentication subject U01, while when B accesses C, it uses service subject S02. Therefore, the corresponding candidate authentication subjects include U01 and S02 respectively. The determination of the authentication subject is based on the actual configuration relationship, not on inferring from the service name to which the interface belongs, thus enabling the identification of the actual preset identity transition points during the call process.
[0099] Determine whether there are adjacent calls with different candidate authentication subjects in each candidate call chain. If so, determine the corresponding candidate entry point as the reserved entry point.
[0100] In this step, it should be noted that different candidate authentication subjects in adjacent calls indicate an authentication identity change at the corresponding position in the call chain, meaning that downstream calls no longer continue to execute with the original authentication subject. If the candidate authentication subjects in the candidate call chain remain consistent, downstream calls are generally still subject to the same authentication subject's permissions, and therefore are not considered the key entry point for verification in this embodiment. When at least one set of adjacent calls corresponds to different candidate authentication subjects, it indicates that the call chain may continue to access invalid operations after switching from one authentication subject to another. For example, in the candidate call chain A→B→C, A and B correspond to candidate authentication subject U01, while C corresponds to candidate authentication subject S02. Therefore, there is a change in authentication subject between B and C, and candidate entry point A is determined as the reserved entry point. Subsequently, the actual call record is obtained by actually triggering this reserved entry point to verify whether the authentication subject change in the static call relationship actually caused the invalid operation to be successfully executed, rather than directly determining permission abnormalities based on the candidate call chain.
[0101] The technical solution implemented in this embodiment can first use the authorization results that remain allowed before and after permission changes to filter candidate entry points that the target account can still actually trigger. Then, it retains only candidate call chains that can reach the invalidated operation along the interface call relationship. Furthermore, it further filters call chains with authentication subject changes by combining the authentication configuration of each level of the call. This ensures that the retained entry points simultaneously meet the three conditions of "still accessible after permission changes", "able to indirectly reach the invalidated operation", and "authentication subject changes during the call process". As a result, the detection scope can be narrowed before actual dynamic verification, and the verification focus can be concentrated on call entry points that may bypass the target account's current permission restrictions due to authentication subject changes, thereby improving the targeting and processing efficiency of subsequent indirect permission anomaly detection.
[0102] In one specific embodiment, this application also provides an account permission intelligent verification and anomaly warning system, which executes the account permission intelligent verification and anomaly warning method as described above during runtime, including: The data management module is used to obtain account permission data, interface call data and authentication data from the application system, and output the obtained data to the verification module.
[0103] The verification module, connected to the data management module, is used to receive account permission data, interface call data, and authentication data, determine the invalidation operation and the reserved entry corresponding to permission changes, and output the verification data and call records to the analysis module.
[0104] The analysis module, connected to the verification module, is used to receive verification data and call records, determine the actual path and authorized deviation calls, and generate abnormal results.
[0105] In this embodiment, it should be noted that the data management module, verification module, and analysis module are connected in the order of permission data acquisition, permission status verification, and abnormal call analysis. The data management module collects account permission data, interface call data, and authentication data generated during the application system's operation. Account permission data may include the permission status before and after a change in the target account's permissions, permission configuration versions, and interface access rules. Interface call data may include interface call relationships, call records, call identifiers, parent call identifiers, operation identifiers, access object identifiers, execution results, rule versions, and call parameters. Authentication data may include account authentication information and the authentication entities used for each level of call. The data management module can establish associations between the above data according to account identifiers, call identifiers, and permission configuration versions, and output the corresponding data to the verification module. The verification module determines invalid operations whose authorization status changes from allowed to denied based on account permission data before and after permission changes. It also identifies reserved entry points that remain accessible after permission changes, are reachable downstream from the invalid operation, and have a changed authentication subject, based on interface call relationships and authentication data. During actual verification, the same account's authentication information after permission changes can be used to directly access the invalid operation. If direct access is denied, the reserved entry point is triggered, and subsequent calls generated by this entry point are recorded, forming verification data and call records that are output to the analysis module. The analysis module reconstructs the actual path from the reserved entry point to the target call that successfully executes the invalid operation based on the call records. It then analyzes the actual authentication subject, execution result, target account's current permission status, and access rules for each level of call. In a specific implementation, for calls where the actual authentication subject differs from the target account's authentication subject, the target account's authorization result can be recalculated based on the actual call conditions and access rule status at the time of the call. The first call that should have been denied by the target account but was actually successfully executed is identified along the actual path and used as the authorization deviation call. For adjacent higher-level calls that are still allowed under the target account's permissions, the authorization deviation boundary between adjacent calls can be further determined. Therefore, each module does not only check the static permission configuration, but also associates the permission change status, the actual call process, the change of the authentication subject and the actual execution result with the same verification process.
[0106] The technical solution implemented in this embodiment can unify the association of account permissions, interface calls, and authentication data through the data management module. After the verification module confirms that the direct permission restriction on the invalid operation of the target account has taken effect, it triggers the still accessible reserved entry point. This allows the system to verify situations where restricted operations may still be indirectly reached through internal application calls after permissions have been revoked. Furthermore, the analysis module restores the actual path based on the real call records and locates authorization deviation calls and authorization deviation boundaries by combining the authentication subjects of each level of call and the current permission status of the target account. This avoids judging anomalies solely based on static permission configurations, interface dependencies, or final execution results, improves the accuracy of indirect permission anomaly identification and the ability to locate anomalies, and can output anomaly results with clear call paths and anomaly location evidence.
[0107] In one operational embodiment, the application system is an internal enterprise operational data management platform, which includes a report center, order service, and data export service. The target account U01 originally belonged to the regional administrator role R1, with READ (data read), REPORT (report generation), and EXPORT (data export) permissions, allowing it to query order data, generate operational reports, and export detailed files. The system administrator adjusted U01's permissions, changing its role from R1 to a regular business role R2, retaining the READ and REPORT permissions but revoking the EXPORT permission. After this permission adjustment, a new permission configuration version P26 (the permission status version after this adjustment) was generated; the previous permission configuration version was P25.
[0108] The system retrieves U01's account permission information before and after the permission change, and reads the interface access rules (permission rules for determining whether an account can execute a certain interface operation) for each interface operation. Specifically, the order query interface OP_QUERY (used to read order data) requires READ permission, the report generation interface OP_REPORT (used to generate business reports) requires REPORT permission, and the data export interface OP_EXPORT (used to export business detail data) requires EXPORT permission. When authorization is determined according to permission configuration version P25, U01's authorization results for the above three interfaces are all allowed; when authorization is determined according to permission configuration version P26, OP_QUERY and OP_REPORT are still allowed, but OP_EXPORT becomes denied. Therefore, the system identifies OP_EXPORT as an invalid operation (an operation that is no longer allowed for the target account after this permission adjustment), and considers OP_QUERY and OP_REPORT as candidate interfaces for further filtering and retention.
[0109] The system then reads the interface call relationships (the upstream and downstream relationships where one interface is executed and then calls other interfaces). In the current application configuration, after OP_REPORT is triggered, it sequentially calls the report aggregation interface OP_AGG (an internal interface used to summarize the business data required to generate reports) and the data export interface OP_EXPORT, thus forming a downstream call chain of OP_REPORT→OP_AGG→OP_EXPORT (a call sequence formed by calling subsequent interfaces level by level from the entry interface). The OP_REPORT entry continues to use the user authentication subject corresponding to U01 (the subject that executes the request representing the current user identity) for access. When OP_AGG accesses the downstream data export service, it is configured to use the internal service subject S02 (the authentication identity used by the application system's internal service itself). Since the authorization result of OP_REPORT is allowed before and after the permission change, its downstream call chain calls the corresponding invalid operation OP_EXPORT at the end, and the authentication subject switches from U01 to S02 during the call. Therefore, the system determines OP_REPORT as a reserved entry point (the target account can still access it after the permission adjustment and may continue to indirectly reach the entry interface of the invalid operation).
[0110] At 09:15:08, the system obtained the valid account authentication information Token_U01_26 (the access token corresponding to the current login status of the target account) and its account authentication subject U01 after the permission change for U01. It then used Token_U01_26 to directly request OP_EXPORT to perform the "Export August 2026 Regional Sales Details" operation on the access object R1024 (the specific business resource affected by this request, in this case, regional sales details data). OP_EXPORT uses rule version R12 (the access rule version actually in effect at the time of this execution) for permission determination. R12 requires the calling subject to have EXPORT permission and requires that the organization to which the access object belongs matches the scope of organizations allowed to be accessed by the calling subject. Since U01 no longer has EXPORT permission under permission configuration version P26, the direct authorization result is denied, and the interface returns HTTP 403 (the server understands the request but refuses to execute due to insufficient permissions). The system thus confirms that the EXPORT permission revocation has taken effect in the direct access path.
[0111] After confirming that direct access was denied, the system continued to use the same Token_U01_26 to trigger the reserved entry point OP_REPORT at 09:15:12, requesting the generation of the regional sales analysis report corresponding to the same access object R1024. Upon receiving the request, the report center formed an entry call T100 (the starting call of this call chain), subsequently calling the report aggregation interface to form call T101, and then the report aggregation service, with service subject S02, called the data export interface to form call T102. In the call log (data recorded by the application system showing the actual execution status of each level of interface), the actual authentication subject of T100 is U01, and the parent call identifier is empty; the actual authentication subject of T101 is still U01, and the parent call identifier is T100; the actual authentication subject of T102 is S02, and the parent call identifier is T101. The parent call identifier indicates which superior call directly triggered the current call. The record operation identifier corresponding to T102 is OP_EXPORT, the record object identifier is R1024, the execution result is successful, the data export service returns HTTP 200 (the request has been processed and executed successfully), and a detailed data file of approximately 8.4MB is generated. Therefore, the system determines T102 as the target call (a call that successfully executed a failed operation during an indirect call process).
[0112] Starting with the target call T102, the system backtracks to T101 and T100 based on the parent call identifier, forming a candidate call sequence T100→T101→T102 in the forward call order. This candidate call sequence represents the call path recovered from the actual parent-child call relationship, pending state consistency confirmation. The system further reads the first permission configuration version identifier P26 and the first rule version identifier R12 corresponding to direct access to OP_EXPORT, and the second permission configuration version identifier P26 and the second rule version identifier R12 corresponding to when T102 occurs. Since the permission configuration version for both calls is P26 and the rule version is R12, the difference in results caused by modifications to account permissions or access rules between the two tests can be ruled out. Therefore, T100→T101→T102 is determined as the actual path (the valid call path that is actually triggered at the entry point and ultimately reaches the target call).
[0113] The system then retrieves the actual authentication subject (the authentication identity used when the call is actually executed) and execution result of each level of the call along the actual path. The actual authentication subject for T100 and T101 is U01, while the actual authentication subject for T102 is S02. Therefore, the system selects T102 as the call whose actual authentication subject differs from the account authentication subject U01. To determine whether T102 should be allowed to execute under the target account's current permission status, the system reads the rule version identifier R12 and the parameter snapshot (saved data of the actual request parameter status at the time of the call) from the call record corresponding to T102. The parameter snapshot records data such as the actual operation type EXPORT, the access object R1024, the organization D08, and the resource category SALES_DETAIL used in this call.
[0114] The system reads the access rule snapshot (the complete rule content corresponding to rule version R12 at the time of the actual call) based on the rule version identifier R12. From this snapshot, it determines the parameters actually used in this authorization determination: operation type, organization to which the accessed object belongs, and permission items. It then extracts the data corresponding to EXPORT, D08, and R1024 from the parameter snapshot to form the call condition data (the actual request conditions used in this permission determination). Subsequently, the system first keeps the access rule snapshot and call condition data unchanged, and inputs the actual permission information of service subject S02 (the actual permission items and resource access scope that S02 possesses) into R12. S02 has EXPORT permission and is allowed to access organization D08; therefore, the actual rule authorization result is "allowed," which is consistent with the successful execution of T102.
[0115] Based on this, the system keeps rule version R12 and the above-mentioned call conditions completely unchanged, only replacing the actual permission information of S02 with the current permission information of the target account of U01 under version P26, and then performing the same authorization judgment again. Since U01 currently only has READ and REPORT permissions and not EXPORT permissions, the authorization result for the target account is denied. This results in state T102 "target account authorization result is denied, actual execution result is successful", and T102 is identified as a deviating candidate call (possibly a call from an abnormal permission starting position).
[0116] The system further reads the previous call T101 of T102 in the actual path and obtains the access rule corresponding to T101. T101 is a report aggregation operation, and its access rule requires REPORT privileges. While maintaining the actual call conditions of T101, the system substitutes the current permission information of U01 under version P26 into the rule for judgment. Since U01 still has REPORT privileges, the previous authorization result corresponding to T101 is allowed. At this time, the authorization status in the actual path is: T100 allowed, T101 allowed, while T102 should be denied for U01 but was actually successfully executed by S02. Therefore, the system determines T102 as an authorization deviation call (the first call in the actual call path where the target account should be denied but is still successfully executed), and determines the call relationship between T101 and T102 as the authorization deviation boundary (the adjacent call position where the target account's privileges change from being overridden to being overridden, but the actual call still continues to succeed).
[0117] After verification, the system generates an anomaly result. For example, the anomaly result record might be: Target account U01; Permission configuration version P26; Invalid operation OP_EXPORT; Reserved entry point OP_REPORT; Access object R1024; Direct access result HTTP403; Target call T102; Actual authentication subject S02; Actual execution result HTTP 200; Target account authorization result is denied; Authorization deviation call T102; Authorization deviation boundary T101→T102; Rule version R12; Anomaly type is "Invalid operation indirectly executed by service subject after permission revocation". The system can output this anomaly result to the permission risk warning interface and mark it as high-risk according to a preset risk level, allowing administrators to further check the authentication configuration and corresponding access rules of service subject S02 used when calling the data export service via OP_AGG.
[0118] When implementing the above operating process, the system does not only determine whether the permission is normal based on whether U01 can directly access the data export interface. Instead, after confirming that direct access has been correctly denied, it further verifies whether the report entry that can still be accessed after the permission change can indirectly execute the same invalid operation through the actual authentication subject conversion. It also associates direct denial and indirect success through the actual path, the same access object, the same permission configuration version, and the same rule version. At the same time, by keeping the actual call conditions and access rules unchanged and only replacing the permission information to re-authorize, it can further determine that the permission deviation is not caused by changes in request parameters, access objects, or rules. Thus, the anomaly is accurately located at the call boundary where the authentication subject changes from T101 to T102 and the target account's current permission limit is breached for the first time.
[0119] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A method for intelligent verification and anomaly warning of account permissions, applied to an application system where account permissions have changed, characterized in that, include: Obtain the authorization results of interface operations before and after the change of permissions for the target account, and identify interface operations whose authorization results change from allowed to denied as invalid operations; Obtain the interface call relationship and the authentication subject of each call configuration. From the interface operations that are allowed before and after the permission change, determine the interface operation that corresponds to the invalid operation in the last level call of the downstream call chain and has at least one set of adjacent calls with different authentication subjects as the reserved entry point. Obtain the changed account authentication information and the corresponding account authentication subject, initiate the invalidation operation with the account authentication information and obtain the direct authorization result; if rejected, trigger the reserved entry with the account authentication information. Obtain the call record triggered by the reserved entry point. If there is a target call that successfully executes the failed operation, determine the actual path from the reserved entry point to the target call based on the call record, and obtain the actual authentication subject and execution result of each level of call. The actual authentication subject is filtered according to the actual path sequence, and calls that are different from the account authentication subject are selected. The corresponding target account authorization result is determined according to the current permission information of the target account and the access rules of each filtered call. From the filtered calls where the authorization result for the target account is denied and the execution result is successful, the call that is first in the actual path order is identified as the authorization deviation call, and an abnormal result is generated.
2. The method for intelligent verification and anomaly warning of account permissions according to claim 1, characterized in that, The determination of the authorized deviance call includes: From the filtered calls, calls where the target account authorization result is rejected and the execution result is successful are selected to obtain deviation candidate calls; Obtain the previous call of each of the deviation candidate calls in the actual path, and obtain the access rule corresponding to each of the previous calls to obtain the previous access rule; Based on the current permission information of the target account and each of the previous access rules, determine the previous authorization result corresponding to each previous call; From the candidate calls for deviation that are allowed according to the previous authorization result, the call that is first in the actual path order is determined as the authorized deviation call, and the call relationship between the corresponding previous call and the authorized deviation call is determined as the authorized deviation boundary.
3. The method for intelligent verification and anomaly warning of account permissions according to claim 2, characterized in that, The determination of the previous authorization result and the target account authorization result includes: Each previous call and each deviation candidate call are determined as calls to be judged, and each previous access rule and each access rule corresponding to the deviation candidate call are determined as the judgment access rule corresponding to each call to be judged. Obtain the call parameters of each of the calls to be determined and the actual permission information associated with the corresponding actual authentication subject; Extract the parameter items involved in the authorization determination from each of the access determination rules, and extract the parameter values from the corresponding call parameters according to the parameter items to obtain the call condition data; The actual permission information and the corresponding call condition data are input into the corresponding access judgment rule to obtain the actual rule authorization result; If the actual rule authorization result is allowed, keep the corresponding call condition data and the access judgment rule unchanged, replace the actual permission information with the current permission information of the target account, re-perform the authorization judgment, and obtain the replacement authorization result; The replacement authorization result corresponding to each of the previous calls is determined as the previous authorization result, and the replacement authorization result corresponding to each of the deviation candidate calls is determined as the target account authorization result.
4. The method for intelligent verification and anomaly warning of account permissions according to claim 3, characterized in that, The determination of the access rules and the invocation condition data includes: Obtain the rule version identifier and parameter snapshot corresponding to each call to be judged from the call record; Obtain the corresponding access rule snapshot according to the rule version identifier, and determine the access rule snapshot as the corresponding judgment access rule; The call parameters are obtained from the parameter snapshot, the parameter items participating in the authorization determination are extracted from the access rule snapshot, and the parameter values are extracted from the corresponding call parameters according to the parameter items to obtain the call condition data; Keeping the access rule snapshot and the invocation condition data unchanged, authorization determination is performed based on the actual permission information and the current permission information of the target account, respectively, to obtain the actual rule authorization result and the replacement authorization result.
5. The method for intelligent verification and anomaly warning of account permissions according to claim 1, characterized in that, The determination of the target call includes: Obtain the operation identifier and access object identifier corresponding to the invalidation operation initiated with the account authentication information, and determine them as the invalidation operation identifier and target object identifier, respectively; Obtain the record operation identifier, record object identifier, and record execution result corresponding to each of the aforementioned call records; From each of the call records, select the call records where the record operation identifier matches the failed operation identifier, the record object identifier matches the target object identifier, and the record execution result is successful, and determine the corresponding call as the target call.
6. The method for intelligent verification and anomaly warning of account permissions according to claim 5, characterized in that, The determination of the actual path includes: Obtain the entry call identifier corresponding to the reserved entry from the call record, and obtain the call identifier and parent call identifier corresponding to each call record; Starting with the call identifier corresponding to the target call, the parent call is determined level by level according to the parent call identifier until the call with the entry call identifier is determined; The determined calls are arranged according to the call order from the reserved entry point to the target call to obtain a candidate call sequence, and the actual path is determined based on the candidate call sequence.
7. The method for intelligent verification and anomaly warning of account permissions according to claim 6, characterized in that, The determination of the actual path also includes: Obtain the first permission configuration version identifier and the first rule version identifier corresponding to the invalidation operation initiated with the account authentication information, and obtain the second permission configuration version identifier and the second rule version identifier corresponding to the target call occurring; Determine whether the first permission configuration version identifier and the second permission configuration version identifier are consistent, and determine whether the first rule version identifier and the second rule version identifier are consistent; If all are consistent, the candidate call sequence is determined as the actual path.
8. The method for intelligent verification and anomaly warning of account permissions according to claim 1, characterized in that, Obtaining the authorization result of the interface operation includes: Obtain the first account permission information before the target account permission change, the second account permission information after the permission change, and the interface access rules corresponding to each interface operation; Based on the first account permission information and the second account permission information, authorization determination is performed in conjunction with the access rules of each interface to obtain the first authorization result and the second authorization result corresponding to each interface operation. The first authorization result and the second authorization result are respectively determined as the interface operation authorization results before and after the permission change.
9. The method for intelligent verification and anomaly warning of account permissions according to claim 8, characterized in that, The determination of the reserved entry point includes: Candidate entry points are determined from interface operations where both the first and second authorization results are allowed; Based on the interface call relationship, downstream calls are determined step by step from each of the candidate entry points until the candidate call chain corresponding to the failed operation of the final call is obtained; Obtain the authentication configuration corresponding to each call in each of the candidate call chains, extract the authentication subject from each authentication configuration, and obtain the candidate authentication subject corresponding to each call; Determine whether there are adjacent calls with different candidate authentication subjects in each of the candidate call chains. If so, determine the corresponding candidate entry as the reserved entry.
10. An intelligent account permission verification and anomaly warning system, which executes the intelligent account permission verification and anomaly warning method as described in any one of claims 1-9 during operation, characterized in that, include: The data management module is used to obtain account permission data, interface call data and authentication data from the application system, and output the obtained data to the verification module; The verification module, connected to the data management module, is used to receive the account permission data, the interface call data and the authentication data, determine the invalidation operation and the reserved entry corresponding to the permission change, and output the verification data and call records to the analysis module. The analysis module, connected to the verification module, is used to receive the verification data and the call record, determine the actual path and authorized deviation call, and generate abnormal results.
