Request processing method, apparatus, device, and storage medium
By obtaining the request header information of the business access request, the policy type of the target access control policy is determined, and processing is performed based on the policy type. This solves the problem of poor flexibility of traditional access control methods, realizes flexible access control for different business applications and terminal devices, and improves processing efficiency.
Patent Information
- Application Number
- CN202110726318.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-29
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2041-06-29
AI Technical Summary
Traditional access control list-based request processing methods cannot handle the complex access requests from different business applications, terminal devices, and proxy software, and have poor flexibility.
By obtaining the request header information of the business access request, the policy type of the target access control policy is determined, and corresponding processing is performed based on the policy type, including control methods for static and dynamic policies, and local cache verification and remote request verification are supported.
It enables flexible handling of business access requests, improves applicability and processing efficiency, and is suitable for access control in the fields of cloud technology and computer technology.
Smart Images

Figure CN115544527B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a request processing method, apparatus, device, and storage medium. Background Technology
[0002] Access control lists (ACLs) are a packet-filtering-based access control technology that filters data packets on an interface based on defined conditions, allowing or dropping them. However, current access control policies can only control access requests based on source address, destination address, and port number.
[0003] With the development of computer technology, people's office scenarios have become more complex, and the security requirements for business applications, terminal devices, and proxy software are also increasing. However, the traditional request processing method based on access control lists cannot cope with the complex access requests brought about by different business applications, terminal devices, and proxy software, and has poor flexibility. Summary of the Invention
[0004] This application provides a request processing method, apparatus, device, and storage medium that can process business access requests based on different types of access control policies, offering high flexibility and applicability.
[0005] On one hand, embodiments of this application provide a request processing method, the method comprising:
[0006] Obtain a business access request and determine at least one access control policy from the preset access control list that matches the access address of the business access request.
[0007] Obtain the request header information of the above-mentioned business access request, and determine the target access control policy corresponding to the above-mentioned business access request from at least one of the above-mentioned access control policies based on the above-mentioned request header information.
[0008] The policy type of the target access control policy is determined. If the policy type is the first type, the business access request is processed based on the control method of the target access control policy. If the policy type is the second type, the business access request is processed based on the verification policy of the target access control policy. The verification policy includes at least one of the local cache verification policy and the remote request verification policy.
[0009] On the other hand, embodiments of this application provide a request processing apparatus, which includes:
[0010] The request acquisition module is used to acquire business access requests and determine at least one access control policy that matches the access address of the aforementioned business access request from a preset access control list.
[0011] The policy determination module is used to obtain the request header information of the above-mentioned business access request, and determine the target access control policy corresponding to the above-mentioned business access request from the above-mentioned at least one access control policy based on the above-mentioned request header information.
[0012] The policy execution module is used to determine the policy type of the target access control policy. If the policy type is the first type, the business access request is processed based on the control method of the target access control policy. If the policy type is the second type, the business access request is processed based on the verification policy of the target access control policy. The verification policy includes at least one of the local cache verification policy and the remote request verification policy.
[0013] On the other hand, embodiments of this application provide an electronic device, including a processor and a memory, which are interconnected;
[0014] The aforementioned memory is used to store computer programs;
[0015] The processor described above is configured to execute the request processing method provided in the embodiments of this application when the computer program described above is invoked.
[0016] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program that is executed by a processor to implement the request processing method provided in embodiments of this application.
[0017] On the other hand, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the request processing method provided in embodiments of this application.
[0018] In this embodiment, the target access control policy for processing the service access request can be determined through the request header information of the service access request. Then, the target access control policy can be flexibly processed based on different policy types, which has high applicability. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the request processing method provided in an embodiment of this application;
[0021] Figure 2a This is a schematic diagram of a scenario for adding access control policies provided in the application embodiment;
[0022] Figure 2b This is a schematic diagram of another scenario for adding access control policies provided in the application embodiment;
[0023] Figure 3a This is a schematic diagram of a scenario for determining a target access control policy provided in an embodiment of this application;
[0024] Figure 3b This is another scenario diagram illustrating the determination of target access control policies provided in the embodiments of this application;
[0025] Figure 3c This is another scenario illustration of determining the target access control policy provided in the embodiment itself;
[0026] Figure 4 This is a flowchart of the request processing method provided in the embodiments of this application;
[0027] Figure 5a This is a schematic diagram of a scenario of the request processing method provided in an embodiment of this application;
[0028] Figure 5b This is another scenario illustration of the request processing method provided in the embodiments of this application;
[0029] Figure 5c This is another scenario illustration of the request processing method provided in the embodiments of this application;
[0030] Figure 6 This is a schematic diagram of the architecture of the request processing method provided in the embodiments of this application;
[0031] Figure 7 This is a schematic diagram of the structure of the request processing device provided in the embodiments of this application;
[0032] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0034] The request processing method provided in this application is applicable to fields such as cloud technology and computer technology. It can process business access requests based on different types of access control policies and has high applicability.
[0035] The request processing method provided in this application embodiment can be executed by a server, which can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0036] In this embodiment of the application, the service access request can be sent through a terminal, which can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, vehicle terminal, smart TV, etc., but is not limited to these.
[0037] Terminals and servers can be connected directly or indirectly via wired or wireless communication, and this application does not impose any restrictions on this.
[0038] See Figure 1 , Figure 1 This is a flowchart illustrating the request processing method provided in an embodiment of this application. For example... Figure 1 As shown, the request processing method provided in this application embodiment may include the following steps:
[0039] Step S11: Obtain the business access request and determine at least one access control policy that matches the access address of the business access request from the preset access control list.
[0040] In some feasible implementations, the source of the service access request may include at least one of the service proxy or the service application. That is, the request processing method provided in this application embodiment can perform access control on service access requests initiated through the service proxy and service access requests initiated through the service application.
[0041] For example, in this embodiment of the application, the service access request can be initiated by the user through a service agent installed on the terminal. The service agent installed on the terminal can be a proxy plugin, proxy software, or a program or device with proxy functionality, etc., and can be determined based on the actual application scenario requirements; no restrictions are imposed here.
[0042] Alternatively, the service access request in this embodiment can also be a service access request initiated by the user through a proxy server based on the terminal. This proxy server can be a standalone physical server, a server cluster consisting of multiple physical servers, or a distributed system; the specific type can be determined based on the actual application scenario requirements and is not limited here.
[0043] For example, in this embodiment, the business access request can be a business access request initiated by a user based on a business application. Here, the aforementioned business application is an application corresponding to the business system to which the request processing method provided in this embodiment applies. The business application communicates with the server of the business system to send the business access request to the business system.
[0044] The business system applicable to the request processing method provided in this application embodiment can be any system that has the need to control and manage access requests, such as a network management system or a network protection system. The specific system can be determined based on the actual application scenario requirements and is not limited here.
[0045] Before obtaining a business access request originating from a business application, it is necessary to obtain the login information and / or application registration information of the request initiator corresponding to the business application in the business system, thereby authenticating the business initiator based on the login information and / or application registration information, and returning a token to the business application after successful authentication.
[0046] When obtaining a business access request, if the business access request carries this token, the business access request originating from the business application can be obtained directly. Otherwise, the business application and / or the request initiator need to be authenticated before the business access request can be obtained.
[0047] In some feasible implementations, an access control list, comprising multiple access control policies, can be pre-determined before acquiring a service access request. Any access control policy in the access control list is used to control service access requests with a preset access address.
[0048] The aforementioned access addresses include, but are not limited to, Uniform Resource Locators (URLs), the domain name represented by the host field, and the path represented by the path field, etc., which are not restricted here.
[0049] For any access control policy in the access control list, the access control policy includes policy name, control conditions, control method and policy description information, which can be determined based on the actual application scenario requirements and are not restricted here.
[0050] Specifically, the above policy name is a non-functional name for the access control policy, and the specific name can be determined based on the actual application scenario requirements, without any restrictions here.
[0051] Specifically, the above control conditions are used to describe the relevant conditions for controlling business access requests, which may include a preset access address. That is, the access control policy is used to control business access requests with a preset access address.
[0052] For business access requests originating from a business agent, the aforementioned control conditions may further include at least one of user information, agent information, and device information. The aforementioned user information includes, but is not limited to, information about the request initiator, such as username and other identity information, and can be determined based on the actual application scenario requirements; no restrictions are imposed here.
[0053] The aforementioned proxy information includes, but is not limited to, proxy plugin information, proxy software information, and proxy server information corresponding to the business proxy. The specific details can be determined based on the actual application scenario requirements and are not restricted here.
[0054] The aforementioned device information includes, but is not limited to, the device model, device identifier, and International Mobile Equipment Identity (IMEI) of the device used by the business initiator. The specific details can be determined based on the actual application scenario requirements and are not restricted here.
[0055] For business access requests originating from business applications, the aforementioned control conditions may also include business application-related information (such as the application name, application identifier, etc.) and user information, which can be determined based on the actual application scenario requirements and are not restricted here.
[0056] Specifically, the above control method is used to describe the specific control method performed on the business access request when the business access request meets the control conditions of the access control policy, that is, the default policy behavior executed based on the access control policy when the business access request matches the access control policy.
[0057] The aforementioned control methods include, but are not limited to, allowing, denying, and redirecting. That is, based on these control methods, one can allow a service access request to access the corresponding access address, deny a service access request to access the corresponding access address, or allow the service access request to redirect to another access address.
[0058] When the control method is denial, the above access control policy also includes a denial message (error message) returned to the business initiator when the business access request is denied. The specific content can be determined based on the actual application scenario requirements and is not restricted here.
[0059] Specifically, the policy description information mentioned above can be used to describe the specific functions of the access control policy, and the specific details can be determined based on the actual application scenario requirements, without any restrictions here.
[0060] Specifically, for any access control policy in the access control list, the access control policy also includes relevant information that satisfies the capabilities of custom plugins, including a type parameter that describes the policy type of the access control policy.
[0061] For example, the `static` parameter can be used to indicate that the access control policy is a static access control policy. For ease of description, the static type can be referred to as the first type. When the access control policy is of the first type (static type), service access requests that meet the control conditions of the access control policy can be processed directly based on the control methods included in the access control policy.
[0062] For example, the remoteVerify parameter can be used to indicate that the access control policy is a dynamic access control policy. For ease of description, the dynamic type can be referred to as the second type.
[0063] When the access control policy is of type 2 (dynamic type), the remote verification parameter is used to instruct the processing of business access requests that meet the control conditions based on the verification policy.
[0064] Among the aforementioned information that satisfies the capabilities of custom plugins, there are also remote request verification strategies, specifically including verification address, verification response time threshold, and timeout control method.
[0065] Specifically, for any access control policy in the access control list, the access control policy can be stored in a certain data storage format.
[0066] As an example, the data storage format corresponding to any access control policy can be shown in Table 1:
[0067] Table 1
[0068]
[0069]
[0070] The parameter name "name" represents the strategy name, and its parameter type can be string.
[0071] The parameter name `conditions` represents the control conditions. Its parameter type can be `conditions`, and it can be expressed through any key-value pair representation. It can be represented as a single value or a list, with multiple values separated by semicolons (;) without spaces. For example, this access control policy targets the request initiator "Zhang San" and the access address "demo.com". This control condition can be specifically represented as: `map['user'] = zhangsan;; map['host'] = 'demo.com'`.
[0072] The parameter name "action" indicates the control method. Its parameter type can be string. For business access requests that match this access control policy, control methods such as allow or deny can be executed.
[0073] The parameter name deniedMsg is used to represent the error message returned when a business access request is rejected, and its parameter type can be string.
[0074] The parameter name "description" is used to describe the access control policy, and its parameter type can be string.
[0075] The parameter name `extend` is used to represent parameters that enable the capabilities of custom plugins. Its specific data content is shown in Table 2.
[0076] Table 2
[0077] Parameter name illustrate type Type: static or remoteVerify verifyUrl Remote verification service address (verification address) verifyTimeout Remote verification service timeout verifyAction The default behavior for API timeouts is to allow timeouts.
[0078] The parameter name `type` represents the access control policy type, which can be either `static` or `remoteVerify`. The parameter name `verifyUrl` represents the verification address. The parameter name `verifyTimeout` represents the verification response time threshold, i.e., the remote verification service timeout. The parameter name `verifyAction` represents the timeout control method, i.e., the default control method when remote verification times out (such as allowing by default).
[0079] In some feasible implementations, when multiple access control policies are determined, a policy addition operation can be performed in response to the access control policy, and the policy addition content corresponding to the policy addition operation can be obtained. The policy addition content corresponding to the policy addition operation includes the aforementioned policy name, control conditions, control method, policy description information, and relevant information that satisfies the capabilities of custom plugins. Then, the various information included in the policy addition content are stored based on the data storage format corresponding to the access control policy to obtain the access control policy corresponding to the policy addition operation.
[0080] See Figure 2a , Figure 2a This is a schematic diagram of a scenario for adding an access control policy according to the application embodiment. Based on the access control policy adding interface shown in 2a, the policy type of the access control policy to be added can be selected as a static policy (the first type of access control policy). In this access control policy adding interface, the policy name, preset access address, control conditions, and control method of the access control policy can also be input and determined. Then, based on the access control policy adding interface, a policy adding operation (such as a confirmation operation) is responded to, thereby obtaining the various information added in the access control policy adding interface, and storing the various information according to the data storage format corresponding to the access control policy to obtain the final access control policy.
[0081] See Figure 2b , Figure 2b This is a schematic diagram of another scenario for adding access control policies provided in the application embodiment. Based on the access control policy adding interface shown in 2b, the policy type of the access control policy to be added can be selected as a dynamic policy (the second type of access control policy). In this access control policy adding interface, the policy name, at least one preset access address, at least one control condition, and control method of the access control policy can also be entered and determined. Furthermore, when the policy type of the access control policy to be added is selected as a dynamic policy, the corresponding verification address, verification response time threshold, and corresponding timeout control method also need to be entered. Then, based on the access control policy adding interface, a policy adding operation (such as a confirmation operation) is responded to to obtain the various information added in the access control policy adding interface, and the various information are stored according to the data storage format corresponding to the access control policy to obtain the final access control policy.
[0082] In some feasible implementations, when determining access control policies in a preset access control list, access control policies can also be determined based on the processing records of historical service access requests. For example, based on the processing records of each historical service access request, at least one target historical service access request originating from a service application and using the same control method can be identified. Then, target control conditions are determined based on the service application-related information and access addresses corresponding to each target historical service access request. A new access control policy is further determined based on the target control conditions and the control method corresponding to the target historical service access request.
[0083] In some feasible implementations, after obtaining a business access request, the access address corresponding to the business access request can be determined, and then at least one access control policy matching the access address of the business access request can be selected from a preset access control list. That is, after obtaining a business access request, only one access control policy matching the access address corresponding to the business access request is selected from the preset access control list.
[0084] For example, if the access address corresponding to the business access request is www.aaa.com, then at least one access control policy that includes www.aaa.com in the control conditions is determined from the preset access control list, and then the determined at least one access control policy is determined as at least one access control policy that matches the access address corresponding to the access request.
[0085] In some feasible implementations, if the preset access control list does not include an access control policy that matches the access address of the business access request, the business access request can be forwarded to the preset access address, or the business access request can be forwarded to the access address requested by the business access request, thereby ending the response to the business access request.
[0086] Step S12: Obtain the request header information of the business access request, and determine the target access control policy corresponding to the business access request from at least one access control policy based on the request header information.
[0087] In some feasible implementations, if the preset access control list includes at least one access control policy that matches the access address of the business access request, the request header information of the business access request can be obtained, and then the target business access request corresponding to the business access request can be determined from the determined access control policy based on the request header information.
[0088] Specifically, based on the request header information of a business access request, the source of the request can be determined. For example, based on the relevant parameters in the request header information, it can be determined whether the business access request was initiated by the business application or by a business proxy.
[0089] The business access request also carries access information. When the source of the business access request is a business proxy, the access information carried by the business access request includes information about the business initiator (user information, etc.), device information (device ID, etc.), and proxy information (proxy software name, proxy server name, etc.).
[0090] When the source of a business access request is a business application, the business access request carries access information including business application-related information, such as the application type and application name of the business application.
[0091] Furthermore, after determining the source of the business access request, the request can be verified based on the verification method corresponding to that source. Upon successful verification, at least one target access control policy matching the access information carried in the business access request can be determined. In other words, based on the control conditions of each determined access control policy, a target access control policy matching the access information carried in the business access request is identified.
[0092] Specifically, for any given access control policy, if all the information in the control conditions of the access control policy other than the access address (such as device information and proxy information) is the same as all or part of the information in the access information of the service access request, that is, the access information carried by the service access request includes all the information in the control conditions of the access control policy other than the access address, then the access control policy is determined to be the target access control policy that matches the access information carried by the service access request.
[0093] For example, for any given access control policy, if the control conditions of the access control policy include the relevant information of the business "Application A" and the access address "www.aaa.com", and the access information carried by the business access request includes "Application A" and "Access time 20:12", then the access control policy can be determined as the target access control policy that matches the access information carried by the business access request.
[0094] Optionally, when verifying the proxy signature of a business proxy or the request signature of a business access request, the initiator information in the access information can also be obtained and verified. For example, if the source of the business access request is a business proxy, the proxy signature of the business proxy and the initiator information are verified. If both verifications pass, the target access control policy for processing the business access request is determined. Similarly, if the source of the business access request is a business application, the request signature of the business access request and the initiator information are verified. If both verifications pass, the target access control policy for processing the business access request is determined.
[0095] The target access control policy determined based on the above method is the access control policy used to process business access requests.
[0096] In some feasible implementations, the business access request is verified based on the verification method corresponding to the request source. If the request source is a business proxy, the proxy signature of the business proxy can be obtained and verified. If the verification passes, the target access control policy for processing the business access request is determined based on the control conditions of each access control policy.
[0097] See Figure 3a , Figure 3a This is a schematic diagram of a scenario for determining a target access control policy provided in an embodiment of this application. For example... Figure 3a As shown, the request initiator installs a service proxy on the terminal and initiates a service access request carrying access information through the service. Based on the request header information of the service access request, at least one access control policy matching the access address of the service access request can be selected from the access control list. Then, after the proxy signature verification is passed, the target service access policy for processing the service access request is determined based on the access information carried in the service access request.
[0098] If the business access request originates from a business application, the request signature can be verified. If the verification passes, the target access control policy for processing the business access request is determined based on the control conditions of each access control policy.
[0099] See Figure 3b , Figure 3b This is another scenario illustration of determining the target access control policy provided in the embodiments of this application. For example... Figure 3b As shown, the request initiator, after obtaining a token by registering the business application corresponding to the business system, can initiate a business access request carrying access information based on the business application. Based on the request header information of the business access request, at least one access control policy matching the access address of the business access request can be filtered from the access control list. After the request verification of the business access request is passed, the target business access policy for processing the business access request is determined based on the access information carried in the business access request.
[0100] See Figure 3c , Figure 3c This is another scenario illustration of determining the target access control policy provided in the embodiment itself. For example... Figure 3c As shown, the request initiator installs a service agent on the terminal and initiates a service access request carrying access information through the service. Based on the request header information of the service access request, at least one access control policy matching the access address of the service access request can be filtered from the access control list. The agent signature and initiator information are further verified. After both are verified, the access information carried by the service access request determines the target service access policy for processing the service access request.
[0101] In some feasible implementations, if the proxy signature fails verification, or the business access request fails verification, or the initiator information fails verification, the business access request can be forwarded to the access address requested by the business access request, thereby ending the response to the business access request.
[0102] Step S13: Determine the policy type of the target access control policy. If the policy type is the first type, the business access request is processed based on the control method of the target access control policy. If the policy type is the second type, the business access request is processed based on the verification policy of the target access control policy.
[0103] In some feasible implementations, after determining the target access control policy for processing business access requests, the policy type of the target access control policy can be determined, thereby processing business access requests in different ways based on different policy types.
[0104] Specifically, the type parameter of the target access control policy can be determined, that is, the type parameter in the target access control policy used to describe the policy type of the access control policy can be determined, and the policy type of the target access control policy can be determined based on the type parameter.
[0105] As an example, if the type parameter in the target access control policy is determined to be static, then the policy type of the target access control policy can be determined to be the first type, that is, the policy type of the target access control policy is static. If the type parameter in the target access control policy is remoteVerify, then the policy type of the target access control policy can be determined to be the second type, that is, the policy type of the target access control policy is dynamic.
[0106] In some feasible implementations, when the target access control policy is of type 1, i.e., a static policy, the control method of the target access control policy can be determined. Specifically, the control method corresponding to the action parameter of the target access control policy can be determined, and then the business access request process can be processed based on this control method.
[0107] For example, if the action parameter of the target access control policy corresponds to the allow control mode, then the business access request is allowed to access the corresponding access address.
[0108] For example, if the control mode corresponding to the action parameter of the target access control policy is deny, then the business access request is denied access to the corresponding access address, and the rejection information (error information) returned when the control mode is deny is determined. After denying the business access request access to the corresponding access address, the rejection information is returned to the requester of the business access request.
[0109] For example, if the control method corresponding to the action parameter of the target access control policy is redirection, the business access request can be redirected to a preset redirection address, or a preset redirection address can be returned to the request initiator so that the business initiator can access the preset redirection address itself. As an example, if the control method corresponding to the action parameter of the target access control policy is redirection, a 302 (Moved Temporarily) Hypertext Transfer Protocol (HTTP) request is returned to the request initiator.
[0110] In some feasible implementations, when the target access control policy is of type two, i.e., a dynamic policy, the business access request can be processed based on the verification policy of the target access control policy. The verification policy includes at least one of a local cache verification policy and a remote request verification policy.
[0111] Specifically, if the target access control policy's verification policy includes a remote verification policy, the verification address, verification response time threshold, and timeout control method included in the remote verification policy can be obtained. A verification request is then sent to the verification address so that the authentication source corresponding to the verification address verifies the business access request.
[0112] When sending a verification request to the verification address, a timer can be used to determine the response time of the verification request, i.e., the time to wait for the verification result. If the response time exceeds the verification response time threshold, the business access request process can be handled according to the target access control policy (such as the control method corresponding to the action parameter). If the response time does not exceed the verification response time threshold, i.e., the verification result sent by the authentication source is received within the verification response time threshold, the control method corresponding to the verification result can be determined, and then the business access request can be processed based on the control method corresponding to the verification result.
[0113] After sending a verification request to the verification address, the legality and security of the business access request can be verified through the authentication source corresponding to the verification address. The access information corresponding to the business access request can also be verified to determine the control method for the business access request.
[0114] Optionally, if the verification strategy of the target access control policy includes a local cache verification strategy, it can be determined whether the local cache includes target cache information associated with the business access request. The target cache information associated with the business access request indicates the control method for the first business access request after, within its corresponding cache time threshold, another business access request (hereinafter referred to as the first business access request) corresponding to the access information and access address of the business access request is obtained again.
[0115] For example, a service access request has a caching time of 2 hours. The corresponding cache information shows the cache user as sanzhang, the cache device as D001, the cache host as demo3.com, and the control method as deny. Based on this, it can be known that within 2 hours, any service access request initiated by sanzhang from device D001 to any access address under demo3.com will be directly denied. If sanzhang initiates a service access request from device D002 to an access address under demo3.com, it is necessary to re-check whether the cached information corresponding to this service access request exists in the local cache.
[0116] Therefore, if the local cache does not contain the target cache information associated with the business access request, or if the local cache does contain the target cache information but the cache time of the target cache information exceeds the cache time threshold, the business access request process can be handled through the target access control policy (such as the control method corresponding to the action parameter). If the local cache contains the target cache information associated with the business access request, and the cache time of the target cache information does not exceed the cache time threshold, then the control method corresponding to the target cache information can be determined, and the business access request can be processed based on the control method corresponding to the target cache information.
[0117] Optionally, if the verification strategy of the target access control policy includes a local cache verification strategy and a remote verification strategy, it can be first determined whether the local cache includes target cache information associated with the business access request. If the local cache includes target cache information associated with the business access request, and the cache time of the target cache information does not exceed the cache time threshold, then the control method corresponding to the target cache information can be determined, and the business access request can be processed based on the control method corresponding to the target cache information.
[0118] If the local cache does not include the target cache information associated with the business access request, or if the local cache does include the target cache information but the cache time of the target cache information exceeds the cache time threshold, the business access request will be further processed based on the remote request verification policy. In this case, the verification address, verification response time threshold, and timeout control method included in the remote verification policy can be obtained, and a verification request can be sent to the verification address so that the authentication source corresponding to the verification address can verify the business access request.
[0119] When sending a verification request to the verification address, a timer can be used to determine the response time of the verification request, i.e., the time to wait for the verification result. If the response time exceeds the verification response time threshold, the business access request process can be handled according to the target access control policy (such as the control method corresponding to the action parameter). If the response time of the verification request does not exceed the verification response time threshold, i.e., the verification result sent by the authentication source is received within the verification response time threshold, the control method corresponding to the verification result can be determined, and then the business access request can be processed based on the control method corresponding to the verification result.
[0120] After sending a verification request to the verification address, the legality and security of the business access request can be verified through the authentication source corresponding to the verification address. The access information corresponding to the business access request can also be verified to determine the control method for the business access request.
[0121] The authentication source can verify the verification request, specifically by checking the IP address and signature of the request. For example, it can verify if the IP address is on a whitelist and if the signature is valid. The specific verification method can be determined based on the actual application scenario and is not limited here. After the verification request passes, the source can return the verification result based on the relevant information of the business access request carried in the verification request (such as device information, proxy information, etc.).
[0122] Furthermore, if the response time corresponding to the verification request does not exceed the verification response time threshold, that is, if the verification result sent by the authentication source is received within the verification response time threshold, and the business access request is processed based on the control method corresponding to the verification result, the caching conditions corresponding to the business access request can be determined based on the verification result, and the caching information associated with the business access request can be cached based on the caching conditions.
[0123] The aforementioned caching conditions include, but are not limited to, specified information included in the cache information, such as one or more of the following: cache time, device information to be cached, access path, application information, request initiator information (user information), and control method. The specific details can be determined based on the actual application scenario requirements and are not limited here. Furthermore, the aforementioned caching conditions also include the cache time of cache information associated with the business access request; that is, within a certain period, subsequent business access requests can be further processed based on the cache information related to the business access request.
[0124] In this embodiment of the application, the request processing method provided in this embodiment of the application can also be applied to a blockchain distributed system formed by multiple nodes (any form of computing device in the access network, such as servers and user terminals) connected through network communication. The nodes form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP).
[0125] In this distributed system, any machine, such as a server or terminal, can join and become a node. The request initiator of the business access request, the executor of the request processing method provided in this embodiment, and the authentication source for remote request verification can all be nodes in the blockchain. For example, the request initiator can be a business node in the blockchain, the executor of the request processing method provided in this embodiment can be a service node in the blockchain, and the authentication source is an authentication node in the blockchain. When a business node in the blockchain initiates a business access request, the service node determines the policy type of the target access control policy corresponding to the business access request. If the policy type is type one, the service node processes the business access request initiated by the business node based on the control method of the target access control policy. If the policy type is type two, the service node processes the business access request based on the verification policy of the target access control policy and with the participation of the authentication node.
[0126] In this embodiment, the local cache storing the cache information corresponding to the business access request, and the storage space for the relevant data required by the authentication source when verifying the business access request, can be distributed cloud storage, database, database management system (DBMS), blockchain, etc. The specific location can be determined based on the actual application scenario requirements, and no restrictions are imposed here.
[0127] Among them, a distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology and distributed storage file systems to bring together a large number of storage devices of various types in the network (storage devices are also called storage nodes) to work together through application software or application interfaces to jointly provide data storage and business access functions to the outside world.
[0128] In short, a database can be viewed as an electronic filing cabinet—a place to store electronic files, where users can perform operations such as adding, querying, updating, and deleting data. A "database" is a collection of data stored together in a certain way, shared by multiple users, with minimal redundancy, and independent of application programs. A database management system is a computer software system designed to manage databases, generally possessing basic functions such as storage, retrieval, security, and backup.
[0129] The following is combined Figure 4 The request processing method provided in this embodiment will be further explained. Figure 4 This is a flowchart of the request processing method provided in the embodiments of this application. Figure 4 As shown, after obtaining a business access request, it can be determined whether there is an access control policy in the preset access control list that matches the access address corresponding to the business access request. If not, the business access request is forwarded.
[0130] If a pre-defined access control list contains an access control policy that matches the access address corresponding to the business access request, the request header information of the business access request is obtained, and the request source of the business access request is determined based on the request header information. If the request source of the business access request is a business proxy, the proxy signature is verified; if the request source of the business access request is a business application, the request signature of the business access request is verified. If the verification fails, the business access request is forwarded.
[0131] If the business access request passes the verification, the access information carried in the business access request is obtained, and it is determined whether there is a target access control policy that matches the access information. If there is no target access control policy, the business access request is forwarded.
[0132] If a target access control policy exists for the business access request, the policy type of the target access control policy is further determined. If the target access control policy is a static access control policy, the policy action is executed, that is, the business access request is processed based on the control method corresponding to the target access control policy. If the target access control policy is a dynamic access control policy, it is determined whether there is cached information corresponding to the business access request in the local cache. If it exists, the policy action is executed, that is, the business access request is processed based on the control method corresponding to the cached information.
[0133] If the local cache does not contain the cached information corresponding to the business access request, or if the corresponding cached information exists but the cache time exceeds the cache time threshold, then remote verification is performed based on the remote verification strategy. This involves obtaining the verification address, verification response time threshold, and timeout control method included in the remote request verification strategy, sending a verification request to the verification address, and determining the response time of the verification request.
[0134] If the response time exceeds the verification response time threshold, a policy action is executed, i.e., the business access request is processed based on timeout control. If the response time does not exceed the verification response time threshold, the verification result corresponding to the verification request is obtained, and the business access request is processed based on the verification result, i.e., the business access request is processed based on the authentication source action. Furthermore, if the response time does not exceed the verification response time threshold, the caching conditions corresponding to the business access request can be determined, and then the caching information associated with the business access request can be cached based on the caching conditions.
[0135] The request processing method provided in this application embodiment is described below with specific examples. If access control policy Demo1 and access control policy Demo3 exist in the preset access control list, their specific policy data are shown in Table 3:
[0136] Table 3
[0137]
[0138] Among them, Demo1 uses a static access control policy, and the control conditions include application information (APP:demo2) and access address demo1.com / abc. The control action is denial (DENY).
[0139] Demo3 uses a dynamic access control policy. The verification address (verifyUrl) is http: / / controlsrc.com / control, the verification response time threshold (verifyTimeout) is 20ms, the timeout control method (verifyAction) is allowed, and the control conditions (Conditions) include the requester information (sanzhang) and the access address demo1.com / .
[0140] See Figure 5a , Figure 5a This is a schematic diagram of a scenario for the request processing method provided in this application embodiment. If application Demo2 initiates a request to demo1.com / a, after receiving the business access request, it checks whether demo1.com / a exists in the control conditions of each access control policy. If it does not exist in any of them, the request is forwarded and the current request ends.
[0141] See Figure 5b , Figure 5b This is another scenario illustration of the request processing method provided in this application embodiment. If application Demo2 initiates a request to demo1.com / abc, after receiving the business access request, it checks whether demo1.com / a exists in the control conditions of each access control policy. If it exists in the control conditions of access control policy Demo1, it obtains the request header information and determines that the request source is a business application based on the request header information.
[0142] Further verification of the request signature of the business access request and acquisition of access information (APP information: demo2) is possible. If the access control policy Demo1 is a static policy, the control method of the access control policy (deny) can be executed, and this request ends.
[0143] See Figure 5c , Figure 5c This is another scenario illustration of the request processing method provided in this application embodiment. If Sanzhang initiates a request to demo3.com / hello, the business agent initiates a business access request carrying access information (including device ID: D001 and agent software: IE). After receiving the business access request, it queries whether the control conditions of each access control policy match demo1.com / hello. If the access control policy Demo3 is matched, the request header information is obtained, and based on the request header information, it is determined that the request source is the business agent. Therefore, the agent signature can be verified first, and the access information (sanzhang, device ID: D001, agent software: IE) can be obtained.
[0144] When access control policy Demo3 is a dynamic policy, if the local cache does not contain cached information associated with access control policy Demo3, or if the cached information associated with access control policy Demo3 exceeds the cache time threshold, the business access request will be processed based on the control method corresponding to the cached information. If the local cache includes cached information associated with access control policy Demo3, and the cache time of the cached information associated with access control policy Demo3 does not exceed the cache time threshold, a timer will be generated, and a verification request carrying access information (sanzhang, device ID: D001, proxy software: IE) will be sent to the authentication source, i.e., the business access request carrying the access information will be forwarded.
[0145] Furthermore, it checks whether the timer has exceeded the verification response time threshold. If it has, the allowed control method is executed; otherwise, it continues to wait for the verification result returned by the authentication source and executes the rejection control method corresponding to the verification result. Simultaneously, cached information corresponding to the business access request can be cached based on caching conditions (cache time: 2 hours, cache user: sanzhang, cache device: D001, cache access address: demo3.com). This indicates that within the next 2 hours, any business access request initiated by sanzhang from device D001 to any access address under demo3.com will be directly rejected without further inquiry to the authentication source.
[0146] In the embodiments of this application, the method provided can also be performed through interaction between a control source and a business system. The control source can be an independent management terminal or an independent server; no limitation is made here. See also Figure 6 , Figure 6 This is a schematic diagram of the architecture of the request processing method provided in the embodiments of this application. For example... Figure 6 As shown, the control source is used to write access control policies through the read / write interface of the access control list management unit, which then stores the access control policy data. The extended information management unit can be used to receive service access requests initiated by the service initiator, determine the source of the service access request, and obtain the access information carried in the request. The control source interaction unit is used to execute services that interact with the control source, including calling the control source and managing the storage of the control source's response. The execution unit is used to execute the control methods of the access control policy.
[0147] In this embodiment, the target access control policy for processing the service access request can be determined through the request header information. Furthermore, the target access control policy can be flexibly processed based on different policy types. Simultaneously, the access control policies in the access control list can be used to control service access requests from different business applications, different users, and different terminals and proxies, thus offering greater applicability.
[0148] See Figure 7 , Figure 7 This is a schematic diagram of the structure of the request processing apparatus provided in an embodiment of this application. The request processing apparatus provided in an embodiment of this application includes:
[0149] The request acquisition module 71 is used to acquire business access requests and determine at least one access control policy that matches the access address of the aforementioned business access request from a preset access control list.
[0150] The policy determination module 72 is used to obtain the request header information of the above-mentioned service access request, and determine the target access control policy corresponding to the above-mentioned service access request from the above-mentioned at least one access control policy based on the above-mentioned request header information.
[0151] The policy execution module 73 is used to determine the policy type of the target access control policy. If the policy type is the first type, the business access request is processed based on the control method of the target access control policy. If the policy type is the second type, the business access request is processed based on the verification policy of the target access control policy. The verification policy includes at least one of the local cache verification policy and the remote request verification policy.
[0152] In some feasible implementations, the aforementioned service access request carries access information; the aforementioned request acquisition module 71 is used for:
[0153] Based on the above request header information, the request source of the above business access request is determined;
[0154] The above-mentioned business access requests are verified based on the verification method corresponding to the above-mentioned request source, and after the verification is passed, the target access control policy that matches the above-mentioned access information is determined from at least one of the above-mentioned access control policies.
[0155] In some feasible implementations, the above-mentioned request source includes a business agent; the above-mentioned request acquisition module 71 is used for:
[0156] Verify the proxy signature of the above business access requests;
[0157] Verify the access information mentioned above;
[0158] The access information mentioned above includes at least one of the following: business initiator information, device information, or agent information.
[0159] In some feasible implementations, the above-mentioned request source includes a business application; the above-mentioned request acquisition module 71 is used for:
[0160] Verify the request signature of the above-mentioned business access requests;
[0161] The access information mentioned above includes information related to business applications.
[0162] In some feasible implementations, the above-mentioned policy execution module 73 is used for:
[0163] Determine the type parameter of the target access control policy mentioned above;
[0164] The policy type of the target access control policy is determined based on the above type parameters.
[0165] In some feasible implementations, the above-mentioned policy execution module 73 is used for:
[0166] If the local cache does not include the target cache information associated with the above-mentioned business access request, or if the local cache includes the above-mentioned target cache information and the cache time of the above-mentioned target cache information exceeds the cache time threshold, then the above-mentioned business access request will be processed based on the above-mentioned remote request verification strategy.
[0167] If the aforementioned local cache includes the aforementioned target cache information, and the caching time of the aforementioned target cache information does not exceed the aforementioned caching time threshold, then the aforementioned business access request will be processed based on the control method corresponding to the aforementioned target cache information.
[0168] In some feasible implementations, the above-mentioned remote request verification strategy includes verification address, verification response time threshold, and timeout control method;
[0169] The above-mentioned strategy execution module 73 is used for:
[0170] Send a verification request to the above verification address and determine the response time of the above verification request;
[0171] If the response time exceeds the verification response time threshold, the service access request will be processed based on the timeout control method. If the response time does not exceed the verification response time threshold, the verification result corresponding to the verification request will be obtained, and the service access request will be processed based on the verification result.
[0172] In some feasible implementations, if the response time does not exceed the verification response time threshold, the policy execution module 73 is further configured to:
[0173] Determine the caching conditions corresponding to the above business access requests;
[0174] Based on the above caching conditions, the cache information associated with the above business access requests will be cached.
[0175] In some feasible implementations, the above-mentioned policy execution module 73 is used for:
[0176] The above-mentioned service access requests are allowed to access the above-mentioned access address;
[0177] Deny the above service access request to the above access address and return a denial message to the requester.
[0178] Return the preset redirect address to the party that initiated the above request.
[0179] In some feasible implementations, the above-mentioned request acquisition module 71 is further configured to:
[0180] If there is no access control policy matching the access address in the preset access control list, or if the target access control policy is not found in at least one of the access control policies, the service access request will be forwarded to the access address.
[0181] In specific implementation, the aforementioned request processing device can perform the above-described actions through its built-in functional modules. Figure 1 The implementation methods provided for each step are detailed in the above-mentioned implementation methods and will not be repeated here.
[0182] See Figure 8 , Figure 8 This is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. For example... Figure 8 As shown, the electronic device 1000 in this embodiment may include: a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the electronic device 1000 may also include: a user interface 1003, and at least one communication bus 1002. The communication bus 1002 is used to implement communication between these components. The user interface 1003 may include a display screen and a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1004 may be a high-speed RAM or non-volatile memory, such as at least one disk storage device. The memory 1005 may optionally be at least one storage device located remotely from the processor 1001. Figure 8As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.
[0183] exist Figure 8 In the illustrated electronic device 1000, the network interface 1004 provides network communication functionality; the user interface 1003 primarily provides an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:
[0184] Obtain a business access request and determine at least one access control policy from the preset access control list that matches the access address of the business access request.
[0185] Obtain the request header information of the above-mentioned business access request, and determine the target access control policy corresponding to the above-mentioned business access request from at least one of the above-mentioned access control policies based on the above-mentioned request header information.
[0186] The policy type of the target access control policy is determined. If the policy type is the first type, the business access request is processed based on the control method of the target access control policy. If the policy type is the second type, the business access request is processed based on the verification policy of the target access control policy. The verification policy includes at least one of the local cache verification policy and the remote request verification policy.
[0187] In some feasible implementations, the aforementioned service access request carries access information; the aforementioned processor 1001 is used for:
[0188] Based on the above request header information, the request source of the above business access request is determined;
[0189] The above-mentioned business access requests are verified based on the verification method corresponding to the above-mentioned request source, and after the verification is passed, the target access control policy that matches the above-mentioned access information is determined from at least one of the above-mentioned access control policies.
[0190] In some feasible implementations, the aforementioned request source includes a business agent; the aforementioned processor 1001 is used for:
[0191] Verify the proxy signature of the above business access requests;
[0192] Verify the access information mentioned above;
[0193] The access information mentioned above includes at least one of the following: business initiator information, device information, or agent information.
[0194] In some feasible implementations, the aforementioned request source includes a business application; the aforementioned processor 1001 is used for:
[0195] Verify the request signature of the above-mentioned business access requests;
[0196] The access information mentioned above includes information related to business applications.
[0197] In some feasible implementations, the processor 1001 described above is used for:
[0198] Determine the type parameter of the target access control policy mentioned above;
[0199] The policy type of the target access control policy is determined based on the above type parameters.
[0200] In some feasible implementations, the above verification strategy includes a local cache verification strategy and a remote request verification strategy; the processor 1001 is used for:
[0201] If the local cache does not include the target cache information associated with the above-mentioned business access request, or if the local cache includes the above-mentioned target cache information and the cache time of the above-mentioned target cache information exceeds the cache time threshold, then the above-mentioned business access request will be processed based on the above-mentioned remote request verification strategy.
[0202] If the aforementioned local cache includes the aforementioned target cache information, and the caching time of the aforementioned target cache information does not exceed the aforementioned caching time threshold, then the aforementioned business access request will be processed based on the control method corresponding to the aforementioned target cache information.
[0203] In some feasible implementations, the above-mentioned remote request verification strategy includes verification address, verification response time threshold, and timeout control method;
[0204] The processor 1001 described above is used for:
[0205] Send a verification request to the above verification address and determine the response time of the above verification request;
[0206] If the response time exceeds the verification response time threshold, the service access request will be processed based on the timeout control method. If the response time does not exceed the verification response time threshold, the verification result corresponding to the verification request will be obtained, and the service access request will be processed based on the verification result.
[0207] In some feasible implementations, if the response time does not exceed the verification response time threshold, the processor 1001 is further configured to:
[0208] Determine the caching conditions corresponding to the above business access requests;
[0209] Based on the above caching conditions, the cache information associated with the above business access requests will be cached.
[0210] In some feasible implementations, the processor 1001 is further configured to:
[0211] The above-mentioned service access requests are allowed to access the above-mentioned access address;
[0212] Deny the above service access request to the above access address and return a denial message to the requester.
[0213] Return the preset redirect address to the party that initiated the above request.
[0214] In some feasible implementations, the processor 1001 is further configured to:
[0215] If there is no access control policy matching the access address in the preset access control list, or if the target access control policy is not found in at least one of the access control policies, the service access request will be forwarded to the access address.
[0216] It should be understood that in some feasible implementations, the processor 1001 described above may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. The memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.
[0217] In specific implementation, the aforementioned electronic device 1000 can perform the above-described actions through its built-in functional modules. Figure 1 The implementation methods provided for each step are detailed in the above-mentioned implementation methods, and will not be repeated here.
[0218] This application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement... Figure 1The methods provided in each step are detailed in the implementation methods provided in the above steps, and will not be repeated here.
[0219] The aforementioned computer-readable storage medium can be an internal storage unit of the request processing apparatus or electronic device, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device. The aforementioned computer-readable storage medium can also include magnetic disks, optical disks, read-only memory (ROM), or random access memory (RAM), etc. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the electronic device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0220] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform... Figure 1 The methods provided for each step in the process.
[0221] The terms "first," "second," etc., used in the claims, description, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or electronic device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or electronic devices. References to "embodiment" herein mean that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The presentation of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and / or" as used in this application's description and appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0222] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Those skilled in the art can implement the described functions using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.
[0223] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A request processing method, characterized in that, The method includes: Obtain a business access request, and determine at least one access control policy that matches the access address of the business access request and the type parameter of each access control policy from a preset access control list; Obtain the request header information of the service access request, determine the target access control policy corresponding to the service access request from the at least one access control policy based on the request header information, and determine the type parameter of the target access control policy from the type parameters of each access control policy; The policy type of the target access control policy is determined based on the type parameter of the target access control policy. If the policy type is static, the service access request is processed based on the control method of the target access control policy. If the policy type is dynamic, the service access request that meets the control conditions is processed based on the verification policy of the target access control policy. The control conditions are represented by key-value pairs and are used to judge the information carried in the service access request. The key of the key-value pair includes at least one of user information, agent information, device information, preset access address, or service application related information. The verification policy based on the target access control policy processes service access requests that meet the control conditions, including: If the local cache does not include the target cache information associated with the business access request, or if the local cache includes the target cache information but the cache time of the target cache information exceeds the cache time threshold, the business access request is processed based on the remote request verification strategy in the verification strategy. The remote request verification strategy is used to send a verification request to the verification address so that the authentication source corresponding to the verification address verifies the business access request.
2. The method according to claim 1, characterized in that, The service access request carries access information; determining the target access control policy corresponding to the service access request from the at least one access control policy based on the request header information includes: Based on the request header information, determine the request source of the service access request; The service access request is verified based on the verification method corresponding to the request source, and after the verification is passed, the target access control policy that matches the access information is determined in the at least one access control policy.
3. The method according to claim 2, characterized in that, The request source includes a business proxy; the verification of the business access request based on the verification method corresponding to the request source includes at least one of the following: Verify the proxy signature of the service access request; The access information is verified. The access information includes at least one of the following: business initiator information, device information, or agent information.
4. The method according to claim 2, characterized in that, The request source includes a business application; the verification of the business access request based on the verification method corresponding to the request source includes: Verify the request signature of the service access request; The access information includes business application-related information.
5. The method according to claim 1, characterized in that, The verification strategy also includes a local cache verification strategy; the verification strategy based on the target access control strategy processes business access requests that meet the control conditions, and further includes: If the local cache includes the target cache information, and the cache time of the target cache information does not exceed the cache time threshold, then the business access request is processed based on the control method corresponding to the target cache information.
6. The method according to claim 5, characterized in that, The remote request verification strategy includes verification address, verification response time threshold, and timeout control method; The process of processing the service access request based on the remote request verification policy in the verification strategy includes: Send a verification request to the verification address and determine the response time of the verification request; If the response time exceeds the verification response time threshold, the service access request is processed based on the timeout control method. If the response time does not exceed the verification response time threshold, the verification result corresponding to the verification request is obtained, and the service access request is processed based on the verification result.
7. The method according to claim 6, characterized in that, If the response time does not exceed the verification response time threshold, the method further includes: Determine the caching conditions corresponding to the business access request; Based on the aforementioned caching conditions, the cache information associated with the service access request is cached.
8. The method according to any one of claims 1 to 7, characterized in that, Processing the service access request includes any of the following: The service access request is allowed to access the access address; Deny the business access request to the access address and return a denial message to the requester. Return a preset redirect address to the request initiator.
9. The method according to claim 1, characterized in that, The method further includes: If there is no access control policy matching the access address in the preset access control list, or if the target access control policy is not found in at least one access control policy, then the service access request will be forwarded to the access address.
10. A request processing apparatus, characterized in that, The device includes: The request acquisition module is used to acquire business access requests, and determine at least one access control policy that matches the access address of the business access request and the type parameter of each access control policy from a preset access control list. The policy determination module is used to obtain the request header information of the service access request, determine the target access control policy corresponding to the service access request from the at least one access control policy based on the request header information, and determine the type parameter of the target access control policy from the type parameters of each access control policy. The policy execution module is used to determine the policy type of the target access control policy based on the type parameter of the target access control policy. If the policy type is static, the service access request is processed based on the control method of the target access control policy. If the policy type is dynamic, the service access request that meets the control conditions is processed based on the verification policy of the target access control policy. The control conditions are represented by key-value pairs and are used to judge the information carried in the service access request. The key of the key-value pair includes at least one of user information, agent information, device information, preset access address, or service application related information. Specifically, when the policy execution module processes service access requests that meet the control conditions based on the verification policy of the target access control policy, it is used to: If the local cache does not include the target cache information associated with the business access request, or if the local cache includes the target cache information but the cache time of the target cache information exceeds the cache time threshold, the business access request is processed based on the remote request verification strategy in the verification strategy. The remote request verification strategy is used to send a verification request to the verification address so that the authentication source corresponding to the verification address verifies the business access request.
11. The apparatus according to claim 10, characterized in that, The service access request carries access information; the policy determination module is used for: Based on the request header information, determine the request source of the service access request; The service access request is verified based on the verification method corresponding to the request source, and after the verification is passed, the target access control policy that matches the access information is determined in the at least one access control policy.
12. The apparatus according to claim 11, characterized in that, The request source includes a business proxy; the policy determination module is used for: Verify the proxy signature of the service access request; The access information is verified. The access information includes at least one of the following: business initiator information, device information, or agent information.
13. The apparatus according to claim 11, characterized in that, The request source includes business applications; the strategy determination module is used for: Verify the request signature of the service access request; The access information includes business application-related information.
14. The apparatus according to claim 10, characterized in that, The verification strategy also includes a local cache verification strategy; the strategy execution module is further configured to: If the local cache includes the target cache information, and the cache time of the target cache information does not exceed the cache time threshold, then the business access request is processed based on the control method corresponding to the target cache information.
15. The apparatus according to claim 10, characterized in that, The remote request verification strategy includes verification address, verification response time threshold, and timeout control method; The strategy execution module is used for: Send a verification request to the verification address and determine the response time of the verification request; If the response time exceeds the verification response time threshold, the service access request is processed based on the timeout control method. If the response time does not exceed the verification response time threshold, the verification result corresponding to the verification request is obtained, and the service access request is processed based on the verification result.
16. The apparatus according to claim 15, characterized in that, If the response time does not exceed the verification response time threshold, the policy execution module is further configured to: Determine the caching conditions corresponding to the business access request; Based on the aforementioned caching conditions, the cache information associated with the service access request is cached.
17. The apparatus according to any one of claims 10 to 16, characterized in that, The policy enforcement module executes any of the following when processing a business access request: The service access request is allowed to access the access address; Deny the business access request to the access address and return a denial message to the requester. Return a preset redirect address to the request initiator.
18. The apparatus according to claim 10, characterized in that, The request acquisition module is also used for: If there is no access control policy matching the access address in the preset access control list, or if the target access control policy is not found in at least one access control policy, then the service access request will be forwarded to the access address.
19. An electronic device, characterized in that, It includes a processor and a memory, which are interconnected; The memory is used to store computer programs; The processor is configured to perform the method as described in any one of claims 1 to 9 when the computer program is invoked.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the method of any one of claims 1 to 9.
Citation Information
Patent Citations
Network security verification method and device based on enterprise browser
CN111212027A
Access control method, device thereof and system
CN111464487A
