Method for realizing independent authentication of API gateway based on application
A gateway and authentication technology, applied in the direction of program control design, instruments, digital data authentication, etc., can solve the problems that cannot meet the requirements of high performance
Patent Information
- Authority / Receiving Office
- CN · China
- Current Assignee / Owner
- Publication Date
- 2021-05-18
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The invention relates to the technical field of computer network authentication and authentication, and specifically provides a method for realizing independent authentication of an API gateway based on an application. Background technique
[0002] As the entrance of external services, the API gateway is like the gate of enterprise services. On the one hand, it must be capable of handling a large number of external visits. On the other hand, it must provide certain security guarantees for internal services.
[0003] When the amount of concurrency is large, it is likely to exceed the gateway's capacity, which may cause the service to discard some requests, or cause the server resources to be exhausted and unavailable. In addition, malicious requests can easily invade the server, causing security risks to internal services.
[0004] Network services usually include a client and a server. Through the API (Application Programming Interface, application pro...
Examples
Embodiment Construction
[0071] The present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.
[0072] A method for implementing independent authentication of an API gateway based on an application. The method implements the APP authentication plug-in function of Kong through Lua code, and uses Redis as a cache database. When the user calls the API with authentication information, the gateway layer will execute the APP authentication logic. If the signature authentication is passed, the request is successful. If the signature authentication fails, the request fails.
[0073] The user creates an APP application on the console page as the identity for calling the API. Each APP application has a pair of AppKey and AppSecret key pairs. The AppKey needs to be passed in as a parameter in the Header or Query when requesting, and the AppSecret needs to be used to calculate the request signature.
[0074] When the API Gateway creates an APP, the ...