Interface access control methods, apparatus, computer equipment and storage media
By obtaining the SDK's authorization result and process name, and performing process and interface verification, the problem of illegal interface use in traditional interface access control is solved, thereby improving the security of interface calls.
Patent Information
- Application Number
- CN202111328399.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-10
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2041-11-10
AI Technical Summary
In traditional interface access control methods, SDKs that are not fully packaged may have issues with unauthorized use of interfaces, resulting in low security for interface calls.
By responding to the interface call request, the authorization result of the software development kit is obtained. When the authorization result is authorized, the name of the calling process is obtained. Then, when the process verification and interface verification pass, the target calling interface is determined to be an authorized interface, thereby achieving precise access control of the interface.
It improves the security of API calls, avoids unauthorized access by different processes or APIs, and enables precise access control for each calling process and its respective API.
Smart Images

Figure CN116108417B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an interface access control method, apparatus, computer device, and storage medium. Background Technology
[0002] With the development of computer technology and the widespread use of various applications, in order to protect the legitimate rights and interests of enterprises and users, it is necessary to implement access control for SDKs (Software Development Kits) during the application development process to ensure the security of SDK calls.
[0003] Traditionally, SDK access control is often implemented by using a partially packaged SDK. For example, a full SDK may provide five interfaces (A, B, C, and D), but a user may only want to purchase the functionality provided by interfaces A and B. In this case, access control can be achieved by packaging a partially packaged SDK (that is, one that only includes interfaces A and B).
[0004] Traditional API access control methods, when using non-full packaging, only control user-level access permissions, meaning they only need to determine if the user has purchased the corresponding API functionality. However, the same user may need to use the same API across different products. Therefore, when the user has access permissions, they can apply the API provided by the purchased SDK to different products, and all products can obtain the information or functionality provided by those APIs.
[0005] Therefore, traditional access control methods still allow for unauthorized use of interfaces, resulting in relatively low security for interface calls. Summary of the Invention
[0006] Therefore, it is necessary to provide an interface access control method, apparatus, computer device, and storage medium that can improve the security of interface calls, in order to address the above-mentioned technical problems.
[0007] An interface access control method, the method comprising:
[0008] In response to an API call request, obtain the authorization result of the software development kit corresponding to the API call request; the authorization result is obtained by the cloud server based on the application package information corresponding to the API call request.
[0009] When the authorization result is determined to be authorized, obtain the name of the calling process corresponding to the interface call request;
[0010] When the process verification of the calling process passes and the interface verification of the target calling interface corresponding to the name of the calling process passes, the target calling interface is determined to be an authorized interface, and the target calling interface is accessed.
[0011] An interface access control method, the method comprising:
[0012] Receive authentication instructions sent by the client and obtain the application package information carried by the authentication instructions;
[0013] In response to the authentication command, the application package information is verified according to the pre-stored application package information, a corresponding authorization result is generated, and the authorization result is fed back to the client;
[0014] When an interface list query command sent by the client is detected, the system responds to the interface list query command by sending a pre-stored list of authorized interfaces back to the client. The list of authorized interfaces is used to enable the client to perform interface verification on the target calling interface corresponding to the calling process name, and to access the target calling interface when the interface verification is successful.
[0015] An interface access control device, the device comprising:
[0016] The authorization result acquisition module is used to respond to the interface call request and obtain the authorization result of the software development kit corresponding to the interface call request; the authorization result is obtained by the cloud server based on the application package information corresponding to the interface call request.
[0017] The process name acquisition module is used to acquire the process name corresponding to the interface call request when the authorization result is determined to be authorized;
[0018] The target call interface access module is used to determine that the target call interface is an authorized interface and access the target call interface when the process verification of the calling process passes and the interface verification of the target call interface corresponding to the name of the calling process passes.
[0019] An interface access control device, the device comprising:
[0020] The application package information acquisition module is used to receive the authentication command sent by the client and acquire the application package information carried by the authentication command.
[0021] The authorization result feedback module is used to respond to the authentication command, verify the application package information according to the pre-stored application package information, generate the corresponding authorization result, and feed the authorization result back to the client;
[0022] The authorized interface list feedback module is used to respond to the interface list query command sent by the client when the client sends an interface list query command, and to feed back the pre-stored authorized interface list to the client; the authorized interface list is used to enable the client to perform interface verification on the target calling interface corresponding to the calling process name, and to access the target calling interface when the interface verification is successful.
[0023] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:
[0024] In response to an API call request, obtain the authorization result of the software development kit corresponding to the API call request; the authorization result is obtained by the cloud server based on the application package information corresponding to the API call request.
[0025] When the authorization result is determined to be authorized, obtain the name of the calling process corresponding to the interface call request;
[0026] When the process verification of the calling process passes and the interface verification of the target calling interface corresponding to the name of the calling process passes, the target calling interface is determined to be an authorized interface, and the target calling interface is accessed.
[0027] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:
[0028] Receive authentication instructions sent by the client and obtain the application package information carried by the authentication instructions;
[0029] In response to the authentication command, the application package information is verified according to the pre-stored application package information, a corresponding authorization result is generated, and the authorization result is fed back to the client;
[0030] When an interface list query command sent by the client is detected, the system responds to the interface list query command by sending a pre-stored list of authorized interfaces back to the client. The list of authorized interfaces is used to enable the client to perform interface verification on the target calling interface corresponding to the calling process name, and to access the target calling interface when the interface verification is successful.
[0031] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0032] In response to an API call request, obtain the authorization result of the software development kit corresponding to the API call request; the authorization result is obtained by the cloud server based on the application package information corresponding to the API call request.
[0033] When the authorization result is determined to be authorized, obtain the name of the calling process corresponding to the interface call request;
[0034] When the process verification of the calling process passes and the interface verification of the target calling interface corresponding to the name of the calling process passes, the target calling interface is determined to be an authorized interface, and the target calling interface is accessed.
[0035] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0036] Receive authentication instructions sent by the client and obtain the application package information carried by the authentication instructions;
[0037] In response to the authentication command, the application package information is verified according to the pre-stored application package information, a corresponding authorization result is generated, and the authorization result is fed back to the client;
[0038] When an interface list query command sent by the client is detected, the system responds to the interface list query command by sending a pre-stored list of authorized interfaces back to the client. The list of authorized interfaces is used to enable the client to perform interface verification on the target calling interface corresponding to the calling process name, and to access the target calling interface when the interface verification is successful.
[0039] A computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0040] In response to an API call request, obtain the authorization result of the software development kit corresponding to the API call request; the authorization result is obtained by the cloud server based on the application package information corresponding to the API call request.
[0041] When the authorization result is determined to be authorized, obtain the name of the calling process corresponding to the interface call request;
[0042] When the process verification of the calling process passes and the interface verification of the target calling interface corresponding to the name of the calling process passes, the target calling interface is determined to be an authorized interface, and the target calling interface is accessed.
[0043] A computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0044] Receive authentication instructions sent by the client and obtain the application package information carried by the authentication instructions;
[0045] In response to the authentication command, the application package information is verified according to the pre-stored application package information, a corresponding authorization result is generated, and the authorization result is fed back to the client;
[0046] When an interface list query command sent by the client is detected, the system responds to the interface list query command by sending a pre-stored list of authorized interfaces back to the client. The list of authorized interfaces is used to enable the client to perform interface verification on the target calling interface corresponding to the calling process name, and to access the target calling interface when the interface verification is successful.
[0047] In the aforementioned interface access control method, apparatus, computer device, and storage medium, by responding to an interface call request, the authorization result of the software development kit (SDK) corresponding to the interface call request is obtained. If the authorization result is confirmed as authorized, the name of the calling process corresponding to the interface call request is obtained. Furthermore, if the process verification of the calling process and the interface verification of the target calling interface corresponding to the calling process name are both successful, the target calling interface is determined to be an authorized interface, and access to the target calling interface is granted. This achieves interface-level access control for the SSD. When access to the SSD is confirmed to be permitted, further determination is made as to whether the corresponding target calling interface is an authorized interface. This enables precise access control for each calling process and its respective interface, preventing unauthorized access by different processes or different types of interfaces, thereby improving interface call security. Attached Figure Description
[0048] Figure 1 This is an application environment diagram of an interface access control method in one embodiment;
[0049] Figure 2 This is a flowchart illustrating an interface access control method in one embodiment;
[0050] Figure 3 This is a flowchart illustrating the interface access control method in another embodiment;
[0051] Figure 4 This is a flowchart illustrating the process of obtaining the authorization result of the software development kit corresponding to the interface call request in one embodiment.
[0052] Figure 5 This is a timing diagram for SDK initialization of an interface access control method in one embodiment;
[0053] Figure 6 This is a flowchart illustrating the interface access control method in another embodiment;
[0054] Figure 7 This is a flowchart illustrating the interface access control method in yet another embodiment;
[0055] Figure 8 This is a schematic diagram of a pre-stored whitelist list for an interface access control method in one embodiment;
[0056] Figure 9 This is a timing diagram of an interface access control method in one embodiment;
[0057] Figure 10 This is a structural block diagram of an interface access control device in one embodiment;
[0058] Figure 11 This is a structural block diagram of the interface access control device in another embodiment;
[0059] Figure 12 This is an architecture diagram of an interface access control system in one embodiment;
[0060] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0062] The interface access control method provided in this application involves cloud technology. Cloud technology refers to a managed technology that unifies hardware, software, network, and other resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology, based on the cloud computing business model, encompasses network technology, information technology, integration technology, management platform technology, and application technology. It can form resource pools, providing on-demand, flexible, and convenient access, making cloud computing technology a crucial support.
[0063] Cloud security refers to the collective term for security software, hardware, users, organizations, and security cloud platforms based on cloud computing business models; it is an application of cloud technology. Cloud security integrates emerging technologies and concepts such as parallel processing, grid computing, and the identification of unknown virus behavior. Through a large network of clients, it monitors abnormal software behavior on the network, obtains the latest information on Trojans and malware on the internet, sends it to the server for automatic analysis and processing, and then distributes solutions for viruses and Trojans to each client. The main research directions in cloud security include: 1. Cloud computing security, which mainly studies how to ensure the security of the cloud itself and various applications on the cloud, including cloud computer system security, secure storage and isolation of user data, user access authentication, information transmission security, network attack protection, and compliance auditing; 2. Cloudification of security infrastructure, which mainly studies how to use cloud computing to build and integrate security infrastructure resources and optimize security protection mechanisms, including building a large-scale security event and information collection and processing platform through cloud computing technology to achieve the collection and correlation analysis of massive amounts of information and improve the ability to control network-wide security events and risks; 3. Cloud security services, which mainly studies various security services provided to users based on cloud computing platforms, such as antivirus services.
[0064] The interface access control method provided in this application can be applied to, for example... Figure 1 In the application environment shown, client 102 communicates with cloud server 104 via a network. Client 102 responds to interface call requests, obtains the authorization result of the software development kit (SDK) corresponding to the interface call request from cloud server 104, and obtains the calling process name corresponding to the interface call request when the authorization result is confirmed. When client 102 verifies and determines that the target calling interface corresponding to the calling process name is an authorized interface, it accesses the target calling interface. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, in-vehicle terminal, smart TV, etc., but is not limited to these. Terminal 102 and server 104 can be directly or indirectly connected via wired or wireless communication, which is not limited herein.
[0065] In one embodiment, such as Figure 2 As shown, an interface access control method is provided, which is applied to... Figure 1 Taking the client in [the document] as an example, the steps are as follows:
[0066] Step S202: Respond to the interface call request and obtain the authorization result of the software development kit corresponding to the interface call request. The authorization result is obtained by the cloud server based on the application package information corresponding to the interface call request.
[0067] Specifically, when the client's SDK (Software Development Kit) detects a user-triggered API call request, it responds to the request and obtains the authorization result of the SDK corresponding to the API call request. The authorization result is obtained by the cloud server based on the application package information corresponding to the API call request, and can be either authorized or unauthorized. If the authorization result of the SDK corresponding to the API call request is unauthorized, the current API call process ends. Specifically, the authorization result of the SDK corresponding to the API call request is determined by the call result of the `init` method provided by the SDK.
[0068] Furthermore, it responds to the API call request and obtains the application package information corresponding to the API call request. Then, based on the application package information, it generates a corresponding authentication command. This authentication command is sent to the cloud server, which is instructed to verify the application package information based on the pre-stored information, generate a corresponding authorization result, and then receives the authorization result from the cloud server. The application package information corresponding to the API call request represents the application package information of the product or application that triggered the API call request and needs to access the interface provided by the software development kit.
[0069] The cloud database on the cloud server stores pre-stored application package information. Based on this information, the application package information can be verified to generate the corresponding authorization result. Specifically, this involves comparing the pre-stored application package information with the actual application package information to determine if a pre-stored application package matching the API call request exists.
[0070] In one embodiment, before a user accesses the interface provided by the software development kit by calling the process, it is necessary to obtain the application package name, application number and corresponding process information of the user's product, and store them as pre-stored application package information in the cloud server for subsequent authentication.
[0071] During the initialization of the software development kit (SDK), it is necessary to extract the application ID and application package name, verify the legitimacy of the users accessing the SSD, and determine whether they have the necessary access permissions. Users accessing the SSD can be understood as products or programs that need to access different interfaces of the SSD.
[0072] Step S204: When the authorization result is determined to be authorized, obtain the name of the calling process corresponding to the interface call request.
[0073] Specifically, when the authorization result is confirmed as authorized, meaning the user of the software development kit (SDK) is deemed legitimate, the process name corresponding to the API call request is further obtained. This process name is used to further determine whether the calling processes needing to access different interfaces of the SDM are legitimate.
[0074] Specifically, the getCallingPid method (process name retrieval function) provided by Binder (process communication technology) is used to obtain the name of the calling process corresponding to the interface call request.
[0075] Step S206: When the process verification of the calling process passes and the interface verification of the target calling interface corresponding to the name of the calling process passes, the target calling interface is determined to be an authorized interface, and the target calling interface is accessed.
[0076] Specifically, a pre-stored whitelist is retrieved, and the process name of the calling process is verified against this whitelist. If the process verification passes, a list of authorized interfaces corresponding to the calling process name is retrieved. Further, based on this list, the target interface corresponding to the interface call request is verified. If the interface verification passes and the target interface is determined to be an authorized interface, the target interface is accessed.
[0077] The pre-stored whitelist is used to store different authorized interfaces and the names of the calling processes associated with each authorized interface. This whitelist can be obtained in real-time from the cloud server or from the client's local cache. Essentially, process verification is performed on the calling process name against the pre-stored whitelist. If the calling process name is confirmed to be in the pre-stored whitelist, the verification is successful. Conversely, if the calling process name is not in the pre-stored whitelist, the verification fails, and the current interface call process terminates.
[0078] Furthermore, the authorized interface list stores one or more authorized interfaces corresponding to the respective authorized processes. Based on this list, interface verification is performed on the target interface corresponding to the interface call request. This can be understood as determining whether the target interface belongs to the authorized interface list. If the target interface is determined to be in the authorized interface list, the interface verification passes, and the target interface is confirmed as an authorized interface, allowing access. Conversely, if the target interface is determined not to be in the authorized interface list, the interface verification fails, and the current interface call process must be terminated.
[0079] In one embodiment, when the authorization result is determined to be authorized, a pre-stored whitelist is retrieved from the cloud server and cached locally for subsequent authentication, avoiding the need to retrieve it from the cloud server in real time each time. The pre-stored whitelist can also be updated in real time based on the authorized product information, resulting in an updated pre-stored whitelist, which is also cached in the client's local storage.
[0080] In one embodiment, after accessing the target API, the corresponding API service and business function are obtained and invoked. Specifically, the API service and business function may include obtaining current user information, obtaining current weather information, enabling facial recognition, and enabling QR code scanning, etc.
[0081] In the aforementioned interface access control method, by responding to an interface call request, the authorization result of the software development kit (SDK) corresponding to the interface call request is obtained. If the authorization result is confirmed as authorized, the name of the calling process corresponding to the interface call request is obtained. Then, if the process verification of the calling process and the interface verification of the target calling interface corresponding to the calling process name are both successful, the target calling interface is determined to be an authorized interface, and access to the target calling interface is granted. This achieves interface-level access control for the SSD. When access to the SSD is confirmed to be permitted, further determination is made as to whether the corresponding target calling interface is an authorized interface. This enables precise access control for each calling process and its respective interface, preventing unauthorized access by different processes or different types of interfaces, thereby improving the security of interface calls.
[0082] In one embodiment, such as Figure 3 As shown, an interface access control method is provided. This method, after obtaining the name of the calling process corresponding to the interface call request when the authorization result is determined to be authorized, further includes:
[0083] Step S302: Perform process verification on the calling process name according to the pre-stored whitelist.
[0084] Specifically, a pre-stored whitelist is retrieved, and the process name of the calling process is validated against this whitelist. In other words, the calling process name is matched against the pre-stored authorized calling processes in the whitelist to determine if a match is successful. This means determining whether the calling process belongs to the corresponding pre-stored whitelist, thus further confirming whether the current calling process is an authorized calling process.
[0085] Specifically, if the calling process name is determined to be in the pre-stored whitelist, the process verification is considered successful. If the calling process name is not in the pre-stored whitelist, the process verification is considered unsuccessful, and the current API call process ends.
[0086] In one embodiment, real-time data interaction with the client and server can be used to obtain the corresponding authorized calling processes and authorized interfaces in real time, thereby enabling process verification and interface verification of the calling process name that needs to access the interface provided by the software development kit.
[0087] Step S304: When the process verification is confirmed to be successful, send an interface list query command to the cloud server and receive the authorized interface list corresponding to the calling process name from the cloud server in response to the interface list query command.
[0088] Specifically, once the process verification is successful—meaning the calling process is confirmed to be a pre-stored authorized calling process in the pre-stored whitelist—an interface list query command is sent to the cloud server. The cloud server responds to the received interface list query command, retrieves the authorized interface list corresponding to the calling process name, and sends the authorized interface list back to the client. The authorized interface list stores one or more authorized interfaces corresponding to the respective authorized process.
[0089] Step S306: Based on the authorized interface list, perform interface verification on the target calling interface corresponding to the interface calling request.
[0090] Specifically, based on one or more authorized interfaces included in the authorized interface list, the target calling interface corresponding to the interface calling request is validated to determine whether the target calling interface corresponding to the interface calling request belongs to one of the authorized interfaces in the authorized interface list.
[0091] Specifically, if the target API is determined to be in the authorized API list, the API verification passes, and the target API is confirmed as an authorized API, allowing access to the target API. Conversely, if the target API is determined not to be in the authorized API list, the API verification fails, and the current API call process must be terminated.
[0092] In this embodiment, the process name of the calling process is validated based on a pre-stored whitelist. When the process validation passes, an interface list query command is sent to the cloud server. The cloud server responds with a list of authorized interfaces corresponding to the calling process name. Then, based on the list of authorized interfaces, the target interface corresponding to the interface call request is validated. This method implements interface-level access control during validation. By performing interface validation on top of process validation, it achieves precise access control for each calling process and its respective interface, preventing unauthorized interface access and improving the security of interface calls.
[0093] In one given embodiment, such as Figure 4As shown, the steps for responding to an API call request and obtaining the authorization result of the software development kit corresponding to the API call request specifically include:
[0094] Step S402: Respond to the interface call request and obtain the application package information corresponding to the interface call request.
[0095] Specifically, upon receiving an API call request, the system responds to the API call request and retrieves the application package information corresponding to the API call request information. This application package information includes the application package name, which is used to compare it with pre-stored application package information in the cloud server.
[0096] Step S404: Generate the corresponding authentication command based on the application package information.
[0097] Specifically, based on the application package information, an authentication command is generated that requires authorization of the application package information. This involves determining whether the product or program corresponding to the application package information is authorized, i.e., whether it has permission to access the interfaces provided by the software development kit.
[0098] Step S406: Send the authentication command to the cloud server. The authentication command is used to instruct the cloud server to verify the application package information based on the pre-stored application package information and generate the corresponding authorization result.
[0099] Specifically, a cloud database on a cloud server stores pre-stored application package information. By sending an authentication command to the cloud server, the cloud server retrieves the pre-stored application package information and verifies it to generate the corresponding authorization result. In other words, it compares the pre-stored application package information with the actual application package information to determine if a pre-stored application package matching the API call request exists.
[0100] Step S408: Receive the authorization result from the cloud server.
[0101] Specifically, by receiving the authorization result from the cloud server, the system determines whether the client's product or program has permission to access the interfaces provided by the software development kit.
[0102] The authorization result includes authorized and unauthorized. When the application package information and the pre-stored application package information are inconsistent, the corresponding authorization result is unauthorized. Only when there is pre-stored application package information that matches the application package information can the corresponding authorization result be determined as authorized.
[0103] In this embodiment, by responding to an interface call request, the application package information corresponding to the request is obtained. Based on the application package information, a corresponding authentication command is generated and sent to the cloud server. The authentication command instructs the cloud server to verify the application package information based on pre-stored application package information, generate a corresponding authorization result, and then receive the authorization result from the cloud server. This achieves the verification of the application package information corresponding to the interface call request based on pre-stored application package information, obtains the authorization result of the software development kit (SDK), and initially determines the legitimacy of the product or program that the client needs to access the SSD's interface. This allows for further interface access control and improves the accuracy of access control.
[0104] In one embodiment, such as Figure 5 As shown, an SDK initialization process is provided, which specifically includes:
[0105] Step S501: The client calls the initialization function to generate the corresponding initialization instructions.
[0106] In step S502, the SDK (Software Development Kit) responds to the initialization command and obtains the package name information of the client process.
[0107] In step S503, the software development kit generates a corresponding authentication command based on the package name information and sends the authentication command to the cloud server.
[0108] In step S504, the cloud server retrieves the pre-stored package name information from the cloud database according to the authentication command.
[0109] In step S505, the cloud server verifies the package name information based on the pre-stored package name information and generates the corresponding authorization result.
[0110] After executing step S505, execute steps S506 to S509. Step S506: The software development kit receives the authorization result from the cloud server.
[0111] Step S507: When the authorization result is "authorized", generate a whitelist query instruction and send the whitelist query instruction to the cloud server.
[0112] In step S508, the cloud server retrieves the pre-stored whitelist list from the cloud database according to the whitelist query command.
[0113] Step S509: The software development kit obtains the pre-stored whitelist returned by the cloud server and ends the initialization process.
[0114] After executing step S505, execute step S510. The software development kit obtains the authorization result from the cloud server. If the authorization result is not authorized, the initialization process ends and the software development kit is set to an unavailable state.
[0115] When the authorization result is unauthorized, it means that an illegal application is currently integrating and using the software development kit (SDK). In this state, all functions and interfaces provided by the SSD are unavailable.
[0116] In this embodiment, the software development kit (SDK) is initialized so that the authorization result of the corresponding SSD can be directly obtained when accessing or calling it later. Furthermore, process-level and interface-level access control is performed to achieve precise access control for each calling process and its respective interface, thereby avoiding illegal access to the interface and improving the security of interface calls.
[0117] In one embodiment, an interface access control method is provided, including the following steps:
[0118] When the authorization result is determined to be authorized, a corresponding whitelist query command is generated.
[0119] The whitelist query command is sent to the cloud server. The whitelist query command is used to instruct the cloud server to obtain the pre-stored whitelist list. The pre-stored whitelist list is used to store different authorized interfaces and the names of the calling processes to which each authorized interface belongs.
[0120] Receive the pre-stored whitelist from the cloud server.
[0121] Specifically, when the authorization result is determined to be authorized, that is, when it is determined that the product or program that needs to access the software development kit is legitimate and has the right to access the software development kit, a corresponding whitelist query instruction is generated and sent to the cloud server. Then, the cloud server retrieves the pre-stored whitelist list from the cloud database according to the whitelist query instruction, and then feeds back the pre-stored whitelist list to the client's software development kit.
[0122] The pre-stored whitelist contains different authorized interfaces and the names of the calling processes to which each authorized interface belongs.
[0123] In one embodiment, the pre-stored whitelist can be an XML file. In the XML file, each line contains elements representing the calling process configuration that can access the software development kit, including the process name and a list of authorized interfaces that the process can access. The list of authorized interfaces may include one or more authorized interfaces.
[0124] In this embodiment, when the authorization result is determined to be authorized, a corresponding whitelist query command is generated and sent to the cloud server. The cloud server then retrieves a pre-stored whitelist based on the query command and sends the pre-stored whitelist back to the client's software development kit (SDK). This achieves improved access control accuracy by retrieving the pre-stored whitelist after initial verification of the application package information, allowing for further verification of processes and interfaces based on the pre-stored whitelist.
[0125] In one embodiment, such as Figure 6 As shown, an interface access control method is provided, which is applied to... Figure 1 Taking a cloud server as an example, the explanation includes the following steps:
[0126] Step S602: Receive the authentication command sent by the client and obtain the application package information carried in the authentication command.
[0127] Specifically, it receives authentication commands sent by the client's software development kit and obtains the application package information carried in the authentication commands. The application package information can be the application package name corresponding to the client's product or program.
[0128] Step S604: Respond to the authentication command, verify the application package information according to the pre-stored application package information, generate the corresponding authorization result, and send the authorization result back to the client.
[0129] Specifically, by responding to authentication commands, the system retrieves pre-stored application package information from the cloud database, verifies the application package information based on the pre-stored application package information, and generates the corresponding authorization result.
[0130] Furthermore, by comparing the pre-stored application package information with the application package information, it is determined whether there is pre-stored application package information that matches the application package information, and then the corresponding authorization result is generated.
[0131] The authorization result includes authorized and unauthorized. When the application package information and the pre-stored application package information are inconsistent, the corresponding authorization result is unauthorized. Only when there is pre-stored application package information that matches the application package information can the corresponding authorization result be determined as authorized.
[0132] Step S606: When an interface list query command sent by the client is detected, respond to the interface list query command by sending back the pre-stored authorized interface list to the client. The authorized interface list is used to enable the client to perform interface verification on the target calling interface corresponding to the calling process name, and access the target calling interface when the interface verification is successful.
[0133] Specifically, after sending the authorization result back to the client's software development kit (SDK), the system continuously monitors for API list query commands. Upon detecting an API list query command from the client's SSD, the system responds to the command and retrieves the stored list of authorized APIs from the cloud database, then sends this list back to the client's SSD. The authorized API list includes multiple authorized APIs.
[0134] The client's software development kit verifies the target calling interface corresponding to the calling process name based on the received list of authorized interfaces. That is, it determines whether the target calling interface belongs to one of the authorized interfaces by comparing the target calling interface with the received authorized interfaces.
[0135] Furthermore, when the verification passes, i.e. when it is determined that the target call interface belongs to the authorized interface, the client can access the corresponding target call interface and further obtain and call the interface business and business functions corresponding to the target call interface.
[0136] In one embodiment, before responding to an interface list query command sent by a client and sending a pre-stored list of authorized interfaces back to the client, the method further includes:
[0137] When a whitelist query command is detected from the client, the system responds by retrieving the corresponding pre-stored whitelist. This pre-stored whitelist stores different authorized interfaces and the names of the calling processes associated with each interface, used for process verification. Specifically, after sending the authorization result back to the client's software development kit (SDK), the system continuously monitors for whitelist query commands from the SSDK. Upon detecting a whitelist query command, the system responds by retrieving the corresponding pre-stored whitelist from the cloud database and performs process verification on the calling process names based on this pre-stored whitelist.
[0138] Furthermore, after verifying the process name of the calling process according to the pre-stored whitelist, and the verification result is that the process verification is successful, the interface list query command sent by the client is further detected in real time.
[0139] In this embodiment, the system receives an authentication command sent by the client, obtains the application package information carried in the authentication command, responds to the authentication command, verifies the application package information according to the pre-stored application package information, generates the corresponding authorization result, and feeds back the authorization result to the client. When an interface list query command sent by the client is detected, the system responds to the interface list query command and feeds back the pre-stored list of authorized interfaces to the client. This method implements interface-level verification, allowing access to the target interface only when it is an authorized interface. This enables precise access control to authorized interfaces provided by different software development kits, preventing unauthorized access to interfaces and improving the security of interface calls.
[0140] In one embodiment, such as Figure 7 As shown, an interface access control method is provided, including the following steps:
[0141] Step S702: Obtain authorized product information.
[0142] Specifically, this is achieved by obtaining authorized product information input by the client user, including the application package name corresponding to the product, the calling process name, and the access control information corresponding to the software development kit (SDK). The access control information for the SSD includes restrictions such as the authorized interface, usage duration, and number of uses.
[0143] Step S704: Extract the corresponding authorized process name and the corresponding authorized interface list from the authorized product information.
[0144] Specifically, from the authorized product information, the corresponding authorized process name and the list of authorized interfaces corresponding to the authorized process name are extracted. The list of authorized interfaces stores one or more authorized interfaces corresponding to the corresponding authorized process; it can be a single interface or a cluster of interfaces.
[0145] Step S706: Based on the preset interface mapping rules, establish a mapping relationship between authorized process names and corresponding authorized interface lists, and generate a corresponding pre-stored whitelist list.
[0146] Specifically, based on the preset interface mapping rules, namely the mapping rules between the authorized process name and each authorized interface included in the authorized interface list, a mapping relationship between the authorized process name and the corresponding authorized interface list is established. Based on the authorized process name, the authorized interface list, and the mapping relationship between the two, a pre-stored whitelist list is generated.
[0147] The pre-stored whitelist is updated in real time based on the obtained authorized product information. After the update, it can be stored in the cloud server or cached in the client's local storage.
[0148] In one embodiment, such as Figure 8 As shown, a pre-stored whitelist is provided for an interface access control method. The pre-stored whitelist can be an XML file. In the XML file, each line's element represents the configuration of the calling process that can access the Software Development Kit (SDK), including the process name (processName) and the list of authorized interfaces (interfaceAccessLevel) that the process can access. The processes corresponding to the process names in the pre-stored whitelist are authorized processes, i.e., calling processes with permission to access the SSD. The list of authorized interfaces can include one or more authorized interfaces, which can be represented by strings referring to different interfaces or interface families.
[0149] Among them, reference Figure 8 As we can see, the process name (processName) corresponding to the element in the first row is "Caller", and the corresponding string for the access level (interfaceAccessLevel) is "1-3-5". Similarly, the process name (processName) corresponding to the element in the second row is "Caller2", and the corresponding string for the access level (interfaceAccessLevel) is "1-2-3". Likewise, the process name (processName) corresponding to the element in the third row is "Caller4", and the corresponding string for the access level (interfaceAccessLevel) is "1-3-4-5".
[0150] Furthermore, regarding the strings and interface mapping rules in the authorized interface list (interfaceAccessLevel), examples are as follows:
[0151] 1) The string "1" corresponds to interfaces A, B, C, and D; 2) The string "3" corresponds to interfaces E, F, and G; 3) The string "5" corresponds to interface H.
[0152] For example, if the process name (processName) in the pre-stored whitelist is Caller and the value of the authorized interface list (interfaceAccessLevel) is "1-5", it means that the process Caller can access five authorized interfaces: A, B, C, D, and H, while it has no right to access other interfaces.
[0153] The aforementioned interface access control method enables the generation and real-time updating of a pre-stored whitelist. This allows for direct access to the pre-stored whitelist for process-level and interface-level verification during subsequent checks. This achieves precise access control for each calling process and its respective interface, preventing unauthorized access by different processes or different types of interfaces and thus improving the security of interface calls.
[0154] In one embodiment, such as Figure 9 As shown, a sequence diagram of an interface access control method is provided, refer to... Figure 9 It can be seen that this specifically includes:
[0155] Step S901: The client sends an interface call request to the software development kit.
[0156] In step S902, the software development kit receives and responds to the interface call request and obtains the application package information corresponding to the interface call request.
[0157] In step S903, the software development kit generates the corresponding authentication command based on the application package information and sends the authentication command to the cloud server.
[0158] In step S904, the cloud server receives the authentication command sent by the client and obtains the application package information carried in the authentication command.
[0159] In step S905, the cloud server responds to the authentication command and retrieves the pre-stored application package information from the cloud database.
[0160] In step S906, the cloud server verifies the application package information carried in the authentication command based on the pre-stored application package information, generates the corresponding authorization result, and sends the authorization result back to the software development kit.
[0161] Step S907: When the authorization result is determined to be authorized, the software development kit generates the corresponding whitelist query instruction and sends the whitelist query instruction to the cloud server.
[0162] In step S908, the cloud server receives and responds to the whitelist query command and retrieves the pre-stored whitelist list from the cloud database.
[0163] In step S909, the cloud server sends the pre-stored whitelist to the software development kit.
[0164] Step S910: The software development kit verifies the process name of the calling process based on the pre-stored whitelist.
[0165] Step S911: When the process verification is confirmed to be successful, the software development kit generates the corresponding interface list query instruction and sends the interface list query instruction to the cloud server.
[0166] In step S912, the cloud server receives and responds to the interface list query command and retrieves the pre-stored list of authorized interfaces from the cloud database.
[0167] In step S913, the cloud server sends the list of authorized interfaces to the software development kit.
[0168] In step S914, the software development kit performs interface verification on the target calling interface corresponding to the interface calling request based on the authorized interface list.
[0169] Step S915: When the interface verification is detected as successful and the target call interface is determined to be an authorized interface, the client accesses the target call interface.
[0170] Step S916: The client obtains and invokes the interface business corresponding to the target call interface.
[0171] The aforementioned interface access control method implements interface-level access control for software development kits. When it is determined that access to the software development kit is permitted, it further determines whether the corresponding target call interface is an authorized interface. This enables precise access control for each calling process and its respective interface, preventing unauthorized access by different processes or different types of interfaces, thereby improving the security of interface calls.
[0172] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.
[0173] In one embodiment, such as Figure 10 As shown, an interface access control device is provided. This device can be a software module, a hardware module, or a combination of both, integrated into a computer device. Specifically, the device includes: an authorization result acquisition module 1002, a calling process name acquisition module 1004, and a target calling interface access module 1006, wherein:
[0174] The authorization result acquisition module 1002 is used to respond to the interface call request and obtain the authorization result of the software development kit corresponding to the interface call request; the authorization result is obtained by the cloud server based on the application package information corresponding to the interface call request.
[0175] The process name retrieval module 1004 is used to retrieve the process name corresponding to the interface call request when the authorization result is determined to be authorized.
[0176] The target call interface access module 1006 is used to determine that the target call interface is an authorized interface and access it when the process verification of the calling process and the interface verification of the target call interface corresponding to the name of the calling process pass. This interface access control device implements interface-level access control for the software development kit (SDK). When access to the SSD is already permitted, it further determines whether the corresponding target call interface is an authorized interface. This enables precise access control for each calling process and its respective interface, preventing unauthorized access by different processes or different types of interfaces, thereby improving the security of interface calls.
[0177] In one embodiment, the interface access control device further includes:
[0178] The process verification module is used to verify the name of the calling process based on a pre-stored whitelist.
[0179] The authorized interface list acquisition module is used to obtain the list of authorized interfaces corresponding to the calling process name when the process verification is confirmed to be successful.
[0180] The interface verification module is used to verify the target interface corresponding to the interface call request based on the authorized interface list.
[0181] In one embodiment, the authorization result acquisition module is further configured to:
[0182] Respond to the API call request and obtain the application package information corresponding to the API call request; generate the corresponding authentication command based on the application package information; send the authentication command to the cloud server; the authentication command is used to instruct the cloud server to verify the application package information based on the pre-stored application package information and generate the corresponding authorization result; receive the authorization result fed back by the cloud server.
[0183] In one embodiment, an interface access control device is provided, the device further comprising a pre-stored whitelist acquisition module, used for:
[0184] When the authorization result is determined to be authorized, a corresponding whitelist query instruction is generated; the whitelist query instruction is sent to the cloud server; the whitelist query instruction is used to instruct the cloud server to obtain the pre-stored whitelist list, which is used to store different authorized interfaces and the name of the calling process to which each authorized interface belongs; the pre-stored whitelist list is received from the cloud server.
[0185] In one embodiment, such as Figure 11 As shown, an interface access control device is provided. This device can be a software module, a hardware module, or a combination of both, integrated into a computer device. Specifically, the device includes: an application package information acquisition module 1102, an authorization result feedback module 1104, and an authorized interface list feedback module 1106, wherein:
[0186] The application package information acquisition module 1102 is used to receive the authentication command sent by the client and acquire the application package information carried by the authentication command.
[0187] The authorization result feedback module 1104 is used to respond to authentication commands, verify the application package information according to the pre-stored application package information, generate the corresponding authorization result, and feed the authorization result back to the client.
[0188] The authorized interface list feedback module 1106 is used to respond to the interface query command sent by the client when the client sends an interface query command, and to feed back the pre-stored authorized interfaces to the client; the authorized interface is used to enable the client to perform interface verification on the target calling interface corresponding to the calling process name, and to access the target calling interface when the interface verification is successful.
[0189] The aforementioned interface access control device implements interface-level verification. Only when the target call interface is an authorized interface can it be accessed. This enables precise access control to authorized interfaces provided by different software development kits, preventing unauthorized access to interfaces and improving the security of interface calls.
[0190] In one embodiment, an interface access control device is provided, further comprising a pre-stored whitelist query module, used for:
[0191] When a whitelist query command is detected from the client, the system responds to the whitelist query command and queries the corresponding pre-stored whitelist list. The pre-stored whitelist list stores different authorized interfaces and the name of the calling process to which each authorized interface belongs.
[0192] In one embodiment, an interface access control device is provided, further comprising a pre-stored whitelist generation module, used for:
[0193] Obtain authorized product information; extract the corresponding authorized process names and corresponding authorized interface lists from the authorized product information; establish a mapping relationship between authorized process names and corresponding authorized interface lists according to preset interface mapping rules, and generate a corresponding pre-stored whitelist list; wherein, the pre-stored whitelist list is updated in real time according to the obtained authorized product information.
[0194] For specific limitations regarding the interface access control device, please refer to the limitations on the interface access control method above, which will not be repeated here. Each module in the aforementioned interface access control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0195] In one embodiment, such as Figure 12 As shown, an interface access control system is provided, with reference to Figure 12 It is known that the interface access control system includes a cloud server 120 and a client 122. The cloud server 120 includes a customer information database 1202, an SDK authentication service 1204, a whitelist management service 1206, and an SDK early warning service 1208. The client 122 includes a functional service layer 1222, an authentication management layer 1224, and an interface proxy layer 1226. Among these:
[0196] The cloud server 120 consists of the following components: 1. Customer Information Database 1202, used to store SDK information authorized to customers, including the customer's application package name, SDK calling process name (optional, defaults to the application package name if not selected), and SDK access control information (including restrictions such as SDK interfaces, usage duration, and usage frequency). 2. SDK Authentication Service 1204, used to verify that the SDK user is a legitimate user. 3. Whitelist Management Service 1206, provides a list of accessible interfaces for SDK runtime and is responsible for distributing the whitelist. 4. SDK Early Warning Service 1208, detects and alerts on abnormal SDK usage.
[0197] Similarly, client 122 consists of the following parts: 1. Functional Service Layer 1222: The implementation layer of the interfaces provided by the SDK, existing in the SDK as an Android Service, including Function A, Function B, ..., Function N. 2. Authentication Management Layer 1224: Contains the logic for updating the dynamic whitelist and authenticating access to the interfaces provided by the SDK, serving as the core module for interface access control. 3. Interface Proxy Layer 1226: The interface proxy layer communicates with the functional service layer through Binder (inter-process communication technology), providing the interface business implementation of the functional service layer to the caller. The interfaces include Interface A, Interface B, ..., Interface N.
[0198] The aforementioned interface access control system implements interface-level access control for software development kits. When it is determined that access to the software development kit is permitted, it further determines whether the corresponding target call interface is an authorized interface. This enables precise access control for each calling process and its respective interface, preventing unauthorized access by different processes or different types of interfaces, thereby improving the security of interface calls.
[0199] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an interface access control method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0200] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0201] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0202] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0203] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the steps in the above method embodiments.
[0204] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0205] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0206] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. An interface access control method, characterized in that, The method includes: In response to an API call request, obtain the authorization result of the software development kit corresponding to the API call request; the authorization result is obtained by the cloud server based on the application package information corresponding to the API call request. When the authorization result is determined to be authorized, the process name corresponding to the interface call request is obtained through the process name acquisition function provided by the process communication technology. The process name of the calling process is verified according to the pre-stored whitelist; the pre-stored whitelist is used to store the mapping relationship between different authorized interfaces and the calling process names to which each authorized interface belongs; When the process verification is successful, an interface list query instruction is sent to the cloud server, and the authorized interface list corresponding to the calling process name is received from the cloud server in response to the interface list query instruction. Based on the authorized interface list, perform interface verification on the target calling interface corresponding to the interface calling request; When the interface verification of the target calling interface corresponding to the calling process name passes, the target calling interface is determined to be an authorized interface, and the target calling interface is accessed.
2. The method according to claim 1, characterized in that, The response interface call request, obtaining the authorization result of the software development kit corresponding to the interface call request, includes: Respond to the interface call request and obtain the application package information corresponding to the interface call request; Based on the application package information, generate the corresponding authentication command; The authentication command is sent to the cloud server; the authentication command is used to instruct the cloud server to verify the application package information according to the pre-stored application package information and generate the corresponding authorization result; Receive the authorization result from the cloud server.
3. The method according to claim 1 or 2, characterized in that, After responding to the interface call request and obtaining the authorization result of the software development kit corresponding to the interface call request, the method further includes: When the authorization result is determined to be authorized, a corresponding whitelist query instruction is generated; The whitelist query instruction is sent to the cloud server; the whitelist query instruction is used to instruct the cloud server to obtain a pre-stored whitelist list, which is used to store different authorized interfaces and the name of the calling process to which each authorized interface belongs; Receive the pre-stored whitelist list from the cloud server.
4. An interface access control method, characterized in that, The method includes: Receive authentication instructions sent by the client and obtain the application package information carried by the authentication instructions; In response to the authentication command, the application package information is verified according to the pre-stored application package information, a corresponding authorization result is generated, and the authorization result is fed back to the client, so that the client can obtain the calling process name corresponding to the interface call request through the process name acquisition function provided by the process communication technology; When a whitelist query command is detected from the client, the system responds by querying the corresponding pre-stored whitelist and sending the pre-stored whitelist back to the client. This allows the client to perform process verification on the calling process name based on the pre-stored whitelist, and send an interface list query command when the process verification passes. When an interface list query command is detected from the client, the system responds by sending a pre-stored list of authorized interfaces corresponding to the calling process name back to the client. This list of authorized interfaces allows the client to perform interface verification on the target calling interface corresponding to the calling process name, and access the target calling interface when the interface verification passes.
5. The method according to claim 4, characterized in that, Generate a pre-stored whitelist, including: Obtain authorized product information; Extract the corresponding authorized process name and the corresponding authorized interface list from the authorized product information; According to the preset interface mapping rules, a mapping relationship is established between the authorized process names and the corresponding authorized interface list, and a corresponding pre-stored whitelist list is generated; wherein, the pre-stored whitelist list is updated in real time according to the obtained authorized product information.
6. An interface access control device, characterized in that, The device includes: The authorization result acquisition module is used to respond to the interface call request and obtain the authorization result of the software development kit corresponding to the interface call request; the authorization result is obtained by the cloud server based on the application package information corresponding to the interface call request. The process name acquisition module is used to acquire the name of the calling process corresponding to the interface call request by means of the process name acquisition function provided by the process communication technology when it is determined that the authorization result is authorized; The target API access module is used to perform process verification on the calling process name according to a pre-stored whitelist. The pre-stored whitelist stores different authorized interfaces and the mapping relationship between the calling process names to which each authorized interface belongs. When the process verification is successful, an API list query instruction is sent to the cloud server, and the authorized interface list corresponding to the calling process name is received from the cloud server in response to the API list query instruction. According to the authorized interface list, the target API corresponding to the API call request is verified. When the API verification of the target API corresponding to the calling process name is successful, the target API is determined to be an authorized API, and the target API is accessed.
7. The apparatus according to claim 6, characterized in that, The authorization result acquisition module is also used for: Responding to an interface call request, the system obtains the application package information corresponding to the interface call request; based on the application package information, it generates a corresponding authentication instruction; and sends the authentication instruction to the cloud server. The authentication instruction is used to instruct the cloud server to verify the application package information based on the pre-stored application package information and generate a corresponding authorization result. Receive the authorization result from the cloud server.
8. The apparatus according to claim 6 or 7, characterized in that, The device also includes a pre-stored whitelist acquisition module, used for: When the authorization result is determined to be authorized, a corresponding whitelist query instruction is generated; The whitelist query instruction is sent to the cloud server; the whitelist query instruction is used to instruct the cloud server to obtain a pre-stored whitelist list, which is used to store different authorized interfaces and the names of the calling processes to which each authorized interface belongs; the pre-stored whitelist list is received from the cloud server.
9. An interface access control device, characterized in that, The device includes: The application package information acquisition module is used to receive the authentication command sent by the client and acquire the application package information carried by the authentication command. The authorization result feedback module is used to respond to the authentication command, verify the application package information according to the pre-stored application package information, generate the corresponding authorization result, and feed the authorization result back to the client, so that the client can obtain the calling process name corresponding to the interface call request through the process name acquisition function provided by the process communication technology; The pre-stored whitelist query module is used to respond to the whitelist query command when the whitelist query command is detected by the client, query the corresponding pre-stored whitelist, and feed the pre-stored whitelist back to the client, so that the client performs process verification on the calling process name according to the pre-stored whitelist and sends the interface list query command when the process verification is successful. The authorized interface list feedback module is used to respond to the interface list query command sent by the client when the client sends the interface list query command, and to feed back the pre-stored authorized interface list corresponding to the calling process name to the client; the authorized interface list is used to enable the client to perform interface verification on the target calling interface corresponding to the calling process name, and to access the target calling interface when the interface verification is successful.
10. The apparatus according to claim 9, characterized in that, The device also includes a pre-stored whitelist generation module, used for: Obtain authorized product information; extract the corresponding authorized process name and the corresponding authorized interface list from the authorized product information; According to the preset interface mapping rules, a mapping relationship is established between the authorized process names and the corresponding authorized interface list, and a corresponding pre-stored whitelist list is generated; wherein, the pre-stored whitelist list is updated in real time according to the obtained authorized product information.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Interface calling method and device, smart television and readable storage medium
CN111083541A
Access control method, system and device and computing equipment
CN112073400A
