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

CN112818325APending Publication Date: 2021-05-18SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
15 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
Publication Date
2021-05-18

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a method for realizing independent authentication of an API gateway based on an application. According to the invention, the method includes realizing native API access authority control by using a Kong plug-in, wherein the Kong plug-in is an APP authentication plug-in; creating an API, and selecting APP authentication during creation; issuing the API, and writing the APP authentication plug-in configuration into an API gateway during issuing; and enabling the API gateway console front-end page to create an APP application according to the needs of the user, and the APP application being used as the identity of calling the API by the user. According to the invention, independent authentication is realized based on the APP, the authorization data is stored in the redis, and when the request of the client is received, the Kong gateway firstly obtains the authentication data from the redis cache, so that the processing speed is higher compared with other authentication modes; and the authorization relationship is persisted to a back-end database, and a back end provides a standby authentication interface, so that safe and stable calling of the API is effectively ensured.
Need to check novelty before this filing date? Find Prior Art

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 ...