Data verification method and device, storage medium and computer program product

By introducing the token verification mechanism into the industrial gateway, the problem of lack of authentication verification in traditional industrial gateways is solved, the identity verification and access control of user equipment are realized, the security and protection capabilities of the industrial gateway are enhanced, and future failures are prevented. Authorized access and potential security threats.

CN118555097APending Publication Date: 2024-08-27CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410592377.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Traditional industrial gateways lack an effective authentication and verification mechanism, which allows malicious users to attack the main control module through the network port and invade the system, affecting the security and stability of the industrial network.

Method used

By introducing a token verification mechanism into the industrial gateway, it checks whether there is a token when receiving request data sent by the user device, verifies the identity and access rights of the user device, prevents unauthorized access and operations, and enhances protection capabilities.

Benefits of technology

It effectively prevents unauthorized access and potential security threats, improves the security and protection capabilities of industrial gateways, reduces the occupation of resources by invalid requests, and improves the efficiency of request processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118555097A
    Figure CN118555097A
Patent Text Reader

Abstract

The invention provides a data verification method and device, a storage medium and a computer program product, and relates to the technical field of information security, and the method can improve the security of an industrial gateway. The method comprises the following steps: receiving first request data sent by user equipment; the first request data is used for requesting to access the industrial gateway; determining whether a first token exists in the first request data; the first token is used for identifying the identity of the user equipment; and under the condition that the first token exists, verifying the access authority of the user equipment according to the first token. According to the invention, the problem of low security of the industrial gateway can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information security technology, and in particular to a data verification method, device, storage medium and computer program product. Background Art

[0002] As the core component connecting the cloud platform and industrial equipment, the industrial gateway is crucial in industrial communications. The industrial gateway is responsible for converting information between systems or products with different communication protocols, data formats, and languages ​​to ensure smooth data transmission.

[0003] The traditional industrial gateway structure includes a main control module, memory and hard disk. Data enters the gateway through the network port, is managed and distributed by the main control module, and can be output or stored. However, this structure lacks an effective authentication verification mechanism. Malicious users can attack the main control module through the network port and invade the system, posing a threat to the security of the industrial gateway and affecting the stability and security of the entire industrial network. Summary of the invention

[0004] The present application provides a data verification method, device, storage medium and computer program product, which can improve the security of industrial gateways.

[0005] In a first aspect, the present application provides a data verification method applied to a gateway filter, the method comprising: receiving first request data sent by a user device; the first request data is used to request access to an industrial gateway; determining whether a first token exists in the first request data; the first token is used to identify the identity of the user device; and in the presence of the first token, verifying the access rights of the user device based on the first token.

[0006] The data verification method provided by the present application receives the first request data sent by the user device; the first request data is used to request access to the industrial gateway, and then, it is determined whether there is a first token in the first request data; the first token is used to identify the identity of the user device, and then, in the presence of the first token, the access rights of the user device are verified according to the first token. The method introduces the first token as the identity of the user device. When receiving the request data sent by the user device, it can confirm whether the user device provides a valid identity by checking whether there is the first token in the request data, which can prevent unauthorized devices from accessing the industrial gateway, limit potential malicious access and operations, and enhance the protection capabilities of the industrial gateway. It can be understood that the present application not only improves the efficiency of request processing and reduces the occupation of industrial gateway resources by invalid requests through the combination of identity authentication and access control, but also effectively prevents unauthorized access and potential security threats, and improves the security of the industrial gateway.

[0007] In a possible implementation, the gateway filter includes an access token list, and the access token list includes information about the access token of the user device that has been successfully authenticated in the industrial gateway. Verifying the access rights of the user device according to the first token can be specifically implemented as follows: querying the access token list to determine whether the access token list includes information about the first token; and determining that the user device has access rights if the access token list includes information about the first token.

[0008] Another possible implementation is to determine that the user device does not have access rights when the access token list does not include information about the first token; and send a first message to the user device, where the first message is used to indicate that the user device has not performed login authentication in the industrial gateway.

[0009] In another possible implementation, for each user device that is successfully authenticated in the industrial gateway, an access token is issued to the user device, and an access token list is constructed based on the issued access token.

[0010] In another possible implementation, the first token is a JSON web token (JWT) token. Determining whether the first token exists in the first request data can be specifically implemented as follows: obtaining the request header JWT information of the first request data; and determining whether the JWT token exists in the request header JWT information.

[0011] Another possible implementation method is to receive second request data sent by the user device; the second request data is used to request login to the industrial gateway; and the second request data is forwarded to the management microservice for login authentication.

[0012] Another possible implementation method is to configure the configuration items of the industrial gateway; the configuration items include at least one of the following: dependency package, boot configuration file, boot class, microservice attributes.

[0013] In a second aspect, the present application provides a data verification device, which includes: a communication module, a determination module and a verification module.

[0014] The communication module is used to receive the first request data sent by the user device; the first request data is used to request access to the industrial gateway; the determination module is used to determine whether the first token exists in the first request data; the first token is used to identify the identity of the user device; the verification module is used to verify the access rights of the user device according to the first token when the first token exists.

[0015] In a possible implementation, the gateway filter includes an access token list, and the access token list includes information about access tokens of user devices that have been successfully authenticated in the industrial gateway. The verification module is specifically used to query the access token list to determine whether the access token list includes information about the first token; if the access token list includes information about the first token, determine that the user device has access rights.

[0016] In another possible implementation, the determination module is also used to determine that the user device does not have access rights when the access token list does not include information about the first token; the communication module is also used to send a first message to the user device, and the first message is used to indicate that the user device has not performed login authentication in the industrial gateway.

[0017] In another possible implementation, the data verification device further includes a processing module.

[0018] The processing module is used to issue an access token to each user device that is successfully authenticated in the industrial gateway, and to construct an access token list based on the issued access token.

[0019] In another possible implementation, the first token is a JWT token. The determination module is specifically configured to obtain JWT information of a request header of the first request data; and determine whether the JWT token exists in the JWT information of the request header.

[0020] In another possible implementation, the communication module is also used to receive second request data sent by the user device; the second request data is used to request login to the industrial gateway; the communication module is also used to forward the second request data to the management microservice for login authentication.

[0021] In another possible implementation, the data verification device further includes a configuration module.

[0022] The configuration module is used to configure the configuration items of the industrial gateway; the configuration items include at least one of the following: dependency package, boot configuration file, boot class, microservice attributes.

[0023] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory; the memory stores instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method of the first aspect above.

[0024] In a fourth aspect, the present application provides a computer-readable storage medium, which includes: computer software instructions; when the computer software instructions are executed in an electronic device, the electronic device implements the method of the first aspect above.

[0025] In a fifth aspect, the present application provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the steps of the related method described in the first aspect above to implement the method of the first aspect above.

[0026] The beneficial effects of the second to fifth aspects mentioned above refer to the corresponding description of the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of the structure of a communication system provided in an embodiment of the present application;

[0028] Figure 2 A flowchart of a data verification method provided in an embodiment of the present application;

[0029] Figure 3 A flowchart of another data verification method provided in an embodiment of the present application;

[0030] Figure 4 A flowchart of another data verification method provided in an embodiment of the present application;

[0031] Figure 5 A flowchart of another data verification method provided in an embodiment of the present application;

[0032] Figure 6 A flowchart of another data verification method provided in an embodiment of the present application;

[0033] Figure 7 A flowchart of another data verification method provided in an embodiment of the present application;

[0034] Figure 8 A schematic diagram of a process for configuring an industrial gateway provided in an embodiment of the present application;

[0035] Fig. 9 A flowchart of another data verification method provided in an embodiment of the present application;

[0036] Fig.10 A schematic diagram of the composition of a data verification device provided in an embodiment of the present application;

[0037] Fig.11 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0039] It should be noted that, in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0040] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. are not limiting the quantity and execution order.

[0041] As described in the background technology, the traditional industrial gateway structure mainly includes a main control module, memory and hard disk. Data enters the gateway through the network port and is then managed and distributed by the main control module. In this process, the memory is used as a temporary buffer for data so that the main control module can process it quickly. Afterwards, these data can be output through the network port or stored securely in the hard disk. However, this structure lacks an effective authentication verification mechanism, allowing malicious users to exploit this security vulnerability and launch attacks on the main control module through the network port, thereby posing a threat to the entire system. Due to the lack of sufficient security protection measures, this attack can often successfully invade the system, causing serious impact on the security and stability of the industrial gateway.

[0042] In summary, a more secure data verification method is urgently needed. Based on this, the embodiment of the present application provides a data verification method, which receives the first request data sent by the user device; the first request data is used to request access to the industrial gateway, and then, determines whether there is a first token in the first request data; the first token is used to identify the identity of the user device, and then, in the presence of the first token, verifies the access rights of the user device according to the first token. The method introduces the first token as the identity of the user device. When receiving the request data sent by the user device, it can confirm whether the user device provides a valid identity by checking whether there is a first token in the request data, which can prevent unauthorized devices from accessing the industrial gateway, limit potential malicious access and operations, and enhance the protection capabilities of the industrial gateway. It can be understood that the present application not only improves the efficiency of request processing and reduces the occupation of industrial gateway resources by invalid requests through the combination of identity authentication and access control, but also effectively prevents unauthorized access and potential security threats, and improves the security of the industrial gateway.

[0043] Figure 1 This is a schematic diagram of the structure of a communication system provided in an embodiment of the present application. Figure 1 As shown, the communication system includes a gateway filter 101, a user device 102 and a server 103. The gateway filter 101 and the user device 102 may be connected via a wired or wireless network, and the gateway filter 101 and the server 103 may be connected via a wired or wireless network.

[0044] Among them, server 103 can be a single server, or it can also be a server cluster composed of multiple servers. In some implementations, the server cluster can also be a distributed cluster. Optionally, the server can also be implemented on a cloud platform, for example, the cloud platform can include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an inter-cloud, and a multi-cloud, etc., or any combination thereof. The embodiments of the present application are not limited to this.

[0045] In some embodiments, server 103 is used to store, analyze or further process data received from gateway filter 101 .

[0046] In some embodiments, the gateway filter 101 is a component in the industrial gateway for processing specific functions, such as identity authentication, authorization, current limiting and logging, and can receive the request data of the user device 102 to access the industrial gateway, implement the verification of data access rights, and forward the data to the server 103 for further processing. The gateway filter 101 can connect to multiple user devices at the same time, is responsible for data processing and forwarding, supports different communication protocols, and can exchange data with multiple servers.

[0047] In some embodiments, the user device 102 is one or more industrial devices, which are used to collect device data around the industrial devices and communicate with the gateway filter 101. The user device 102 can be various sensors, controllers or other devices, which are not limited in this embodiment.

[0048] It should be understood that Figure 1 is an exemplary structural diagram, Figure 1 The communication system shown includes an unlimited number of devices, for example, an unlimited number of gateway filters 101 and an unlimited number of user devices 102. Figure 1 In addition to the equipment shown, Figure 1 The communication system shown may also include other devices, which is not limited thereto.

[0049] Figure 2 A flow chart of a data verification method provided in an embodiment of the present application. Figure 2 As shown, the data verification method provided by the present application can be implemented by the above-mentioned gateway filter, and specifically includes the following steps:

[0050] S201: Receive first request data sent by user equipment.

[0051] The first request data is used to request access to the industrial gateway.

[0052] In some embodiments, the first request data includes but is not limited to at least one of the following: request type, target address, request parameters, etc.

[0053] In some embodiments, the gateway filter may perform token verification and permission control based on the first request data.

[0054] It should be understood that the gateway filter receives the request data sent by the user device through one or more interfaces, such as a hypertext transfer protocol (HTTP) interface, a network socket (Web Socket) interface, etc. Exemplarily, when the user device attempts to access other services or resources through the industrial gateway, the request data can be sent through these interfaces.

[0055] S202: Determine whether a first token exists in the first request data.

[0056] The first token is used to identify the identity of the user equipment.

[0057] It can be understood that the gateway filter determines the access rights of the user device by verifying the identity of the user device. Therefore, after receiving the first request data, the gateway filter will check whether there is a first token therein. By verifying the first token, the gateway filter can ensure that user devices with valid identity tokens access resources and prevent unauthorized users or malicious devices from accessing the industrial gateway.

[0058] As a possible implementation manner, the gateway filter obtains a request header or a request body of the first request data, and then determines whether the first token exists in the request header or the request body.

[0059] In some embodiments, the first token is a JWT token. Figure 3 As shown, S202 can be specifically implemented as S202a-S202b as follows:

[0060] S202a. Obtain the request header JWT information of the first request data.

[0061] In some embodiments, the first request data is an HTTP request, and the gateway filter extracts the JWT information in the request header by parsing the request header of the HTTP request, wherein the JWT information is the part of the request header that stores the JWT token, and the JWT information includes a string consisting of the JWT token.

[0062] For example, the JWT information is stored in the Authorization field and starts with the Bearer prefix.

[0063] S202b: Determine whether there is a JWT token in the request header JWT information.

[0064] In some embodiments, the JWT token is a string consisting of three parts, separated by periods. The three parts are: a header, which contains metadata about the token type; a payload, which contains statements about the token subject (e.g., a user identifier) ​​and the token expiration time; and a signature, which is a cryptographic signature used to verify the authenticity of the token. If the extracted string conforms to this structure, it is determined that a JWT token exists in the request header JWT information.

[0065] S203: If the first token exists, verify the access rights of the user device according to the first token.

[0066] In some embodiments, when the first token exists, the gateway filter verifies the access rights of the user device based on the first token. The verification process includes checking the validity period of the first token, whether the first token has been revoked, whether the user associated with the first token has the authority to access the target service, etc.

[0067] In some embodiments, the gateway filter includes an access token list, and the access token list includes information about access tokens of user devices that have been successfully authenticated in the industrial gateway. Figure 4 As shown, S203 can be specifically implemented as S203a-S203b as follows:

[0068] S203a: Query the access token list to determine whether the access token list includes information about the first token.

[0069] In some embodiments, the gateway filter compares by traversing the access token list, or uses a hash table to quickly find information in the access token list that matches the first token. After the query is completed, if a match is found in the access token list, it is determined that the access token list includes information about the first token.

[0070] Optionally, a data structure such as List or Map in the Java programming language is used to store the access token list.

[0071] S203b: When the access token list includes information of the first token, determine that the user device has access rights.

[0072] In some embodiments, when the access token list includes information of the first token, the gateway filter may determine that the user device has permission to access the requested resource. In this case, the gateway filter may continue to process the request, including forwarding the request to the target service, or performing other permission-related operations, such as logging, triggering events, etc.

[0073] The data verification method provided by the present application receives the first request data sent by the user device; the first request data is used to request access to the industrial gateway, and then, it is determined whether there is a first token in the first request data; the first token is used to identify the identity of the user device, and then, in the presence of the first token, the access rights of the user device are verified according to the first token. The method introduces the first token as the identity of the user device. When receiving the request data sent by the user device, it can confirm whether the user device provides a valid identity by checking whether there is the first token in the request data, which can prevent unauthorized devices from accessing the industrial gateway, limit potential malicious access and operations, and enhance the protection capabilities of the industrial gateway. It can be understood that the present application not only improves the efficiency of request processing and reduces the occupation of industrial gateway resources by invalid requests through the combination of identity authentication and access control, but also effectively prevents unauthorized access and potential security threats, and improves the security of the industrial gateway.

[0074] In some embodiments, Figure 5 As shown, before S201, the data verification method provided in the embodiment of the present application further includes the following S401:

[0075] S401. For each user device that is successfully authenticated in the industrial gateway, an access token is issued to the user device, and an access token list is constructed based on the issued access token.

[0076] The access token is used to identify the user device that has been successfully authenticated. The industrial gateway will allow the successfully authenticated user device to access protected resources or services based on the access token. The access token list is used to store and manage all valid access tokens in the current industrial gateway. The access token list contains relevant information for each access token, such as the token value, associated user device, validity period, etc.

[0077] In some embodiments, when the user device successfully passes the login authentication in the management microservice, the gateway filter will issue an access token to the user device. At the same time, the gateway filter will also add the newly issued access token to the access token list. In the subsequent interaction with the industrial gateway, the user device will carry the access token to prove its identity and authority. The gateway filter verifies the validity of the access token based on the access token list, and then controls the access rights of the user device.

[0078] In some embodiments, Figure 6 As shown, before S201, the data verification method provided in the embodiment of the present application further includes the following S501-S502:

[0079] S501: Receive second request data sent by user equipment.

[0080] The second request data is used to request to log in to the industrial gateway.

[0081] In some embodiments, when a user device requests to log in to an industrial gateway, the user device will send second request data containing login information to the gateway filter, where the second request data includes login information such as user name, password, and device identification.

[0082] S502: forward the second request data to the management microservice for login authentication.

[0083] In some embodiments, the management microservice is responsible for verifying the identity and authority of the user device to determine whether the user device is allowed to log in to the industrial gateway.

[0084] In some embodiments, the gateway filter encapsulates the second request data into an HTTP request and forwards it to the management microservice. To ensure the security of the data during the forwarding process, the gateway filter can use transport layer security (TLS) / (secure sockets layer, SSL) encrypted communication to prevent the data from being illegally intercepted or tampered with during the transmission process. To verify the validity of the identification, the management microservice can interact with the authentication service, such as lightweight directory access protocol (LDAP) or security assertion markup language (SAML), to query and verify the identity information of the user device.

[0085] It should be noted that, if the user device login authentication is successful, the management microservice will return a successful authentication response to the gateway filter, and the gateway filter will issue an access token to the user device, that is, execute the above step S401, and then execute step S201 to implement subsequent request verification. In the case of a user device login authentication failure, for example, the user name or password is incorrect, the device is not authorized, or the user has insufficient authority, the management microservice will return an error message to the user device and reject the access request of the user device.

[0086] In some embodiments, Figure 7 As shown, before S201, the data verification method provided in the embodiment of the present application further includes the following S601:

[0087] S601. Configure the configuration items of the industrial gateway.

[0088] The configuration items include at least one of the following: dependency package, boot configuration file, boot class, and microservice attribute.

[0089] It should be noted that dependency packages are libraries and frameworks required to build and run applications; bootstrap configuration files are configuration files loaded when the program starts, which are used to specify some initial settings or connection parameters; bootstrap classes are the entry point of the application, which contain all the configurations and settings required to start and initialize the gateway; microservice properties are used to define various properties and configurations of the application, which may include service name, service port, load balancing policy, security settings, etc.

[0090] In some embodiments, Figure 8 As shown in the figure, in the process of configuring the industrial gateway, first import the relevant dependency packages. For example, for the industrial gateway using Spring Cloud Gateway, import the spring-cloud-starter-gateway dependency to provide the required core functions for the industrial gateway, such as routing, filtering, and current limiting. Then, set bootstrap.yml to contain the necessary startup parameters and connection information of the industrial gateway, such as the address of the configuration center, the service discovery mechanism, etc. These configurations can ensure that the industrial gateway can correctly connect to other service components when it starts. Among them, bootstrap.yml is a boot configuration file used when the application starts, which is used to read the configuration information that needs to be determined before the application context is loaded. Further, create a springboot boot class for the entry point of the industrial gateway application. For example, the springboot boot class contains the @SpringBootApplication annotation for enabling the Spring Boot function and the @EnableEurekaClient annotation for enabling integration with the Eureka registry. Finally, configure the application.yml file, which contains various microservice properties, such as: address, port, authentication method, load balancing strategy, etc. By configuring these properties, it can be ensured that the industrial gateway can correctly route requests to the target microservice.

[0091] It should be noted that Spring Cloud Gateway is used to manage and protect the application programming interface (API) in the microservice architecture.

[0092] In some embodiments, Fig. 9 As shown, after S203, the data verification method provided in the embodiment of the present application further includes the following S301-S302:

[0093] S301: When the access token list does not include information about the first token, determine that the user device does not have access rights.

[0094] In some embodiments, when the gateway filter searches for information of the first token in the access token list but finds no match, it indicates that the user device has not yet been successfully authenticated, or its authentication status has changed, for example, the user has logged out or the token has expired, and the gateway filter determines that the user device does not have permission to access the requested resource.

[0095] S302: Send a first message to user equipment.

[0096] The first message is used to indicate that the user device has not performed login authentication in the industrial gateway.

[0097] In some embodiments, when it is determined that the user device does not have access rights, the gateway filter sends a first message to the user device, indicating that the user device has not yet performed login authentication in the industrial gateway. The first message can be an HTTP response or a message queuing telemetry transport (MQTT) message.

[0098] For example, the first message may include a prompt message similar to “You have not yet logged in and authenticated in the industrial gateway, please authenticate first to access resources.” At the same time, further operation instructions or links may be provided in the first message to help the user complete the login authentication process.

[0099] The data verification method provided by the present application can provide a lightweight, self-contained authentication mechanism by using the JWT token as the first token. The gateway filter can efficiently parse and verify the existence of the JWT token. This mechanism not only improves the efficiency of request data processing, but also ensures the security of the request data and prevents the intrusion of illegal requests. In addition, the gateway filter receives the login request data sent by the user device and forwards it to the management microservice for login authentication, which can realize centralized user authentication and management, and improve the security and scalability of the industrial gateway.

[0100] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy to realize that the technical goals in this field are combined with the units and algorithm steps of each example described in the embodiments disclosed in this article, and the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical goals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0101] In an exemplary embodiment, the present application further provides a data verification device, which may include one or more functional modules for implementing the data verification method of the above method embodiment.

[0102] For example, Fig.10 A schematic diagram of the composition of a data verification device provided in an embodiment of the present application. Fig.10 As shown, the device includes: a communication module 1001, a determination module 1002 and a verification module 1003.

[0103] The communication module 1001 receives the first request data sent by the user device; the first request data is used to request access to the industrial gateway; the determination module 1002 is used to determine whether there is a first token in the first request data; the first token is used to identify the identity of the user device; the verification module 1003 is used to verify the access rights of the user device according to the first token when the first token exists.

[0104] In some embodiments, the gateway filter includes an access token list, and the access token list includes information about access tokens of user devices that have been successfully authenticated in the industrial gateway. The verification module 1003 is specifically used to query the access token list to determine whether the access token list includes information about the first token; if the access token list includes information about the first token, determine that the user device has access rights.

[0105] In other embodiments, the determination module 1002 is also used to determine that the user device does not have access rights when the access token list does not include information about the first token; the communication module 1001 is also used to send a first message to the user device, and the first message is used to indicate that the user device has not performed login authentication in the industrial gateway.

[0106] In some further embodiments, the data verification device further includes a processing module 1004 .

[0107] The processing module 1004 is used to issue an access token to each user device that is successfully authenticated in the industrial gateway, and to construct an access token list based on the issued access token.

[0108] In some other embodiments, the first token is a JWT token. The determination module 1002 is specifically configured to obtain JWT information of a request header of the first request data and determine whether a JWT token exists in the JWT information of the request header.

[0109] In some other embodiments, the communication module 1001 is also used to receive second request data sent by the user device; the second request data is used to request login to the industrial gateway; the communication module 1001 is also used to forward the second request data to the management microservice for login authentication.

[0110] In some further embodiments, the data verification device further includes a configuration module 1005 .

[0111] The configuration module 1005 is used to configure the configuration items of the industrial gateway; the configuration items include at least one of the following: dependency package, boot configuration file, boot class, microservice attribute.

[0112] In an exemplary embodiment, the present application also provides an electronic device, which may be the data verification device in the above method embodiment. Fig.11 The following is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application. Fig.11 As shown, the electronic device may include: a processor 1101 and a memory 1102; the memory 1102 stores instructions executable by the processor 1101; when the processor 1101 is configured to execute the instructions, the electronic device or network device or manager implements the method described in the aforementioned method embodiment.

[0113] In an exemplary embodiment, the present application also provides a computer-readable storage medium on which computer program instructions are stored; when the computer program instructions are executed by a computer, the computer implements the method described in the aforementioned embodiment. The computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.

[0114] In an exemplary embodiment, the embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the above-mentioned related method steps to implement the data verification method in the above-mentioned embodiment.

[0115] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data verification method, It is characterized in that Applied to a gateway filter; the method comprises: Receiving first request data sent by a user device; the first request data is used to request access to an industrial gateway; Determine whether a first token exists in the first request data; the first token is used to identify the identity of the user device; In a case where the first token exists, the access authority of the user device is verified according to the first token.

2. The method according to claim 1, It is characterized in that The gateway filter includes an access token list, and the access token list includes information of access tokens of user devices that have been successfully authenticated in the industrial gateway; The verifying the access rights of the user device according to the first token includes: Query the access token list to determine whether the access token list includes information of the first token; In a case where the access token list includes information of the first token, it is determined that the user device has the access right.

3. The method according to claim 1, It is characterized in that The method further comprises: If the access token list does not include information about the first token, determining that the user device does not have access rights; A first message is sent to the user equipment, where the first message is used to indicate that the user equipment has not performed login authentication in the industrial gateway.

4. The method according to claim 1, It is characterized in that Before receiving the first request data sent by the user equipment, the method further includes: For each user device that is successfully authenticated in the industrial gateway, an access token is issued to the user device, and an access token list is constructed based on the issued access token.

5. The method according to claim 1, It is characterized in that The first token is a JWT token; The determining whether the first token exists in the first request data comprises: Obtain the request header JWT information of the first request data; Determine whether the JWT token exists in the request header JWT information.

6. The method according to claim 1, It is characterized in that Before receiving the first request data sent by the user equipment, the method further includes: Receiving second request data sent by a user device; the second request data is used to request to log in to the industrial gateway; The second request data is forwarded to the management microservice for login authentication.

7. The method according to claim 1, It is characterized in that Before receiving the first request data sent by the user equipment, the method further includes: The configuration items of the industrial gateway are configured; the configuration items include at least one of the following: dependency packages, boot configuration files, boot classes, and microservice attributes.

8. An electronic device, It is characterized in that The electronic device comprises: a processor and a memory; The memory stores instructions executable by the processor; When the processor is configured to execute the instructions, the electronic device implements the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes: computer software instructions; When the computer software instructions are executed in an electronic device, the electronic device implements the method according to any one of claims 1 to 7.

10. A computer program product, It is characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • A method for implementing simple authentication authorization using an API gateway

    CN109039880A

  • Security authentication method, system and device

    CN110324328A

  • Gateway authentication and identity authentication platform and method thereof

    CN111865920A

  • Authentication method and device based on unified gateway, equipment and storage medium

    CN112039909A

  • Gateway-based Oauth2 single sign-on method and device, electronic equipment and storage medium

    CN113691378A