Regulatory Situation-Based Business Customization Service Gateway Method, Device, and Computer Equipment

The permission authentication and proxy type determination of user requests are solved through the gateway service, which solves the problem that the main service and customized service cannot be unified, realizes unified proxy and reduces maintenance costs.

CN115484077BActive Publication Date: 2025-07-29HANGZHOU ANHENG INFORMATION SECURITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211053109.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2025-07-29
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

In the prior art, the main service and customized services cannot be unified in the process, resulting in disconnection of the permission authentication of customized services and excessive maintenance costs.

Method used

By authenticating user requests based on gateway services, determining the proxy type, and obtaining user information in gateway services, adding to user requests, and forwarding to customized services to build corresponding services.

Benefits of technology

It realizes a unified proxy for main service and customized service, reducing maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115484077B_ABST
    Figure CN115484077B_ABST
Patent Text Reader

Abstract

This application relates to a method, device, and computer equipment for a regulatory situation business customization service gateway. Among them, the method for the regulatory situation business customization service gateway includes: based on the gateway service, performing permission authentication on a first user request and determining the proxy type corresponding to the first user request. If the proxy type is a customized service proxy, obtaining user information through the gateway service, adding the user information to the first user request to obtain a second user request. Further, forwarding the second user request to the customized service and building the service corresponding to the second user request. Through this application, the problem of being unable to uniformly proxy the main service and the customized service is solved, the unified proxy of the main service and the customized service is realized, and the effect of reducing the maintenance cost is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network security, and in particular, to a method, apparatus, and computer device for customizing a service gateway based on a regulatory situation service. Background Art

[0002] In the face of malicious network attacks and changing penetration technologies, situation awareness is increasingly becoming the key to future network security. Through a regulatory situation awareness platform, unified threat detection and risk handling can be provided for users. Generally, its product architecture is divided into a main service and a customized service. Among them, the customized service must rely on the main service to provide complete product functions. Therefore, it is usually necessary to handle the communication and authentication problems between the main service and the customized service.

[0003] In the current processing solution, the permission authentication function is maintained separately in the main service and the customized service, and the user session is maintained in the memory of the main service. However, the customized service cannot share this user session, resulting in the disconnection of the permission authentication of the customized service. On this basis, since the function of the customized service is strongly associated with the main service, it is required to keep the authentication code of the customized service exactly the same as that of the main service, so that the relevant code of the customized service needs to be independently maintained, resulting in too high maintenance costs.

[0004] In view of the problem that there is no effective solution to the problem of being unable to uniformly proxy the main service and the customized service in the related technology. Summary of the Invention

[0005] In this embodiment, a method, apparatus, and computer device for customizing a service gateway based on a regulatory situation service are provided to solve the problem of being unable to uniformly proxy the main service and the customized service in the related technology.

[0006] In a first aspect, in this embodiment, a method for customizing a service gateway based on a regulatory situation service is provided, and the method includes:

[0007] Based on the gateway service, perform permission authentication on a first user request and determine the proxy type corresponding to the first user request;

[0008] If the proxy type is a customized service proxy, obtain user information through the gateway service and add the user information to the first user request to obtain a second user request;

[0009] Forward the second user request to the customized service and build the service corresponding to the second user request.

[0010] In some of these embodiments, the performing permission authentication on the first user request based on the gateway service includes:

[0011] Determine whether the first user request requires user authentication;

[0012] If the first user request requires user authentication, forward the first user request to the login page through Spring Security configuration and perform user authentication;

[0013] Perform authorization on the first user request after user authentication.

[0014] In some embodiments, the performing authorization on the first user request after user authentication includes:

[0015] Obtain the user permission interface and the current call interface corresponding to the first user request;

[0016] Determine whether the user permission interface includes the current call interface.

[0017] In some embodiments, the performing permission authentication on the first user request based on the gateway service includes:

[0018] Based on the gateway service, perform user IP verification and CSRF verification on the first user request.

[0019] In some embodiments, the determining the proxy type corresponding to the first user request includes:

[0020] Send the first user request to the ProxyServlet;

[0021] Configure the first user request through the ProxyServlet and determine the corresponding proxy type based on the configured first user request.

[0022] In some embodiments, after determining the proxy type corresponding to the first user request, it further includes:

[0023] If the proxy type is the main service proxy, obtain the user information through the user Session and add the user information to the first user request.

[0024] In some embodiments, after building the service corresponding to the second user request, it further includes:

[0025] Send the service corresponding to the second user request built to the ProxyServlet;

[0026] Through the ProxyServlet, send the service corresponding to the second user request to the user corresponding to the first user request.

[0027] Second aspect, in this embodiment, a regulatory situation-based business customization service gateway device is provided, and the device includes:

[0028] A permission module, based on the gateway service, performs permission authentication on the first user request and determines the proxy type corresponding to the first user request;

[0029] A proxy module, if the proxy type is a customization service proxy, obtains user information through the gateway service and adds the user information to the first user request to obtain a second user request;

[0030] An establishment module, forwards the second user request to the customization service and establishes the service corresponding to the second user request.

[0031] Third aspect, in this embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the regulatory situation-based business customization service gateway method described in the first aspect above is implemented.

[0032] Fourth aspect, in this embodiment, a storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the regulatory situation-based business customization service gateway method described in the first aspect above is implemented.

[0033] Compared with the related art, in the regulatory situation-based business customization service gateway method, device, and computer device provided in this embodiment, through the gateway service, permission authentication is performed on the first user request, and the proxy type corresponding to the first user request is determined. If the proxy type is a customization service proxy, user information is obtained through the gateway service and added to the first user request to obtain a second user request. Further, the second user request is forwarded to the customization service and the service corresponding to the second user request is established, solving the problem of being unable to uniformly proxy the main service and the customization service, achieving the effect of uniformly proxying the main service and the customization service and reducing the maintenance cost.

[0034] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more concise and understandable. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The drawings described herein are used to provide a further understanding of the present application, form a part of the present application, and the illustrative embodiments and descriptions thereof are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0036] Figure 1It is a hardware structure block diagram of a terminal device for a method of customizing a service gateway based on a regulatory situation service according to an embodiment of the present application;

[0037] Figure 2 It is a flowchart of a method of customizing a service gateway based on a regulatory situation service according to an embodiment of the present application;

[0038] Figure 3 It is a preferred flowchart of a method of customizing a service gateway based on a regulatory situation service according to an embodiment of the present application;

[0039] Figure 4 It is a schematic diagram of the process of a method of customizing a service gateway based on a regulatory situation service according to an embodiment of the present application;

[0040] Figure 5 It is a structure block diagram of a device for customizing a service gateway based on a regulatory situation service according to an embodiment of the present application.

[0041] In the figure: 10, permission module; 20, proxy module; 30, construction module. Specific embodiments

[0042] To more clearly understand the purpose, technical solution and advantages of the present application, the present application will be described and explained below with reference to the accompanying drawings and embodiments.

[0043] Unless otherwise defined, the technical terms or scientific terms involved in the present application shall have the general meaning understood by those with ordinary skills in the technical field to which the present application belongs. In the present application, words such as "a", "one", "a kind of", "the", "these" and the like do not indicate a limitation in quantity, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in the present application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device including a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent in these processes, methods, products or devices. The terms "connection", "connected", "coupled" and the like involved in the present application are not limited to physical or mechanical connections, but may include electrical connections, whether directly connected or indirectly connected. The term "plurality" involved in the present application refers to two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may indicate: A exists alone, A and B exist simultaneously, and B exists alone. Generally, the character " / " indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third" and the like involved in the present application are only used to distinguish similar objects and do not represent a specific order for the objects.

[0044] The method embodiments provided in this embodiment may be executed on a terminal, a computer, or a similar computing device. For example, when running on a terminal, Figure 1 is a hardware structural block diagram of the terminal of the method for customizing service gateway based on regulatory situation in this embodiment. As Figure 1 shown, the terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 and a memory 104 for storing data. Among them, the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above terminal. For example, the terminal may further include more or fewer components than those shown in Figure 1 the figure, or have a different configuration from that shown in Figure 1 the figure.

[0045] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the method for customizing service gateway based on regulatory situation in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely provided with respect to the processor 102, and these remote memories may be connected to the terminal through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0046] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (abbreviated as RF) module, which is used to communicate with the Internet wirelessly.

[0047] In this embodiment, a method for customizing service gateway based on regulatory situation is provided. Figure 2 is a flowchart of the method for customizing service gateway based on regulatory situation in this embodiment. AsFigure 2 As shown, this process includes the following steps:

[0048] Step S210: Based on the gateway service, perform permission authentication on the first user request and determine the proxy type corresponding to the first user request.

[0049] Specifically, in the gateway, when the first user request is received, user authentication is first performed on the first user request. The first user request can be divided into two categories: those that require user authentication and those that do not. If the first user request is determined to require user authentication, that is, it needs to be logged in to access, the first user request is forwarded to the login page; if the first user request is determined not to require user authentication, then authorization is performed on the first user request.

[0050] It should be noted that after completing user authentication, authorization is performed on the first user request by verifying the interface permissions of the user corresponding to the first user request. If the user has the permissions for the current interface, proxy configuration is performed on the first user request.

[0051] Furthermore, after completing authorization, if it is determined that the first user request can be executed normally, the first user request is sent to the proxy server program (ProxyServlet), and a server program registration base class (ServletRegistrationBean) is registered for proxy configuration corresponding to the first user request.

[0052] Step S220: If the proxy type is a customized service proxy, obtain user information through the gateway service and add the user information to the first user request to obtain a second user request.

[0053] It should be noted that obtaining user information is required to complete the proxy process. The user information includes user roles, user permission interface information, and the uniform resource locator (Universal Resource Locator, abbreviated as URL) of the interfaces associated with the user roles, etc. When the proxy type is a customized service proxy, the specific implementation method for obtaining user information is to customize a ProxyServlet object when registering ServletRegistrationBean. This ProxyServlet object obtains the user information corresponding to the first user request from the user session and adds the user information to the request header of the first user request to obtain a second user request.

[0054] Step S230: Forward the second user request to the customized service and set up the service corresponding to the second user request.

[0055] Specifically, forward the second user request to the customized service. The customized service can obtain user information from the request header of the second user request, thereby setting up the service corresponding to the second user request.

[0056] In the current processing solution, the permission authentication function is maintained separately in the main service and the customized service, and the user Session is maintained in the memory of the main service. However, the customized service cannot share this user Session, resulting in the disconnection of the permission authentication of the customized service. On this basis, since the function of the customized service is strongly associated with the main service, it is required to keep the authentication code of the customized service exactly the same as that of the main service. Therefore, the relevant code of the customized service needs to be independently maintained, resulting in too high maintenance costs. It can be seen that in the prior art, the user authentication and proxy processes of the customized service are both independent. In this application, through the gateway service, the user authentication of the customized service and the main service is uniformly processed, so as to unify the proxy process of the customized service and the main service. Specifically, based on the gateway service, perform permission authentication on the first user request and determine the proxy type corresponding to the first user request. If the proxy type is a customized service proxy, obtain user information through the gateway service and add the user information to the first user request to obtain the second user request. Further, forward the second user request to the customized service and set up the service corresponding to the second user request, thereby solving the problem that the main service and the customized service cannot be uniformly proxied, realizing the unified proxy of the main service and the customized service, and reducing the maintenance cost.

[0057] In some of these embodiments, based on the gateway service, performing permission authentication on the first user request includes the following steps:

[0058] Step S211, determine whether the first user request requires user authentication;

[0059] Step S212, if the first user request requires user authentication, forward the first user request to the login page through Spring Security configuration and perform user authentication;

[0060] Step S213, perform authorization on the first user request after user authentication.

[0061] Specifically, for the first user request that requires user authentication, determine whether it has logged in. If not, forward the first user request to the login page through the security management framework (Spring Security) configuration to complete user authentication by logging in to the page.

[0062] It should be noted that Spring Security is a security framework that can provide a declarative security access control solution for Spring-based enterprise application systems, offering a complete solution for web application security. Generally, web application security includes user authentication and user authorization. User authentication refers to verifying whether a user is a legitimate entity in the system, that is, whether the user can access the system, while user authorization refers to verifying whether a user has the permission to perform a certain operation. In a system, different users have different permissions.

[0063] Furthermore, for user authentication, the Spring Security framework supports authentication methods such as Hypertext Transfer Protocol (HTTP) basic authentication, HTTP form-based authentication, and HTTP digest authentication; for user authorization, the Spring Security framework provides role-based access control and access control lists to perform fine-grained control over domain objects in the application.

[0064] In this embodiment, the Spring Security framework is used to perform login authentication on the first user request to complete the user authentication of the request, and then perform authorization on the first user request after user authentication, thereby achieving unified processing of user authentication and authorization for customized services and main services.

[0065] In some of these embodiments, performing authorization on the first user request after user authentication includes the following steps:

[0066] Obtain the user permission interface corresponding to the first user request and the currently called interface;

[0067] Determine whether the user permission interface contains the currently called interface.

[0068] Specifically, query the user information corresponding to the first user request, further obtain the user role associated with the user information and the permission interface information it has, as well as the information of the currently called interface, and determine whether the permission interface owned by the user contains the currently called interface.

[0069] It should be noted that if the permission interface owned by the user contains the currently called interface, proxy configuration is performed on the first user request; if the user does not have the permission for the current interface, it indicates that the authorization of the first user request fails, and an exception message is returned.

[0070] In this embodiment, by determining whether the user permission interface contains the currently called interface, authorization is performed on the first user request after user authentication, preventing unauthorized users from operating the system, thereby maintaining system security.

[0071] In some of these embodiments, based on the gateway service, performing permission authentication on the first user request includes the following steps:

[0072] Based on the gateway service, performing user IP verification and CSRF verification on the first user request.

[0073] Specifically, in the gateway, customizing and implementing the authentication logic, so that relevant security authentication can be added, performing user IP verification and cross-site request forgery (CSRF) verification on the first user request, and also including filtering special server script commands, etc.

[0074] It should be noted that the user IP corresponding to the first user request is verified through a regular expression, and the random number key generated in the first user request is verified through a CSRF middleware.

[0075] Through this embodiment, on the basis of customizing and implementing the gateway logic, adding relevant security authentication can improve the security of data information in the system and prevent file injection.

[0076] In some of these embodiments, determining the proxy type corresponding to the first user request includes the following steps:

[0077] Sending the first user request to the ProxyServlet;

[0078] Configuring the first user request through the ProxyServlet and determining the corresponding proxy type based on the configured first user request.

[0079] Specifically, proxy configuration is performed through the registered ServletRegistrationBean, and the first user request is proxied to the corresponding service according to the prefix of the URL in the first user request.

[0080] It should be noted that the first user request with the URL prefix of " / ext" is proxied to the customized service, and multiple customized services can be accessed in the system. For example, if the first user request with the URL prefix of " / bass" also needs to be proxied to the customized service, a new ServletRegistrationBean is registered and the first user request is configured with this ServletRegistrationBean, then the corresponding bass service can be accessed.

[0081] Furthermore, under the condition of ensuring that the gateway authentication logic and user information are consistent, the gateway service can be extended to configure multiple proxy addresses, so as to proxy to different supervision situation awareness services.

[0082] In this embodiment, the first user request is sent to the ProxyServlet, and the ProxyServlet is configured to proxy the first user request, so as to determine the proxy type corresponding to the first user request, and the user requests of different proxy types can be efficiently processed.

[0083] In some of these embodiments, after determining the proxy type corresponding to the first user request, the following steps are further included:

[0084] If the proxy type is the main service proxy, the user information is obtained through the user Session, and the user information is added to the first user request.

[0085] Specifically, proxy configuration is performed through the registered ServletRegistrationBean, and the first user request whose URL prefix is not " / ext" is proxied to the main service.

[0086] It should be noted that since the gateway service is set in the main service, during the process of user authentication in the Spring Security framework, the user information is stored in the user Session, so that the main service can obtain the user information through the user Session and add the user information to the user request corresponding to the main service.

[0087] In this embodiment, the first user request is configured through the ProxyServlet, and the first user request whose URL prefix is not " / ext" is proxied to the main service, and the main service can obtain the user information from the user Session and add it to the corresponding user request, so as to build the main service.

[0088] In some of these embodiments, after building the service corresponding to the second user request, the following steps are further included:

[0089] Step S231, sending the service corresponding to the second user request built to the ProxyServlet;

[0090] Step S232, through the ProxyServlet, sending the service corresponding to the second user request to the user corresponding to the first user request.

[0091] Specifically, for the user request proxied by the ProxyServlet, after the user request is completed, the built service is sent to the ProxyServlet, and further the result of the request is returned to the corresponding user.

[0092] It should be noted that the ProxyServlet is based on the Filter for service proxy. It can match the received user requests to the corresponding URL templates for proxy configuration and access the corresponding services. After the main service and the customized service complete the user requests, the ProxyServlet sends the established service to the user corresponding to the user request.

[0093] Through this embodiment, the service corresponding to the second user request is sent to the ProxyServlet, and through the ProxyServlet, the service corresponding to the second user request is sent to the user corresponding to the first user request, thereby completing the service proxy for different user requests and realizing the response to the user requests. The following describes and illustrates this embodiment through preferred embodiments.

[0094] Figure 3 It is the preferred flowchart of the method for the customized service gateway of the supervision situation service in this embodiment. As Figure 3 shown, the method for the customized service gateway of the supervision situation service includes the following steps:

[0095] Step S310, determine whether the first user request requires user authentication. If the first user request requires user authentication, forward the first user request to the login page through Spring Security configuration and perform user authentication.

[0096] Step S320, perform authorization on the first user request after user authentication.

[0097] Step S330, send the authorized first user request to the ProxyServlet, configure the first user request through the ProxyServlet, and determine the corresponding proxy type based on the configured first user request.

[0098] Step S340, if the proxy type is a customized service proxy, obtain user information through the gateway service and add the user information to the first user request to obtain a second user request.

[0099] Step S350, if the proxy type is a main service proxy, obtain user information through the user Session and add the user information to the first user request to obtain a third user request.

[0100] Step S360, forward the second user request or the third user request to the customized service and build the service corresponding to the second user request or the third user request.

[0101] Step S370, send the built service to the ProxyServlet, and through the ProxyServlet, send the built service to the user corresponding to the first user request.

[0102] In this embodiment, in the Spring Security framework of the gateway service, user authentication and authorization are performed on the first user request. The first user request after permission authentication is sent to the ProxyServlet, and the first user request is configured through the ProxyServlet. Based on the configured first user request, the corresponding proxy type is determined. When it is determined that the proxy type is a customized service proxy, user information is added to the first user request through the gateway service to obtain a second user request. Further, the second user request is forwarded to the customized service, and the service corresponding to the second user request is built. After the request is completed, the ProxyServlet sends the built service to the user corresponding to the request. Thus, based on the gateway service, user authentication and authorization are implemented through the Spring Security framework, and the proxy configuration and user information acquisition are performed through the ProxyServlet, so as to unify the permission authentication and proxy configuration of the customized service with the main service, improve the efficiency of the service proxy and reduce the maintenance cost.

[0103] Figure 4 is a schematic flowchart of the method for the customized service gateway based on the supervision situation service in this embodiment, as Figure 4 shown. The process of the method for the customized service gateway based on the supervision situation service is as follows:

[0104] Receive the first user request S401, and perform permission authentication on the first user request S402; first, determine whether the first user request requires user authentication, that is, whether it needs to log in to access S403. If it is determined that the first user request requires user authentication, then determine whether the first user request has logged in S404. Further, if the first user request has not logged in, the first user request is configured and forwarded to the login page S405; for the first user request that does not require user authentication and has completed user authentication, determine whether there is interface permission S406; if the first user request does not have interface permission, an exception is returned S407. If the first user request has interface permission, the first user request is configured through the gateway service proxy S408, and thus the proxy type of the first user request is determined S409; if the proxy type is a customized service proxy, the first user request after adding user information is forwarded to the customized service S410. If the proxy type is a main service proxy, the first user request after adding user information is forwarded to the main service S411, thereby completing the request S412.

[0105] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0106] In this embodiment, a regulatory situation service customization service gateway device is further provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated here. The following terms such as "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0107] Figure 5 is the structural block diagram of the regulatory situation service customization service gateway device of this embodiment, as Figure 5 shown, the device includes: a permission module 10, an agent module 20, and a construction module 30;

[0108] The permission module 10 performs permission authentication on the first user request based on the gateway service and determines the proxy type corresponding to the first user request;

[0109] The agent module 20, if the proxy type is a customized service proxy, obtains user information through the gateway service and adds the user information to the first user request to obtain a second user request;

[0110] The construction module 30 forwards the second user request to the customized service and constructs the service corresponding to the second user request.

[0111] Through the device provided in this embodiment, based on the gateway service, permission authentication is performed on the first user request, and the proxy type corresponding to the first user request is determined. If the proxy type is a customized service proxy, user information is obtained through the gateway service and added to the first user request to obtain a second user request. Further, the second user request is forwarded to the customized service, and the service corresponding to the second user request is constructed, solving the problem of inability to uniformly proxy the main service and the customized service, realizing the unified proxy of the main service and the customized service, and achieving the effect of reducing the maintenance cost.

[0112] In some of these embodiments, on the basis of Figure 5 this, the device further includes an authentication module for determining whether the first user request requires user authentication; if the first user request requires user authentication, the first user request is forwarded to the login page through Spring Security configuration for user authentication; authorization is performed on the first user request after user authentication.

[0113] In some of these embodiments, on the basis of Figure 5Based on this, the device further includes an authentication module, which is used to obtain the user permission interface corresponding to the first user request and the currently called interface, and determine whether the user permission interface contains the currently called interface.

[0114] In some embodiments, based on Figure 5 this, the device further includes a verification module, which is used to perform user IP verification and CSRF verification on the first user request based on the gateway service.

[0115] In some embodiments, based on Figure 5 this, the device further includes a configuration module, which is used to send the first user request to the ProxyServlet, configure the first user request through the ProxyServlet, and determine the corresponding proxy type based on the configured first user request.

[0116] In some embodiments, based on Figure 5 this, the device further includes a main service module, which is used to obtain user information through the user Session if the proxy type is the main service proxy, and add the user information to the first user request.

[0117] In some embodiments, based on Figure 5 this, the device further includes a return module, which is used to send the service corresponding to the constructed second user request to the ProxyServlet, and send the service corresponding to the second user request to the user corresponding to the first user request through the ProxyServlet.

[0118] It should be noted that the above-mentioned various modules can be functional modules or program modules, and can be implemented either by software or by hardware. For the modules implemented by hardware, the above-mentioned various modules can be located in the same processor; or the above-mentioned various modules can also be located in different processors in any combined form.

[0119] In this embodiment, a computer device is further provided, which includes a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0120] Optionally, the above computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above processor, and the input / output device is connected to the above processor.

[0121] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be elaborated in this embodiment.

[0122] In addition, in combination with the method for customizing service gateways based on regulatory situation services provided in the above embodiments, a storage medium can also be provided to implement this in this embodiment. A computer program is stored on the storage medium; when the computer program is executed by a processor, any one of the methods for customizing service gateways based on regulatory situation services in the above embodiments is implemented.

[0123] It should be understood that the specific embodiments described here are only used to explain this application, rather than to limit it. According to the embodiments provided in this application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of this application.

[0124] Obviously, the accompanying drawings are only some examples or embodiments of this application. For those of ordinary skill in the art, this application can also be applied to other similar situations based on these drawings without creative work. Additionally, it can be understood that although the work done during the development process here may be complex and time-consuming, for those of ordinary skill in the art, certain design, manufacturing, or production changes based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient disclosure of this application.

[0125] The term "embodiment" in this application means that the specific features, structures, or characteristics described in combination with the embodiments can be included in at least one embodiment of this application. The phrase appears in various positions in the specification and does not necessarily mean the same embodiment, nor does it mean being independent or alternative to other embodiments and mutually exclusive. Those of ordinary skill in the art can clearly or implicitly understand that the embodiments described in this application can be combined with other embodiments without conflict.

[0126] The above-described embodiments only represent several implementation manners of this application. Their descriptions are relatively specific and detailed, but should not be construed as limiting the scope of patent protection. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of this application should be subject to the appended claims.

Claims

1. A method for a regulatory situation-based business customization service gateway, characterized in that The method includes: Based on the gateway service, perform permission authentication on the first user request and determine the proxy type corresponding to the first user request; If the proxy type is the main service proxy, obtain user information through the user Session, add the user information to the first user request, and forward the first user request with the added user information to the main service; If the proxy type is the customized service proxy, obtain user information through the gateway service, and add the user information to the first user request to obtain a second user request; Forward the second user request to the customized service and build the service corresponding to the second user request.

2. The method for customizing a service gateway based on a regulatory situation service according to claim 1, wherein The performing permission authentication on the first user request based on the gateway service includes: Determine whether the first user request requires user authentication; If the first user request requires user authentication, forward the first user request to the login page through the Spring Security configuration and perform user authentication; Perform authorization on the first user request after user authentication.

3. The method for customizing a service gateway based on a regulatory situation service according to claim 2, wherein The performing authorization on the first user request after user authentication includes: Obtain the user permission interface and the current call interface corresponding to the first user request; Determine whether the user permission interface includes the current call interface.

4. The method for customizing a service gateway based on a regulatory situation service according to claim 1, wherein The performing permission authentication on the first user request based on the gateway service includes: Based on the gateway service, perform user IP verification and CSRF verification on the first user request.

5. The method for customizing a service gateway based on a regulatory situation service according to claim 1, wherein The determining the proxy type corresponding to the first user request includes: Send the first user request to the ProxyServlet; Configure the first user request through the ProxyServlet and determine the corresponding proxy type based on the configured first user request.

6. The method for customizing a service gateway based on a regulatory situation service according to claim 1, wherein After building the service corresponding to the second user request, it further includes: Send the service corresponding to the built second user request to the ProxyServlet; Through the ProxyServlet, send the service corresponding to the second user request to the user corresponding to the first user request.

7. A regulatory situation-based service gateway device for business customization, characterized in that The device includes: A permission module, which performs permission authentication on the first user request based on the gateway service and determines the proxy type corresponding to the first user request; A proxy module, if the proxy type is the main service proxy, obtains user information through the user Session, adds the user information to the first user request, and forwards the first user request with the added user information to the main service; A proxy module, if the proxy type is the customized service proxy, obtains user information through the gateway service, and adds the user information to the first user request to obtain a second user request; A building module, which forwards the second user request to the customized service and builds the service corresponding to the second user request.

8. A computer device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the method for a customized service gateway based on regulatory situation services according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for a regulatory situation-based service customization service gateway according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Service delivery management for proxy service delivery of service groups

    CN102262767A

  • Authentication method and device, terminal and computer readable storage medium

    CN112543169A