Data message processing method, device and system and medium

By inserting tokens in the APN message header, the problem that the token carrying method in the prior art is limited to specific application scenarios, and the adaptation of multiple application scenarios and the universality of zero-trust access control is achieved.

CN119071003APending Publication Date: 2024-12-03HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310631312.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the prior art, the token carrying method is limited to specific application scenarios, which makes it difficult to access zero trust for application, and the token carrying method of different application layer protocols is not unified and difficult to standardize.

Method used

By inserting tokens in the application-aware network (APN) message header, the insertion and carrying of tokens are realized from the application layer to the network layer, reducing the adaptation needs for specific applications and are suitable for a variety of application scenarios.

Benefits of technology

It realizes the flexibility of tokens to adapt to various application scenarios, reduces the difficulty of application transformation, and improves the universality and standardization of zero-trust access control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071003A_ABST
    Figure CN119071003A_ABST
Patent Text Reader

Abstract

The invention discloses a data message processing method, device and system and a medium, the insertion and carrying of a token are sunk from an application layer to a network layer by inserting and carrying the token in an APN message header, so that the limitation of an application scene caused by inserting and carrying the token in an application layer protocol header is reduced to a certain extent, and the data message processing efficiency is improved. And targeted adaptation for specific types of applications is basically not needed, so that the zero-trust application access difficulty is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a data message processing method, device, system and medium. Background Art

[0002] When transmitting data between different networks, tokens are often used for access control and permission management to improve security.

[0003] At present, the token is usually carried in the application layer protocol header of the message. For example, in the scenario of World Wide Web (Web) application, the hypertext transfer protocol (HTTP) header is usually used to carry the token. In the scenario of file transfer, the file transfer protocol header is usually used to carry the token. However, when the token is carried in the application layer protocol header, the token carrying method may only be applicable to specific types of applications, resulting in strong limitations on the application scenarios. Summary of the invention

[0004] The present application provides a data message processing method, device, system and medium, which are helpful to solve the limitations of application scenarios applicable to the token carrying method. The technical solution is as follows.

[0005] In a first aspect, a data message processing method is provided, comprising:

[0006] The first network device obtains a first data message, wherein the first data message includes application layer data;

[0007] The first network device obtains a second data packet based on the first data packet and the token, where the second data packet includes the application layer data and an application-aware network APN header, and the APN header includes the token;

[0008] The first network device sends the second data packet.

[0009] In the above method, by inserting tokens and carrying tokens in the APN message header, the insertion and carrying of tokens are moved from the application layer to the network layer, thereby reducing the limitations of applicable scenarios caused by inserting tokens and carrying tokens in the application layer protocol header to a certain extent. There is basically no need for targeted adaptation for specific types of applications, thereby reducing the difficulty of zero-trust application access.

[0010] In a possible implementation, the APN message header includes an application-aware network identifier APN-ID field, and the APN-ID field includes the token.

[0011] In a possible implementation, the token includes an application token, the APN message header includes an application group identifier APP-group-ID field, and the APP-group-ID field includes the application token.

[0012] In a possible implementation, the token includes a user token, the APN message header includes a user group identifier user-group-ID field, and the user-group-ID field includes the user token.

[0013] In a possible implementation, the first network device obtains the second data packet based on the first data packet and the token, including:

[0014] The first network device performs application identification based on the first data message to obtain an APN-ID;

[0015] The first network device inserts the token into the APN-ID to obtain the APN-ID including the token;

[0016] The first network device adds the APN-ID including the token to the first data message to obtain the second data message.

[0017] In a possible implementation, the first network device obtains the second data packet based on the first data packet and the token, including:

[0018] The first network device adds the token to the APN-ID included in the first data message to obtain the second data message.

[0019] In a possible implementation, before the first network device obtains the second data packet based on the first data packet and the token, the method further includes:

[0020] The first network device receives the token sent by the controller; or,

[0021] The first network device receives the token sent by an identity and access management (IAM) node.

[0022] In a second aspect, a data message processing method is provided, the method comprising:

[0023] The second network device receives a second data message from the first network device, wherein the second data message includes application layer data and an application-aware network APN message header, and the APN message header includes the token;

[0024] In response to the token passing authentication, the second network device sends a third data message, where the third data message includes the application layer data; or, in response to the application token failing authentication, the second network device discards the second data message.

[0025] In a possible implementation, after the second network device receives the second data message from the first network device, the method further includes:

[0026] The second network device obtains an authentication request based on the token;

[0027] The second network device sends the authentication request to an identity and access management IAM node;

[0028] The second network device receives an authentication response from the IAM node, where the authentication response indicates whether the token is authenticated.

[0029] In a possible implementation, the APN message header includes an application-aware network identifier APN-ID field, and the APN-ID field includes the token.

[0030] In a possible implementation, the token includes an application token, the APN message header includes an application group identifier APP-group-ID field, and the APP-group-ID field includes the application token.

[0031] In a possible implementation, the token includes a user token, the APN message header includes a user group identifier user-group-ID field, and the user-group-ID field includes the user token.

[0032] In a third aspect, a data message processing device is provided, which has the function of implementing the above-mentioned first aspect or any optional method of the first aspect. The data message processing device includes at least one module, and the at least one module is used to implement the method provided by the above-mentioned first aspect or any optional method of the first aspect. In some embodiments, the modules in the data message processing device are implemented by software, and the modules in the data message processing device are program modules. In other embodiments, the modules in the data message processing device are implemented by hardware or firmware. The specific details of the data message processing device provided in the third aspect can be found in the above-mentioned first aspect or any optional method of the first aspect, and will not be repeated here.

[0033] In a fourth aspect, a data message processing device is provided, which has the function of implementing the second aspect or any optional method of the second aspect. The data message processing device includes at least one module, and the at least one module is used to implement the method provided by the second aspect or any optional method of the second aspect. In some embodiments, the modules in the data message processing device are implemented by software, and the modules in the data message processing device are program modules. In other embodiments, the modules in the data message processing device are implemented by hardware or firmware. The specific details of the data message processing device provided in the fourth aspect can be found in the second aspect or any optional method of the second aspect, which will not be repeated here.

[0034] In a fifth aspect, a network device is provided, the network device comprising a processor and a network interface, the processor is used to execute instructions so that the network device performs the method provided by the first aspect or any optional manner of the first aspect, and the network interface is used to receive or send a message. The specific details of the network device provided in the fifth aspect can be found in the first aspect or any optional manner of the first aspect, and will not be repeated here.

[0035] In a sixth aspect, a network device is provided, the network device comprising a processor and a network interface, the processor is used to execute instructions so that the network device performs the method provided by the second aspect or any optional manner of the second aspect, and the network interface is used to receive or send a message. The specific details of the network device provided in the sixth aspect can be found in the second aspect or any optional manner of the second aspect, and will not be repeated here.

[0036] In a seventh aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and when the instruction is executed on a computer, the computer executes the method provided in the first aspect or any optional manner of the first aspect.

[0037] In an eighth aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and when the instruction is executed on a computer, the computer executes the method provided in the second aspect or any optional manner of the second aspect.

[0038] In the ninth aspect, a computer program product is provided, which includes one or more computer program instructions. When the computer program instructions are loaded and executed by a computer, the computer executes the method provided by the first aspect or any optional manner of the first aspect.

[0039] In the tenth aspect, a computer program product is provided, which includes one or more computer program instructions. When the computer program instructions are loaded and executed by a computer, the computer executes the method provided in the second aspect or any optional manner of the second aspect.

[0040] In the eleventh aspect, a chip is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method in the above-mentioned first aspect and any possible implementation of the first aspect.

[0041] In the twelfth aspect, a chip is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method provided in the above-mentioned second aspect or any optional manner of the second aspect.

[0042] In the thirteenth aspect, a network system is provided, which includes the device described in the third aspect or any optional manner of the third aspect and the device described in the fourth aspect or any optional manner of the fourth aspect.

[0043] In the fourteenth aspect, a network system is provided, which includes the device described in the fifth aspect or any optional embodiment of the fifth aspect and the device described in the sixth aspect or any optional embodiment of the sixth aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 This is a schematic diagram of a message format provided in an embodiment of the present application;

[0045] Figure 2 This is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0046] Figure 3 This is a schematic diagram of a scenario of one-way import of cross-network data provided in an embodiment of the present application;

[0047] Figure 4 It is a schematic diagram of a cross-network data unidirectional export scenario provided in an embodiment of the present application;

[0048] Figure 5 It is a flow chart of a data message forwarding method provided in an embodiment of the present application;

[0049] Figure 6 It is a structural schematic diagram of a data message processing device provided in an embodiment of the present application;

[0050] Figure 7 It is a structural schematic diagram of a data message processing device provided in an embodiment of the present application;

[0051] Figure 8 It is a structural diagram of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0053] The following is an explanation of some terminology concepts involved in the embodiments of the present application.

[0054] (1) Token

[0055] A token is a security credential used for identity authentication and authorization to access network resources. The data form of a token is usually a data string. Tokens are usually part of an access control policy and can be passed and used between different network services. Tokens are mainly used to verify the identity and authorization of the accessing party so that the accessing party can access the authorized resources, reduce the probability of unauthorized access and malicious intrusion, and improve network security.

[0056] Tokens are usually generated based on identity authentication. For example, the access party is authenticated, and if the authentication is successful, the node responsible for identity authentication issues a token. The token mainly contains identity information, and can also contain information such as the authority to access resources, the scope of access resources, and the expiration time.

[0057] In some cases, the token contains the identity information of the accessor. In this case, the token is usually used for authentication and authorization so that the authenticated accessor can access the resource. In addition, by using the token, you can avoid authentication on each service, thus taking into account both efficiency and security. In other cases, the token contains the identity information of the accessee. In this case, the token is usually used to represent the authorized resource or service in order to verify the accessor's permission to access the authorized resource or service. Support the accessor to access specific resources or services.

[0058] (2) User token

[0059] A user token is a token issued to a user. The user token is used to identify the user's identity and can also be used to verify the user's permissions and authorize the user to access restricted resources in the application. For example, the node responsible for identity authentication authenticates the user's identity. If the authentication is successful, the node responsible for identity authentication issues a user token, which can prove that the user does have permission to access specific restricted resources in the application.

[0060] The user token mainly contains the user's identity information. For example, the user token includes a user token identifier, and optionally includes at least one of the token creation time, token expiration time, user organization information, terminal IP address, or terminal device identifier. The user token identifier is used to uniquely identify a user token, reducing the risk of replay attacks and token forgery. The token creation time is used to record the generation time of the user token, and the token creation time is used to calculate the validity period of the token. The token expiration time is used to record the expiration time of the user token, which is used to limit the usage time of the token to avoid abuse. The user organization information is used to record the organization information to which the user belongs, for authorization and auditing purposes. The terminal IP address is used to record the terminal Internet Protocol (IP) address of the user's access to resources, which is used to reduce the risk of cross-site request forgery attacks and abnormal access. The terminal device identifier is a terminal device identifier that records the user's access to resources, which is used to identify different terminal devices and strengthen security control and auditing functions.

[0061] (3) Application Token

[0062] An application token is a token that identifies an application. It is used to prove the identity of the application and verify whether the application has permission to access restricted resources. For example, after authenticating the application, an application token is generated if the authentication is successful. The application token can be used to prove that the application has permission to access specific restricted resources.

[0063] The application token includes the identity information of the application. For example, the application token includes at least one of the application token identifier, token creation time, token expiration time, application identifier, user identifier (optional), or application organization identifier. The application token identifier is used to uniquely identify an application token so that each request uses a unique token. When verifying the application token identifier, the corresponding application can be identified by the application token identifier. The token creation time is used to record the time when the token was created, and is usually used to verify the validity period of the token. The token expiration time is used to record the expiration time of the token. Once it expires, the token will be rejected. The expiration time is usually set to be short to improve the security of the token. The application identifier is used to identify the application to which the token belongs. The user identifier is optional and is usually used to record the user to whom the token belongs. If the application token is for a specific user, this field is important. The application organization identifier is used to identify the organization or institution to which the application belongs. For example, the application organization identifier is the application organization code.

[0064] (4) Application-aware IPv6 networking (APN6)

[0065] APN6 uses the IPv6 extended message header to carry application information so that network devices can use the application information to identify the application and then manage the application in a refined manner at the network layer. The application information includes the application identifier (APN ID) and the application's network requirement parameters (APN parameters) so that traffic from different applications or different application groups can be refinedly differentiated and scheduled within the network. It can be seen that APN6 technology can distinguish which application the traffic belongs to and identify the application traffic's demands on the network, thereby providing refined network services for the application.

[0066] Currently, there are two types of APN6 implementation solutions: application side solution and network side solution.

[0067] The APN6 implementation scheme on the application side is also called the host insertion method. In the APN6 implementation scheme on the application side, the APN ID is generated by the application client, and the application client encapsulates the APN ID into the IPv6 extension header of the message. Optionally, the application client also encapsulates the application requirements into the IPv6 extension header of the message. Alternatively, the APN ID is generated by the server, and the server encapsulates the APN ID into the IPv6 extension header of the message. Optionally, the server also encapsulates the application requirements into the IPv6 extension header of the message. Network devices within the APN6 network domain can provide corresponding application-aware fine-grained network services based on the application information carried in the message. The application-side solution requires that the operating system of the application and the device running the application support encapsulation of application information and requirements in the message, and is easy to deploy in scenarios where the network and application are owned and managed by one organization.

[0068] The APN6 implementation scheme on the network side is also called the network device insertion method. In the APN6 implementation scheme on the network side, the APN ID is generated by the network device, and the network device encapsulates the APN ID into the message.

[0069] In the APN6 network side solution, the network devices deployed at the edge of the network perceive the application and then encapsulate the APN ID into the traffic, without the need for the application client or server to encapsulate the APN ID. For example, the network device perceives the application based on the five-tuple information and / or the layer 2 interface information in the message, and then determines the APN ID. In this way, the corresponding application-aware fine-grained network services can be provided within the APN6 network domain based on the application information carried in the message.

[0070] The network-side solution does not require ecological support from the application side and is easy to deploy in both network operators and industry networks. Therefore, the current use of APN6 mainly focuses on the network-side solution. The application-side solution requires ecological support, but has great development potential, so it is also the future development direction of APN6.

[0071] (5) APN identification object

[0072] The IETF draft-li-apn-framework defines the application information (APNattribute) carried in the APN message, including the application-aware networking ID (APN ID) and APN parameters.

[0073] APN ID provides information that helps the network distinguish between different application flows and different users (groups) of a certain / class application. APN ID may include information such as APP group ID and user group ID.

[0074] APN parameters are optional information. APN parameters may include bandwidth, latency, jitter, packet loss rate and other application requirements for network performance.

[0075] (6) APN identification format

[0076] Attached Figure 1 A schematic diagram of the format of an APN header provided for an embodiment of the present application. The APN header is an IPv6 extension header used to carry the attributes of the APN. For example, the APN header may be a hop-by-hop options header (HBH), such as carrying the APNAttribute by identifying the APN6 option type through the option type. In another example, the APN header may be a destination options header (DOH), carrying the APN attribute by identifying the APN6 option type through the option type. In another example, the APN header may be a segment routing header (SRH), such as carrying the APNAttribute through fields such as the segment routing header TLV (SRH TLV), the segment identification parameters field (SID arguments field), and the segment routing header TAG field (SRH TAG field).

[0077] Take the APN message header implemented through the destination option header as an example, as shown in the attached Figure 1 As shown, Figure 1The APN header in the APN6 header is, for example, DOH for IPv6. In the APN6 header, the APN ID contains the APP group ID, user group ID, and reserved fields, through which specific applications or specific users can be located. The key information about the quality requirements for a certain type of application is carried in the APN-para-Type. Currently, this type of requirement parameters may include bandwidth, latency, jitter, packet loss rate, etc.

[0078] The meaning of each field in the APN6 message header is shown in the following table.

[0079]

[0080] (7) Cross-network data exchange

[0081] Cross-network data exchange refers to the process of transmitting data between different networks. Cross-network data exchange usually occurs between different organizations, different geographical locations, or different technology platforms, such as data sharing between enterprises and data transmission in cloud computing. The data transmitted in the cross-network data exchange scenario includes files, database synchronization, message queues, and video streams.

[0082] Cross-network data exchange scenarios include one-way export scenarios and one-way import scenarios. One-way export scenarios refer to data transmission from the data center inside the network to the external network. One-way import scenarios refer to data transmission from the external network to the data center in the internal network through the cross-network data exchange system.

[0083] (8) Identity and access management (IAM)

[0084] IAM refers to the technology for managing user identities and access rights. IAM includes functions such as user authentication, authorization, and auditing, which can help enterprises better manage and protect their network resources. IAM includes identity authentication and authorization. Authentication refers to verifying the identity of a user, service, or application. Authorization refers to granting authenticated users access to specific resources or functions. For example, an IAM node performs permission verification based on the information contained in a token. For example, an IAM node determines whether a user has access to the resource based on information such as the user ID, role, or permission in the token. If the user is authorized to access the resource, the IAM node allows the user to perform the corresponding operation.

[0085] (9) Zero Trust Access Control

[0086] Traditional access control methods are usually based on trust, that is, internal users are considered trustworthy, while external users are not. Zero-trust access control is a network security strategy and architecture. Under zero-trust access control, each user, device, and application is considered a potential threat, and they need to undergo strict security authentication and authorization before they are allowed to access limited network resources and data. In other words, almost no device, user, or application is trusted, and all access needs to be verified and authorized. Through zero-trust access control, network security and data protection can be improved, internal security threats can be reduced, and the threat to corporate data from accidental or malicious behavior of internal personnel can be reduced. Access and permissions to resources can be controlled, which is particularly effective for protecting important corporate data.

[0087] The core components of the zero trust architecture include policy decision points and policy execution points. The policy decision point consists of a policy engine and a policy manager. The policy execution point communicates on the data plane and the control plane. The functions of each component in the zero trust architecture are as follows.

[0088] The policy engine is used to comprehensively analyze multi-dimensional information and ultimately decide whether to grant access rights to the specified access subject. The policy engine and the policy manager must be used together. The policy engine makes decisions, and the policy manager issues the decisions. In some solutions, the same system can play the role of both the policy engine and the policy manager.

[0089] The policy manager is responsible for establishing the logical connection between the access subject and the object, and generating the credentials for the subject to access the object. The policy manager is closely related to the policy engine, and relies on the decision of the policy engine to issue the corresponding policy; at the same time, the policy manager communicates with the policy execution point and executes the policy through the policy execution point.

[0090] The policy enforcement point is used to determine whether to allow the subject to connect to the object based on the policy issued by the policy manager. Multiple components can play the role of policy enforcement point, such as terminal agent, gateway, etc.

[0091] The following is an example of an application scenario of the embodiment of the present application.

[0092] The embodiments of the present application can be applied to the scenario of cross-network data exchange. For example, the embodiments of the present application can be applied to the process of cross-network data unidirectional import. For another example, the embodiments of the present application can be applied to the process of cross-network data unidirectional export. For another example, the embodiments of the present application can be applied to the process of cross-network instruction exchange.

[0093] One-way import of data across networks refers to the transfer of data from an external network to an internal network. For example, data from the Internet is transferred to a data center deployed in a local area network. One-way export of data across networks refers to the transfer of data from an internal network to an external network, such as transferring data from a data center in a local area network to the Internet. The transmitted data includes at least one of a file, data that needs to be synchronized in a database, a message queue, a video stream, or a control instruction. Optionally, an embodiment of the present application is applied to a scenario of zero-trust cross-network data exchange.

[0094] In the scenario of cross-network data exchange, the method of inserting tokens at the application layer and carrying tokens at the application layer is usually adopted. For example, for the zero-trust access control solution for Web applications, the token is usually inserted in the HTTP header and carried in the HTTP header. The policy execution node 35 parses the token from the HTTP header and carries the token to the policy manager for authentication. For another example, in the scenario of non-HTTP protocol, in a possible implementation method, the application token is inserted as an identity credential in the file header, database comment field, message header, etc. For example, in the scenario of using database protocol, the user token and application token are carried by using database statements or data annotations. For another example, in the scenario of using big data message queues, such as kafka message queues, when using this message queue to transmit data, a standard data block containing a token is written, for example, client_id bearer token technology and message header bearer token are used. The message header bearer token is, for example, in the way of generating a kafka message header containing a token, and adding the kafka message header containing the token to the message. For another example, in the case of using the file transfer protocol, the file extension header is used to bear the token. The interface machine inserts the token of the target transfer file into the file header. After the inspection point receives the file, it obtains the token from the file header.

[0095] However, the method of inserting tokens at the application layer and carrying tokens in application tokens has limitations in application scenarios. For example, the method of inserting tokens in HTTP headers is only applicable to HTTP protocol scenarios, and is difficult to apply to non-HTTP protocol scenarios. The method of inserting tokens in file headers is only applicable to file transfer protocols such as the file transfer protocol (FTP) protocol, and is difficult to apply to non-FTP protocol scenarios. The method of inserting tokens in database statements or data comments is only applicable to database application scenarios, and is difficult to apply to non-database application scenarios.

[0096] In addition, since different application layer protocols use different token carrying methods, different business applications need to use corresponding token carrying methods separately, which makes it difficult to standardize the token carrying methods and also makes it difficult to transform applications to connect to zero trust.

[0097] In addition, for database applications, such as MySQL or Oracle, once the database version is updated, it may not be possible to insert a token in the comment field, making the zero-trust solution unavailable.

[0098] Based on a series of problems caused by inserting and carrying tokens at the application layer, in a possible implementation of the present application, the network device inserts the token in the APN message header, and carries the token through the APN message header, so as to realize the insertion and carrying of the token from the application layer to the network layer, so that there is no need to pay attention to the differences in upper-layer applications, and various applications can be flexibly adapted. Since the application layer does not need to bear the task of inserting and carrying tokens, the workload of business application transformation caused by carrying tokens is also reduced.

[0099] For example, it can flexibly adapt to Web applications (Browser / Server, B / S) based on the HTTP protocol browser / server mode and Client / Server (C / S) applications based on non-HTTP protocol scenarios such as Remote Desktop Protocol (RDP), FTP, and database operations, meeting the needs of zero-trust access control in multiple scenarios such as Web application access, C / S application access, cloud desktop video streaming, cross-network data exchange, database calls, and IoT access, with basically no need for targeted development and adaptation of applications.

[0100] In addition, considering that upgrading from IPv4 to IPv6 is a trend in network and security infrastructure construction, and the APN header is a header in the IPv6 protocol, the method of inserting tokens in the APN header is suitable for various network deployment scenarios that support the IPv6 protocol. It is more universal and easier to standardize, and can be used as a universal token insertion method in the IPv6 protocol.

[0101] The following example uses a zero-trust cross-network data exchange scenario.

[0102] For example, after the user and the application pass the identity authentication, the network controller sends the user token and the application token to the access router or switch. The access router or switch receives the user token and the application token from the network controller, inserts the user token and the application token into the APN ID, and forwards the data message carrying the APN ID of the user token and the application token. When the forwarding path of the data message passes through the policy execution point (PEP), the policy execution point parses the user token and the application token from the APN ID. The policy execution point generates an authentication request based on the parsed user token and application token. The policy execution point sends an authentication request to the identity and access management (IAM) node, and the authentication request includes the user token and the application token. The IAM node receives the authentication request and performs a permission check on the user token and the application token. If the result of the permission check is permission, the policy execution node forwards the data message, thereby allowing access; if the result of the permission check is no permission, the policy execution node discards the data message, thereby preventing access.

[0103] For example, please refer to the attached Figure 2 , attached Figure 2 is a schematic diagram of an application scenario provided by an embodiment of the present application, Figure 2 The illustrated scenario includes an external network 40 and an internal network 30. An external network application 401 is deployed in the external network 40. A switch 34, an external network application front-end 38, an external data exchange system 36, an internal data exchange system 39, an internal network application front-end 33, a policy engine 57, a policy manager 52, a switch 311, a policy execution node 35, a data storage node 312, and an internal network application 31 are deployed in the internal network 30. The policy manager 52 includes a network controller 521 and an IAM node 522.

[0104] The network controller 521 and the IAM node 522 may be combined. For example, the network controller 521 and the IAM node 522 are integrated into one physical device, for example, the IAM node 522 and the network controller 521 are both provided in one controller device. The network controller 521 and the IAM node 522 may also be two independent physical devices, and the network controller 521 and the IAM node 522 communicate through a network. The policy execution node 35 may be a device for protecting network security. For example, the policy execution node 35 is a router, a switch, a firewall or a gateway.

[0105] Attached Figure 2 The process in the illustrated scenario includes the following steps.

[0106] S210, the intranet application 31 sends an identity registration request to the policy manager 52, and the identity registration request includes the identity information of the intranet application 31. The identity information of the intranet application 31 includes the application identifier of the intranet application 31, the organizational identifier of the intranet application 31, and the authority of the intranet application 31 to transfer files. The application identifier of the intranet application 31 is used to identify the intranet application 31. The authority to transfer files is used to indicate under what circumstances the intranet application 31 can transfer files to other applications or users. The policy manager 52 receives the identity registration request from the intranet application 31, and in response to the identity registration request, the policy manager 52 registers the identity information of the intranet application 31, so as to perform identity authentication and authority verification based on the identity information of the intranet application 31 in the future.

[0107] S220, after the intranet application front-end 33 receives the file sent by the internal data exchange system 39 (the file can be replaced by other types of data), the intranet application front-end 33 generates an authentication request, and the intranet application front-end 33 sends the authentication request to the IAM node 522, and the authentication request includes the identity information of the intranet application 31. In response to the authentication request, the IAM node 522 obtains the identity information of the intranet application 31 from the authentication request, and authenticates the intranet application 31 based on the identity information of the intranet application 31. Specifically, the IAM node 522 matches the identity information of the intranet application 31 carried in the authentication request with the identity information of the intranet application 31 in the registration process in S210. If the IAM node 522 determines that the identity information of the intranet application 31 carried in the authentication request matches the identity information of the intranet application 31 in the registration process in S210, the IAM node 522 authenticates the identity information of the intranet application 31. The IAM node 522 generates an application token based on the identity information of the intranet application 31, and the application token includes the identity information of the intranet application 31.

[0108] S230, when the IAM node 522 determines that the authentication is successful, the IAM node 522 generates an application token for the intranet application 31, and the application token includes the identity information of the intranet application 31. The IAM node 522 sends the application token of the intranet application 31 to the network controller 521 through the token query interface. The network controller 521 sends the application token of the intranet application 31 to the switch 34.

[0109] S240, the switch 34 adds the application token of the intranet application 31 to the APN ID, adds the APN ID including the application token to the first data message carrying the file in the payload, and obtains a second data message, the second data message including the payload and the APN ID, the payload including the file, and the APN ID including the token. The switch 34 sends the second data message to the policy execution node 35.

[0110] S250, the policy execution node 35 (PEP) receives the second data message, and the policy execution node 35 parses the application token from the APN ID of the second data message. The policy execution node 35 generates an authentication request based on the application token, and the authentication request includes the application token. The policy execution node 35 sends the authentication request to the IAM node 522. The IAM node 522 receives the authentication request, obtains the application token from the authentication request, and performs authentication based on the application token. The IAM node 522 sends an authentication response to the policy execution node 35 based on the authentication result.

[0111] S260, the policy execution node 35 receives the authentication response from the IAM node 522. If the authentication response indicates that the application token authentication is successful, the policy execution node 35 (PEP) sends the file carried in the data message to the intranet application 31.

[0112] S270 , risk handling: the policy engine 57 detects the host and network security risks of the intranet application 31 . In response to detecting high-risk behavior, the policy engine 57 reduces the risk score of the intranet application 31 , and sends the risk score of the intranet application 31 to the policy manager 52 .

[0113] S280, the policy manager 52 changes the permissions of the intranet application 31 according to the risk score of the intranet application 31. The policy manager 52 sends the policy to the policy execution node 35, which blocks it.

[0114] The following two specific scenarios are combined to explain the above Figure 2 The illustrated embodiments are illustrative.

[0115] Example 1

[0116] Cross-network data one-way import scenario

[0117] Please refer to the attached Figure 3 , attached Figure 3 This is a schematic diagram of a scenario of one-way import of cross-network data provided by an embodiment of the present application. For example, the one-way import scenario of cross-network data is that data is transmitted from an external network 40 to a data center 302 in an intranet through a cross-network data exchange system, and the transmitted data includes files, database synchronization, message queues, or video streams. For example, the process of one-way import of cross-network data is as follows.

[0118] S3a, the external network application front end 38 receives data from the external network 40. The external network application front end 38 signs the data to obtain data containing the signature. The external network application front end 38 sends the data carrying the signature to the external data exchange system 36.

[0119] S3b, the external data exchange system 36 receives the data sent by the external network application front-end 38. After the external data exchange system 36 performs security checks on the data and strips the outer layer protocol header, it sends the data that has passed the security check and stripped the outer layer protocol header to the one-way import system 37. The one-way import system 37 receives the data and sends the data to the internal data exchange system 39. The internal data exchange system 39 forwards the data to the internal network application front-end 33.

[0120] S3c, the intranet application front-end 33 verifies the data signature carried by the data. In addition, the intranet application front-end 33 generates an authentication request, and sends the authentication request to the IAM node 522, and the authentication request includes the identity information of the intranet application 31. The IAM node 522 responds to the authentication request, obtains the identity information of the intranet application 31 from the authentication request, and authenticates the intranet application 31 based on the identity information of the intranet application 31. The IAM node 522 generates an application token based on the identity information of the intranet application 31, and the application token includes the identity information of the intranet application 31.

[0121] S3d, the IAM node 522 sends the application token to the network controller 521 through the token query interface. The network controller 521 receives the application token from the IAM node 522, and the network controller 521 sends the application token to the switch 34 close to the intranet application front-end 33. The switch 34 receives the application token from the network controller 521. In addition, the switch 34 receives the first data message from the external network 40 sent by the internal data exchange system 39. The switch 34 inserts the application token into the APN ID in the first data message to obtain the second data message. The APN ID contains information such as APP-group-ID, user-group-ID and SLA by default. The switch 34 can insert the application token into the APP-group-ID. If there is a user token, the switch 34 can insert the user token into the user-group-ID. Carry the token through the APN ID. The switch 34 sends the second data message to the policy execution node 35.

[0122] S3e, the policy execution node 35 (PEP) receives the second data message. The policy execution node 35 parses the APN ID of the second data message to obtain the application token. The policy execution node 35 generates an authentication request based on the application token, and the authentication request includes the application token. The IAM node 522 receives the authentication request, obtains the application token from the authentication request, performs authentication based on the application token, and sends an authentication response to the policy execution node 35. For example, in response to determining that the token has not expired and the token contains the correct signature, the IAM node 522 generates an authentication response indicating that it has permission. For another example, in response to determining that the token has expired, has been revoked, the token does not contain the correct signature, or the token cannot be found, the IAM node 522 confirms that the token is invalid, then the authentication response generated by the IAM node 522 indicates that it has permission.

[0123] S3f, in response to the authentication response indicating permission, the policy execution node 35 sends the second data message to the intranet application 31 in the data center 302. Alternatively, in response to the authentication response indicating no permission, the policy execution node 35 discards the second data message, thereby blocking further transmission of the second data message.

[0124] There are usually multiple network devices between the switch 34 into which the APN ID is inserted and the firewall serving as the policy execution node 35. Figure 3 The scenario in which the switch 34 is adjacent to the policy execution node 35 is only for illustration.

[0125] Cross-network data one-way export scenario

[0126] The cross-network data unidirectional export scenario refers to the data transmission from the data center 302 in the intranet to the external network 40, and the transmitted data includes files, database synchronization, message queues or video streams. For example, please refer to the attached Figure 4 , attached Figure 4 This is a schematic diagram of a one-way cross-network data export scenario provided in an embodiment of the present application. The detailed process of one-way cross-network data export is as follows.

[0127] S4a, the intranet application 31 signs the data transmitted to the external network 40 to obtain data containing the signature. The intranet application 31 sends an authentication request to the IAM node 522, and the authentication request includes the data containing the signature. The IAM node 522 receives the authentication request and authenticates the data containing the signature. If the authentication is successful, the IAM node 522 obtains the application token, and the application token includes the identity information of the intranet application 31.

[0128] S4b, the IAM node 522 sends the application token to the network controller 521. The network controller 521 sends the application token to the switch 316. The switch 316 receives the application token. The switch 316 receives a first data message from the intranet application 31, and the first data message includes data transmitted by the intranet application 31 to the external network 40. The switch 31 obtains the APN ID based on the first data message, and the switch 316 inserts the application token into the APN ID. The switch 316 inserts the application token including the APN ID into the first data message to obtain a second data message, and the second data message includes the APN ID, and the APN ID includes the application token. The switch 316 sends the second data message to the security boundary.

[0129] S4c, the policy execution node 35 (PEP) receives the second data message sent by the switch 316. The policy execution node 35 parses the application token from the APN ID of the second data message. The policy execution node 35 generates an authentication request based on the application token, and the authentication request includes the application token. The policy execution node 35 sends the authentication request to the IAM node 522, and the IAM node 522 receives the authentication request, obtains the application token from the authentication request, and performs authentication based on the application token. The IAM node 522 sends an authentication response to the policy execution node 35 based on the authentication result. For example, when the IAM node 522 responds to determining that the application token has not expired and the signature contained in the application token is correct, the authentication response indicates that there is permission. For another example, when the IAM node 522 responds to determining that the token has expired, has been revoked, the token does not contain the correct signature, or the token cannot be found, the IAM node 522 will confirm that the token is invalid, and the authentication response indicates that there is no permission. In response to the authentication response indicating that there is permission, the policy execution node 35 sends the second data message to the switch 34. The switch 34 forwards the second data message to the inner data switching system 39. Alternatively, in response to the authentication response indicating no authority, the policy execution node 35 discards the second data message, thereby blocking the transmission of the second data message.

[0130] S4d, after authentication, the inner data exchange system 39 receives the second data message, the inner data exchange system 39 obtains data from the second data message, the inner data exchange system 39 performs a security check on the data and strips off the outer protocol header, and then sends the data that has passed the security check and stripped off the outer protocol header to the one-way export system 32.

[0131] S4e, the one-way export system 32 sends the data to the external data exchange system 36. The external data exchange system 36 forwards the data to the external network application front-end 38.

[0132] S4f, the external network application front-end 38 transmits the data to the external network 40.

[0133] There are usually multiple network devices between the switch 316 into which the APN ID is inserted and the firewall serving as the policy execution node 35. Figure 4 The scenario in which the switch 316 is adjacent to the policy execution node 35 is only for illustration.

[0134] This embodiment provides a universal token carrying method that can flexibly adapt to non-HTTP protocols such as RDP, FTP, and database operations to meet typical business scenarios such as video streaming, cross-network data file transmission, and database calls. In addition, this method does not require targeted adaptation of applications, reduces the difficulty of zero-trust docking, and is conducive to the promotion of zero-trust to all-scenario solutions.

[0135] Cross-network data exchange is only a specific example of an application scenario of an embodiment of the present application. The embodiment of the present application can be used as a general token carrying method and token transmission method, and can be applied to any network that supports IPv6 (such as a network that supports APN6). The embodiment of the present application can also be applied to other business scenarios besides cross-network data exchange. For example, the embodiment of the present application can also be applied to typical business scenarios such as IT and IoT device network access control, user access to applications, and application calls to API services. For example, in the scenario of IT and IoT device network access control, the network device can insert the token of the device requesting access in the APN ID, and the token includes the identity of the device. For another example, in the scenario of application calls to API services, the network device can insert the application's token in the APN ID. For another example, in the scenario of user access to applications, the network device can insert the application's token in the APN ID.

[0136] Attached Figure 5 is a flow chart of a data message forwarding method provided in an embodiment of the present application, Figure 5 The method shown includes the following steps.

[0137] Attached Figure 5 The method shown involves interaction between multiple network devices. In order to distinguish different network devices, "first network device" and "second network device" are used to distinguish and describe multiple different network devices.

[0138] The first network device and the second network device are two-hop devices that the forwarding path of the data message passes through. The first network device is an upstream node of the forwarding path of the data message. In other words, the first network device is closer to the source end of the data, and the second network device is closer to the destination end of the data. The first network device and the second network device are connected through a communication network. For example, the first network device and the second network device are connected through one or more network devices serving as intermediate nodes. The one or more intermediate nodes are used to forward the data message sent by the first network device to the second network device.

[0139] In the process of token-based access control, the role of the first network device is the inserter of the token, and the first network device is used to insert the token into the data message. The role of the second network device is a node that performs access control based on the authentication result of the token. The first network device is, for example, a router, a switch, a firewall, or a gateway. The second network device is, for example, a router, a switch, a firewall, or a gateway.

[0140] Attached Figure 5 The network deployment scenario based on the method shown in the figure is optionally as shown in the above-mentioned appendix. Figure 2 For example, in combination with the Figure 2 Come and see, Figure 5 The first network device in the method shown is attached Figure 2 Switch 34. Figure 5 The second network device in the method shown is attached Figure 2 Middle policy execution node 35.

[0141] Attached Figure 5 The network deployment scenario based on the method shown in the figure is optionally as shown in the above-mentioned appendix. Figure 3 For example, in combination with the Figure 3 Come and see, Figure 5 The first network device in the method shown is attached Figure 3 Switch 34. Figure 5 The second network device in the method shown is attached Figure 3 Middle policy execution node 35.

[0142] Attached Figure 5 The network deployment scenario based on the method shown in the figure is optionally as shown in the above-mentioned appendix. Figure 4 For example, in combination with the Figure 4 Come and see, Figure 5 The first network device in the method shown is attached Figure 4 Switch 316. Figure 5 The second network device in the method shown is an attached Figure 4 Middle policy execution node 35.

[0143] Attached Figure 5 The method shown involves data messages before and after the token is inserted. In order to distinguish different data messages, the data message before the token is inserted is described as "first data message", and the data message after the token is inserted is described as "second data message".

[0144] S510: A first network device obtains a first data message.

[0145] Regarding the content and format of the first data message, for example, the first data message includes application layer data, and the application layer data includes an application layer protocol header and application data or application instructions. In the scenario of cross-network communication between different applications, the format and content of the first data message may be different. For example, in the scenario of web application, the first data message includes an HTTP header and an HTTP body. For another example, in the scenario of file transmission, the first data message includes a file transfer protocol header (such as an FTP protocol header) and binary data of the file. For another example, in the scenario of database synchronization, the first data message includes a database protocol header (such as a MySQL protocol header) and a data operation statement or data returned for a data operation statement. For another example, in the scenario of a message queue, the first data message includes a message header (such as an AMQP protocol header) and the content of the message. For another example, in the scenario of video transmission, the first data message includes a video transmission protocol header (such as an RTSP protocol header) and video stream data. For another example, in the scenario of Internet of Things access, the first data message includes an Internet of Things protocol header (such as an MQTT protocol header) and data of an Internet of Things device. For another example, in a cloud desktop scenario, the first data message includes a desktop protocol header (such as an RDP header) and desktop data. Through the token insertion method provided in this embodiment, since the token is inserted and carried in the outer layer of the application layer protocol header in the first data message, there is no need to perceive the application layer protocol header and the data or instructions and differences of the application in the first data message, and it can be compatible with various application layer communication scenarios such as the above-mentioned web application scenario, file transfer scenario, database synchronization scenario, video transmission scenario, IoT access scenario, and cloud desktop scenario, without the need for targeted adaptation for different applications, and meet the needs of various applications for cross-network access control.

[0146] Regarding the data source of the first data message, for example, in a data import scenario, the first network device receives the first data message from the second network. The source IP address of the first data message indicates the user device deployed in the second network. The destination IP address of the first data message indicates the server deployed in the first network. The second network is different from the first network. For example, in combination with the attached Figure 2 From a scenario perspective, the first network device receives a first data packet from an external network application 401 , the source IP address of the first data packet indicates the IP address of the server where the external network application 401 is located, and the destination IP address of the first data packet indicates the IP address of the user device where the internal network application 31 is located.

[0147] For another example, in a data export scenario, a first network device receives a first data message from a first network. The source IP address of the first data message indicates a server deployed in the first network. The destination IP address of the first data message indicates a user device deployed in a second network. Figure 4From a scenario perspective, the first network device receives a first data packet from the intranet application 31 , the source IP address of the first data packet indicates the IP address of the server where the intranet application 31 is located, and the destination IP address of the first data packet indicates the IP address of the user device where the external network application 401 is located.

[0148] Regarding the deployment location of the first network device, for example, the first network device is deployed inside the first network, and the first network device is an intermediate node of the forwarding path that the first data message passes through in the first network. Alternatively, the first network device is deployed at the entrance of the first network, and the first network device is the head node of the forwarding path that the first data message passes through in the first network.

[0149] The first data message may be an IPv6 message. For example, the outer layer of the application layer protocol header in the first data message includes an IPv6 header. The first data message may also be an IPv4 message. For example, the outer layer of the application layer protocol header in the first data message includes an IPv4 header.

[0150] This embodiment can be applied to insert a token into each data message in a data stream. For ease of understanding, the token insertion into the first data message is used as an example for explanation. The token insertion method for other data messages other than the first data message in the data stream can refer to the token insertion method for the first data message. In this way, since each data message in the data stream carries a token, it is suitable for a packet-by-packet verification scenario.

[0151] This embodiment can also be applied to inserting a token into a specific data message in a data stream, for example, inserting a token into the first data message in a data stream. If the token authentication in the first data message passes, there is no need to authenticate the tokens inserted into other data messages in the same data stream. In this scenario, the first data message is the first data message in the data stream. In this way, it is applicable to the scenario of stream-by-stream authentication.

[0152] S520: The first network device obtains a second data packet based on the first data packet and the token.

[0153] With respect to the content of the second data message, the second data message includes the payload of the first data message and the token. The token in the second data message includes at least one of an application token or a user token. The application token is used to identify the application identity, and the user token is used to identify the user identity. For example, the first network device adds at least one of the application token or the user token to the first data message to obtain the second data message.

[0154] For the encapsulation format of the second data message, for example, the second data message is an IPv6 message. For example, please refer to the attached Figure 1 , the second data message has Figure 1The format of the IPv6 message is shown. The second data message includes an IPv6 header, an APN header, and an IPv6 payload field. The IPv6 header is encapsulated in the outer layer of the APN header and the IPv6 payload field, and the APN header is encapsulated in the outer layer of the IPv6 payload field.

[0155] The APN header of the second data message includes a token. By using the APN header to carry the token, since the purpose of the APN header defined in the standard is to carry information related to application identification, the APN header is used to carry the token, so that the carrying method of the token is more consistent with the purpose defined in the standard, and there is enough space in the APN header.

[0156] Regarding the carrying position of the token in the APN header, for example, the APN-ID field of the APN header of the second data message includes the token. For example, the APN-ID field of the APN header of the second data message includes the APP-group-ID field and the user-group-ID field, the APP-group-ID field includes the application token, and the user-group-ID field includes the user token. In this way, since the purpose of the APP-group-ID field in the standard is to carry the identifier of the application group, the purpose of the user-group-ID field in the standard is to carry the identifier of the user group, and the application token is used as a credential to identify the application identity, and the user token is used as a credential to identify the user identity, the APP-group-ID field is used to carry the application token, and the user-group-ID field is used to carry the user token, so that the carrying method of the application token is more consistent with the purpose defined by the standard for the APP-group-ID field, the carrying method of the user token is more consistent with the purpose defined by the standard for the user-group-ID field, and there is enough space in the APN header.

[0157] In some other embodiments, the APN-ID field of the APN header of the second data message includes a reserved field, and the reserved field includes a token. For another example, the APN-para field in the APN header of the second data message includes a token. For another example, the intent field in the APN header of the second data message includes a token. For another example, the Flags field in the APN header of the second data message includes a token.

[0158] The following is an example of how to generate the APN header in the second data message.

[0159] Method 1: The first network device inserts an APN header containing a token

[0160] Corresponding to the APN6 network side solution, the first network device performs application identification on the first data message based on the five-tuple information and / or the second-layer interface information in the first data message to obtain the APN-ID; the first network device generates an APN header containing the token based on the APN-ID and the token. The first network device adds the APN header containing the token to the first data message to obtain a second data message in which the APN header contains the token. The five-tuple information refers to the source IP address, source port number, destination IP address, destination port number and protocol type. APN-ID includes user-group-ID and APP-group-ID.

[0161] Regarding the implementation details of generating the APN header, for example, the first network device determines the source application of the first data message based on at least one of the application layer protocol type or the source port number in the first data message, and generates the APP-group-ID in the APN header based on the source application of the first data message. For another example, the first network device determines the source user of the first data message based on the source IP address in the first data message, and generates the user-group-ID in the APN header based on the source user of the first data message. For another example, the first network device determines the destination user of the first data message based on the destination IP address in the first data message, and generates the user-group-ID in the APN header based on the destination user of the first data message. For another example, the first network device determines the Layer 2 interface group corresponding to the first data message based on the MAC address, VLAN ID or subnet number, and determines the corresponding APP-group-ID based on the correspondence between the Layer 2 interface group and the APP-group-ID.

[0162] In the above manner, since the network device inserts the token and the APN header, there is no need to require the device running the service application to support the insertion of the APN header, thereby reducing the requirements for the application and reducing the complexity of deployment.

[0163] Method 2: The first network device inserts a token into the APN header included in the first data message.

[0164] For example, an upstream device of the first network device generates an APN header, a first data packet received by the first network device already includes the APN header, and the first network device adds a token to the APN header in the first data packet to obtain a second data packet including the token in the APN header.

[0165] In an exemplary scenario, after receiving the third data message from the second network, the third network device performs application identification on the third data message to obtain an application identification result; the third network device generates an APN header based on the application identification result. The third network device adds the APN header to the third data message to obtain a first data message including the APN header. The third network device sends the first data message including the APN header to the first network device, and the first network device receives the first data message including the APN header.

[0166] The third network device may be an entry node of the first network, a gateway or an access router of the first network, or an intranet application front-end.

[0167] The type of token in the second data message may vary in different scenarios. For example, the second data message may include an application token but not a user token. For example, in a scenario where a first application accesses a second application, the second data message includes a token of the first application or a token of the second application. As another example, the second data message may include an application token and a user token. For example, in a scenario where a first user accesses a second application through a first application, the second data message includes a user token of the first user and a token of the first application. In addition, if the application token includes user identity information, the application token may also be carried instead of the user token.

[0168] Regarding the method of obtaining the token, in one possible implementation, the first network device receives the token from the controller. In another possible implementation, the first network device receives the token from the IAM node.

[0169] The first data message is, for example, the content of the IPv6 payload field of the second data message. For example, the IPv6 payload field in the second data message includes the application layer protocol header of the first data message and the data or instructions of the application. For example, in the scenario of web application, the IPv6 payload field of the second data message includes the HTTP header and HTTP body in the first data message. For another example, in the scenario of transferring files, the IPv6 payload field of the second data message includes the file transfer protocol header in the first data message and the binary data of the file. For another example, in the scenario of database synchronization, the IPv6 payload field of the second data message includes the database protocol header and the data operation statement in the first data message or the data returned for the data operation statement. For another example, in the scenario of message queue, the IPv6 payload field of the second data message includes the message header and the content of the message in the first data message. For another example, in the cloud desktop scenario, the IPv6 payload field of the second data message includes the desktop protocol header and desktop data in the first data message. For another example, in the scenario of IoT access, the IPv6 payload field of the second data message includes the IoT protocol header in the first data message and the data of the IoT device.

[0170] The IPv6 header in the second data message may be generated by the first network device and added to the message. For example, please refer to the attached Figure 2 , the first network device is, for example, Figure 2 In the switch 34, the first network device generates an IPv6 header and an APN header, takes the first data message as a whole as the IPv6 payload, and adds the IPv6 header and the APN header to the outer layer of the first data message to obtain a second data message including the IPv6 header and the APN header.

[0171] The IPv6 header in the second data message may also be generated by the upstream device of the first network device and added to the message. For another example, the first data message received by the first network device includes an IPv6 header, and the first network device inserts an APN header between the IPv6 header and the IPv6 payload in the first data message to obtain a second data message including an IPv6 header and an APN header.

[0172] S530: The first network device sends a second data packet.

[0173] S540: The second network device receives a second data packet.

[0174] The second network device can obtain the token from the second data message, and perform corresponding processing actions based on the authentication result of the token. For example, the second network device generates an authentication request based on the token, and the second network device sends the authentication request to the IAM node. The IAM node authenticates the token. The IAM node generates an authentication response based on the authentication result, and the IAM node sends the authentication response to the second network device. If the authentication response indicates that the token has passed the authentication, the second network device executes S550. If the authentication response indicates that the token has not passed the authentication, the second network device executes S560.

[0175] S550: In response to the token passing the authentication, the second network device sends a third data message.

[0176] The third data message includes application layer data. The third data message and the second data message may be the same message. For example, when the token passes the authentication, the second network device does not modify the second data message and directly forwards the received second data message. In this way, the third data message may include the token, so that the application receiving the third data message may also use the token for further improvement.

[0177] The third data message may also not include the token. For example, the second network device strips the APN message header from the second data message to obtain the third data message that does not include the APN message header. Alternatively, the second network device strips the token from the APN message header of the second data message to obtain the third data message that includes the APN message header but does not include the token.

[0178] S560: In response to the token failing authentication, the second network device discards the second data packet.

[0179] By discarding the message if the token fails authentication, network security risks are reduced.

[0180] The method provided in this embodiment inserts tokens and carries tokens in the APN message header, thereby sinking the insertion and carrying of tokens from the application layer to the network layer, thereby reducing the limitations of applicable scenarios caused by inserting tokens and carrying tokens in the application layer protocol header to a certain extent, and basically eliminating the need for targeted adaptation for specific types of applications, thereby reducing the difficulty of zero-trust application access.

[0181] Attached Figure 6 6 is a schematic diagram of the structure of a data message processing device 600 provided in an embodiment of the present application. The data message processing device 600 includes an obtaining module 602 and a sending module 603. Optionally, the device 600 also includes a receiving module 601.

[0182] Optionally, in combination with Figure 2 According to the scene shown, Figure 6The device 600 shown in the attached Figure 2 The receiving module 601 is used to receive the token sent by the network controller 521 in S230. The obtaining module 602 is used to add the token in S240. The sending module 603 is used to send a message including the token in S240.

[0183] Optionally, in combination with Figure 3 According to the scene shown, Figure 6 The device 600 shown in the attached Figure 3 The receiving module 601 is used to receive the token sent by the network controller 521 in S3d. The obtaining module 602 is used to add the token in S3d. The sending module 603 is used to send a message including the token in S3d.

[0184] Optionally, in combination with Figure 4 According to the scene shown, Figure 6 The device 600 shown in the attached Figure 4 The receiving module 601 is used to receive the token sent by the network controller 521 in S4b. The obtaining module 602 is used to add the token in S4b. The sending module 603 is used to send a message including the token in S4b.

[0185] Optionally, in combination with Figure 5 Come and see, Figure 6 The data message processing device 600 shown is arranged in the attached Figure 5 On the first network device in the method shown, the obtaining module 602 is used to execute S510 and S520. The sending module 603 is used to execute S530.

[0186] Attached Figure 6 The device embodiments described are merely illustrative. For example, the division of the above units is only a logical functional division. There may be other division methods in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0187] Each unit in the device 600 is implemented in whole or in part by software, hardware, firmware or any combination thereof.

[0188] In conjunction with the network device 800 described below, some possible implementations of the various functional units in the apparatus 600 using hardware or software are described below.

[0189] In the case of software implementation, for example, the acquisition module 602 is provided by the attached Figure 8At least one processor 801 in the processor 801 reads the program code stored in the memory 802 and generates a software function unit to implement it.

[0190] In the case of hardware implementation, for example, Figure 6 The above-mentioned units are implemented by different hardware in the network device 800, for example, the acquisition module 602 is implemented by the attached Figure 8 The receiving module 601 and the sending module 603 are implemented by a part of the processing resources of at least one processor 801 (for example, one core or two cores of a multi-core processor), or by a programmable device such as a field-programmable gate array (FPGA) or a coprocessor. Figure 8 The network interface 803 in is implemented.

[0191] Attached Figure 7 700 is a schematic diagram of a data message processing device 700 provided in an embodiment of the present application. The device 700 includes a receiving module 701 and a sending module 703 .

[0192] Optionally, in combination with Figure 2 According to the scene shown, Figure 7 The device 700 shown is provided in the attached Figure 2 The receiving module 701 is used to receive the token sent by the switch 34 in S240. The sending module 703 is used to send the token to the intranet application 31 in S260.

[0193] Optionally, in combination with Figure 3 According to the scene shown, Figure 7 The device 700 shown is provided in the attached Figure 3 The receiving module 701 is used to receive the token sent by the switch 34 in S240. The sending module 703 is used to send a message including the token in S260.

[0194] Optionally, in combination with Figure 4 According to the scene shown, Figure 7 The device 700 shown is provided in the attached Figure 4 The receiving module 701 is used to receive the token sent by the network controller 521 in S4b. The receiving module 701 is used to add the token in S4b. The sending module 703 is used to send a message including the token in S4b.

[0195] Optionally, in combination with Figure 5 Come and see, Figure 7 The device 700 shown is provided in the attached Figure 5On the second network device in the method shown, the receiving module 701 is used to execute S540, and the sending module 703 is used to execute S550.

[0196] Attached Figure 7 The device embodiments described are merely illustrative. For example, the division of the above units is only a logical functional division. There may be other division methods in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0197] Each unit in the device 700 is implemented in whole or in part by software, hardware, firmware or any combination thereof.

[0198] In conjunction with the network device 800 described below, some possible implementations of the various functional units in the apparatus 700 using hardware or software are described below.

[0199] In the case of software implementation, for example, the acquisition module 702 is provided by the attached Figure 8 At least one processor 801 in the processor 801 reads the program code stored in the memory 802 and generates a software function unit to implement it.

[0200] In the case of hardware implementation, for example, Figure 6 The above-mentioned units are implemented by different hardware in the network device 800, for example, the acquisition module 702 is implemented by the attached Figure 8 The receiving module 701 and the sending module 703 are implemented by a part of the processing resources of at least one processor 801 (for example, one core or two cores of a multi-core processor), or by a programmable device such as a field-programmable gate array (FPGA) or a coprocessor. Figure 8 The network interface 803 in is implemented.

[0201] Attached Figure 8 It is a structural diagram of a network device 800 provided in an embodiment of the present application.

[0202] The network device 800 includes a processor 801 , a memory 802 , and at least one network interface 803 .

[0203] Optionally, in combination with Figure 2 According to the scene shown, Figure 8 The network device 800 shown is attached Figure 2The switch 34. The network interface 803 is used to receive the token sent by the network controller 521 in S230. The processor 801 is used to add the token in S240. The network interface 803 is used to send a message including the token in S240.

[0204] Optionally, in combination with Figure 3 According to the scene shown, Figure 8 The network device 800 shown is attached Figure 3 The switch 34. The network interface 803 is used to receive the token sent by the network controller 521 in S3d. The processor 801 is used to add the token in S3d. The network interface 803 is used to send a message including the token in S3d.

[0205] Optionally, in combination with Figure 4 According to the scene shown, Figure 8 The network device 800 shown is attached Figure 4 The switch 316 of S4b. The network interface 803 is used to receive the token sent by the network controller 521 in S4b. The processor 801 is used to add the token in S4b. The network interface 803 is used to send a message including the token in S4b.

[0206] Optionally, in combination with Figure 5 Come and see, Figure 8 The network device 800 shown is attached Figure 5 The first network device in the method shown. The processor 801 is used to execute S510 and S520. The network interface 803 is used to execute S530.

[0207] Optionally, in combination with Figure 2 According to the scene shown, Figure 8 The network device 800 shown is attached Figure 2 The network interface 803 is used to receive the token sent by the switch 34 in S240. The processor 801 is used to instruct the network interface 803 to send the token to the intranet application 31 in S260.

[0208] Optionally, in combination with Figure 3 According to the scene shown, Figure 8 The network device 800 shown is attached Figure 3 The network interface 803 is used to receive the token sent by the switch 34 in S240. The processor 801 is used to instruct the network interface 803 to send a message including the token in S260.

[0209] Optionally, in combination with Figure 4 According to the scene shown, Figure 8 The network device 800 shown is attached Figure 4The network interface 803 is used to receive the token sent by the network controller 521 in S4b. The network interface 803 is used to add the token in S4b. The processor 801 is used to instruct the network interface 803 to send a message including the token in S4b.

[0210] Optionally, in combination with Figure 5 Come and see, Figure 8 The network device 800 shown is attached Figure 5 The second network device in the method shown. The network interface 803 is used to execute S540. The processor 801 is used to instruct the network interface 803 to execute S550.

[0211] The processor 801 is, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 801 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0212] The memory 802 is, for example, a read-only memory (ROM) or other static storage device that can store static information and instructions, a random access memory (RAM) or other dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. Optionally, the memory 802 exists independently and is connected to the processor 801 through the internal connection 804. Alternatively, the memory 802 and the processor 801 are optionally integrated together.

[0213] The network interface 803 uses any transceiver-like device for communicating with other devices or communication networks. The network interface 803 includes, for example, at least one of a wired network interface or a wireless network interface. The wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface, or a combination thereof. The wireless network interface is, for example, a wireless local area network (WLAN) interface, a cellular network interface, or a combination thereof.

[0214] In some embodiments, the processor 801 includes one or more CPUs, such as Figure 8 CPU0 and CPU1 are shown in the figure.

[0215] In some embodiments, the network device 800 optionally includes multiple processors, such as the attached Figure 8 801 and processor 805 are shown in FIG. Each of these processors is, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU). The processor here optionally refers to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0216] In some embodiments, the network device 800 further includes an internal connection 804. The processor 801, the memory 802, and the at least one network interface 803 are connected via the internal connection 804. The internal connection 804 includes a path to transmit information between the above components. Optionally, the internal connection 804 is a single board or a bus. Optionally, the internal connection 804 is divided into an address bus, a data bus, a control bus, etc.

[0217] In some embodiments, the network device 800 further includes an input / output interface 806. The input / output interface 806 is connected to the internal connection 804.

[0218] Optionally, the processor 801 implements the method in the above embodiment by reading the program code stored in the memory 802, or the processor 801 implements the method in the above embodiment by the program code stored internally. In the case where the processor 801 implements the method in the above embodiment by reading the program code stored in the memory 802, the memory 802 stores the program code 810 that implements the method provided in the embodiment of the present application.

[0219] For more details on how the processor 801 implements the above functions, please refer to the descriptions in the previous method embodiments, which will not be repeated here.

[0220] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0221] A refers to B, which means that A is the same as B or A is a simple variant of B.

[0222] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of objects, and cannot be understood as indicating or implying relative importance. For example, a first network device and a second network device are used to distinguish different network devices, rather than to describe a specific order of network devices, and cannot be understood as meaning that the first network device is more important than the second network device.

[0223] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function described in accordance with the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. Available media can be magnetic media, (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state hard disk Solid State Disk (SSD)), etc.

[0224] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data message processing method, characterized in that: The method comprises: The first network device obtains a first data message, wherein the first data message includes application layer data; The first network device obtains a second data packet based on the first data packet and the token, where the second data packet includes the application layer data and an application-aware network APN header, and the APN header includes the token; The first network device sends the second data packet.

2. The method according to claim 1, characterized in that The APN message header includes an application-aware network identifier APN-ID field, and the APN-ID field includes the token.

3. The method according to claim 1 or 2, characterized in that: The token includes an application token, the APN message header includes an application group identifier APP-group-ID field, and the APP-group-ID field includes the application token.

4. The method according to any one of claims 1 to 3, characterized in that The token includes a user token, the APN message header includes a user-group-ID field, and the user-group-ID field includes the user token.

5. The method according to any one of claims 1 to 4, characterized in that The first network device obtains a second data message based on the first data message and the token, including: The first network device performs application identification based on the first data message to obtain an APN-ID; The first network device inserts the token into the APN-ID to obtain the APN-ID including the token; The first network device adds the APN-ID including the token to the first data message to obtain the second data message.

6. The method according to any one of claims 1 to 4, characterized in that The first network device obtains a second data message based on the first data message and the token, including: The first network device adds the token to the APN-ID included in the first data message to obtain the second data message.

7. The method according to any one of claims 1 to 6, characterized in that Before the first network device obtains the second data message based on the first data message and the token, the method further includes: The first network device receives the token sent by the controller; or, The first network device receives the token sent by an identity and access management (IAM) node.

8. A data message processing method, characterized in that: The method comprises: The second network device receives a second data message from the first network device, wherein the second data message includes application layer data and an application-aware network APN message header, and the APN message header includes the token; In response to the token passing authentication, the second network device sends a third data message, where the third data message includes the application layer data; or, in response to the application token failing authentication, the second network device discards the second data message.

9. The method according to claim 8, characterized in that After the second network device receives the second data message from the first network device, the method further includes: The second network device obtains an authentication request based on the token; The second network device sends the authentication request to an identity and access management IAM node; The second network device receives an authentication response from the IAM node, where the authentication response indicates whether the token is authenticated.

10. The method according to claim 8 or 9, characterized in that: The APN message header includes an application-aware network identifier APN-ID field, and the APN-ID field includes the token.

11. The method according to any one of claims 8 to 10, characterized in that The token includes an application token, the APN message header includes an application group identifier APP-group-ID field, and the APP-group-ID field includes the application token.

12. The method according to any one of claims 8 to 11, characterized in that The token includes a user token, the APN message header includes a user-group-ID field, and the user-group-ID field includes the user token.

13. A data message processing device, characterized in that: The device is provided in a first network device and includes: An obtaining module, configured to obtain a first data message, wherein the first data message includes application layer data; The obtaining module is further used to obtain a second data packet based on the first data packet and the token, wherein the second data packet includes the application layer data and an application-aware network APN packet header, and the APN packet header includes the token; A sending module is used to send the second data message.

14. A data message processing device, characterized in that: The device comprises: A receiving module, configured to receive a second data message from the first network device, wherein the second data message includes application layer data and an application-aware network APN message header, and the APN message header includes the token; A sending module is used to send the second data message in response to the token passing authentication; or to discard the second data message in response to the application token failing authentication.

15. A network device, characterized in that: The network device comprises: a processor, the processor is coupled to a memory, the memory stores at least one computer program instruction, and the at least one computer program instruction is loaded and executed by the processor so that the network device implements the method according to any one of claims 1 to 7.

16. A network device, characterized in that: The network device comprises: a processor, the processor is coupled to a memory, the memory stores at least one computer program instruction, and the at least one computer program instruction is loaded and executed by the processor so that the network device implements the method according to any one of claims 8 to 12.

17. A network system, characterized in that: The system comprises the apparatus according to claim 13 and the apparatus according to claim 14, or the system comprises the device according to claim 15 and the device according to claim 16.

18. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, and when the instruction is executed on a computer, the computer executes the method according to any one of claims 1 to 12.

19. A computer program product, characterized in that The computer program product comprises one or more computer program instructions, and when the computer program instructions are loaded and executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 12.