A gateway user management method and related device based on Kong gateway

By using Acl plug-in and Redis caching mechanism in Kong gateway to generate and manage token authentication information, the problems of complex processes and inability to achieve automatic expiration in the existing technology are solved, and more efficient and secure user management and data protection are achieved.

CN119766439APending Publication Date: 2025-04-04BEIJING HUANENG XINRUI CONTROL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411941271.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the prior art, the process of generating token authentication information is complicated, the maintenance is difficult, and the token automatic expiration function cannot be implemented, affecting the overall data security.

Method used

Through the Acl plug-in based on Kong gateway, the gateway users are managed, the account number and password information is received and verified, a new token is generated, and the expiration time is set in Redis, realizing the automatic expiration function of tokens.

Benefits of technology

It simplifies user management process, reduces maintenance difficulty, and improves overall data security through the token automatic expiration function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766439A_ABST
    Figure CN119766439A_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of gateway application, and discloses a gateway user management method based on Kong gateway and related devices, including: managing gateway users based on an Acl plug-in of Kong gateway; receiving and verifying the account and password information of the gateway user; if the account and password information of the gateway user passes the verification, verifying whether there is a key with the user id as the key in the Redis cache; if not, calling the Jwts.builder() method to generate a new token and return it; adding a key-value pair with the user id as the key in Redis, and setting the expiration time of the key-value pair with the user id as the key; the present invention does not need to manually configure its user permissions through the Konga visual interface, which greatly reduces the difficulty of user management; at the same time, it can realize the generation and automatic expiration functions of token identity authentication information, and ensure the security of the overall data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of gateway application, and in particular relates to a gateway user management method based on Kong gateway and related devices. Background Art

[0002] Kong Gateway is an open source, scalable microservice API gateway that has been widely used in organizations of all sizes around the world. The design principle of Kong Gateway is to handle service-to-service communication and achieve comprehensive management of API interfaces by providing a feature-rich platform. Among them, by generating token authentication information for Kong Gateway users, user authentication can be achieved when accessing the interface, and the specific user identity accessing the interface can be identified, thereby achieving access permission control for the user interface.

[0003] Currently, there is a process for generating token authentication information, such as Figure 1 As shown; specifically: first extract the key and secret information from the jwt information of the newly registered user, then visit the jwt.io official website to use the key and secret to generate token information; the above identity authentication process is complicated, and as the number of newly registered users continues to increase, the maintenance difficulty increases; in addition, the token automatic expiration function cannot be realized. If the token identity authentication information is valid for a long time, it will affect the overall data security. Summary of the invention

[0004] In view of the technical problems existing in the prior art, the present invention provides a gateway user management method and related devices based on Kong gateway to solve the technical problems that the existing process of generating token identity authentication information is complicated, difficult to maintain and easily affects the security of the overall data.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is: The present invention provides a gateway user management method based on Kong gateway, comprising: Based on the Acl plug-in of Kong gateway, gateway users are managed; Receive and verify the gateway user's account and password information; If the gateway user's account and password information is verified, check whether there is a key with the user id as the key in the Redis cache; if not, call the Jwts.builder() method to generate a new token and return it; Based on the new token, a key-value pair with the user id as the key is added in Redis, and the expiration time of the key-value pair with the user id as the key is set.

[0006] Furthermore, based on the Acl plug-in of the Kong gateway, the process of managing gateway users is as follows: Receive the user name to be registered; Determine whether the user name to be registered is repeated; if not, configure the account and password for logging in to obtain the token authentication information interface; Use the Acl plug-in of the Kong gateway to configure user permission groups; All configuration information is persisted and saved in the preset database; among them, all configuration information includes the account password and user authority group for logging in to obtain the token authentication information interface.

[0007] Furthermore, it is determined whether the user name to be registered is repeated; if not, the process of logging in to obtain the account and password of the token authentication information interface is configured as follows: Compare the username to be registered with the username of the consumer in the Kong gateway; if the consumer in the Kong gateway does not exist in the same username as the username to be registered, the username to be registered will not be repeated, and an account for logging in to the token authentication information interface will be established with the username to be registered; According to the preset password complexity requirements, set the password for logging in to the token authentication information interface.

[0008] Furthermore, the process of configuring the user permission group using the Acl plug-in of the Kong gateway is as follows: Get all user permission groups on the Kong gateway through the Kong gateway service interface; When registering a gateway user, check the predetermined user permission group from all the user permission groups on the queried Kong gateway; call the Kong gateway service interface to configure the checked user permission group to the Groups of the gateway user Consumer.

[0009] Furthermore, the process of adding a key-value pair with the user ID as the key in Redis is as follows: Based on the new token, the key-value pair in the Redis cache is set using the opsForValue() method in the Java integrated RedisTemplate class.

[0010] Furthermore, when setting the key-value pair in the Redis cache, the Kong gateway consumer id is used as the key and the consumer name is used as the value.

[0011] The present invention also provides a gateway user management system based on Kong gateway, characterized in that it includes: User management module, used to manage gateway users based on the Acl plug-in of Kong gateway; Information verification module, used to receive and verify the gateway user's account and password information; The token generation module is used to check whether there is a key with the user id as the key in the Redis cache if the gateway user's account and password information are verified; if not, the Jwts.builder() method is called to generate a new token and return it; The key-value pair setting module is used to add a key-value pair with the user id as the key in Redis based on the new token, and set the expiration time of the key-value pair with the user id as the key.

[0012] The present invention also provides a gateway user management device based on Kong gateway, comprising: a processor suitable for executing a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the gateway user management method based on the Kong gateway is executed.

[0013] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the gateway user management method based on the Kong gateway is implemented.

[0014] The present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the gateway user management method based on the Kong gateway is implemented.

[0015] Compared with the prior art, the present invention has the following beneficial effects: The gateway user management method based on Kong gateway provided by the present invention manages gateway users by utilizing the Acl plug-in of Kong gateway, thereby realizing precise control of user access rights to gateway resources, without the need to manually configure user rights through the Konga visual interface, thereby greatly reducing the difficulty of user management; in combination with the Kong gateway Jwt plug-in, the builder() method in the Jwts class of Java and the Redis cache mechanism, flexible acquisition of token identity authentication information is realized, and at the same time, the generation and automatic expiration functions of token identity authentication information can be realized, thereby effectively controlling the access rights of the user interface and ensuring the security of the overall data.

[0016] The gateway user management system based on Kong gateway, the gateway user management device based on Kong gateway, the computer-readable storage medium and the computer program product provided by the present invention have all the advantages of the above-mentioned gateway user management method based on Kong gateway. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A flowchart for generating token authentication information in the prior art; Figure 2 A flowchart of a gateway user management method based on Kong gateway provided in Example 1; Figure 3 A structural block diagram of a gateway user management system based on Kong gateway provided in Example 2; Figure 4 This is a structural block diagram of a gateway user management device based on the Kong gateway provided in Example 3. DETAILED DESCRIPTION

[0019] In order to make the technical problems, technical solutions and beneficial effects solved by this application clearer, the technical solutions in the embodiments of this application will be described clearly and completely in combination with the drawings in the embodiments of this application; obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0020] Example 1 As attached Figure 2 As shown, this embodiment 1 provides a gateway user management method based on Kong gateway, including the following steps: Step 1: Build the Kong gateway user management platform based on the Acl plug-in of the Kong gateway and the gateway general configuration interface, where the gateway general configuration interface is the Admin API interface of the Kong gateway.

[0021] Step 2: Use the Kong gateway user management platform to manage gateway users. Specifically, the process of managing gateway users is as follows: Step 21: Receive the user name to be registered.

[0022] Step 22: Determine whether the user name to be registered is repeated; if it is repeated, return an error prompt; if it is not repeated, configure the account and password for logging in to obtain the token identity authentication information interface.

[0023] Specifically, the process of determining whether the username to be registered is repeated is as follows: compare the username to be registered with the username of the consumer in the Kong gateway; if the consumer in the Kong gateway does not exist with the same username as the username to be registered, the username to be registered is not repeated; otherwise, the username to be registered is repeated.

[0024] It should be noted that the username is the username of the Consumer in the Kong gateway background; since the username is the unique identifier of the consumer in the Kong gateway, the username is unique in the Kong gateway background, that is; if the username to be registered is the same as the username of the consumer in the Kong gateway when adding a user, an exception will be reported when the Kong gateway general configuration interface is called, and an error prompt will be returned to prompt you to provide a new username to be registered; otherwise, the user will be added normally and the subsequent password configuration steps will continue.

[0025] Specifically, the process of configuring the account and password for logging in to obtain the token authentication information interface is as follows: If the user names to be registered are not repeated, an account for logging in to the token identity authentication information interface is established with the user names to be registered; the password for logging in to the token identity authentication information interface is set according to the preset password complexity requirements, and the configuration of the account password for logging in to the token identity authentication information interface is completed; preferably, the preset password complexity requirements are: it must contain numbers, letters and special characters at the same time, and no less than 8 characters; specifically, if the set password meets the preset password complexity requirements, the set password is used as the password for logging in to the token identity authentication information interface; if the set password does not meet the preset password complexity requirements, a prompt that the password setting is wrong is returned.

[0026] Step 23. Use the Acl plug-in of the Kong gateway to configure the user permission group. The process of configuring user permissions is as follows: Get all user permission groups on the Kong gateway through the Kong gateway service interface.

[0027] When registering a gateway user, check the predetermined user permission group from all the user permission groups on the queried Kong gateway; call the Kong gateway service interface to configure the checked user permission group to the Groups of the gateway user Consumer.

[0028] It should be noted that the Acl plug-in of the Kong gateway is used to grant user interface access rights, that is, to select a user permission group for the user so that the user belongs to the selected user permission group. Each interface can be configured with a user group that can access the interface through the Acl plug-in: if the user belongs to the user group, the user can access the interface; if the user does not belong to the user group, the user cannot access the interface.

[0029] Step 24, save all configuration information persistently to a preset database; wherein all configuration information includes the account password and user authority group for logging in to obtain the token identity authentication information interface; preferably, the preset database is a Mysql database.

[0030] It should be noted that the Kong gateway user management platform can also realize the functions of user modification and user deletion; specifically, the process of realizing the user modification function is: since the user name in the Kong gateway cannot be repeated, when modifying the user, only the user's password can be modified; the modified new password needs to meet the preset password complexity requirements. If it meets the requirements, the password is successfully set; if it does not meet the requirements, a prompt will be returned; the process of realizing user deletion is specifically: first, delete all user configuration information persisted in the database; among them, all user configuration information includes user name, user password and user binding interface information; then, call the Kong gateway general configuration interface to delete the user's consumer information in the Kong gateway.

[0031] It should also be noted that when calling the Kong gateway general configuration interface, the user information and plug-in information of the Kong gateway background can be modified and configured.

[0032] Step 3: Receive and verify the gateway user's account and password information, wherein the gateway user's account and password information includes the user name and password input by the gateway user.

[0033] Specifically, the process of verifying the gateway user's account and password information is as follows: According to the user name input by the gateway user, the password of the corresponding gateway user is read from the preset database to obtain the read password.

[0034] Use Java's equals() instruction to process strings to compare the password entered by the gateway user with the password read; if they are consistent, return True, which means the gateway user's account and password information verification result is passed, and jump to step 4; otherwise, return False, which means the gateway user's account and password information verification result is failed.

[0035] Step 4: Check whether there is a key with user id as key in the Redis cache. The user id is the account number used to log in to the token authentication information interface. If it exists, a prompt indicating that the token has not expired and the token has not expired are returned; if it does not exist, the token has expired and the process jumps to step 5.

[0036] Step 5. Call the Jwts.builder() method to generate a new token and return it.

[0037] Specifically, the process of generating a new token is as follows: Use the setHeaderParam() method to set the request header, set the encryption algorithm alg to HS256, and set the type typ to JWT; use the claim() method to set the payload id to the user id; use the signWith() method to set the signature algorithm to HS256; use the compact() method to construct and return token information.

[0038] Step 6: Based on the new token, add a key-value pair with the user id as the key in Redis, and set the expiration time of the key-value pair with the user id as the key. Specifically, based on the new token, use the opsForValue() method in the RedisTemplate class integrated in Java to set the key-value pair in the Redis cache; preferably, the expiration time of the key-value pair with the user id as the key is set to 2h.

[0039] It should be noted that the user id is the unique identifier of the user, which corresponds to the token one by one. The user id is used as the key to record whether the user's current authentication information token has expired; if the key exists, the token has not expired; if the token does not exist, the token has expired; when using the opsForValue() method in the Java integrated RedisTemplate class to set the key-value pair in redis, the Kong gateway consumer id is used as the key and the consumer name is used as the value.

[0040] The gateway user management method based on Kong gateway described in this embodiment 1 realizes the management of gateway users by building a Kong gateway user management platform based on the Acl plug-in of Kong gateway and the general configuration interface of Kong gateway; uses the builder() method in the Jwts class of Kong gateway and Java and the Redis cache mechanism to realize the flexible acquisition of token authentication information, thereby realizing the generation and automatic expiration function of token authentication information.

[0041] In this embodiment 1, through the Kong gateway user management platform, maintenance personnel can more easily perform functions such as user registration, modification and deletion, so as to configure user authority groups for users and manage data interfaces associated with user authority groups, which greatly reduces the difficulty of background maintenance; specifically, through the Kong gateway user management platform, through the window visualization interface, all registered users and interfaces corresponding to different user groups are visualized through the window; functions such as adding, modifying, deleting and configuring user authority groups are in the form of buttons, and various functions can be realized by clicking the mouse, without logging in to the Kong gateway background to configure them one by one.

[0042] In this embodiment 1, the user logs in using the account and password through the user login interface, and the token information is obtained after successful login; at the same time, a key-value pair with the user id as the key is added to the Redis cache; thereafter, each time the user accesses the interface, it will first confirm from Redis whether there is a key-value pair with the user id as the key; if it exists, the access can be performed normally if the token has not expired; if it does not exist, it means that the token has expired and it is necessary to log in again to obtain the token information, thereby realizing the automatic expiration mechanism of the token.

[0043] Example 2 As attached Figure 3 As shown, this embodiment 2 provides a gateway user management system based on the Kong gateway, including a platform construction module, a user management module, an information verification module, a Token generation module and a key-value pair setting module.

[0044] A platform construction module is used to build a Kong gateway user management platform based on the Kong gateway's Acl plug-in and the gateway's general configuration interface; a user management module is used to manage gateway users using the Kong gateway user management platform; an information verification module is used to receive and verify the gateway user's account and password information; a Token generation module is used to verify whether there is a key with the user id as the key in the Redis cache if the gateway user's account and password information verification passes; if not, the Jwts.builder() method is called to generate a new token and return it; a key-value pair setting module is used to add a key-value pair with the user id as the key in Redis based on the new token, and set the expiration time of the key-value pair with the user id as the key.

[0045] Example 3 As attached Figure 4 As shown, this embodiment 3 provides a gateway user management device based on Kong gateway, including: a memory for storing a computer program; a processor for implementing the steps of the gateway user management method based on Kong gateway when executing the computer program.

[0046] When the processor executes the computer program, the steps of the gateway user management method based on the Kong gateway are implemented, for example: Based on the Acl plug-in of Kong gateway and the general configuration interface of gateway, a Kong gateway user management platform is constructed; the gateway users are managed by the Kong gateway user management platform; the account and password information of the gateway user is received and verified; if the account and password information of the gateway user passes the verification, check whether there is a key with the user id as the key in the Redis cache; if not, call the Jwts.builder() method to generate a new token and return it; based on the new token, add a key-value pair with the user id as the key in Redis, and set the expiration time of the key-value pair with the user id as the key.

[0047] Alternatively, when the processor executes the computer program, the functions of each module in the above-mentioned gateway user management system based on Kong gateway are realized, for example: A platform construction module is used to build a Kong gateway user management platform based on the Kong gateway's Acl plug-in and the gateway's general configuration interface; a user management module is used to manage gateway users using the Kong gateway user management platform; an information verification module is used to receive and verify the gateway user's account and password information; a Token generation module is used to verify whether there is a key with the user id as the key in the Redis cache if the gateway user's account and password information verification passes; if not, the Jwts.builder() method is called to generate a new token and return it; a key-value pair setting module is used to add a key-value pair with the user id as the key in Redis based on the new token, and set the expiration time of the key-value pair with the user id as the key.

[0048] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing preset functions, and the instruction segments are used to describe the execution process of the computer program in the gateway user management device based on the Kong gateway.

[0049] For example, the computer program can be divided into a platform construction module, a user management module, an information verification module, a Token generation module and a key-value pair setting module, and the specific functions of each module are as follows: a platform construction module, which is used to build a Kong gateway user management platform based on the Acl plug-in of the Kong gateway and the gateway general configuration interface; a user management module, which is used to manage gateway users using the Kong gateway user management platform; an information verification module, which is used to receive and verify the account and password information of the gateway user; a Token generation module, which is used to verify whether there is a key with the user id as the key in the Redis cache if the account and password information of the gateway user is verified; if not, call the Jwts.builder() method to generate a new token and return it; a key-value pair setting module, which is used to add a key-value pair with the user id as the key in Redis based on the new token, and set the expiration time of the key-value pair with the user id as the key.

[0050] The gateway user management device based on Kong gateway can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The gateway user management device based on Kong gateway can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above is an example of a gateway user management device based on Kong gateway, and does not constitute a limitation on the gateway user management device based on Kong gateway. It can include more components than the above, or combine certain components, or different components. For example, the gateway user management device based on Kong gateway can also include input and output devices, network access devices, buses, etc.

[0051] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The processor is the control center of the gateway user management device based on the Kong gateway, and uses various interfaces and lines to connect the various parts of the entire gateway user management device based on the Kong gateway.

[0052] The memory can be used to store the computer program and / or module, and the processor implements various functions of the gateway user management device based on the Kong gateway by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory.

[0053] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0054] Example 4 This embodiment 4 also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the gateway user management method based on the Kong gateway are implemented, for example: Based on the Acl plug-in of Kong gateway and the general configuration interface of gateway, a Kong gateway user management platform is constructed; the gateway users are managed by the Kong gateway user management platform; the account and password information of the gateway user is received and verified; if the account and password information of the gateway user passes the verification, check whether there is a key with the user id as the key in the Redis cache; if not, call the Jwts.builder() method to generate a new token and return it; based on the new token, add a key-value pair with the user id as the key in Redis, and set the expiration time of the key-value pair with the user id as the key.

[0055] If the modules / units integrated in the gateway user management system based on Kong gateway are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0056] Based on such understanding, the present invention implements all or part of the processes in the above-mentioned gateway user management method based on Kong gateway, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned gateway user management method based on Kong gateway when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or preset intermediate form, etc.

[0057] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0058] It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electrical carrier signals and telecommunication signals.

[0059] Example 5 This embodiment 5 provides a computer product, which computer program product includes a computer program, which is stored in a computer-readable storage medium; the processor of the gateway user management device based on the Kong gateway reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the gateway user management device based on the Kong gateway can execute the gateway user management method based on the Kong gateway described in Embodiment 1, which will not be repeated here.

[0060] It should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods.

[0061] The gateway user management method based on Kong gateway described in the present invention is combined with the Acl plug-in of Kong gateway and the general configuration interface of Kong gateway to build a Kong gateway user management platform to realize the management of gateway users, so that the difficulty of background maintenance is greatly reduced; combined with the Kong gateway Jwt plug-in, the builder() method in the Jwts class of Java and the Redis cache mechanism, a flexible token identity authentication information acquisition method is constructed to realize the generation and automatic expiration functions of token identity authentication information, thereby realizing the access permission control of the user interface and ensuring the security of the overall data.

[0062] The above embodiment is only one of the implementation methods that can realize the technical solution of the present invention. The scope of protection claimed by the present invention is not limited only to this embodiment, but also includes changes, replacements and other implementation methods that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention.

Claims

1. A gateway user management method based on Kong gateway, characterized in that: include: Based on the Acl plug-in of Kong gateway, gateway users are managed; Receive and verify the gateway user's account and password information; If the gateway user's account and password information is verified, check whether there is a key with the user id as the key in the Redis cache; if not, call the Jwts.builder() method to generate a new token and return it; Based on the new token, a key-value pair with the user id as the key is added in Redis, and the expiration time of the key-value pair with the user id as the key is set.

2. According to claim 1, a gateway user management method based on Kong gateway is characterized in that: The process of managing gateway users based on the Acl plug-in of the Kong gateway is as follows: Receive the user name to be registered; Determine whether the user name to be registered is repeated; if not, configure the account and password for logging in to obtain the token authentication information interface; Use the Acl plug-in of the Kong gateway to configure user permission groups; All configuration information is persisted and saved in the preset database; among them, all configuration information includes the account password and user permission group for logging in to obtain token authentication information interface.

3. According to claim 2, a gateway user management method based on Kong gateway is characterized in that: Determine whether the user name to be registered is repeated; if not, configure the account and password process of logging in to obtain the token authentication information interface, as follows: Compare the username to be registered with the username of the consumer in the Kong gateway; if the consumer in the Kong gateway does not exist in the same username as the username to be registered, the username to be registered will not be repeated, and an account for logging in to the token authentication information interface will be established with the username to be registered; According to the preset password complexity requirements, set the password for logging in to the token authentication information interface.

4. According to claim 2, a gateway user management method based on Kong gateway is characterized in that: The process of configuring user permission groups using the Acl plug-in of the Kong gateway is as follows: Get all user permission groups on the Kong gateway through the Kong gateway service interface; When registering a gateway user, check the predetermined user permission group from all the user permission groups on the queried Kong gateway; call the Kong gateway service interface to configure the checked user permission group to the Groups of the gateway user Consumer.

5. According to claim 1, a gateway user management method based on Kong gateway is characterized in that: The process of adding a key-value pair with user ID as key in Redis is as follows: Based on the new token, the key-value pair in the Redis cache is set using the opsForValue() method in the Java integrated RedisTemplate class.

6. According to claim 5, a gateway user management method based on Kong gateway is characterized in that: When setting the key-value pair in the Redis cache, use the Kong gateway consumer id as the key and the consumer name as the value.

7. A gateway user management system based on Kong gateway, characterized in that: include: User management module, used to manage gateway users based on the Acl plug-in of Kong gateway; Information verification module, used to receive and verify the gateway user's account and password information; The token generation module is used to check whether there is a key with the user id as the key in the Redis cache if the gateway user's account and password information are verified; if not, the Jwts.builder() method is called to generate a new token and return it; The key-value pair setting module is used to add a key-value pair with the user id as the key in Redis based on the new token, and set the expiration time of the key-value pair with the user id as the key.

8. A gateway user management device based on Kong gateway, characterized in that: include: a processor suitable for executing a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the gateway user management method based on the Kong gateway as described in any one of claims 1-6 is executed.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the gateway user management method based on the Kong gateway is implemented as described in any one of claims 1-6.

10. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, the gateway user management method based on the Kong gateway is implemented as described in any one of claims 1-6.