Authorization policy optimization method and device based on large-scale API call behavior analysis

By splitting and analyzing the IAM system API log data, invalid API calls are identified and recycled, the security risk problem in traditional API authorization policies is solved, and security management is realized in large-scale API call scenarios.

CN118606922BActive Publication Date: 2024-11-26SHENZHEN BAMBOOCLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411096079.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-11-26
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

Traditional API authorization strategies pose huge application security risks, especially in large-scale API calls scenarios, which are difficult to effectively manage and recycle invalid authorizations, resulting in an increase in security threats.

Method used

By obtaining the API log data of the IAM system, it is divided into application dimensions, whitelist IP dimensions and API dimension data, it identifies valid and invalid applications, IP and API URLs, and identifies invalid data based on the preset call time interval threshold, and pushes authorization recycling Prompt message to realize automated authorization strategy optimization.

Benefits of technology

It significantly improves the security of the application, and reduces security threats and improves management efficiency through automatic identification and recycling of invalid authorization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118606922B_ABST
    Figure CN118606922B_ABST
Patent Text Reader

Abstract

The present application relates to an authorization policy optimization method and device based on large-scale API call behavior analysis, wherein the method includes: obtaining API log data of the IAM system, and splitting the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data; identifying valid applications and invalid applications in authorized applications according to the application dimension data; querying the last IP call time and the last API call time of valid applications according to the application and whitelist IP dimension data and the application and API dimension data; identifying invalid IP and invalid API URL in valid applications based on the preset call time interval threshold, the last IP call time and the last API call time; generating and pushing authorization recovery prompt messages according to invalid applications, invalid IPs and invalid API URLs. The entire solution can significantly improve application security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of application security technology, and in particular to an authorization policy optimization method, apparatus, computer equipment, storage medium and computer program product based on large-scale API (Application Programming Interface) call behavior analysis. Background Art

[0002] API Gateway is a server that is the only entrance to the system. When external requests enter the system, they must pass through the API Gateway. The role of the API Gateway is similar to that of a forwarder. It is responsible for receiving requests sent by the client, and then forwarding the requests to the corresponding backend services according to the preset rules. At the same time, it also performs a series of processing on the requests, such as authentication, authorization, current limiting, and circuit breaking.

[0003] In traditional technology, when an application needs to open its own capabilities to other applications in the form of APIs, it is generally necessary for the application administrator to manually authorize and open a limited range of APIs that can complete the integration scenario for the caller to call. However, in the actual implementation process, it is often encountered that all authorizations are granted for convenience, or the integration party has taken the integration function offline and no longer uses these APIs, but these authorizations are still there. Some applications will set only certain IP addresses that can call the API to prevent the API authorization from being cracked. However, the more applications an application's API faces, the wider its exposure is, and the easier it is to be exploited by attackers. There are even some integrated applications that may not notify the API provider after they go offline, which will cause this IP whitelist to become an invalid authorization that can be exploited.

[0004] It can be seen that the authorization strategy in traditional technology has huge application security risks. Summary of the invention

[0005] Based on this, it is necessary to provide an authorization policy optimization method, device, computer equipment, computer-readable storage medium and computer program product based on large-scale API call behavior analysis that can significantly improve application security in response to the above technical problems.

[0006] In a first aspect, the present application provides an authorization policy optimization method based on large-scale API call behavior analysis. The method comprises:

[0007] Obtain API log data of an IAM (Identity and Access Management) system, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data;

[0008] Identifying valid applications and invalid applications among authorized applications according to the application dimension data;

[0009] According to the application and whitelist IP dimension data and the application and API dimension data, query the last IP call time and the last API call time in the valid application;

[0010] Identify invalid IP addresses and invalid API URLs (Uniform Resource Locators) in the valid application based on a preset call time interval threshold, the last call time of the IP address, and the last call time of the API address;

[0011] According to the invalid application, the invalid IP and the invalid API URL, an authorization recovery prompt message is generated and pushed.

[0012] In one embodiment, obtaining API log data of the IAM system and splitting the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data includes:

[0013] Get API log data of the IAM system;

[0014] Asynchronously writing the API log data into a message queue;

[0015] The API log data in the message queue is monitored, and the API log data is split into application dimension data, application and whitelist IP dimension data, and application and API dimension data.

[0016] In one embodiment, before identifying valid applications and invalid applications in authorized applications according to the application dimension data, the method further includes:

[0017] Writing the application dimension data, the application and whitelist IP dimension data, and the application and API dimension data into a cache database;

[0018] The data in the cache database is overwritten and updated at preset time intervals.

[0019] In one embodiment, before identifying the invalid IP and invalid API URL in the valid application based on the preset call time interval threshold, the last call time of the IP and the last call time of the API, the method further includes:

[0020] Get API configuration data;

[0021] A preset call time interval threshold is extracted from the API configuration data.

[0022] In one embodiment, before identifying the invalid IP and invalid API URL in the valid application based on the preset call time interval threshold, the last call time of the IP, and the last call time of the API, the method further includes:

[0023] Get API call history data;

[0024] According to the API call history data, the average call interval time of each API call is obtained;

[0025] Based on the average call interval time and the preset floating fault tolerance rate, a preset call time interval threshold is obtained.

[0026] In one embodiment, generating and pushing an authorization recovery prompt message according to the invalid application, the invalid IP and the invalid API URL includes:

[0027] Periodically collect the invalid applications, invalid IPs and invalid API URLs to generate an invalid data list;

[0028] Generate an authorization recovery prompt message based on the invalid data list;

[0029] Push the authorization recovery reminder message to a preset email address.

[0030] In a second aspect, the present application also provides an authorization policy optimization device based on large-scale API call behavior analysis. The device comprises:

[0031] A data splitting module is used to obtain API log data of the IAM system and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data;

[0032] A first identification module, configured to identify valid applications and invalid applications among authorized applications according to the application dimension data;

[0033] A query module, used to query the last IP call time and the last API call time in the valid application according to the application and whitelist IP dimension data and the application and API dimension data;

[0034] A second identification module is used to identify invalid IPs and invalid API URLs in the valid application based on a preset call time interval threshold, the last call time of the IP, and the last call time of the API;

[0035] The prompt module is used to generate and push an authorization recovery prompt message according to the invalid application, the invalid IP and the invalid API URL.

[0036] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0037] Obtain API log data of the IAM system, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data;

[0038] Identifying valid applications and invalid applications among authorized applications according to the application dimension data;

[0039] According to the application and whitelist IP dimension data and the application and API dimension data, query the last IP call time and the last API call time in the valid application;

[0040] Based on a preset call time interval threshold, the last call time of the IP, and the last call time of the API, identifying invalid IPs and invalid API URLs in the valid application;

[0041] According to the invalid application, the invalid IP and the invalid API URL, an authorization recovery prompt message is generated and pushed.

[0042] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0043] Obtain API log data of the IAM system, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data;

[0044] Identifying valid applications and invalid applications among authorized applications according to the application dimension data;

[0045] According to the application and whitelist IP dimension data and the application and API dimension data, query the last IP call time and the last API call time in the valid application;

[0046] Based on a preset call time interval threshold, the last call time of the IP, and the last call time of the API, identifying invalid IPs and invalid API URLs in the valid application;

[0047] According to the invalid application, the invalid IP and the invalid API URL, an authorization recovery prompt message is generated and pushed.

[0048] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0049] Obtain API log data of the IAM system, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data;

[0050] Identifying valid applications and invalid applications among authorized applications according to the application dimension data;

[0051] According to the application and whitelist IP dimension data and the application and API dimension data, query the last IP call time and the last API call time in the valid application;

[0052] Based on a preset call time interval threshold, the last call time of the IP, and the last call time of the API, identifying invalid IPs and invalid API URLs in the valid application;

[0053] According to the invalid application, the invalid IP and the invalid API URL, an authorization recovery prompt message is generated and pushed.

[0054] The above authorization strategy optimization method, device, computer equipment, storage medium and computer program product based on large-scale API call behavior analysis obtains the API log data of the IAM system, and splits the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data; according to the application dimension data, identifies the valid applications and invalid applications in the authorized applications; according to the application and whitelist IP dimension data and the application and API dimension data, queries the last call time of the IP and the last call time of the API in the valid application; based on the preset call time interval threshold, the last call time of the IP and the last call time of the API, identifies the invalid IP and invalid API URL in the valid application; according to the invalid application, invalid IP and invalid API URL, generates and pushes the authorization recovery prompt message. In the whole process, based on the API log data, data analysis is performed from the three dimensions of application, application and whitelist IP, and application and API, respectively, to identify invalid applications and invalid IP and invalid API URL, and push the authorization recovery prompt message to the administrator to prompt the administrator to recover the authorization permissions corresponding to these invalid data, which can significantly improve the application security. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 This is an application environment diagram of an authorization policy optimization method based on large-scale API call behavior analysis in one embodiment;

[0056] Figure 2 A flowchart of an authorization policy optimization method based on large-scale API call behavior analysis in one embodiment;

[0057] Figure 3 It is a flowchart of an authorization policy optimization method based on large-scale API call behavior analysis in another embodiment;

[0058] Figure 4 It is a structural block diagram of an authorization policy optimization device based on large-scale API call behavior analysis in one embodiment;

[0059] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0061] The authorization policy optimization method based on large-scale API call behavior analysis provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 is connected to the IAM system, and the application manager operates on the IAM system to authorize a specific range of API permissions and the IP of the third-party application for the third-party application. In the actual operation of the IAM system, API log data is generated in real time, and the terminal 102 obtains the API log data of the IAM system, and splits the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data; according to the application dimension data, the valid application and invalid application are identified; according to the application and whitelist IP dimension data and the application and API dimension data, the last call time of the IP and the last call time of the API in the valid application are queried; based on the preset call time interval threshold, the last call time of the IP and the last call time of the API, the invalid IP and invalid API URL in the valid application are identified; according to the invalid application, invalid IP and invalid API URL, an authorization recovery prompt message is generated and pushed to the application manager. For example, the terminal 102 can actively send an email carrying an authorization recovery prompt message to the preset mailbox of the application manager.

[0062] In one embodiment, Figure 2 As shown in the figure, an authorization policy optimization method based on large-scale API call behavior analysis is provided. Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:

[0063] S100: Obtain API log data of the IAM system, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data.

[0064] IAM is a key component in cloud computing and network security. It is responsible for verifying user identities and controlling access to system resources such as data, applications, APIs, etc. The IAM system ensures that only authorized users or systems can access specific resources, thereby improving overall security and compliance. When third-party applications call the API of the IAM system, API logs will be generated. You can directly obtain the API log data of the IAM system through ELK (Elasticsearch, Logstash, Kibana) and other log collection technologies.

[0065] The attributes in the log include the following: Call time: records the timestamp of the API call, which is used to analyze the time distribution and performance bottleneck of the API call. Call IP: records the source of the API call, which is used to locate the source of the API call. Caller: Generally identified by ClientID, which is used to identify which application. API URL: used to identify the API address being called. Request parameters: records the request parameters passed when the API is called, including request header, request body, etc. These parameters are crucial for understanding the API call method and data transmission. Response result: records the response result after the API call, including response code, response body, etc. The response result reflects the success or failure of the API call and the returned data content. Error message: If the API call fails, the corresponding error message will be recorded in the log. These messages can help developers quickly locate the cause of the problem and fix it. Call status: records the status of the API call, such as success, failure, etc. The call status is an important indicator for evaluating the results of API calls. Trace ID: used to track and associate a complete API call process, which is convenient for troubleshooting in distributed systems.

[0066] Generally speaking, the acquired API log data is semi-structured or unstructured, and tools can be called here to parse these API log data. For the parsed data, split it into application dimension data, application and whitelist IP dimension data, and application and API dimension data. Among them, application dimension data: group all log records related to a specific application together. This usually involves filtering log records by application ID or similar identifiers. Application and whitelist IP dimension data: based on the application dimension data, further filter out those log records from whitelist IP addresses. Here, a list of whitelist IP addresses can be maintained and compared with it when processing log data. Application and API dimension data: group all log records related to specific applications and APIs together. This usually involves filtering log records by application ID and API name.

[0067] S200: Identify valid applications and invalid applications among authorized applications according to the application dimension data.

[0068] The application dimension data is further analyzed for expired and invalid applications, that is, the last call time of the application is obtained based on the application dimension data. If the difference between the current time and the last call time is greater than the preset value, the application is determined to be invalid. If the difference between the current time and the last call time is not greater than the preset value, the application is determined to be valid. In the application example, valid applications and invalid applications in the authorized applications are identified according to the application dimension data as shown in Table 1 below.

[0069] Table 1 shows the list of authorized applications and their last call time aggregated based on application dimension data

[0070]

[0071] S300: According to the application and whitelist IP dimension data and the application and API dimension data, query the last IP call time and the last API call time in the valid application.

[0072] A similar processing method is adopted for the application and whitelist IP dimension data and the application and API dimension data. On the basis of the valid application, the last IP call time and the last API call time in the valid application are further queried.

[0073] S400: Identify invalid IPs and invalid API URLs in valid applications based on a preset call time interval threshold, the last call time of the IP, and the last call time of the API.

[0074] The preset call time interval threshold is a preset time threshold, which can be determined based on the agreement between the API and the caller during authorization, and is generally calculated in days. It can also be determined based on historical data analysis. Based on the processing of S200 and S300, the preset call time interval threshold is combined to determine whether the API and IP are active (valid). The details are shown in Table 2 below.

[0075] Table 2 shows the analysis results of API and IP calls in the application example

[0076]

[0077] S500: Generate and push an authorization revocation prompt message based on the invalid application, invalid IP and invalid API URL.

[0078] The invalid applications, invalid IPs and invalid API URLs are merged, and an authorization recovery prompt message is generated, which is further pushed to the administrator. The merged data is shown in Table 3 below.

[0079] Table 3 shows the invalid results after merging in the application example

[0080]

[0081] In actual application, the management personnel can decide whether to recycle the authorization authority of these invalid objects to ensure the safety of the application. In addition, the management personnel can be notified that these invalid objects exist, and the terminal automatically recycles the authorization authority of these invalid objects.

[0082] The above authorization policy optimization method based on large-scale API call behavior analysis obtains the API log data of the IAM system and splits the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data; identifies valid applications and invalid applications in authorized applications based on application dimension data; queries the last IP call time and API last call time in valid applications based on application and whitelist IP dimension data and application and API dimension data; identifies invalid IP and invalid API URL in valid applications based on preset call time interval threshold, IP last call time and API last call time; generates and pushes authorization recovery prompt messages based on invalid applications, invalid IP and invalid API URL. In the whole process, based on API log data, data analysis is performed from three dimensions: application, application and whitelist IP, and application and API, to identify invalid applications, invalid IP and invalid API URL, and push authorization recovery prompt messages to managers to prompt managers to recover the authorization permissions corresponding to these invalid data, which can significantly improve application security.

[0083] like Figure 3 As shown, in one embodiment, S100 includes:

[0084] S120: Obtain API log data of the IAM system.

[0085] Get API log data from the IAM system. This can usually be achieved through API calls, system log exports, or integrated logging services such as AWS CloudTrail, Azure Monitor, etc.

[0086] S140: Asynchronously write the API log data into the message queue.

[0087] Use message queues (such as RabbitMQ, Apache Kafka, AWS SQS, etc.) to process log data asynchronously. This can improve the scalability and responsiveness of the system because message queues can decouple the production and consumption of logs. Send API log data as messages to the message queue for subsequent processing.

[0088] S160: Monitor the API log data in the message queue, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data.

[0089] Create a listening thread to listen to the API log data in the message queue, and split the API log data according to different dimensions to obtain application dimension data, application and whitelist IP dimension data, and application and API dimension data. Among them, application dimension data: extract all information related to a specific application in the log, such as application name, access time, access results, etc. Application and whitelist IP dimension data: further subdivide the application dimension data, add the IP address information of the access source, and mark which IP addresses belong to the whitelist. Application and API dimension data: extract all information related to a specific application and API call in the log, such as API name, request parameters, return results, etc.

[0090] In one embodiment, before identifying valid applications and invalid applications in authorized applications according to the application dimension data, the method further includes:

[0091] Write application dimension data, application and whitelist IP dimension data, and application and API dimension data into the cache database; overwrite and update the data in the cache database at preset intervals.

[0092] Before using the application dimension data for further analysis, the application dimension data, application and whitelist IP dimension data, and application and API dimension data are first written to the cache database. Later, only these application dimension data, application and whitelist IP dimension data, and application and API dimension data need to be read from the cache database. In addition, since the storage space of the cache database is limited, in order to reduce the amount of data written to the cache database, here, if there is duplicate data, the data in the cache database is updated by overwriting, that is, the data entered later will overwrite the data entered earlier at a preset interval. The preset time here can be set according to the actual situation, for example, it can be set to 5 minutes, 10 minutes, 15 minutes, etc.

[0093] In one embodiment, before identifying invalid IPs and invalid API URLs in valid applications based on a preset call time interval threshold, the last call time of the IP, and the last call time of the API, the method further includes:

[0094] Obtain API configuration data; extract a preset call time interval threshold from the API configuration data.

[0095] In this embodiment, the preset call time interval threshold is obtained through the API configuration data corresponding to the API configuration. Here, the storage location of the API configuration data is first determined, and then the API configuration data is obtained from the storage location, and then the obtained configuration data is parsed into an operable format, and the preset call time interval threshold is searched in the parsed configuration data. The preset call time interval threshold can be X days, such as 3 days, 5 days, 10 days, etc.

[0096] In one embodiment, before identifying invalid IPs and invalid API URLs in valid applications based on a preset call time interval threshold, the last call time of the IP, and the last call time of the API, the method further includes:

[0097] Obtain API call history data; obtain the average call interval time of each API call based on the API call history data; obtain the preset call time interval threshold based on the average call interval time and the preset floating fault tolerance rate.

[0098] In this embodiment, the preset call time interval threshold is determined by analyzing historical data. Specifically, the API call history data can be obtained from a data source such as a log system, a database, or an API management platform, and the obtained data can be parsed into an operable format, such as a list or a dictionary, where each element represents an API call; for each API call, its timestamp information is extracted to ensure that the timestamp is in a unified format, such as a Unix timestamp; the timestamp is converted to a comparable date and time format; the timestamps are sorted to ensure that they are arranged in the order of the call; the time difference between two adjacent calls is calculated; the average of all time differences is calculated to obtain the average call interval time. According to business needs, set a floating fault tolerance rate (for example, 200%, 300%, etc.). Then, this fault tolerance rate is applied to the average call interval time to calculate the preset call time interval threshold.

[0099] In one embodiment, generating and pushing an authorization revocation prompt message according to an invalid application, an invalid IP, and an invalid API URL includes:

[0100] Periodically collect invalid applications, invalid IPs and invalid API URLs to generate an invalid data list; generate authorization recovery prompt messages based on the invalid data list; and push authorization recovery prompt messages to the preset email address.

[0101] The periodicity here can be daily, that is, invalid applications, invalid IPs and invalid API URLs are collected every day to generate an invalid data list, and then an authorization recovery prompt message is generated based on the invalid data list, and the authorization recovery prompt message is sent to the preset email address set by the administrator to remind the administrator that the authorization permissions for these invalid objects need to be recovered, or the authorization permissions for these invalid objects have been automatically recovered. Furthermore, when authorization is recovered, the risk identification of the API call source (i.e., IP) can be combined with authorization recovery, such as combining third-party IP threat sources, or analyzing the UA (User-Agent), request results and request time of recent real-time requests to identify suspicious request IPs, and issue alarms or temporary permission recovery.

[0102] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0103] Based on the same inventive concept, the embodiment of the present application also provides an authorization policy optimization device based on large-scale API call behavior analysis for implementing the authorization policy optimization method based on large-scale API call behavior analysis involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more authorization policy optimization devices based on large-scale API call behavior analysis provided below can refer to the limitations of the authorization policy optimization method based on large-scale API call behavior analysis above, and will not be repeated here.

[0104] In one embodiment, Figure 4 As shown, an authorization policy optimization device based on large-scale API call behavior analysis is provided, including:

[0105] The data splitting module 100 is used to obtain the API log data of the IAM system and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data;

[0106] A first identification module 200, for identifying valid applications and invalid applications among authorized applications according to application dimension data;

[0107] The query module 300 is used to query the last IP call time and the last API call time in the valid application according to the application and whitelist IP dimension data and the application and API dimension data;

[0108] The second identification module 400 is used to identify invalid IPs and invalid API URLs in valid applications based on a preset call time interval threshold, the last call time of the IP, and the last call time of the API;

[0109] The prompt module 500 is used to generate and push an authorization revocation prompt message according to invalid applications, invalid IPs and invalid API URLs.

[0110] In one of the embodiments, the data splitting module 100 is also used to obtain API log data of the IAM system; asynchronously write the API log data to the message queue; monitor the API log data in the message queue, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data.

[0111] In one embodiment, the first identification module 200 is further used to write application dimension data, application and whitelist IP dimension data, and application and API dimension data into the cache database; and to overwrite and update the data in the cache database at preset intervals.

[0112] In one embodiment, the second identification module 400 is further used to obtain API configuration data; and extract a preset call time interval threshold from the API configuration data.

[0113] In one embodiment, the second identification module 400 is also used to obtain API call history data; based on the API call history data, obtain the average call interval time of each API call; based on the average call interval time and the preset floating fault tolerance rate, obtain the preset call time interval threshold.

[0114] In one embodiment, the prompt module 500 is also used to periodically collect invalid applications, invalid IPs and invalid API URLs to generate an invalid data list; generate an authorization recovery prompt message based on the invalid data list; and push the authorization recovery prompt message to a preset email address.

[0115] Each module in the above authorization policy optimization device based on large-scale API call behavior analysis can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0116] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 5As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an authorization policy optimization method based on large-scale API call behavior analysis is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0117] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0118] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0119] Obtain the API log data of the IAM system, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data;

[0120] Based on the application dimension data, identify valid applications and invalid applications among the authorized applications;

[0121] Based on the application and whitelist IP dimension data and the application and API dimension data, query the last IP call time and API last call time in the valid application;

[0122] Identify invalid IPs and invalid API URLs in valid applications based on preset call interval thresholds, IP last call time, and API last call time;

[0123] Generate and push authorization revocation prompt messages based on invalid applications, invalid IPs, and invalid API URLs.

[0124] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0125] Obtain API log data from the IAM system; asynchronously write API log data to the message queue; monitor API log data in the message queue, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data.

[0126] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0127] Write application dimension data, application and whitelist IP dimension data, and application and API dimension data into the cache database; overwrite and update the data in the cache database at preset intervals.

[0128] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0129] Obtain API configuration data; extract a preset call time interval threshold from the API configuration data.

[0130] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0131] Obtain API call history data; obtain the average call interval time of each API call based on the API call history data; obtain the preset call time interval threshold based on the average call interval time and the preset floating fault tolerance rate.

[0132] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0133] Periodically collect invalid applications, invalid IPs and invalid API URLs to generate an invalid data list; generate authorization recovery prompt messages based on the invalid data list; and push authorization recovery prompt messages to the preset email address.

[0134] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0135] Obtain the API log data of the IAM system, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data;

[0136] Based on the application dimension data, identify valid applications and invalid applications among the authorized applications;

[0137] Based on the application and whitelist IP dimension data and the application and API dimension data, query the last IP call time and API last call time in the valid application;

[0138] Identify invalid IPs and invalid API URLs in valid applications based on preset call interval thresholds, IP last call time, and API last call time;

[0139] Generate and push authorization revocation prompt messages based on invalid applications, invalid IPs, and invalid API URLs.

[0140] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0141] Obtain API log data from the IAM system; asynchronously write API log data to the message queue; monitor API log data in the message queue, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data.

[0142] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0143] Write application dimension data, application and whitelist IP dimension data, and application and API dimension data into the cache database; overwrite and update the data in the cache database at preset intervals.

[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0145] Obtain API configuration data; extract a preset call time interval threshold from the API configuration data.

[0146] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0147] Obtain API call history data; obtain the average call interval time of each API call based on the API call history data; obtain the preset call time interval threshold based on the average call interval time and the preset floating fault tolerance rate.

[0148] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0149] Periodically collect invalid applications, invalid IPs and invalid API URLs to generate an invalid data list; generate authorization recovery prompt messages based on the invalid data list; and push authorization recovery prompt messages to the preset email address.

[0150] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0151] Obtain the API log data of the IAM system, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data;

[0152] Based on the application dimension data, identify valid applications and invalid applications among the authorized applications;

[0153] Based on the application and whitelist IP dimension data and the application and API dimension data, query the last IP call time and API last call time in the valid application;

[0154] Identify invalid IPs and invalid API URLs in valid applications based on preset call interval thresholds, IP last call time, and API last call time;

[0155] Generate and push authorization revocation prompt messages based on invalid applications, invalid IPs, and invalid API URLs.

[0156] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0157] Obtain API log data from the IAM system; asynchronously write API log data to the message queue; monitor API log data in the message queue, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data.

[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0159] Write application dimension data, application and whitelist IP dimension data, and application and API dimension data into the cache database; overwrite and update the data in the cache database at preset intervals.

[0160] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0161] Obtain API configuration data; extract a preset call time interval threshold from the API configuration data.

[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0163] Obtain API call history data; obtain the average call interval time of each API call based on the API call history data; obtain the preset call time interval threshold based on the average call interval time and the preset floating fault tolerance rate.

[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0165] Periodically collect invalid applications, invalid IPs and invalid API URLs to generate an invalid data list; generate authorization recovery prompt messages based on the invalid data list; and push authorization recovery prompt messages to the preset email address.

[0166] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0167] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0168] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.

[0169] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An authorization policy optimization method based on large-scale API call behavior analysis, characterized in that: The method comprises: Obtain API log data of the IAM system, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data; Identifying valid applications and invalid applications among authorized applications according to the application dimension data; According to the application and whitelist IP dimension data and the application and API dimension data, query the last IP call time and the last API call time in the valid application; Based on a preset call time interval threshold, the last call time of the IP, and the last call time of the API, identifying invalid IPs and invalid API URLs in the valid application; Generate and push an authorization recovery prompt message based on the invalid application, the invalid IP and the invalid API URL; Before identifying invalid IPs and invalid API URLs in the valid application based on the preset call time interval threshold, the last call time of the IP and the last call time of the API, the method also includes: obtaining API call history data; obtaining the average call interval time of each API call based on the API call history data; and obtaining the preset call time interval threshold based on the average call interval time and the preset floating fault tolerance rate.

2. The method according to claim 1, characterized in that The step of obtaining the API log data of the IAM system and splitting the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data includes: Get API log data of the IAM system; Asynchronously writing the API log data into a message queue; The API log data in the message queue is monitored, and the API log data is split into application dimension data, application and whitelist IP dimension data, and application and API dimension data.

3. The method according to claim 1, characterized in that Before identifying valid applications and invalid applications in authorized applications according to the application dimension data, the method further includes: Writing the application dimension data, the application and whitelist IP dimension data, and the application and API dimension data into a cache database; The data in the cache database is overwritten and updated at preset time intervals.

4. The method according to claim 1, characterized in that: Before identifying the invalid IP and invalid API URL in the valid application based on the preset call time interval threshold, the last call time of the IP, and the last call time of the API, the method further includes: Get API configuration data; A preset call time interval threshold is extracted from the API configuration data.

5. The method according to claim 1, characterized in that The generating and pushing the authorization recovery prompt message according to the invalid application, the invalid IP and the invalid API URL includes: Periodically collect the invalid applications, invalid IPs and invalid API URLs to generate an invalid data list; Generate an authorization recovery prompt message based on the invalid data list; Push the authorization recovery reminder message to a preset email address.

6. An authorization policy optimization device based on large-scale API call behavior analysis, characterized in that: The device comprises: A data splitting module is used to obtain API log data of the IAM system and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data; A first identification module, configured to identify valid applications and invalid applications among authorized applications according to the application dimension data; A query module, used to query the last IP call time and the last API call time in the valid application according to the application and whitelist IP dimension data and the application and API dimension data; A second identification module is used to identify invalid IPs and invalid API URLs in the valid application based on a preset call time interval threshold, the last call time of the IP, and the last call time of the API; A prompt module, used to generate and push an authorization recovery prompt message according to the invalid application, the invalid IP and the invalid API URL; The second identification module is also used to obtain API call history data; based on the API call history data, obtain the average call interval time of each API call; based on the average call interval time and the preset floating fault tolerance rate, obtain the preset call time interval threshold.

7. The device according to claim 6, characterized in that The data splitting module is also used to obtain the API log data of the IAM system; asynchronously write the API log data to the message queue; monitor the API log data in the message queue, and split the API log data into application dimension data, application and whitelist IP dimension data, and application and API dimension data.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.