Abnormal interface identification method and device, computer equipment and storage medium
By counting and recording the interface description documents of the business backend system, and automatically identifying abnormal interfaces, the problem of expired API residues caused by API adjustments and new additions is solved, the risk of data leakage is reduced, and data security performance is improved.
Patent Information
- Application Number
- CN202310579616.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-19
- Publication Date
- 2024-11-22
AI Technical Summary
With frequent adjustments and additions to application programming interfaces (APIs) in enterprise systems, the risk of expired APIs is increased, especially in terms of data breaches and service outages.
By counting the interface description documents of the business backend system, combining the data records of the intelligent gateway and interface gateway, abnormal interfaces are automatically identified and handled, and regular abnormal interface detection and monitoring are realized to reduce the risk of data leakage caused by abnormal interfaces.
It effectively reduces the risk of data leakage caused by illegal access to abnormal interfaces, improves data security performance, and ensures the stability and security of the business system.
Smart Images

Figure CN119004449A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an abnormal interface identification method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the development of Internet technology, the large-scale rise of application modes based on application programming interfaces (APIs) has realized the interconnection between internal systems and third-party platforms, as well as the rapid iteration of development modes. Application programming interfaces are essentially some pre-defined functions, which aim to provide applications and developers with the ability to access a set of routines based on certain software or hardware without accessing the source code or understanding the details of the internal working mechanism. However, with the frequent adjustments and additions of application programming interfaces introduced in enterprise systems, various abnormal interfaces, including expired application programming interfaces, which should have been eliminated, remain in large numbers in various nodes of the enterprise network during the process of functional iteration. Therefore, application programming interfaces have become an important target of network attacks. When application programming interfaces are attacked, many risks may arise, such as data loss, account abuse, data leakage, service interruption, etc.
[0003] At present, the life cycle of enterprise interfaces is generally managed by analyzing design documents and log files. With the frequent changes and growth of interfaces brought about by agile development and rapid iteration, and due to the lack of sufficient document follow-up and maintenance, there is a large difference between the interface documentation and the current situation, thereby increasing the risk of data leakage. Summary of the invention
[0004] Based on this, it is necessary to provide an abnormal interface identification method, device, computer equipment, computer-readable storage medium and computer program product that can reduce the risk of data leakage in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for identifying an abnormal interface. The method comprises:
[0006] The static interfaces in the interface description document of the business backend system are counted to obtain the existing static interfaces; the business backend system includes an intelligent gateway and an interface gateway; the intelligent gateway is used to extract the interface call request from the access request for the business backend system, and forward the interface call request to the interface gateway, and the interface gateway is used to authenticate the interface call request;
[0007] Acquire first record data of the intelligent gateway forwarding the interface call request within the target time period, and second record data of the interface gateway calling the interface based on the interface call request within the target time period;
[0008] Determine interface call data of each interface in the existing static interface based on the first record data and the second record data;
[0009] Based on the interface call data of each interface, abnormal interface identification processing is performed to determine the abnormal interface with abnormal call in the existing static interface.
[0010] In a second aspect, the present application also provides an abnormal interface identification device. The device includes:
[0011] The interface statistics module is used to count the static interfaces in the interface description document of the business background system to obtain the existing static interfaces; the business background system includes an intelligent gateway and an interface gateway; the intelligent gateway is used to extract the interface call request from the access request for the business background system and forward the interface call request to the interface gateway, and the interface gateway is used to authenticate the interface call request;
[0012] A call data acquisition module, used to acquire first record data of the intelligent gateway forwarding the interface call request within the target period, and second record data of the interface gateway calling the interface based on the interface call request within the target period;
[0013] A call data processing module, used to determine the interface call data of each interface in the existing static interface based on the first record data and the second record data;
[0014] The abnormal interface identification module is used to perform abnormal interface identification processing based on the interface call data of each interface, and determine the abnormal interface with abnormal call in the existing static interface.
[0015] 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:
[0016] The static interfaces in the interface description document of the business backend system are counted to obtain the existing static interfaces; the business backend system includes an intelligent gateway and an interface gateway; the intelligent gateway is used to extract the interface call request from the access request for the business backend system, and forward the interface call request to the interface gateway, and the interface gateway is used to authenticate the interface call request;
[0017] Acquire first record data of the intelligent gateway forwarding the interface call request within the target time period, and second record data of the interface gateway calling the interface based on the interface call request within the target time period;
[0018] Determine interface call data of each interface in the existing static interface based on the first record data and the second record data;
[0019] Based on the interface call data of each interface, abnormal interface identification processing is performed to determine the abnormal interface with abnormal call in the existing static interface.
[0020] 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:
[0021] The static interfaces in the interface description document of the business backend system are counted to obtain the existing static interfaces; the business backend system includes an intelligent gateway and an interface gateway; the intelligent gateway is used to extract the interface call request from the access request for the business backend system, and forward the interface call request to the interface gateway, and the interface gateway is used to authenticate the interface call request;
[0022] Acquire first record data of the intelligent gateway forwarding the interface call request within the target time period, and second record data of the interface gateway calling the interface based on the interface call request within the target time period;
[0023] Determine interface call data of each interface in the existing static interface based on the first record data and the second record data;
[0024] Based on the interface call data of each interface, abnormal interface identification processing is performed to determine the abnormal interface with abnormal call in the existing static interface.
[0025] 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:
[0026] The static interfaces in the interface description document of the business backend system are counted to obtain the existing static interfaces; the business backend system includes an intelligent gateway and an interface gateway; the intelligent gateway is used to extract the interface call request from the access request for the business backend system, and forward the interface call request to the interface gateway, and the interface gateway is used to authenticate the interface call request;
[0027] Acquire first record data of the intelligent gateway forwarding the interface call request within the target time period, and second record data of the interface gateway calling the interface based on the interface call request within the target time period;
[0028] Determine interface call data of each interface in the existing static interface based on the first record data and the second record data;
[0029] Based on the interface call data of each interface, abnormal interface identification processing is performed to determine the abnormal interface with abnormal call in the existing static interface.
[0030] The above abnormal interface identification method, device, computer equipment, storage medium and computer program product first count the static interfaces in the interface description document of the business backend system to obtain the existing static interfaces, thereby determining all existing static interfaces in the business backend system, and then obtaining the first record data of the intelligent gateway forwarding the interface call request within the target period, and the second record data of the interface gateway calling the interface based on the interface call request within the target period, so that in the process of interface call processing, through the information flow between the intelligent gateway and the interface gateway, the relevant call information of the called interface is determined; finally, based on the first record data and the second record data, the interface call data of each interface in the existing static interface is determined; based on the interface call data of each interface, the abnormal interface identification processing is performed to determine the abnormal interface that calls the abnormality in the existing static interface, that is, by comparing the interface call data of each interface, the abnormal interface that calls the abnormality from the existing static interface is called. The present application collects interface call information in an automated manner, thereby realizing regular abnormal interface detection, reducing the risks of data leakage caused by illegal access to abnormal interfaces, and improving data security performance.
[0031] In a sixth aspect, the present application also provides another abnormal interface identification method. The method includes:
[0032] Receiving an access request forwarded by an access proxy server of a business backend system;
[0033] Parse the access request and identify the interface call request in the access request;
[0034] Forwards the interface call request to the interface gateway of the business backend system;
[0035] Record the forwarded interface call request, generate interface forwarding record data, upload the interface forwarding record data collected during the target period to the abnormal interface identification server, and the abnormal interface identification server is used to detect abnormal interfaces of the business backend system based on the interface call data.
[0036] In a seventh aspect, the present application also provides another abnormal interface identification device. The device includes:
[0037] A request receiving module, used to receive an access request forwarded by an access proxy server of a business backend system;
[0038] A request parsing module is used to parse the access request and identify the interface call request in the access request;
[0039] A request forwarding module is used to forward the interface call request to the interface gateway of the business backend system;
[0040] The data upload module is used to record the forwarded interface call requests, generate interface forwarding record data, and upload the interface forwarding record data collected within the target period to the abnormal interface identification server. The abnormal interface identification server is used to detect abnormal interfaces of the business backend system based on the interface call data.
[0041] In an eighth aspect, the present application also provides another 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:
[0042] Receiving an access request forwarded by an access proxy server of a business backend system;
[0043] Parse the access request and identify the interface call request in the access request;
[0044] Forwards the interface call request to the interface gateway of the business backend system;
[0045] Record the forwarded interface call request, generate interface forwarding record data, upload the interface forwarding record data collected during the target period to the abnormal interface identification server, and the abnormal interface identification server is used to detect abnormal interfaces of the business backend system based on the interface call data.
[0046] In a ninth aspect, the present application also provides another 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:
[0047] Receiving an access request forwarded by an access proxy server of a business backend system;
[0048] Parse the access request and identify the interface call request in the access request;
[0049] Forwards the interface call request to the interface gateway of the business backend system;
[0050] Record the forwarded interface call request, generate interface forwarding record data, upload the interface forwarding record data collected during the target period to the abnormal interface identification server, and the abnormal interface identification server is used to detect abnormal interfaces of the business backend system based on the interface call data.
[0051] In a tenth aspect, the present application also provides another 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:
[0052] Receiving an access request forwarded by an access proxy server of a business backend system;
[0053] Parse the access request and identify the interface call request in the access request;
[0054] Forwards the interface call request to the interface gateway of the business backend system;
[0055] Record the forwarded interface call request, generate interface forwarding record data, upload the interface forwarding record data collected during the target period to the abnormal interface identification server, and the abnormal interface identification server is used to detect abnormal interfaces of the business backend system based on the interface call data.
[0056] The above-mentioned abnormal interface identification method, device, computer equipment, storage medium and computer program product, by receiving the access request forwarded by the access proxy server of the business back-end system, thereby intercepting all access traffic to the business back-end system, and then parsing the access request, identifying the interface call request in the access request, thereby separating the interface call request corresponding to the interface from all access traffic; and forwarding the interface call request to the interface gateway of the business back-end system, implementing the corresponding interface service through the interface gateway, and recording the forwarded interface call request during forwarding, generating interface call data, and uploading the interface call data collected during the target time period to the abnormal interface identification server, thereby providing the abnormal interface identification server with basic data for abnormal interface identification, thereby realizing effective monitoring of abnormal interfaces. The present application collects interface call information in an automated manner, thereby realizing regular abnormal interface detection, reducing the risks of data leakage caused by illegal access to abnormal interfaces, and improving data security performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 An application environment diagram of an abnormal interface identification method in an embodiment;
[0058] Figure 2 A schematic diagram of a flow chart of an abnormal interface identification method in one embodiment;
[0059] Figure 3 A schematic diagram of a flow chart of an abnormal interface identification method in another embodiment;
[0060] Figure 4 A schematic diagram of an interface for configuring authentication on a zero-trust network management terminal in one embodiment;
[0061] Figure 5 A schematic diagram of an interface for configuring secondary authentication of a zero-trust network management terminal in one embodiment;
[0062] Figure 6 This is a schematic diagram of a zero-trust network client login interface in one embodiment;
[0063] Figure 7 This is a schematic diagram of an interface of a zero-trust network client login interface in another embodiment;
[0064] Figure 8 This is a schematic diagram of an interface of a zero-trust network secondary authentication login interface in an embodiment;
[0065] Fig. 9 is a schematic diagram of zero-trust network access logic in one embodiment;
[0066] Fig.10 A schematic diagram of an interface anomaly identification process implemented by a zero-trust network in one embodiment;
[0067] Fig.11 is a structural block diagram of an abnormal interface identification device in an embodiment;
[0068] Fig.12 is a structural block diagram of an abnormal interface identification device in another embodiment;
[0069] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0070] 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.
[0071] In this article, it is important to understand that the terms involved are:
[0072] Zero Trust Access Control Policy: It consists of process information (trusted applications) that users can use and accessible business sites (accessible areas). When permissions are enabled, users can access any accessible area through any trusted application. The granularity of the Zero Trust Access Control Policy is the logged-in user, allowing different Zero Trust policies to be formulated for different logged-in users.
[0073] Zero Trust Gateway: Deployed at the entrance of enterprise applications and data resources, it is responsible for verifying and forwarding each session request to access enterprise resources.
[0074] Access agent: The terminal access agent is a terminal agent deployed on the controlled device to initiate secure access. It is responsible for initiating requests for trusted identity authentication of the access subject. Once the identity is verified to be trustworthy, an encrypted access connection can be established with the access gateway. It is also the policy enforcement point for access control.
[0075] Direct access: In a zero-trust network access architecture, an application initiates a network access request to a site. After the full-flow proxy hijacks the traffic, it initiates network access to the target site through the full-flow proxy, that is, initiates direct connection access. The full-flow proxy sends the network response of the target site to the application. This access mode is called direct access.
[0076] Proxy access: In a zero-trust network access architecture, an application initiates a network access request to a site. After the full-flow proxy hijacks the traffic, the full-flow proxy initiates traffic forwarding to the intelligent gateway, and the intelligent gateway proxy accesses the target business site. After the access, the intelligent gateway sends the network response of the target site to the full-flow proxy, and the full-flow proxy forwards the network response of the target site to the application. This access mode is called proxy access.
[0077] Access subject: In the network, the party that initiates access, the person / device / application that accesses intranet business resources, is a digital entity composed of a single person, device, application, etc. or a combination of these factors.
[0078] Access object: The party being accessed in the network, that is, the enterprise's intranet business resources, including applications, systems (development and testing environment, operation and maintenance environment, production environment, etc.), data, interfaces, functions, etc.
[0079] API: API is an application programming interface, which is composed of a set of tools, definitions and protocols for integrating application software and services. It is mainly used to achieve links between applications.
[0080] API Gateway: An API management tool located between the front-end and back-end service sets. It is part of the API management system. The API Gateway intercepts all incoming requests and sends them out through the API management system. It is equivalent to a reverse proxy, which is used to accept various API calls from the enterprise, integrate and process the various back-end services required for these calls, and return the corresponding results.
[0081] The abnormal interface identification method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 is connected to the access proxy server 104 of the business backend system, and the access proxy server 104 is connected to the intelligent gateway server 106 of the business backend system, and the intelligent gateway server 106 is connected to the interface gateway server 108 and the abnormal interface identification server 110 of the business backend system, and the interface gateway server 108 is connected to the background server 112, and the two connected ends can communicate through the network. The data storage system can store the data that the abnormal interface identification server 110 needs to process. The data storage system can be integrated on the abnormal interface identification server 110, or it can be placed on the cloud or other servers. When the user of the terminal 102 wants to request an interface service from the background server 112, a request can be initiated to the business backend system. All requests initiated by users will be concentrated on the access proxy server 104 and forwarded to the intelligent gateway server 106, and the intelligent gateway server 106 is used to parse the access request, identify the interface call request in the access request, and forward the interface call request to the interface gateway server 108, the interface gateway server 108 is used to authenticate the interface call request, and the intelligent gateway server 106 will also record the forwarded interface call request, generate interface forwarding record data, and upload the interface forwarding record data collected during the target period to the abnormal interface identification server. The abnormal interface identification server 110 will count the static interfaces in the interface description document of the business background system to obtain the existing static interface; and obtain the first record data of the intelligent gateway forwarding the interface call request during the target period, and the second record data of the interface gateway calling the interface based on the interface call request during the target period; based on the first record data and the second record data, determine the interface call data of each interface in the existing static interface; perform abnormal interface identification processing based on the interface call data of each interface, determine the abnormal interface that calls the abnormality in the existing static interface, and perform subsequent processing on the identified abnormal interface. The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Each server in the business backend system may also be implemented as an independent server or a server cluster consisting of multiple servers.
[0082] In one embodiment, Figure 2 As shown, a method for identifying an abnormal interface is provided, and the method is applied to Figure 1 Taking the abnormal interface identification server 110 in the example as an example, the following steps are included:
[0083] Step 201, count the static interfaces in the interface description document of the business background system to obtain the existing static interfaces; the business background system includes an intelligent gateway and an interface gateway; the intelligent gateway is used to extract the interface call request from the access request for the business background system, and forward the interface call request to the interface gateway, and the interface gateway is used to authenticate the interface call request.
[0084] Among them, the business backend system refers to the backend system used to process user requests. The backend system is the interface service deployed on the server node. The front-end system is an independent third-party application. By embedding the call of the interface into the application, different interface requests to the business backend system can be initiated in the front-end system according to different business logics. The static interface is the API in the business backend system. The interface description document refers to the API document for the API provided by the interface manager. The API document is generally divided into several parts: interface description, interface address, request method, request parameters, corresponding content, error code, and instance. Therefore, all existing static interfaces in the business backend system can be determined based on statistics of the static interfaces in the interface description document of the business backend system. The intelligent gateway is deployed at the entrance of the business application program and data resources, and is responsible for the verification, authorization and forwarding of each session request to access business resources. In the scheme of this application, the intelligent gateway can complete the authentication of users, devices and applications in the access request, extract the interface call request, and forward the interface call request to the interface gateway. The interface gateway is the API gateway, which is an API management tool located between the front-end and back-end service sets. It is part of the API management system. The API gateway intercepts all incoming requests and then sends them out through the API management system, which is equivalent to a reverse proxy. It is used to accept various API calls from the business backend system, integrate and process various backend services required for these calls, and return the corresponding results. The interface call data is the record data related to the interface call request forwarded by the smart gateway to the interface gateway.
[0085] Specifically, in the process of iteration of the business system, due to the limitation of the interface function of the old version, defects or more scenarios need to be met, it is necessary to expand the existing interface list, or launch a new version of the interface, and run multiple versions in parallel in the production environment at the same time. In the existing business system environment, expanding different interface lists and iterating new versions of interfaces are common operations, which will not introduce new functional failures due to the lack of interfaces, and relatively speaking, the offline and removal of interfaces are often cautious operations taken by various enterprises. This situation will aggravate the formation and residue of expired interfaces, thereby bringing hidden dangers to the data security, privacy compliance, etc. of the enterprise. Therefore, the method of the present application can be used to identify abnormal interfaces, and in the identification process, it is first necessary to form a static interface category and specific interface information based on the interface document provided by the interface manager for statistical call information. At the same time, combined with the interface call data forwarded to the interface gateway by the intelligent gateway in the business backend system, it can be combined to realize the identification of abnormal interfaces. In one embodiment, when a business site of an enterprise is highly sensitive, the enterprise administrator generally limits the terminal user to access from the enterprise office environment, and prohibits direct access to such business sites or applications (including data, API and other resources) from the Internet. At this time, an access system for these business sites can be built through a zero-trust network system, and the abnormal interface identification method of the present application can be applied to the zero-trust network system to realize the identification of abnormal interfaces through a zero-trust server.
[0086] Step 203: Acquire first record data of the intelligent gateway forwarding the interface call request within the target time period, and second record data of the interface gateway calling the interface based on the interface call request within the target time period.
[0087] The target period refers to the time period for abnormal interface detection, and the abnormal interface can be identified by the interface call data of the business backend system within the target period. In a specific embodiment, the abnormal interface identification of the business backend system can be performed regularly, and the time period between different timed detection nodes can be regarded as the target period. Whether the interface is abnormal can be identified by the interface call data between the timed detection nodes.
[0088] Specifically, the scheme of the present application specifically identifies abnormal interfaces through the interface call data in the business backend system. The identification and detection process is specifically a time-divided detection. Therefore, the interface call data between the intelligent gateway and the interface gateway of the business backend system in the standard time period can be received regularly through the abnormal interface identification server 110. Thus, the first record data of the intelligent gateway forwarding the interface call request in the target time period and the second record data of the interface gateway calling the interface based on the interface call request in the target time period are obtained. Then this part of the target time period interface call data is used as the basic data used in the abnormal interface identification process. In one embodiment, the scheme of the present application is applied to a zero-trust network system. At this time, the access request for the business backend system is uniformly forwarded to the intelligent gateway by the access proxy server, and the intelligent gateway needs to distinguish the API call from the access request and forward it to the API gateway, wherein the intelligent gateway needs to complete the authentication of the user, device and application, and the API gateway is responsible for the authentication of the API call itself. In this process, the intelligent gateway can complete the authentication of the user, device and application, while the API gateway is responsible for the authentication of the API call itself and completes the corresponding API backend service. In this process, the intelligent gateway can record the forwarded interface call request and send it to the zero-trust server responsible for management, so as to realize abnormal interface identification through the zero-trust server. At the same time, in order to identify abnormal APIs, similar to the intelligent gateway sending the data forwarded by the interface call request to the zero-trust server for auditing, the API gateway's call data is also sent to the server by the API gateway through asynchronous reporting and other methods. Both the intelligent gateway and the API gateway report relevant data to the server for auditing through asynchronous reporting and other methods, including data analysis and statistical use, and also include the identification process of expired APIs below. Among them, the data reported by the intelligent gateway includes the details of ticket verification, forwarding indicators of various requests (including API traffic forwarding) (whether the access is successful, network and business error codes, and the size of upstream and downstream traffic), etc. The API gateway sends the forwarding, authentication and call information of each API to the zero-trust server cluster through asynchronous centralized reporting. Then the zero-trust server identifies abnormal interfaces based on the target period interface call data when the business backend system is running.
[0089] Step 205: Determine the interface call data of each interface in the existing static interface based on the first record data and the second record data.
[0090] Specifically, the existing static interfaces shown are all interfaces involved in the business backend system. In order to identify abnormal interfaces, each interface can be discussed separately. Therefore, based on the interface call data of the target period, the interface call data of each interface in the existing static interfaces can be determined. For each interface, the interface call request record corresponding to the interface forwarded by the intelligent gateway and the record of the interface gateway calling the interface can be determined through the interface call data.
[0091] Step 207: performing abnormal interface identification processing based on the interface call data of each interface, and determining the abnormal interface with abnormal call in the existing static interface.
[0092] Among them, abnormal interfaces specifically include old versions and expired interfaces that are no longer used. These expired interfaces are no longer called during the iteration process but are not cleaned up in time, which may cause data risks.
[0093] Specifically, after determining the interface call data of each interface, the abnormal interfaces with call exceptions in the existing static interfaces can be identified based on the interface call data. Since these old versions and expired interfaces that are no longer used have lower call times and calling terminal numbers than other normal interfaces, the interface call data of each interface can be used to identify the abnormal interfaces with abnormal call data in the existing static interfaces, and then these abnormal interfaces can be taken offline and other processing can be performed to ensure the data security of the business back-end system.
[0094] The above abnormal interface identification method first counts the static interfaces in the interface description document of the business backend system to obtain the existing static interfaces, thereby determining all existing static interfaces in the business backend system, and then obtains the first record data of the intelligent gateway forwarding the interface call request within the target period, and the second record data of the interface gateway calling the interface based on the interface call request within the target period, so that in the process of interface call processing, through the information flow between the intelligent gateway and the interface gateway, the relevant call information of the called interface is determined; finally, based on the first record data and the second record data, the interface call data of each interface in the existing static interface is determined; based on the interface call data of each interface, the abnormal interface identification processing is performed to determine the abnormal interface that calls the abnormality in the existing static interface, that is, by comparing the interface call data of each interface, the abnormal interface that calls the abnormality from the existing static interface. The present application collects interface call information in an automated manner, thereby realizing regular abnormal interface detection, reducing the risks of data leakage caused by illegal access to abnormal interfaces, and improving data security performance.
[0095] In one embodiment, step 207 includes: determining the version information of each interface in the existing static interfaces; performing abnormal interface identification processing based on the version information of each interface and the call data of each interface, and determining the abnormal interface with the call exception in the existing static interfaces.
[0096] The interface version information refers to the description information of different versions of interfaces for the same service. In addition to being recorded in the interface description document, the interface version information can also be extracted from the message information of the interface call request. The interface version information can be used to further refine the interface category based on the interface category recorded in the interface description document, for example, to count the call information based on version-based naming information such as APIa-v1, APIa-v2, etc.
[0097] Specifically, in the process of iteration of the business backend system, due to the limitation of the old version interface function, defects or more scenarios need to be satisfied, it may be necessary to launch a new version of the interface, and run multiple interface versions in parallel in the production environment at the same time (wherein the new version is used to meet new business scenarios and security requirements, and the old version is used for the compatibility of the front and back ends of new and old products). Therefore, when identifying the abnormal interface, the version of the interface is also one of the factors to be considered, and the comparison data between the interfaces of different versions is also the criterion for judging whether the interface is abnormal, so it is necessary to determine the version information of each interface in the existing static interface, and then for the version information of each interface and the call data of each interface, identify the abnormal interface that calls the abnormality in the existing static interface. In the present embodiment, the identification of the abnormal interface that calls the abnormality in the existing static interface is realized in conjunction with the version information of the interface, and the abnormal identification of the interface can be effectively realized based on the comparison of the interfaces of different versions, ensuring the accuracy of the abnormal interface identification.
[0098] In one embodiment, abnormal interface identification processing is performed based on the version information of each interface and the calling data of each interface, and the abnormal interface with the calling exception in the existing static interface is determined, including: determining the single-version interface based on the version information of each interface; determining the number of times the single-version interface is called and the number of calling terminals based on the calling data of each interface; when the number of times the single-version interface is called is lower than the lower limit of the number of calls, and the number of calling terminals is lower than the lower limit of the number of terminals, the single-version interface is determined as an abnormal interface.
[0099] Among them, a single-version interface refers to an interface that has only one version and no other iterative versions. These interfaces can be directly analyzed for anomalies based on the interface call data. The number of calls refers to the number of times the current interface is called by an interface call request. The number of calling terminals refers to the number of terminal trees that initiate an interface call request to call the current interface. The lower limit of the number of calls and the lower limit of the number of terminals are the lower limit judgment values for determining whether the interface is abnormal.
[0100] Specifically, for the single-version interface in the existing static interface, it is only necessary to identify whether it is an abnormal interface through the interface call data corresponding to the current single-version interface. During identification, for each single-version interface, the call data of the single-version interface can be found in the interface call data of the target period based on the interface description information of the single-version interface. Then, statistical analysis is performed based on the found data to determine the number of calls and the number of calling terminals of the current single-version interface. If the number of calls of the single-version interface is lower than the lower limit of the number of calls, and the number of calling terminals is lower than the lower limit of the number of terminals, it means that the call of the single-version interface is abnormal and may be an expired interface. Therefore, the single-version interface can be determined as an abnormal interface. In this embodiment, after identifying the single-version interface, the abnormal interface is judged based on the number of calls and the number of calling terminals of the single-version interface, which can effectively ensure the accuracy of interface identification.
[0101] In one embodiment, abnormal interface identification processing is performed based on the version information of each interface and the call data of each interface, and determining the abnormal interface with call exception in the existing static interface includes: determining a multi-version interface based on the version information of each interface; determining the number of calls and the number of calling terminals of each version interface in the multi-version interface based on the call data of each interface; identifying a high-frequency interface whose number of calls is higher than the upper limit of the number of calls and the number of calling terminals is higher than the upper limit of the number of terminals, and a low-frequency interface whose number of calls is lower than the upper limit of the number of calls and the number of calling terminals is lower than the upper limit of the number of terminals; when both a high-frequency interface and a low-frequency interface exist in the multi-version interface, the low-frequency interface is determined as an abnormal interface.
[0102] Specifically, in addition to the single-version interface, there are also multi-version interfaces with different versions in the existing static interface. When processing the multi-version interface, the interface call data between different versions can be compared, and the abnormal interface can be identified based on the comparison results. In order to compare, for each version of the interface in the multi-version interface, the number of calls and the number of calling terminals of each version of the interface in the multi-version interface can be determined based on the call data of each interface. Then, in the multi-version interface, a high-frequency interface whose number of calls is higher than the upper limit of the number of calls and the number of calling terminals is higher than the upper limit of the number of terminals is identified, and a low-frequency interface whose number of calls is lower than the upper limit of the number of calls and the number of calling terminals is lower than the upper limit of the number of terminals is identified. After completing the identification of the interface under each version in the multi-version interface, a comparative analysis can be performed. If a group of high-frequency interfaces and low-frequency interfaces exist in a group of multi-version interfaces at the same time, it means that these low-frequency interfaces may be outdated old version interfaces, so the call volume is small, and the high-frequency interface is a newly updated version of the interface, so the call volume is large. Therefore, when a high-frequency interface and a low-frequency interface exist in a multi-version interface at the same time, the low-frequency interface can be determined as an abnormal interface. It is worth noting that if there is no high-frequency interface in the multi-version interface, it means that the interface call request may be shunted by all interfaces in the multi-version interface, so the low-frequency interface will not be identified as an expired interface. In this embodiment, by identifying the high-frequency interface and the low-frequency interface in the multi-version interface for comparison and analysis of the abnormal interface, the accuracy of abnormal interface identification can be effectively improved.
[0103] In one embodiment, step 207 includes: determining the call forwarding record and call success record of each interface in the existing static interface based on the interface call data of each interface; when there is a call forwarding record for the current interface and there is no call success record for the current interface, determining the current interface as an abnormal interface.
[0104] Among them, the call forwarding record refers to the record information generated by the intelligent gateway after the interface call request is forwarded to the interface gateway, and it can be generated as long as the intelligent gateway completes the forwarding of the interface call request. The call success record is generated by the interface gateway after the interface call service is completed in the backend based on the forwarded interface call request.
[0105] Specifically, since some interfaces may have been invalidated at the back end, the service provider no longer provides the corresponding services of these interfaces. When the user requests the services of these interfaces through interface call requests, the corresponding interface call requests will still be forwarded to the interface gateway, but in the interface gateway, these interface call requests cannot call the corresponding interface to implement the interface service, and thus cannot generate a call success record. Therefore, in the process of identifying interface anomalies, the interface anomalies can also be identified by comparing the call forwarding records and call success records of each interface. If there is a call forwarding record for the current interface, and there is no call success record for the current interface, it means that the current interface may be abnormal, and it can be determined as an abnormal interface for subsequent processing. In this embodiment, the abnormal interface with call anomalies is determined by comparing the interface forwarding record and the call success record, which can effectively ensure the accuracy of the interface anomaly identification process.
[0106] In one embodiment, the method also includes: obtaining a data marking record uploaded by the intelligent gateway, wherein the data marking in the data marking record is used to mark an abnormal interface call request; based on the data marking request, determining an abnormal interface call request in the interface call request; and determining an abnormal interface based on the abnormal interface call request.
[0107] Among them, when processing interface call requests, the intelligent gateway will perform data marking on some interface call requests that do not comply with the rules and generate corresponding data marking records. Therefore, abnormal interface call requests can be identified based on the data marking records, thereby further identifying abnormal interfaces.
[0108] Specifically, since the access proxy hijacks all traffic submitted to the business backend system, the access traffic of the old version interface that does not access the interface gateway in accordance with the specification and provides services in a dispersed manner will also reach the intelligent gateway through the access proxy, and the intelligent gateway detects whether the request is an interface call request based on the interface identification rules formulated by the staff. Generally speaking, the interface distinction rule can distinguish the traffic of the interface call request from other non-interface call request traffic. The intelligent gateway can decrypt the communication protocol of the request, such as HTTPS message, and read the information in the message, and input the decrypted message information, including the call path, public parameters, etc. into the interface identification rules for filtering. If it meets the characteristics of the interface call request, it is considered to be the call traffic related to the interface call request, and the next step is to use the interface forwarding rules to perform filtering. If the corresponding rule item is not hit, it can be considered that the data is not normally accessed to the interface gateway in accordance with the specification. Although there are call requests for such interfaces, these are not accessed and verified according to the specification, they are dispersed interfaces, or expired interfaces that have not been uniformly security verified, rate controlled and routed by the intelligent gateway and the interface gateway. No matter which one, there are security risks. Therefore, by marking such data and reporting it to the server for abnormal interface identification, an alarm message of the abnormal interface is formed on the server, and the server can determine the abnormal interface call request in the interface call request based on the data marking request; and determine the abnormal interface based on the abnormal interface call request. In this embodiment, the abnormal interface call request is marked by the intelligent interface, so as to realize the identification of the abnormal interface, which can effectively improve the accuracy of the abnormal interface identification process.
[0109] In one embodiment, the method also includes: generating an abnormal interface list based on the abnormal interface, and pushing the abnormal interface list to the interface manager and the interface service provider; when receiving a confirmation message for the abnormal interface list from the interface manager and the interface service provider, generating an interface offline message corresponding to the interface in the abnormal interface list; and pushing the interface offline message to the interface manager.
[0110] The interface manager is used to manage all existing static interfaces, including online, offline and clearing, etc. The interface service provider is used to provide new interfaces and provide interface services.
[0111] Specifically, after detecting abnormal interfaces in the target time period from the existing static interfaces, in order to prevent the data leakage risk caused by these abnormal interfaces, these interfaces can be offline and cleared. Therefore, an abnormal interface list can be generated based on the abnormal interface, and the abnormal interface list can be pushed to the interface management party and the interface service provider. Then the interface management party and the interface service provider will identify and confirm each abnormal interface in the abnormal interface list. When the interface management party and the interface service provider have completed the confirmation of these abnormal interfaces, the interface offline message corresponding to the interface in the abnormal interface list can be generated; the interface offline message shown is pushed to the interface management party, thereby notifying the interface management party to perform offline processing on these identified abnormal interfaces. In this embodiment, by timely confirming and offline the abnormal interface, the data leakage risk of these abnormal interfaces can be effectively prevented after the abnormal interface is detected.
[0112] In one embodiment, Figure 3 As shown, a method for identifying an abnormal interface is provided, and the method is applied to Figure 1 Taking the intelligent gateway server 106 in the example as an example, the following steps are included:
[0113] Step 302: receiving an access request forwarded by an access proxy server of a business backend system.
[0114] Among them, the access proxy server 104 can hijack the access request for the business background system through the TUN / TAP virtual network card, and then forward the hijacked access request to the intelligent gateway server 106.
[0115] Specifically, in the solution of the present application, the access proxy server 104 can be accessed to hijack the access request initiated by the terminal 102 to the business backend system, and all access requests can be forwarded to the intelligent gateway server 106, so that subsequent processing such as screening of access requests and identification of interface call requests can be completed on the intelligent gateway server 106.
[0116] Step 304: parse the access request to identify the interface call request in the access request.
[0117] Specifically, the interface call request specifically includes the request communication protocol (for example, https provides a more secure communication channel), the service access address (in the form of a domain name or IP, generally pointing to an API gateway), the name of the interface to be called, the interface version, the public request parameters specified by the system (public request parameters are request parameters that each interface needs to provide when requesting, and these parameters need to be carried when sending a request, otherwise the request will fail), the business parameters and signature information required to call the interface (for each interface call request, such as an HTTPS protocol request, the interface gateway will verify the identity of the access requester based on the signature information in the request), etc. Therefore, when it is necessary to identify the interface call request, the specific information contained in the access request can be obtained by parsing the access request, and then the interface call request in the access request can be identified through the information contained in the access request.
[0118] Step 306: forward the interface call request to the interface gateway of the business backend system.
[0119] Specifically, when the intelligent gateway identifies the interface call request in the access request, it will forward the interface call request to the interface gateway of the business backend system, and the interface gateway will perform subsequent interface call request authentication and interface services. Common functions of the interface gateway include: identity authentication, interface routing, rate limiting, billing, caching, alarms, and security protection. The general interface gateway contains a specific signature mechanism and method, that is, for each communication protocol initiated by the caller, such as HTTPS request, the interface gateway will verify the identity of the interface requester according to the signature information in the interface call request. Then, for the access subject user identity that initiates the interface call request, the legitimacy of the device where it is located, and the application trust detection can be unified by the issuance and verification of the network access ticket of the business backend system. If the terminal 102 that sends the interface call request is not compliant due to security baselines, or the application is detected by threat intelligence cloud check services and other security risks, the network access ticket will not be sent from the control flow to the data flow. If the user's identity authentication fails, the user login fails and will not enter the subsequent network access process of the interface resource. Therefore, for the interface gateway, it only needs to be responsible for the authentication of the interface call itself, including whether the user has the authority to call the interface, whether the interface request parameters are legal, etc.
[0120] Step 308, record the forwarded interface call request, generate interface forwarding record data, upload the interface forwarding record data collected during the target period to the abnormal interface identification server, and the abnormal interface identification server is used to detect abnormal interfaces of the business backend system based on the interface forwarding record data.
[0121] Wherein, the intelligent gateway server 106 records the forwarded interface call request while forwarding the interface call request, generates interface forwarding record data, and then regularly uploads these interface forwarding record data to the abnormal interface identification server 110, and the abnormal interface identification server 110 detects the abnormal interface of the business back-end system based on the interface forwarding record data. At the same time, for the gateway interface server 108, the interface call data is sent to the service end of the abnormal interface identification server 110 by the interface gateway through asynchronous reporting and other methods. The intelligent gateway server 106 and the interface gateway server 108 report the relevant data to the abnormal interface identification server 110 for auditing through asynchronous reporting and other methods, including data analysis and statistical use, as the basic data for subsequent interface abnormal identification processing. Wherein, the data reported by the intelligent gateway server 106 includes the details of the ticket verification, the forwarding indicators of various requests (including interface traffic forwarding) (whether the access is successful, network and business error codes, the size of the upstream and downstream traffic of the transmission), etc., and the interface gateway sends the forwarding, authentication and call information of each interface to the abnormal interface identification server 110 through asynchronous centralized reporting.
[0122] The above abnormal interface identification method intercepts all access traffic to the business backend system by receiving access requests forwarded by the access proxy server of the business backend system, and then parses and processes the access requests to identify the interface call requests in the access requests, thereby separating the interface call requests corresponding to the interface from all access traffic; and forwards the interface call requests to the interface gateway of the business backend system, implements the corresponding interface service through the interface gateway, and records the forwarded interface call requests during forwarding, generates interface call data, and uploads the interface call data collected during the target period to the abnormal interface identification server, thereby providing the abnormal interface identification server with basic data for abnormal interface identification, thereby realizing effective monitoring of abnormal interfaces. The present application collects interface call information in an automated manner, thereby realizing regular abnormal interface detection, reducing the risks of data leakage caused by illegal access to abnormal interfaces, and improving data security performance.
[0123] In one embodiment, step 304 includes: parsing the access request at the intelligent gateway to obtain message information of the access request; performing interface request detection based on the interface identification rule and the message information to identify the interface call request in the access request.
[0124] Specifically, for example Figure 1In the application scenario, since the access proxy server 104 is a four-layer traffic proxy, and most of the existing traffic is encrypted by the Transport Layer Security (TLS) protocol, it is generally not decrypted at the terminal. Therefore, the access proxy server 104 cannot distinguish between interface calls and non-interface calls. The access request initiated by the application of the terminal 102 will be uniformly authenticated by the access proxy server 104. After the authentication is passed, it will be sent to the intelligent gateway server 106 by the access proxy server 104. The intelligent gateway server 106 deploys a certificate authority (CA) certificate and performs SSL / TLS decryption. That is, after the encrypted access initiated by the terminal 102 as the access subject reaches the intelligent gateway server 106 via the access proxy server 104, the intelligent gateway server 106 can decrypt the access request HTTPS message and read the information in the message, and then judge whether the user request belongs to an interface call according to the interface forwarding rules based on the read information. That is, the access request can be parsed and processed on the intelligent gateway server 106 to obtain the message information of the access request; then the interface request detection is performed based on the interface identification rule and the message information to identify the interface call request in the access request. The interface forwarding rule includes the identification features of the common interface form and the forwarding target address. The interface features are formulated by the enterprise administrator. After the intelligent gateway server 106 decrypts the request content, it identifies whether it is an interface call request based on the features. Then forward it to the corresponding address (interface gateway node or other server node) based on the service access address in the request. The supported interface types include RESTful, XML-based SOAP (Simple Object Access Protocol, Simple Object Access Protocol) protocol or SDK provided by various programming languages. Therefore, the intelligent gateway can identify various types of interfaces in the enterprise according to the interface forwarding rules, and forward them to the interface gateway for unified processing. After receiving the call request, the interface gateway forwards the interface access request initiated by the subject to the corresponding backend, and the backend node performs the authentication of the interface call request. If the authentication passes, the user request is responded normally, otherwise the error message is responded. In a specific embodiment, the process of performing interface request detection on message information can specifically identify the call path and common parameters of the access request based on the message information; when the call path and common parameters are determined to meet the interface characteristics based on the interface identification rules, the access request is determined to be an interface call request.When identifying the interface call request in the access request, specifically, all input access requests can be parsed by first decrypting the communication protocol such as the HTTPS protocol to obtain the HTTPS messages corresponding to these access requests, and then the information in the message is read, and the decrypted message information, including the call path, public parameters, and other input interface identification rules are filtered. If it meets the characteristics of the interface call, it is considered to be an interface call request. In this embodiment, the interface call request is detected through the message information of the access request, which can effectively ensure the detection accuracy of the interface call request, thereby ensuring the accuracy of abnormal interface identification.
[0125] In one of the embodiments, the method also includes: identifying interface call requests based on interface forwarding rules to determine the rule items hit by each interface call request; determining the interface call requests that do not hit the rule items as abnormal interface call requests; generating data marking records based on the identified abnormal interface call requests, and uploading the data marking records to the abnormal interface identification server; forwarding the interface call requests to the interface gateway of the business back-end system includes: forwarding the interface call requests after filtering the abnormal interface call requests to the interface gateway of the business back-end system.
[0126] The abnormal interface call request specifically refers to a portion of the interface call request that complies with the interface call rule but does not comply with the interface forwarding rule.
[0127] Specifically, after identifying all interface call requests from the access request, it is also necessary to determine whether these interface call requests meet the interface forwarding rules. If there is no hit on the corresponding rule item, it is considered that the current interface call request is data that is not normally accessed to the interface gateway according to the specification. Although this type of interface has a call request, it is not accessed and verified according to the specification. It is a scattered interface, or an interface that is expired and has not been uniformly verified, controlled by the intelligent gateway and the interface gateway. No matter which one, there is a security risk. By marking this type of interface call request with data and reporting it to the abnormal interface identification server, an alarm message is formed on the abnormal interface identification server, and through this automated collection method, it is provided to the interface management party or the interface service provider for identification and processing. At the same time, in the process of forwarding, this part of the abnormal interface call request will also be filtered and then forwarded, thereby ensuring the success rate of the interface call request forwarding. In the present embodiment, the abnormal interface call request is further identified by the interface forwarding rule, which can effectively ensure the accuracy of abnormal interface identification.
[0128] The present application also provides an application scenario, which applies the above-mentioned abnormal interface identification method.
[0129] Specifically, the application of the abnormal interface identification method in this application scenario is as follows:
[0130] When the access system of enterprise customers is implemented through a zero-trust access control strategy, the abnormal interface identification method of this application can be used to detect expired APIs in the access system, thereby reducing the risk of data leakage. Figure 4 As shown, zero-trust network security service providers can converge users' access paths to enterprise business sites, data, APIs and other resources, and users are considered untrustworthy in any environment. Only after filtering through the access control engine (control flow) is it converted into trusted access. Zero-trust agents and access gateways provide a unified entry (data flow) for access subjects to access the object's resources through network requests. Zero-trust clients provide authentication operations for the unified entry. Only authenticated network requests can be forwarded by the zero-trust agent to the access gateway, which then proxies access to the actual business system. First, as Figure 5 As shown in the figure, multiple authentication configurations can be configured on the management side of the zero trust network. In addition to basic authentication, such as Figure 6 As shown in the figure, the management end of the zero-trust network provides the configuration of secondary authentication, which can issue different secondary authentication configurations to different groups or individuals in the organizational structure. The configuration issued by the management end corresponds to Figure 7 and Figure 8 As shown in Figure 1, the terminals of the zero-trust network can provide users with different login methods. Fig. 9 As shown in the figure, when a designated user is detected accessing a sensitive business system in a specific terminal environment, the terminal of the zero-trust network needs to remind the user to perform secondary authentication according to the secondary authentication configuration issued by the server before attempting to access the sensitive business system. When a business site of an enterprise customer is highly sensitive, the enterprise administrator generally limits terminal users to access it from the enterprise office environment, and prohibits direct access to such business sites or applications (including data, API and other resources) from the Internet. Such business sites or applications can generally be divided into the front-end and the back-end. The back-end is the API service deployed on the server node, and the front-end is an independent third-party application. By embedding the API call into the application, different API requests to the back-end are initiated according to different business logics. In this scenario, this can be done specifically through the following methods: Fig.10The solution shown implements the API security access function and detects abnormal APIs. In the traditional network access architecture, the default intranet is absolutely trusted. Through network isolation and border deployment of protection security products, the border is focused on defense. However, the in-depth defense from the outside to the inside is not considered, which makes it easy to be attacked horizontally by attackers. In this scenario, the zero-trust network access architecture breaks the default premise of "intranet trust". First, it is considered that all users' resource access behaviors in any scenario are untrustworthy. Dynamic trust is granted only after unified multiple authentication and certification in each link. The access control flow is composed of zero-trust clients and servers, and the data flow is composed of terminal access agents and intelligent gateways. The traffic forwarding path through the access agent and the intelligent gateway is used as a unified entrance to receive dynamic access control of the control flow, and it is compatible with various C / S and B / S applications, and is not invasive. In summary, by setting the default untrusted initial state and breaking the mapping relationship between trust and network location, the real-time collection of environmental status and continuous monitoring of the security status of each component are used to dynamically assign corresponding levels after trust evaluation, and then corresponding traffic control measures are taken. Fig.10The access control flow is composed of zero-trust clients and servers, which mainly includes user authentication, application detection and issuance of access tickets (the access agent initiates a ticket application to the zero-trust server through the zero-trust client, and after the zero-trust server responds, the zero-trust client responds back to the access agent) and authentication (the gateway initiates ticket authentication to the zero-trust server with the ticket). As an important role in the data flow, the smart gateway assumes the responsibility of traffic proxy in the zero-trust system. The terminal access agent generally uses a four-layer traffic proxy to forward the original request traffic initiated by the application to the smart gateway through full-traffic hijacking TUN / TAP or network filtering driver. The four-layer traffic proxy is compatible with B / S and C / S applications. While hijacking various terminal access traffic, it can also reduce the intrusion to applications and business logic. As for the specific abnormal interface identification process, first, the access proxy forwards all access requests to the intelligent gateway. The intelligent gateway receives the access request forwarded by the access proxy server of the business backend system, parses and processes the access request, obtains the message information of the access request, and identifies the call path and common parameters of the access request based on the message information; when the call path and common parameters are determined to meet the interface characteristics based on the interface identification rules, the access request is determined as an interface call request. Then, the interface call request is identified based on the interface forwarding rules, and the rule items hit by each interface call request are determined, and the interface call request that does not hit the rule items is determined as an abnormal interface call request; a data tag record is generated based on the identified abnormal interface call request, and the data tag record is uploaded to the abnormal interface identification server; and the interface call request after filtering the abnormal interface call request is forwarded to the interface gateway of the business backend system. At the same time, the forwarded interface call request is recorded, the interface forwarding record data is generated, and the interface forwarding record data collected during the target period is uploaded to the abnormal interface identification server. The abnormal interface identification server counts the static interfaces in the interface description document of the business background system to obtain the existing static interfaces, and then obtains the first record data of the intelligent gateway forwarding the interface call request within the target period, and the second record data of the interface gateway calling the interface based on the interface call request within the target period; based on the first record data and the second record data, the interface call data of each interface in the existing static interface is determined. Determine the version information of each interface in the existing static interface; perform abnormal interface identification processing based on the version information of each interface and the call data of each interface, and determine the abnormal interface with abnormal call in the existing static interface. For the single-version interface; the number of calls and the number of calling terminals of the single-version interface can be determined based on the call data of each interface; when the number of calls of the single-version interface is lower than the lower limit of the number of calls, and the number of calling terminals is lower than the lower limit of the number of terminals, the single-version interface is determined as an abnormal interface.As for multi-version interfaces; based on the call data of each interface, determine the number of times each version interface in the multi-version interface is called and the number of calling terminals; identify high-frequency interfaces whose number of calls is higher than the upper limit of the number of calls and the number of calling terminals is higher than the upper limit of the number of terminals, and low-frequency interfaces whose number of calls is lower than the upper limit of the number of calls and the number of calling terminals is lower than the upper limit of the number of terminals; when there are both high-frequency interfaces and low-frequency interfaces in the multi-version interface, determine the low-frequency interface as an abnormal interface. Finally, based on the interface call data of each interface, the call forwarding record and call success record of each interface in the existing static interface can be determined; when there is a call forwarding record for the current interface and there is no call success record for the current interface, the current interface is determined as an abnormal interface. At the same time, the data marking record uploaded by the intelligent gateway can also be obtained, and the data mark in the data marking record is used to mark the abnormal interface call request; based on the data marking record, determine the abnormal interface call request in the interface call request; determine the abnormal interface based on the abnormal interface call request. Generate an abnormal interface list based on the abnormal interface, and push the abnormal interface list to the interface manager and interface service provider; when receiving the confirmation message of the abnormal interface list from the interface manager and interface service provider, generate the interface offline message corresponding to the interface in the abnormal interface list; push the interface offline message to the interface manager. The interface manager will offline or clear the identified abnormal interface.
[0131] 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.
[0132] Based on the same inventive concept, the embodiment of the present application also provides an abnormal interface identification device for implementing the abnormal interface identification method 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 one or more abnormal interface identification device embodiments provided below can refer to the limitations of the abnormal interface identification method above, and will not be repeated here.
[0133] In one embodiment, Fig.11 As shown, a device for identifying an abnormal interface is provided, comprising:
[0134] The interface statistics module 1102 is used to count the static interfaces in the interface description document of the business background system to obtain the existing static interfaces; the business background system includes an intelligent gateway and an interface gateway; the intelligent gateway is used to extract the interface call request from the access request for the business background system, and forward the interface call request to the interface gateway, and the interface gateway is used to authenticate the interface call request.
[0135] The call data acquisition module 1104 is used to acquire first record data of the intelligent gateway forwarding the interface call request within the target time period, and second record data of the interface gateway calling the interface based on the interface call request within the target time period.
[0136] The calling data processing module 1106 is used to determine the interface calling data of each interface in the existing static interface based on the first record data and the second record data.
[0137] The abnormal interface identification module 1108 is used to perform abnormal interface identification processing based on the interface call data of each interface, and determine the abnormal interface with abnormal call in the existing static interface.
[0138] In one embodiment, the abnormal interface identification module 1108 is specifically used to: determine the version information of each interface in the existing static interface; perform abnormal interface identification processing based on the version information of each interface and the call data of each interface, and determine the abnormal interface with the call exception in the existing static interface.
[0139] In one embodiment, the abnormal interface identification module 1108 is specifically used to: determine the single-version interface based on the version information of each interface; determine the number of times the single-version interface is called and the number of calling terminals based on the call data of each interface; when the number of times the single-version interface is called is lower than the lower limit of the number of calls, and the number of calling terminals is lower than the lower limit of the number of terminals, determine the single-version interface as an abnormal interface.
[0140] In one embodiment, the abnormal interface identification module 1108 is specifically used to: determine a multi-version interface based on the version information of each interface; determine the number of times each version interface in the multi-version interface is called and the number of calling terminals based on the call data of each interface; identify a high-frequency interface whose number of calls is higher than the upper limit of the number of calls and the number of calling terminals is higher than the upper limit of the number of terminals, and a low-frequency interface whose number of calls is lower than the upper limit of the number of calls and the number of calling terminals is lower than the upper limit of the number of terminals; when both high-frequency interfaces and low-frequency interfaces exist in the multi-version interface, the low-frequency interface is determined as an abnormal interface.
[0141] In one embodiment, the abnormal interface identification module 1108 is specifically used to: determine the call forwarding record and call success record of each interface in the existing static interface based on the interface call data of each interface; when there is a call forwarding record for the current interface and there is no call success record for the current interface, the current interface is determined as an abnormal interface.
[0142] In one embodiment, it also includes a data tag identification module, which is used to: obtain data tag records uploaded by the intelligent gateway, the data tags in the data tag records are used to mark abnormal interface call requests; based on the data tag records, determine the abnormal interface call requests in the interface call requests; determine the abnormal interface based on the abnormal interface call requests.
[0143] In one embodiment, it also includes an abnormal interface upload module, which is used to: generate an abnormal interface list based on the abnormal interface, and push the abnormal interface list to the interface manager and the interface service provider; when receiving a confirmation message for the abnormal interface list from the interface manager and the interface service provider, generate an interface offline message corresponding to the interface in the abnormal interface list; and push the interface offline message to the interface manager.
[0144] In one embodiment, Fig.12 As shown, a device for identifying an abnormal interface is provided, comprising:
[0145] The request receiving module 1201 is used to receive an access request forwarded by an access proxy server of a business backend system.
[0146] The request parsing module 1203 is used to parse the access request and identify the interface call request in the access request.
[0147] The request forwarding module 1205 is used to forward the interface call request to the interface gateway of the business backend system.
[0148] The data upload module 1207 is used to record the forwarded interface call request, generate interface forwarding record data, and upload the interface forwarding record data collected within the target period to the abnormal interface identification server. The abnormal interface identification server is used to detect abnormal interfaces of the business backend system based on the interface call data.
[0149] In one embodiment, the request parsing module 1203 is specifically used to: parse the access request at the intelligent gateway to obtain the message information of the access request; perform interface request detection based on the interface identification rule and the message information to identify the interface call request in the access request.
[0150] In one embodiment, the request parsing module 1203 is specifically used to: identify the call path and common parameters of the access request based on the message information; when the call path and common parameters are determined to meet the interface characteristics based on the interface identification rules, determine the access request as an interface call request.
[0151] In one embodiment, it also includes a data marking module, which is used to: identify interface call requests based on interface forwarding rules, and determine the rule items hit by each interface call request; determine the interface call requests that do not hit the rule items as abnormal interface call requests; generate data marking records based on the identified abnormal interface call requests, and upload the data marking records to the abnormal interface identification server; the request forwarding module 1205 is specifically used to: forward the interface call requests after filtering the abnormal interface call requests to the interface gateway of the business back-end system.
[0152] Each module in the abnormal interface identification device 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.
[0153] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.13 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to abnormal interface identification. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an abnormal interface identification method is implemented.
[0154] Those skilled in the art will understand that Fig.13 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.
[0155] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0156] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0157] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.
[0158] It should be noted that the information of the accessing party involved in this application (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.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0159] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods 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 the present 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.
[0160] 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.
[0161] The above-described 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. A method for identifying abnormal interfaces, characterized in that: The method comprises: The static interfaces in the interface description document of the business background system are counted to obtain the existing static interfaces; the business background system includes an intelligent gateway and an interface gateway; the intelligent gateway is used to extract an interface call request from an access request for the business background system, and forward the interface call request to the interface gateway, and the interface gateway is used to authenticate the interface call request; Acquire first record data of the intelligent gateway forwarding the interface call request within a target time period, and second record data of the interface gateway calling an interface based on the interface call request within the target time period; Determining interface call data of each interface in the existing static interface based on the first record data and the second record data; Abnormal interface identification processing is performed based on the interface call data of each interface to determine the abnormal interface with abnormal call in the existing static interface.
2. The method according to claim 1, characterized in that The abnormal interface identification processing is performed based on the interface call data of each interface to determine the abnormal interface with abnormal call in the existing static interface, including: Determining version information of each of the existing static interfaces; Abnormal interface identification processing is performed based on the version information of each interface and the call data of each interface to determine the abnormal interface with abnormal call in the existing static interface.
3. The method according to claim 2, characterized in that The abnormal interface identification process is performed based on the version information of each interface and the call data of each interface to determine the abnormal interface with abnormal call in the existing static interface, including: Determining a single-version interface based on the version information of each interface; Based on the call data of each interface, determine the number of times the single version interface is called and the number of calling terminals; When the number of times the single-version interface is called is lower than the lower limit of the number of calls, and the number of calling terminals is lower than the lower limit of the number of terminals, the single-version interface is determined as an abnormal interface.
4. The method according to claim 2, characterized in that: The abnormal interface identification process is performed based on the version information of each interface and the call data of each interface to determine the abnormal interface with abnormal call in the existing static interface, including: Determine a multi-version interface based on the version information of each interface; Based on the call data of each interface, determine the number of times each version interface in the multi-version interface is called and the number of calling terminals; Identify high-frequency interfaces whose number of calls exceeds the upper limit of the number of calls and whose number of calling terminals exceeds the upper limit of the number of terminals, and low-frequency interfaces whose number of calls is lower than the upper limit of the number of calls and whose number of calling terminals is lower than the upper limit of the number of terminals; When there are both high-frequency interfaces and low-frequency interfaces in the multi-version interfaces, the low-frequency interface is determined as an abnormal interface.
5. The method according to claim 1, characterized in that The abnormal interface identification processing is performed based on the interface call data of each interface to determine the abnormal interface with abnormal call in the existing static interface, including: Determine the call forwarding record and the call success record of each interface in the existing static interface based on the interface call data of each interface; When there is a call forwarding record for the current interface and there is no call success record for the current interface, the current interface is determined as an abnormal interface.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining a data marking record uploaded by the intelligent gateway, wherein the data marking in the data marking record is used to mark an abnormal interface call request; Determining an abnormal interface call request in the interface call request based on the data marking record; An abnormal interface is determined based on the abnormal interface call request.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Generate an abnormal interface list based on the abnormal interface, and push the abnormal interface list to the interface manager and the interface service provider; When receiving confirmation messages of the interface management party and the interface service provider for the abnormal interface list, generating interface offline messages corresponding to the interfaces in the abnormal interface list; Push the interface offline message to the interface manager.
8. A method for identifying abnormal interfaces, characterized in that: The method comprises: Receiving an access request forwarded by an access proxy server of a business backend system; Parsing the access request to identify an interface call request in the access request; Forwarding the interface call request to the interface gateway of the business backend system; Record the forwarded interface call request, generate interface forwarding record data, upload the interface forwarding record data collected within the target time period to the abnormal interface identification server, and the abnormal interface identification server is used to detect the abnormal interface of the business backend system based on the interface forwarding record data.
9. The method according to claim 8, characterized in that The parsing and processing the access request to identify the interface call request in the access request includes: Parsing the access request to obtain message information of the access request; An interface request detection is performed based on the interface identification rule and the message information to identify the interface call request in the access request.
10. The method according to claim 9, characterized in that The performing interface request detection based on the interface identification rule and the message information to identify the interface call request in the access request includes: Identify the calling path and common parameters of the access request based on the message information; When it is determined based on the interface identification rule that the calling path and the public parameters meet the interface characteristics, the access request is determined to be an interface calling request.
11. The method according to claim 8, characterized in that The method further comprises: Identify the interface call request based on the interface forwarding rule, and determine the rule item hit by each interface call request; Determine the interface call request that does not hit the rule item as an abnormal interface call request; Generate a data mark record based on the identified abnormal interface call request, and upload the data mark record to the abnormal interface identification server; The interface gateway that forwards the interface call request to the business backend system includes: The interface call request after filtering abnormal interface call requests is forwarded to the interface gateway of the business backend system.
12. An abnormal interface identification device, characterized in that: The device comprises: The interface statistics module is used to count the static interfaces in the interface description document of the business background system to obtain the existing static interfaces; the business background system includes an intelligent gateway and an interface gateway; the intelligent gateway is used to extract the interface call request from the access request for the business background system, and forward the interface call request to the interface gateway, and the interface gateway is used to authenticate the interface call request; A call data acquisition module, used to acquire first record data of the intelligent gateway forwarding the interface call request within a target period, and second record data of the interface gateway calling the interface based on the interface call request within the target period; A calling data processing module, used for determining the interface calling data of each interface in the existing static interface based on the first record data and the second record data; The abnormal interface identification module is used to perform abnormal interface identification processing based on the interface call data of each interface, and determine the abnormal interface with abnormal call in the existing static interface.
13. An abnormal interface identification device, characterized in that: The device comprises: A request receiving module, used to receive an access request forwarded by an access proxy server of a business backend system; A request parsing module, used to parse the access request and identify the interface call request in the access request; A request forwarding module, used to forward the interface call request to the interface gateway of the business backend system; The data upload module is used to record the forwarded interface call request, generate interface forwarding record data, and upload the interface forwarding record data collected within the target time period to the abnormal interface identification server. The abnormal interface identification server is used to detect the abnormal interface of the business backend system based on the interface call data.
14. 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 11 are implemented.
15. 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 11 are implemented.
