CN115603932A - An access control method, access control system and related equipment - Google Patents
An access control method, access control system and related equipment Download PDFInfo
- Publication number
- CN115603932A CN115603932A CN202110838315.3A CN202110838315A CN115603932A CN 115603932 A CN115603932 A CN 115603932A CN 202110838315 A CN202110838315 A CN 202110838315A CN 115603932 A CN115603932 A CN 115603932A
- Authority
- CN
- China
- Prior art keywords
- sdp
- client device
- message
- controller
- sdp client
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0807—Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
- H04L63/102—Entity profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/321—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
- H04L9/3213—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请提供一种访问控制方法、访问控制系统及相关设备,涉及网络安全技术领域,用于提高受保护的应用资源的安全性。该方法包括:SDP控制器接收第一SDP客户端设备发送的第一报文,第一报文的TCP选项字段中携带第一SDP客户端设备的设备标识;该SDP控制器根据第一SDP客户端设备的设备标识对第一SDP客户端设备进行单包认证;如果对第一SDP客户端设备的单包认证失败,该SDP控制器关闭第一报文所属的第一SDP客户端设备和该SDP控制器之间的TCP连接。
The application provides an access control method, an access control system and related equipment, which relate to the technical field of network security and are used to improve the security of protected application resources. The method includes: the SDP controller receives the first message sent by the first SDP client device, and the TCP option field of the first message carries the device identifier of the first SDP client device; The device identification of the end device carries out single-packet authentication to the first SDP client device; if the single-packet authentication to the first SDP client device fails, the SDP controller closes the first SDP client device and the first SDP client device to which the first message belongs. TCP connection between SDP controllers.
Description
本申请要求于2021年07月08日提交国家知识产权局、申请号为202110770853.3、申请名称为“一种访问控制方法、访问控制系统及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110770853.3 and the application name "A method for access control, access control system and related equipment" submitted to the State Intellectual Property Office on July 08, 2021. The entire content of the application is passed References are incorporated in this application.
技术领域technical field
本申请涉及网络安全技术领域,尤其涉及一种访问控制方法、访问控制系统及相关设备。The present application relates to the technical field of network security, in particular to an access control method, an access control system and related equipment.
背景技术Background technique
软件定义边界(software defined perimeter,SDP)是由云安全联盟提出的一种基于身份进行资源访问控制的技术。SDP在授予终端设备对资源的访问权限之前,先对用户和用户使用的设备进行身份认证。如果认证通过,则用户能够使用该设备访问资源;如果认证失败,则禁止用户使用该设备访问资源。因此,SDP技术能够保证资源隔离和安全性。Software defined perimeter (SDP) is a technology for resource access control based on identity proposed by Cloud Security Alliance. SDP first authenticates the user and the device used by the user before granting the terminal device access to resources. If the authentication passes, the user can use the device to access resources; if the authentication fails, the user is prohibited from using the device to access resources. Therefore, SDP technology can guarantee resource isolation and security.
基于SDP技术的访问控制系统通常包括:SDP控制器、SDP客户端和SDP网关。SDP客户端和SDP网关分别与SDP控制器之间建立双向连接。当SDP客户端需要访问受保护的应用资源时,SDP客户端会先向SDP控制器发起认证,认证通过之后SDP控制器将需要放行的源IP地址和目的端口等信息发送给SDP网关。SDP客户端再向SDP网关发送访问请求,由SDP网关判断SDP客户端的源IP地址是否合法、以及在判断SDP客户端的源IP地址是合法的情况下允许进行相应的访问。The access control system based on SDP technology usually includes: SDP controller, SDP client and SDP gateway. The SDP client and the SDP gateway respectively establish bidirectional connections with the SDP controller. When the SDP client needs to access protected application resources, the SDP client will first initiate authentication to the SDP controller. After the authentication is passed, the SDP controller will send information such as the source IP address and destination port that need to be released to the SDP gateway. The SDP client sends an access request to the SDP gateway, and the SDP gateway judges whether the source IP address of the SDP client is legal, and allows corresponding access when it is judged that the source IP address of the SDP client is legal.
目前,通常存在多个SDP客户端通过源网络地址转换(source network addresstranslation,SNAT)设备的转换后使用同一个源IP地址进行访问的情况。此时SDP网关接收到来自多个SDP客户端的数据包的源IP地址是相同的,SDP网关无法区分SNAT设备转换前的IP地址。在这种情况下,多个SDP客户端中只要有一个SDP客户端认证通过,则其他认证未通过的SDP客户端都能够使用该源IP地址访问受保护的应用资源,从而造成一定的安全隐患。At present, there are usually situations where multiple SDP clients use the same source IP address to access after conversion by a source network address translation (SNAT) device. At this time, the source IP address of the data packets received by the SDP gateway from multiple SDP clients is the same, and the SDP gateway cannot distinguish the IP address before the SNAT device conversion. In this case, as long as one of the multiple SDP clients passes the authentication, other SDP clients that fail the authentication can use the source IP address to access the protected application resources, thus causing certain security risks .
发明内容Contents of the invention
本申请提供一种访问控制方法、访问控制系统及相关设备,用于提高受保护的应用资源的安全性。The present application provides an access control method, an access control system and related equipment, which are used to improve the security of protected application resources.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above object, the application adopts the following technical solutions:
第一方面,提供一种访问控制方法,该方法包括:SDP控制器接收第一SDP客户端设备发送的第一报文,第一报文的传输控制协议TCP选项字段中携带第一SDP客户端设备的设备标识;该SDP控制器根据第一SDP客户端设备的设备标识对第一SDP客户端设备进行单包认证;如果对第一SDP客户端设备的单包认证失败,该SDP控制器关闭第一报文所属的第一SDP客户端设备和该SDP控制器之间的TCP连接。In a first aspect, an access control method is provided, the method comprising: the SDP controller receives the first message sent by the first SDP client device, and the first SDP client is carried in the Transmission Control Protocol TCP option field of the first message The device ID of the device; the SDP controller performs single-packet authentication on the first SDP client device according to the device ID of the first SDP client device; if the single-packet authentication of the first SDP client device fails, the SDP controller shuts down A TCP connection between the first SDP client device to which the first packet belongs and the SDP controller.
上述技术方案中,第一SDP客户端向SDP控制器发送第一报文,该第一报文的TCP选项字段中携带第一SDP客户端设备的设备标识。当SDP控制器接收到该第一报文时,基于第一SDP客户端设备的设备标识对第一SDP客户端设备进行单包认证。如果对第一SDP客户端设备的单包认证失败,该SDP控制器关闭该第一报文所属的第一SDP客户端设备和该SDP控制器之间的TCP连接。这样,当多个SDP客户端设备经过同一SNAT设备转换后使用同一源IP地址时,SDP控制器能够基于SDP客户端设备的设备标识识别不同的SDP客户端设备,从而能够保证受保护的应用资源的安全性。更进一步地,第一SDP客户端通过第一报文的TCP选项字段携带第一SDP客户端设备的设备标识,而不是通过TCP传输层之上的其他协议层携带该设备标识,从而无需创建套接字,也无需读取和解析报文的应用层数据,进而降低了SDP控制器的系统开销。In the above technical solution, the first SDP client sends a first message to the SDP controller, and the TCP option field of the first message carries the device identifier of the first SDP client device. When the SDP controller receives the first message, it performs single-packet authentication on the first SDP client device based on the device identifier of the first SDP client device. If the single-packet authentication of the first SDP client device fails, the SDP controller closes the TCP connection between the first SDP client device to which the first packet belongs and the SDP controller. In this way, when multiple SDP client devices use the same source IP address after being translated by the same SNAT device, the SDP controller can identify different SDP client devices based on the device identification of the SDP client device, thereby ensuring the protected application resources security. Furthermore, the first SDP client carries the device identifier of the first SDP client device through the TCP option field of the first message, instead of carrying the device identifier through other protocol layers above the TCP transport layer, so that there is no need to create a socket There is no need to read and parse the application layer data of the message, thereby reducing the system overhead of the SDP controller.
可选地,在第一方面的一种可能的设计中,该方法还包括:SDP控制器接收第二SDP客户端设备发送的第一报文,第二SDP客户端设备发送的第一报文的TCP选项字段中携带第二SDP客户端设备的设备标识;该SDP控制器根据第二SDP客户端设备的设备标识对第二SDP客户端设备进行单包认证;如果对第二SDP客户端设备的单包认证成功,该SDP控制器接收第二SDP客户端设备发送的第二报文,第二报文的安全传输层协议TLS选项字段或者应用层报文头中携带鉴权信息,该鉴权信息包括第二SDP客户端设备的用户信息;该SDP控制器根据第二SDP客户端设备的设备标识和该用户信息对第二SDP客户端设备进行用户认证;如果对第二SDP客户端设备的用户认证成功,该SDP控制器向第二SDP客户端设备发送资源列表,该资源列表包括允许第二SDP客户端设备访问的至少一个应用服务器的标识。上述可能的设计中,如果该SDP控制器对第二SDP客户端设备的单包认证成功和用户认证成功,该SDP控制器才向第二SDP客户端设备发送资源列表。这样,当多个SDP客户端设备经过同一SNAT设备转换后使用同一源IP地址时,该多个SDP客户端设备中未认证成功的SDP客户端设备无法访问受保护的应用资源的安全性,从而能够提高受保护的应用资源的安全性。Optionally, in a possible design of the first aspect, the method further includes: the SDP controller receives the first message sent by the second SDP client device, and the first message sent by the second SDP client device The device identification of the second SDP client device is carried in the TCP option field of the device; the SDP controller performs single-packet authentication on the second SDP client device according to the device identification of the second SDP client device; if the second SDP client device If the single-packet authentication is successful, the SDP controller receives the second packet sent by the second SDP client device. The TLS option field of the second packet or the application layer header of the second packet carries authentication information. The rights information includes the user information of the second SDP client device; the SDP controller performs user authentication on the second SDP client device according to the device identification of the second SDP client device and the user information; if the second SDP client device If the user authentication is successful, the SDP controller sends a resource list to the second SDP client device, where the resource list includes an identifier of at least one application server that is allowed to be accessed by the second SDP client device. In the above possible design, the SDP controller only sends the resource list to the second SDP client device if the SDP controller succeeds in the single-packet authentication and user authentication of the second SDP client device. In this way, when multiple SDP client devices use the same source IP address after being converted by the same SNAT device, the SDP client devices that have not been successfully authenticated in the multiple SDP client devices cannot access the security of the protected application resources, thereby Ability to improve the security of protected application resources.
可选地,在第一方面的一种可能的设计中,第二SDP客户端设备发送的第一报文和第二报文为同一个TCP连接中的报文;或者,第二SDP客户端设备发送的第一报文和第二报文为不同TCP连接中的报文。上述可能的设计中,第二SDP客户端设备能够通过同一TCP连接的两个报文分别进行单包认证和用户认证,也能够通过不同TCP连接中的两个报文分别进行单包认证和用户认证,从而提高了认证的灵活性。Optionally, in a possible design of the first aspect, the first message and the second message sent by the second SDP client device are messages in the same TCP connection; or, the second SDP client device The first packet and the second packet sent by the device are packets in different TCP connections. In the above possible design, the second SDP client device can perform single-packet authentication and user authentication respectively through two messages in the same TCP connection, and can also perform single-packet authentication and user authentication respectively through two messages in different TCP connections. certification, thereby improving the flexibility of certification.
可选地,在第一方面的一种可能的设计中,若第二SDP客户端设备发送的第一报文和第二报文为不同TCP连接中的报文,SDP控制器接收第二SDP客户端设备发送的第二报文之前,该方法还包括:该SDP控制器根据第二SDP客户端设备发送的第一报文向第二SDP客户端设备发送盐值;第二报文还携带该盐值,该SDP控制器接收第二SDP客户端设备发送的第二报文之后,该方法还包括:该SDP控制器根据第二报文中携带的该盐值确定第二SDP客户端设备的单包认证已成功。上述可能的设计中,若第二SDP客户端设备发送的第一报文和第二报文为不同TCP连接中的报文,通过在第二报文中还携带该SDP控制器根据第一报文发送的盐值,能够使得该SDP控制器能够根据第二报文中携带的该盐值确定第二SDP客户端设备的单包认证已成功。Optionally, in a possible design of the first aspect, if the first message and the second message sent by the second SDP client device are messages in different TCP connections, the SDP controller receives the second SDP Before the second message sent by the client device, the method also includes: the SDP controller sends the salt value to the second SDP client device according to the first message sent by the second SDP client device; the second message also carries The salt value, after the SDP controller receives the second message sent by the second SDP client device, the method further includes: the SDP controller determines the second SDP client device according to the salt value carried in the second message Single-package authentication for was successful. In the above possible design, if the first message and the second message sent by the second SDP client device are messages in different TCP connections, by carrying the second message in the SDP controller according to the first message The salt value sent in the message can enable the SDP controller to determine that the single-packet authentication of the second SDP client device has succeeded according to the salt value carried in the second message.
可选地,在第一方面的一种可能的设计中,第一SDP客户端设备发送的第一报文是同步SYN报文;第二SDP客户端设备发送的第一报文是SYN报文。Optionally, in a possible design of the first aspect, the first message sent by the first SDP client device is a synchronous SYN message; the first message sent by the second SDP client device is a SYN message .
可选地,在第一方面的一种可能的设计中,第一SDP客户端设备发送的第一报文中携带的该设备标识为密文形式的设备标识,该方法还包括:SDP控制器使用作为该第一报文的该SYN报文的序列号对该密文形式的设备标识进行解密,得到指定长度的字符串,该字符串用于该SDP控制器对第一SDP客户端设备进行单包认证。类似的,第二SDP客户端设备发送的第一报文中携带的该设备标识为密文形式的设备标识,该方法还包括:该SDP控制器使用作为该第一报文的SYN报文的序列号对该密文形式的设备标识进行解密,得到指定长度的字符串,该字符串用于该SDP控制器对第二SDP客户端设备进行单包认证。上述可能的设计中,通过对第一报文中携带的该设备标识进行加密,能够保证通过网络传输的设备标识的安全性,避免第一报文被非法SDP客户端设备拦截后从中得到合法SDP客户端设备的设备标识,从而冒充合法SDP客户端设备进行恶意活动。Optionally, in a possible design of the first aspect, the device identifier carried in the first message sent by the first SDP client device is a device identifier in ciphertext form, and the method further includes: the SDP controller Use the serial number of the SYN message as the first message to decrypt the device identification in ciphertext form to obtain a character string of a specified length, which is used by the SDP controller to perform the first SDP client device Single pack authentication. Similarly, the device identification carried in the first message sent by the second SDP client device is a device identification in ciphertext form, and the method further includes: the SDP controller uses the SYN message as the first message The serial number decrypts the device identification in ciphertext form to obtain a character string of a specified length, which is used by the SDP controller to perform single-packet authentication on the second SDP client device. In the above possible design, by encrypting the device identifier carried in the first message, the security of the device identifier transmitted through the network can be guaranteed, and the legitimate SDP can be obtained from the first message after being intercepted by an illegal SDP client device. The device identification of the client device, thereby posing as a legitimate SDP client device for malicious activities.
可选地,在第一方面的一种可能的设计中,SDP控制器根据第一SDP客户端设备的设备标识对第一SDP客户端设备进行单包认证,包括:所述SDP控制器使用所述字符串与保存的各已注册的SDP客户端设备对应的字符串进行比较,其中,所述已注册的SDP客户端设备对应的字符串是根据已注册的SDP客户端设备的明文形式的设备标识生成的;若所述所述字符串与一个已注册的SDP客户端设备对应的字符串相同,则确定单包认证成功。Optionally, in a possible design of the first aspect, the SDP controller performs single-packet authentication on the first SDP client device according to the device identifier of the first SDP client device, including: the SDP controller uses the The above character string is compared with the character string corresponding to each registered SDP client device, wherein the character string corresponding to the registered SDP client device is the device according to the plain text form of the registered SDP client device The identification is generated; if the character string is the same as the character string corresponding to a registered SDP client device, it is determined that the single-packet authentication is successful.
可选地,在第一方面的一种可能的设计中,如果对第二SDP客户端设备的用户认证成功,该方法还包括:SDP控制器向第二SDP客户端设备发送令牌信息,该令牌信息用于SDP网关对第二SDP客户端设备发起的资源访问进行校验。上述可能的设计中,SDP控制器通过向第二SDP客户端设备发送令牌信息,以便于后续第二SDP客户端设备在向SDP网关发起资源访问时携带令牌信息,SDP网关基于资源访问请求中的令牌信息对第二SDP客户端设备发起的资源访问进行合法校验。Optionally, in a possible design of the first aspect, if the user authentication of the second SDP client device succeeds, the method further includes: the SDP controller sends token information to the second SDP client device, the The token information is used by the SDP gateway to verify the resource access initiated by the second SDP client device. In the above possible design, the SDP controller sends the token information to the second SDP client device, so that the subsequent second SDP client device carries the token information when initiating resource access to the SDP gateway, and the SDP gateway based on the resource access request The token information in is used to verify the legality of the resource access initiated by the second SDP client device.
可选地,在第一方面的一种可能的设计中,如果对第二SDP客户端设备的用户认证成功,该方法还包括:SDP控制器向SDP网关发送客户端信息,该客户端信息用于指示第二SDP客户端设备认证通过,该客户端信息包括第二SDP客户端设备的设备标识。上述可能的设计中,如果对第二SDP客户端设备的用户认证成功,该SDP控制器通过向SDP网关发送客户端信息,以便于SDP网关基于客户端信息确定SDP客户端设备发送的资源访问的合法性,以保证受保护的应用资源的安全性。Optionally, in a possible design of the first aspect, if the user authentication of the second SDP client device succeeds, the method further includes: the SDP controller sends client information to the SDP gateway, and the client information is used To indicate that the second SDP client device passes the authentication, the client information includes the device identifier of the second SDP client device. In the above possible design, if the user authentication of the second SDP client device is successful, the SDP controller sends the client information to the SDP gateway, so that the SDP gateway can determine the resource access information sent by the SDP client device based on the client information. Legality to ensure the security of protected application resources.
第二方面,提供一种访问控制方法,该方法包括:SDP客户端设备向SDP控制器发送第一报文,第一报文的传输控制协议TCP选项字段中携带该SDP客户端设备的设备标识。这样当该SDP控制器接收到该第一报文时,该SDP控制器能够通过SDP客户端设备的设备标识识别出不同的SDP客户端设备,从而避免了多个SDP客户端设备经过同一SNAT设备转换后使用同一源IP地址时,无法识别不同的SDP客户端设备的问题,进而也保证了受保护的应用资源的安全性。此外,该SDP客户端通过第一报文的TCP选项字段中携带该SDP客户端设备的设备标识,而不是通过TCP传输层之上的其他协议层携带该设备标识,从而无需创建套接字,也无需读取和解析应用层数据,进而降低了SDP控制器的系统开销。In a second aspect, an access control method is provided, the method comprising: an SDP client device sends a first message to an SDP controller, and the Transmission Control Protocol TCP option field of the first message carries the device identifier of the SDP client device . In this way, when the SDP controller receives the first message, the SDP controller can identify different SDP client devices through the device identification of the SDP client device, thereby preventing multiple SDP client devices from passing through the same SNAT device When the same source IP address is used after conversion, different SDP client devices cannot be identified, thereby ensuring the security of protected application resources. In addition, the SDP client carries the device identifier of the SDP client device in the TCP option field of the first message instead of carrying the device identifier through other protocol layers above the TCP transport layer, so that there is no need to create a socket, There is also no need to read and parse application layer data, thereby reducing the system overhead of the SDP controller.
可选地,在第二方面的一种可能的设计中,该方法还包括:SDP客户端设备接收SDP控制器发送的单包认证响应;如果该单包认证响应用于指示该SDP控制器对该SDP客户端设备的单包认证成功,SDP客户端设备向该SDP控制器发送第二报文,第二报文的安全传输层协议TLS选项字段或者应用层报文头中携带鉴权信息,该鉴权信息包括该SDP客户端设备的用户信息;该SDP客户端设备接收该SDP控制器返回的资源列表,该资源列表包括允许该SDP客户端设备访问的至少一个应用服务器的标识。上述可能的设计中,如果该SDP控制器对该SDP客户端设备的单包认证成功和用户认证成功,该SDP客户端设备才能够接收到该资源列表。这样,当多个SDP客户端设备经过同一SNAT设备转换后使用同一源IP地址时,该多个SDP客户端设备中未认证成功的SDP客户端设备无法访问受保护的应用资源的安全性,从而能够提高受保护的应用资源的安全性。Optionally, in a possible design of the second aspect, the method further includes: the SDP client device receives a single-packet authentication response sent by the SDP controller; if the single-packet authentication response is used to indicate that the SDP controller is The single-packet authentication of the SDP client device is successful, the SDP client device sends a second message to the SDP controller, and the security transport layer protocol TLS option field of the second message or the application layer message header carry authentication information, The authentication information includes user information of the SDP client device; the SDP client device receives a resource list returned by the SDP controller, and the resource list includes an identifier of at least one application server that the SDP client device is allowed to access. In the above possible design, the SDP client device can receive the resource list only if the SDP controller succeeds in the single-packet authentication and user authentication of the SDP client device. In this way, when multiple SDP client devices use the same source IP address after being converted by the same SNAT device, the SDP client devices that have not been successfully authenticated in the multiple SDP client devices cannot access the security of the protected application resources, thereby Ability to improve the security of protected application resources.
可选地,在第二方面的一种可能的设计中,第一报文和第二报文为同一个TCP连接中的报文;或者,第一报文和第二报文为不同TCP连接中的报文。上述可能的设计中,第二SDP客户端设备能够通过同一TCP连接的两个报文分别进行单包认证和用户认证,也能够通过不同TCP连接中的两个报文分别进行单包认证和用户认证,从而提高了认证的灵活性。Optionally, in a possible design of the second aspect, the first message and the second message are messages in the same TCP connection; or, the first message and the second message are different TCP connections messages in . In the above possible design, the second SDP client device can perform single-packet authentication and user authentication respectively through two messages in the same TCP connection, and can also perform single-packet authentication and user authentication respectively through two messages in different TCP connections. certification, thereby improving the flexibility of certification.
可选地,在第二方面的一种可能的设计中,当第一报文和第二报文为不同TCP连接中的报文时,SDP客户端设备向SDP控制器发送第二报文之前,该方法还包括:该SDP客户端设备接收该SDP控制器根据第一报文返回的盐值;第二报文中还携带该盐值,第二报文携带的该盐值用于该SDP控制器确定第二SDP客户端设备的单包认证已成功。上述可能的设计中,若该SDP客户端设备发送的第一报文和第二报文为不同TCP连接中的报文,通过在第二报文中还携带该SDP控制器根据第一报文发送的盐值,能够使得该SDP控制器能够根据第二报文中携带的该盐值确定第二SDP客户端设备的单包认证已成功。Optionally, in a possible design of the second aspect, when the first message and the second message are messages in different TCP connections, before the SDP client device sends the second message to the SDP controller , the method further includes: the SDP client device receiving the salt value returned by the SDP controller according to the first message; the second message also carries the salt value, and the salt value carried in the second message is used for the SDP The controller determines that the single-packet authentication of the second SDP client device has succeeded. In the above possible design, if the first message and the second message sent by the SDP client device are messages in different TCP connections, by carrying the SDP controller in the second message according to the first message The sent salt value can enable the SDP controller to determine that the single-packet authentication of the second SDP client device has succeeded according to the salt value carried in the second message.
可选地,在第二方面的一种可能的设计中,第一报文是同步SYN报文。Optionally, in a possible design of the second aspect, the first packet is a synchronous SYN packet.
可选地,在第二方面的一种可能的设计中,第一报文的该TCP选项字段中携带的该设备标识为密文形式的设备标识,该方法还包括:基于SDP客户端设备的明文形式的设备标识获取指定长度的字符串;使用该SYN报文的序列号对该字符串进行加密,得到该密文形式的设备标识。可选的,该指定长度的字符串是通过对该明文的设备标识进行哈希运算得到的。上述可能的设计中,通过对第一报文中携带的该设备标识进行加密,能够保证通过网络传输的设备标识的安全性,避免第一报文被非法SDP客户端设备拦截后从中得到合法SDP客户端设备的设备标识,从而冒充合法SDP客户端设备进行恶意活动。Optionally, in a possible design of the second aspect, the device identifier carried in the TCP option field of the first message is a device identifier in ciphertext form, and the method further includes: Obtain a string of a specified length for the device ID in plain text; use the serial number of the SYN message to encrypt the string to obtain the device ID in cipher text. Optionally, the character string of the specified length is obtained by performing a hash operation on the plaintext device identifier. In the above possible design, by encrypting the device identifier carried in the first message, the security of the device identifier transmitted through the network can be guaranteed, and the legitimate SDP can be obtained from the first message after being intercepted by an illegal SDP client device. The device identification of the client device, thereby posing as a legitimate SDP client device for malicious activities.
可选地,在第二方面的一种可能的设计中,SDP客户端设备接收SDP控制器返回的资源列表之后,该方法还包括:该SDP客户端设备向SDP网关发送第三报文,第三报文的TCP选项字段中携带该SDP客户端设备的设备标识;该SDP客户端设备接收该应用服务器返回的业务数据,该业务数据是该SDP网关根据第三报文的TCP选项字段中携带的该设备标识确定该SDP客户端设备合法后将第三报文转发给该应用服务器后,该应用服务器发送的。上述可能的设计中,通过在第三报文的TCP选项字段中携带该SDP客户端设备的设备标识,能够使得SDP网关在多个SDP客户端设备经过同一SNAT设备后使用同一源IP地址的情况下,识别出不同的SDP客户端设备,从而保证受保护的应用资源的安全性。此外,通过第三报文的TCP选项字段中携带该SDP客户端设备的设备标识,而不是通过TCP传输层之上的其他协议层携带该设备标识,从而无需创建套接字,也无需读取和解析应用层数据,进而降低了SDP控制器的系统开销。Optionally, in a possible design of the second aspect, after the SDP client device receives the resource list returned by the SDP controller, the method further includes: the SDP client device sends a third message to the SDP gateway, the first The device identifier of the SDP client device is carried in the TCP option field of the third message; the SDP client device receives the service data returned by the application server, and the service data is carried by the SDP gateway according to the TCP option field of the third message After the device identifier determines that the SDP client device is legal and forwards the third message to the application server, the application server sends it. In the above possible design, by carrying the device identifier of the SDP client device in the TCP option field of the third message, the SDP gateway can use the same source IP address after multiple SDP client devices pass through the same SNAT device Next, different SDP client devices are identified, thereby ensuring the security of protected application resources. In addition, the device identification of the SDP client device is carried in the TCP option field of the third message instead of carrying the device identification through other protocol layers above the TCP transport layer, so that there is no need to create a socket or read And analyze the application layer data, thereby reducing the system overhead of the SDP controller.
可选地,在第二方面的一种可能的设计中,第三报文是同步SYN报文。Optionally, in a possible design of the second aspect, the third message is a synchronous SYN message.
可选地,在第二方面的一种可能的设计中,第三报文的该TCP选项字段中携带的该设备标识为密文形式的设备标识,该方法还包括:基于SDP客户端设备的明文形式的设备标识获取指定长度的字符串;使用作为该第三报文的该SYN报文的序列号对该字符串进行加密,得到该密文形式的设备标识。可选的,该指定长度的字符串是通过对该明文的设备标识进行哈希运算得到的。上述可能的设计中,通过对第三报文中携带的该设备标识进行加密,能够保证通过网络传输的设备标识的安全性,避免第一报文被非法SDP客户端设备拦截后从中得到合法SDP客户端设备的设备标识,从而冒充合法SDP客户端设备进行恶意活动。Optionally, in a possible design of the second aspect, the device identifier carried in the TCP option field of the third message is a device identifier in ciphertext form, and the method further includes: Obtain a character string of a specified length for the device identifier in plain text; use the serial number of the SYN message as the third message to encrypt the character string to obtain the device identifier in cipher text. Optionally, the character string of the specified length is obtained by performing a hash operation on the plaintext device identifier. In the above possible design, by encrypting the device identification carried in the third message, the security of the device identification transmitted through the network can be guaranteed, and the legal SDP can be obtained from the first message after being intercepted by an illegal SDP client device. The device identification of the client device, thereby posing as a legitimate SDP client device for malicious activities.
可选地,在第二方面的一种可能的设计中,该方法还包括:SDP客户端设备接收该SDP控制器发送的令牌信息,并且在后续发送的资源访问请求中携带该令牌信息。以便于SDP网关基于资源访问请求中携带的令牌信息对该SDP客户端设备发起的资源访问请求进行校验。Optionally, in a possible design of the second aspect, the method further includes: the SDP client device receives the token information sent by the SDP controller, and carries the token information in a subsequently sent resource access request . In order for the SDP gateway to verify the resource access request initiated by the SDP client device based on the token information carried in the resource access request.
第三方面,提供一种访问控制方法,该方法包括:SDP网关接收SDP控制器发送的客户端信息,该客户端信息用于指示SDP客户端设备认证通过,该客户端信息包括该SDP客户端设备的设备标识;该SDP网关接收该SDP客户端设备发送的第三报文,第三报文的TCP选项字段中携带该SDP客户端设备的设备标识;该SDP网关根据该客户端信息包括的该设备标识和第三报文包括的该设备标识,确定该SDP客户端设备是否合法;如果确定该SDP客户端设备合法,该SDP网关将第三报文发送给应用服务器,并将该应用服务器返回的业务数据转发给该SDP客户端设备。In a third aspect, an access control method is provided, the method includes: the SDP gateway receives client information sent by the SDP controller, the client information is used to indicate that the SDP client device has passed the authentication, and the client information includes the SDP client The device identifier of the device; the SDP gateway receives the third message sent by the SDP client device, and the TCP option field of the third message carries the device identifier of the SDP client device; the SDP gateway according to the client information includes The device identifier and the device identifier included in the third message determine whether the SDP client device is legal; if it is determined that the SDP client device is legal, the SDP gateway sends the third message to the application server, and sends the application server The returned service data is forwarded to the SDP client device.
上述技术方案中,该SDP客户端设备通过在第三报文的TCP选项字段中携带该SDP客户端设备的设备标识,能够使得SDP网关在多个SDP客户端设备经过同一SNAT设备后使用同一源IP地址进行资源访问的情况下,识别出不同的SDP客户端设备,从而保证受保护的应用资源的安全性。此外,通过第三报文的TCP选项字段中携带该SDP客户端设备的设备标识,而不是通过TCP传输层之上的其他层携带该设备标识,从而无需创建套接字,也无需读取和解析应用层数据,进而降低了SDP控制器或SDP网关的系统开销。In the above technical solution, the SDP client device can enable the SDP gateway to use the same source after multiple SDP client devices pass through the same SNAT device by carrying the device identifier of the SDP client device in the TCP option field of the third message. In the case of resource access by IP address, different SDP client devices are identified, thereby ensuring the security of protected application resources. In addition, the device identification of the SDP client device is carried in the TCP option field of the third message instead of carrying the device identification through other layers above the TCP transport layer, so that there is no need to create a socket, and there is no need to read and Parse the application layer data, thereby reducing the system overhead of the SDP controller or SDP gateway.
可选地,在第三方面的一种可能的设计中,第三报文是同步SYN报文。Optionally, in a possible design of the third aspect, the third message is a synchronous SYN message.
可选地,在第三方面的一种可能的设计中,该TCP选项字段中携带的该设备标识为密文形式的设备标识,该方法还包括:该SDP网关使用该SYN报文的序列号对该密文形式的设备标识进行解密,得到指定长度的第一字符串,第一字符串用于该SDP网关确定该SDP客户端设备是否合法。上述可能的设计中,通过对第三报文中携带的该设备标识进行加密,能够保证通过网络传输的设备标识的安全性,避免第三报文被非法SDP客户端设备拦截后从中得到合法SDP客户端设备的设备标识,从而冒充合法SDP客户端设备进行恶意活动。Optionally, in a possible design of the third aspect, the device identifier carried in the TCP option field is a device identifier in ciphertext form, and the method further includes: the SDP gateway uses the serial number of the SYN message Decrypt the device identification in ciphertext form to obtain a first character string of a specified length, and the first character string is used by the SDP gateway to determine whether the SDP client device is legitimate. In the above possible design, by encrypting the device identification carried in the third message, the security of the device identification transmitted through the network can be guaranteed, and the third message can be prevented from being intercepted by an illegal SDP client device to obtain a legal SDP The device identification of the client device, thereby posing as a legitimate SDP client device for malicious activities.
可选地,在第三方面的一种可能的设计中,该SDP网关根据该客户端信息包括的该设备标识和第三报文中包括的该设备标识确定该SDP客户端设备是否合法,包括:该SDP网关根据该客户端信息包括的该设备标识获取该指定长度的第二字符串;该SDP网关比较第一字符串和第二字符串;如果第一字符串和第二字符串一致,确定该SDP客户端设备合法。Optionally, in a possible design of the third aspect, the SDP gateway determines whether the SDP client device is legitimate according to the device identifier included in the client information and the device identifier included in the third message, including : The SDP gateway obtains the second character string of the specified length according to the device identification included in the client information; the SDP gateway compares the first character string with the second character string; if the first character string is consistent with the second character string, It is determined that the SDP client device is legitimate.
可选地,在第三方面的一种可能的设计中,第三报文还携带令牌信息,该令牌信息用于SDP网关对该SDP客户端设备发起的资源访问进行校验。Optionally, in a possible design of the third aspect, the third message also carries token information, and the token information is used by the SDP gateway to verify the resource access initiated by the SDP client device.
第四方面,提供一种访问控制装置,该装置作为SDP控制器或者SDP控制器内置的芯片,包括:存储器和至少一个处理器。该存储器用于存储指令,该指令被至少一个处理器读取后,该装置执行上述第一方面或第一方面的任意一种可能的设计所提供的访问控制方法,具体参见上面的详细描述,此处不再赘述。According to a fourth aspect, an access control device is provided. The device is used as an SDP controller or a built-in chip of the SDP controller, and includes: a memory and at least one processor. The memory is used to store instructions. After the instructions are read by at least one processor, the device executes the access control method provided by the first aspect or any possible design of the first aspect. For details, refer to the above detailed description. I won't repeat them here.
第五方面,提供一种访问控制装置,该装置作为SDP控制器或者SDP控制器内置的芯片,该装置具有实现上述第一方面或第一方面的任意一种可能的设计所提供的访问控制方法中的功能。所述功能能够通过硬件实现,也能够通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In the fifth aspect, an access control device is provided, which is used as an SDP controller or a built-in chip of the SDP controller, and the device has the access control method provided by the above-mentioned first aspect or any possible design of the first aspect function in . The functions described above can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions.
第六方面,提供一种访问控制装置,该装置作为SDP客户端设备或者SDP客户端设备内置的芯片,包括:存储器和至少一个处理器。该存储器用于存储指令,该指令被至少一个处理器读取后,该装置执行上述第二方面或第二方面的任意一种可能的设计所提供的访问控制方法,具体参见上面的详细描述,此处不再赘述。According to a sixth aspect, an access control device is provided. The device is used as an SDP client device or a built-in chip of the SDP client device, and includes: a memory and at least one processor. The memory is used to store instructions. After the instructions are read by at least one processor, the device executes the access control method provided by the second aspect or any possible design of the second aspect. For details, refer to the above detailed description, I won't repeat them here.
第七方面,提供一种访问控制装置,该装置作为SDP客户端设备或者SDP客户端设备内置的芯片,该装置具有实现上述第二方面或第二方面的任意一种可能的设计所提供的访问控制方法中的功能。所述功能能够通过硬件实现,也能够通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In the seventh aspect, an access control device is provided, which is used as an SDP client device or a built-in chip of the SDP client device, and the device has the access provided by any possible design for realizing the above-mentioned second aspect or the second aspect function in the control method. The functions described above can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions.
第八方面,提供一种访问控制装置,该装置作为SDP网关或者SDP网关内置的芯片,包括:存储器和至少一个处理器。该存储器用于存储指令,该指令被至少一个处理器读取后,该装置执行上述第三方面或第三方面的任意一种可能的设计所提供的访问控制方法,具体参见上面的详细描述,此处不再赘述。In an eighth aspect, an access control device is provided. The device is used as an SDP gateway or a built-in chip of the SDP gateway, and includes: a memory and at least one processor. The memory is used to store instructions. After the instructions are read by at least one processor, the device executes the access control method provided by the above third aspect or any possible design of the third aspect. For details, refer to the above detailed description, I won't repeat them here.
第九方面,提供一种访问控制装置,该装置作为SDP网关或者SDP网关内置的芯片,该装置具有实现上述第三方面或第三方面的任意一种可能的设计所提供的访问控制方法中的功能。所述功能能够通过硬件实现,也能够通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In the ninth aspect, an access control device is provided. The device is used as an SDP gateway or a built-in chip of the SDP gateway. The device has the access control method provided by any possible design of the third aspect or the third aspect. Features. The functions described above can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions.
在本申请的另一方面,提供一种访问控制系统,该系统包括:SDP控制器、SDP客户端设备和SDP网关;其中,该SDP控制器包括第四方面或者第五方面所提供的访问控制装置,该SDP客户端设备包括第六方面或者第七方面所提供的访问控制装置,该SDP网关包括第八方面或者第九方面的访问控制装置。In another aspect of the present application, an access control system is provided, the system includes: an SDP controller, an SDP client device, and an SDP gateway; wherein, the SDP controller includes the access control provided in the fourth aspect or the fifth aspect device, the SDP client device includes the access control device provided in the sixth aspect or the seventh aspect, and the SDP gateway includes the access control device in the eighth aspect or the ninth aspect.
在本申请的又一方面,提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当该计算机指令运行时,执行如第一方面或第一方面的任一种可能的设计所提供的访问控制方法。In yet another aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium includes computer instructions, and when the computer instructions are executed, any possible design as in the first aspect or the first aspect is executed The provided access control method.
在本申请的又一方面,提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当该计算机指令运行时,执行如第二方面或第二方面的任一种可能的设计所提供的访问控制方法。In yet another aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium includes computer instructions, and when the computer instructions are executed, any possible design as in the second aspect or the second aspect is executed The provided access control method.
在本申请的又一方面,提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当该计算机指令运行时,执行如第三方面或第三方面的任一种可能的设计所提供的访问控制方法。In yet another aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium includes computer instructions, and when the computer instructions are executed, any possible design of the third aspect or the third aspect is executed The provided access control method.
在本申请的又一方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第一方面或者第一方面的任一种可能的设计所提供的访问控制方法。In yet another aspect of the present application, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to execute the access control method provided by the first aspect or any possible design of the first aspect.
在本申请的又一方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第二方面或第二方面的任一种可能的设计所提供的访问控制方法。In yet another aspect of the present application, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to execute the access control method provided by the second aspect or any possible design of the second aspect.
在本申请的又一方面,提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第三方面或者第三方面的任一种可能的设计中所提供的访问控制方法。In yet another aspect of the present application, a computer program product containing instructions is provided, and when it is run on a computer, it causes the computer to execute the access control method provided in the third aspect or any possible design of the third aspect .
应当理解的是,上述提供的任一种访问控制装置、通信系统、计算机可读存储介质和计算机程序产品的有益效果均能够对应参考上文对应方面提供的方法实施例的有益效果,此处不再赘述。It should be understood that, the beneficial effects of any access control device, communication system, computer-readable storage medium, and computer program product provided above can refer to the beneficial effects of the method embodiments provided in the corresponding aspects above, and are not described here. Let me repeat.
附图说明Description of drawings
图1为本申请实施例提供的一种传统网络安全的系统架构图;FIG. 1 is a system architecture diagram of a traditional network security provided by an embodiment of the present application;
图2为本申请实施例提供的一种SDP系统的结构示意图;FIG. 2 is a schematic structural diagram of an SDP system provided by an embodiment of the present application;
图3为本申请实施例提供的另一种SDP系统的结构示意图;FIG. 3 is a schematic structural diagram of another SDP system provided by the embodiment of the present application;
图4为本申请实施例提供的一种访问控制方法的流程示意图;FIG. 4 is a schematic flowchart of an access control method provided in an embodiment of the present application;
图5为本申请实施例提供的一种TCP选项的示意图;FIG. 5 is a schematic diagram of a TCP option provided by an embodiment of the present application;
图6为本申请实施例提供的另一种访问控制方法的流程示意图;FIG. 6 is a schematic flow diagram of another access control method provided by the embodiment of the present application;
图7为本申请实施例提供的一种上报第二报文的示意图;FIG. 7 is a schematic diagram of reporting a second message provided by an embodiment of the present application;
图8为本申请实施例提供的又一种访问控制方法的流程示意图;FIG. 8 is a schematic flowchart of another access control method provided by the embodiment of the present application;
图9为本申请实施例提供的一种SDP控制器的访问控制示意图;FIG. 9 is a schematic diagram of access control of an SDP controller provided by an embodiment of the present application;
图10为本申请实施例提供的一种SDP控制器的结构示意图;FIG. 10 is a schematic structural diagram of an SDP controller provided in an embodiment of the present application;
图11为本申请实施例提供的另一种SDP控制器的结构示意图;FIG. 11 is a schematic structural diagram of another SDP controller provided in the embodiment of the present application;
图12为本申请实施例提供的一种SDP客户端设备的结构示意图;FIG. 12 is a schematic structural diagram of an SDP client device provided in an embodiment of the present application;
图13为本申请实施例提供的另一种SDP客户端设备的结构示意图;FIG. 13 is a schematic structural diagram of another SDP client device provided in the embodiment of the present application;
图14为本申请实施例提供的一种SDP网关的结构示意图;FIG. 14 is a schematic structural diagram of an SDP gateway provided by an embodiment of the present application;
图15为本申请实施例提供的另一种SDP网关的结构示意图。FIG. 15 is a schematic structural diagram of another SDP gateway provided by the embodiment of the present application.
具体实施方式detailed description
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示存在三种关系,例如,A和/或B表示:单独存在A,同时存在A和B,单独存在B的情况,其中A和B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下中的至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个)表示:a、b、c、a-b、a-c、b-c、或a-b-c,其中a、b、c可以是单个,也可以是多个。另外,在本申请的实施例中,“第一”、“第二”等字样并不对数量和执行次序进行限定。In this application, "at least one" means one or more, and "multiple" means two or more. "And/or" describes the association relationship of associated objects, indicating that there are three kinds of relationships, for example, A and/or B means: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (unit) of a, b or c means: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c can be single or multiple. In addition, in the embodiments of the present application, words such as "first" and "second" do not limit the quantity and execution order.
下面在介绍本申请实施例之前,首先对本申请所涉及的背景技术进行介绍说明。Below, before introducing the embodiments of the present application, the background technology involved in the present application will first be described.
传统网络安全概念主要是基于网络边界的定义进行安全保护。示例性的,如图1所示,通过防火墙(fire wall,FW)/网络智能防护(network intelligent protection,NIP)等边界设备,将内部网络和外部网络隔离开。其中,外部网络是可能存在安全风险的,内部网络是相对安全的,内部网络的资源(比如,某一企业内部使用的财务系统、人力系统、应用程序和其他系统等)不向外部网络暴露,即外部网络中的终端设备无法访问该内部网络的资源。传统网络安全能够为企业提供一定的安全保护,但是伴随着网络的发展也出现了诸如网络边界模糊、访问复杂化和内部攻击等一系列问题。The traditional concept of network security is mainly based on the definition of network boundaries for security protection. Exemplarily, as shown in FIG. 1 , an internal network is isolated from an external network by border devices such as a firewall (fire wall, FW)/network intelligent protection (network intelligent protection, NIP). Among them, the external network may have security risks, the internal network is relatively safe, and the resources of the internal network (such as financial systems, human resources systems, applications and other systems used within a certain enterprise) are not exposed to the external network. That is, terminal devices in the external network cannot access the resources of the internal network. Traditional network security can provide enterprises with certain security protection, but with the development of the network, a series of problems such as blurred network boundaries, complicated access and internal attacks have emerged.
为应对上述问题,有研究提出基于零信任(zero trust)理念的软件定义边界(software defined perimeter,SDP)概念。SDP是一种基于身份进行资源访问控制的技术。SDP在授予终端设备对资源的访问权限之前,先对用户和用户使用的设备进行身份认证。如果认证通过,则用户能够使用该设备访问资源;如果认证失败,则禁止用户使用该设备访问资源。也即是,SDP技术通过对每个终端设备的访问请求进行严格认证,以确保资源永远被安全地访问,从而保证资源隔离和安全性。To deal with the above problems, some studies have proposed the concept of software defined perimeter (SDP) based on the concept of zero trust. SDP is a technology for resource access control based on identity. SDP first authenticates the user and the device used by the user before granting the terminal device access to resources. If the authentication passes, the user can use the device to access resources; if the authentication fails, the user is prohibited from using the device to access resources. That is to say, the SDP technology strictly authenticates the access request of each terminal device to ensure that resources are always safely accessed, thereby ensuring resource isolation and security.
图2为本申请实施例提供的一种SDP系统的结构示意图,该SDP系统包括:SDP控制器、SDP客户端、SDP网关和受保护的应用资源。SDP客户端和SDP网关均可以称为SDP主机,将SDP主机按照连接发起者和接收者分为SDP客户端和SDP网关。SDP网关设置在SDP客户端和受保护的应用资源之间,SDP客户端对于受保护的应用资源的访问需要经过SDP网关。FIG. 2 is a schematic structural diagram of an SDP system provided by an embodiment of the present application. The SDP system includes: an SDP controller, an SDP client, an SDP gateway, and protected application resources. Both the SDP client and the SDP gateway can be called the SDP host, and the SDP host is divided into the SDP client and the SDP gateway according to the connection initiator and receiver. The SDP gateway is set between the SDP client and the protected application resources, and the SDP client's access to the protected application resources needs to go through the SDP gateway.
可选地,SDP客户端安装在终端设备上,安装有SDP客户端的终端设备被称为SDP客户端设备。可选地,SDP客户端设备上还安装SDP客户端对应的本地代理(agent)。本地代理用于对该SDP客户端发送或接收的报文进行一定的处理。比如,在本申请实施例中,本地代理用于在下述方法实施例中的第一报文和第三报文的TCP选项字段中添加该SDP客户端设备的设备标识等。Optionally, the SDP client is installed on the terminal device, and the terminal device on which the SDP client is installed is called an SDP client device. Optionally, a local agent (agent) corresponding to the SDP client is also installed on the SDP client device. The local proxy is used to perform certain processing on the packets sent or received by the SDP client. For example, in the embodiment of the present application, the home agent is used to add the device identifier of the SDP client device in the TCP option fields of the first packet and the third packet in the following method embodiments.
在SDP系统中,SDP控制器用于对该SDP客户端设备进行身份认证,对SDP客户端设备对受保护的应用资源的访问进行鉴权等。可选地,SDP控制器还用于将合法SDP客户端设备的控制策略下发给该SDP网关,以便于SDP网关根据该控制策略控制SDP客户端设备对于该受保护的应用资源的访问。可选地,受保护的应用资源包括万维网(world wide web,web)应用、安全外壳协议(secure shell protocol,SSH)服务、基于客户端/服务器(client/server,C/S)系统的服务、基于浏览器/服务器(browser/server,B/S)系统的服务等,本申请实施例对此不作具体限制。In the SDP system, the SDP controller is used for identity authentication of the SDP client device, authentication of the SDP client device's access to protected application resources, and the like. Optionally, the SDP controller is further configured to deliver the control policy of the legal SDP client device to the SDP gateway, so that the SDP gateway controls the SDP client device's access to the protected application resource according to the control policy. Optionally, the protected application resources include world wide web (world wide web, web) applications, secure shell protocol (secure shell protocol, SSH) services, services based on client/server (client/server, C/S) systems, Services based on a browser/server (browser/server, B/S) system, etc., are not specifically limited in this embodiment of the present application.
SDP客户端和SDP网关分别与SDP控制器之间建立双向连接。当SDP客户端需要访问受保护的应用资源时,SDP客户端会先向SDP控制器发起认证,认证通过之后SDP控制器将需要放行的源IP地址和目的端口等信息发送给该SDP网关。SDP客户端再向SDP网关发送访问请求,由SDP网关判断访问请求的源IP地址是否合法、以及在合法时向受保护的应用资源转发访问请求,从而允许发送访问请求的SDP客户端访问受保护的应用资源。The SDP client and the SDP gateway respectively establish bidirectional connections with the SDP controller. When the SDP client needs to access protected application resources, the SDP client will first initiate authentication to the SDP controller. After the authentication is passed, the SDP controller will send information such as the source IP address and destination port that need to be released to the SDP gateway. The SDP client then sends an access request to the SDP gateway, and the SDP gateway judges whether the source IP address of the access request is legal, and forwards the access request to the protected application resource when it is legal, thereby allowing the SDP client sending the access request to access the protected application resources.
目前,在SDP系统中,如图3所示,当多个SDP客户端(图3中表示为第一SDP客户端至第n SDP客户端)通过SNAT设备的转换后使用同一个源IP地址访问受保护的应用资源时,SDP网关接收到来自多个SDP客户端的访问请求的源IP地址是相同的,SDP网关无法区分SNAT设备转换前的IP地址。在这种情况下,多个SDP客户端中只要有一个SDP客户端认证通过,则其他认证未通过的SDP客户端都能够使用该源IP地址访问受保护的应用资源,从而造成一定的安全隐患。基于此,本申请实施例提供一种访问控制方法,能够在多个SDP客户端使用一个SNAT设备时识别不同的SDP客户端,从而提高受保护的应用资源的安全性。At present, in the SDP system, as shown in Figure 3, when multiple SDP clients (shown as the first SDP client to the nth SDP client in Figure 3) use the same source IP address to access For protected application resources, the source IP address of the access request received by the SDP gateway from multiple SDP clients is the same, and the SDP gateway cannot distinguish the IP address before the SNAT device translation. In this case, as long as one of the multiple SDP clients passes the authentication, other SDP clients that fail the authentication can use the source IP address to access the protected application resources, thus causing certain security risks . Based on this, an embodiment of the present application provides an access control method, which can identify different SDP clients when multiple SDP clients use one SNAT device, thereby improving the security of protected application resources.
图4为本申请实施例提供的一种访问控制方法的流程示意图,该方法应用于包括SDP控制器、SDP客户端设备和SDP网关的系统中。参见图4,该方法包括以下几个步骤。图4中示出了SDP控制器对第一SDP客户端设备的单包认证失败的情况。FIG. 4 is a schematic flowchart of an access control method provided by an embodiment of the present application, and the method is applied to a system including an SDP controller, an SDP client device, and an SDP gateway. Referring to Fig. 4, the method includes the following steps. Fig. 4 shows the situation that the SDP controller fails to authenticate the single packet of the first SDP client device.
S201:第一SDP客户端设备向SDP控制器发送第一报文,第一报文的传输控制协议(transmission control protocol,TCP)选项(option)字段中携带第一SDP客户端设备的设备标识。S201: The first SDP client device sends a first packet to the SDP controller, and a transmission control protocol (transmission control protocol, TCP) option (option) field of the first packet carries a device identifier of the first SDP client device.
其中,SDP客户端设备为安装有SDP客户端的终端设备。在本实施例中,用“第一报文”表示SDP客户端设备发送的用于进行单包授权(single packet authorization,SPA)认证的报文。可选的,第一报文是第一SDP客户端设备向SDP控制器发起TCP连接时的同步(synchronous,SYN)报文。Wherein, the SDP client device is a terminal device installed with an SDP client. In this embodiment, "the first packet" is used to represent the packet sent by the SDP client device for single packet authorization (single packet authorization, SPA) authentication. Optionally, the first packet is a synchronous (synchronous, SYN) packet when the first SDP client device initiates a TCP connection to the SDP controller.
另外,第一报文是承载在TCP传输层上的报文,且该第一报文的TCP选项字段中携带第一SDP客户端设备的设备标识。示例性的,如图5所示,该TCP选项字段包括:种类(kind,K)、长度(length,L)和值(value,V)三部分。该种类K用于表示该TCP选项字段承载的信息的种类,K的不同取值对应不同的种类,比如,图5中以K的取值为252表示该TCP选项字段承载的信息为该SDP客户端设备的设备标识。该长度L用于表示该TCP选项字段占用的长度,图5中以该TCP选项字段占用18个字节为例进行说明。该值V用于表示该SDP客户端设备的设备标识,图5中以该值V占用的长度为16字节为例进行说明。In addition, the first message is a message carried on the TCP transport layer, and the TCP option field of the first message carries the device identifier of the first SDP client device. Exemplarily, as shown in FIG. 5 , the TCP option field includes three parts: kind (kind, K), length (length, L) and value (value, V). The type K is used to indicate the type of information carried by the TCP option field, and different values of K correspond to different types. For example, in Figure 5, the value of K is 252 to indicate that the information carried by the TCP option field is the SDP client Device ID of the end device. The length L is used to indicate the length occupied by the TCP option field. In FIG. 5 , the TCP option field occupies 18 bytes as an example for illustration. The value V is used to represent the device identifier of the SDP client device. In FIG. 5 , the length occupied by the value V is 16 bytes as an example for illustration.
再者,第一SDP客户端设备的设备标识能够用于唯一标识第一SDP客户端设备,该设备标识是基于第一SDP客户端设备的相关信息生成的。比如,第一SDP客户端设备将第一SDP客户端设备的主硬盘序列号、网卡的媒体接入控制(media access control)信息、和/或中央处理器(central processing unit,CPU)序列号等信息作为主键信息,再结合当前时间戳和一个随机数生成的散列值生成该设备标识。Furthermore, the device identifier of the first SDP client device can be used to uniquely identify the first SDP client device, and the device identifier is generated based on relevant information of the first SDP client device. For example, the first SDP client device sends the serial number of the main hard disk of the first SDP client device, the media access control (media access control) information of the network card, and/or the central processing unit (central processing unit, CPU) serial number, etc. information as the primary key information, combined with the current timestamp and a hash value generated by a random number to generate the device identifier.
具体的,当第一SDP客户端设备与SDP控制器建立TCP连接时,第一SDP客户端设备向该SDP控制器发送该第一报文,该第一报文的TCP选项字段中携带第一SDP客户端设备的设备标识,以通过该第一报文向该SDP控制器发起SPA认证。Specifically, when the first SDP client device establishes a TCP connection with the SDP controller, the first SDP client device sends the first message to the SDP controller, and the TCP option field of the first message carries the first The device identifier of the SDP client device, so as to initiate SPA authentication to the SDP controller through the first message.
可选的,该第一报文的TCP选项字段中携带的SDP客户端设备的设备标识为密文形式的设备标识。示例性,该TCP选项字段的结构如图5所示,该TCP选项字段中的第三部分(即V)中承载的设备标识为该SDP客户端设备的密文形式的设备标识。Optionally, the device identifier of the SDP client device carried in the TCP option field of the first packet is a device identifier in ciphertext. Exemplarily, the structure of the TCP option field is shown in FIG. 5 , and the device identifier carried in the third part (namely V) in the TCP option field is the device identifier in ciphertext form of the SDP client device.
在一种可能的实现方式中,密文形式的设备标识通过以下方式获得:第一SDP客户端设备根据第一SDP客户端设备的明文形式的设备标识获取指定长度的字符串,并使用该SYN报文的序列号对该字符串进行高级加密标准(advanced encryption standard,AES)对称加密,以得到该密文形式的设备标识。可选地,在获取指定长度的字符串时,第一SDP客户端设备使用哈希算法对该明文形式的设备标识进行哈希运算,或者对该明文形式的设备标识进行截取,以得到该指定长度的字符串。In a possible implementation, the device identification in cipher text is obtained in the following manner: the first SDP client device obtains a character string of a specified length according to the device identification in plain text of the first SDP client device, and uses the SYN The serial number of the message performs advanced encryption standard (AES) symmetric encryption on the character string to obtain the device identifier in the ciphertext form. Optionally, when obtaining a character string of a specified length, the first SDP client device uses a hash algorithm to perform a hash operation on the device identification in plain text, or intercepts the device identification in plain text to obtain the specified length string.
需要说明的是,第一SDP客户端设备对该字符串进行加密时使用的密钥除了SYN报文的序列号,还能够是其他具有唯一性的信息,本申请中仅以该密钥为SYN报文的序列号为例进行说明,并不构成对本申请实施例的限制。It should be noted that, in addition to the serial number of the SYN message, the key used by the first SDP client device to encrypt the string can also be other unique information. In this application, only the key is referred to as the SYN key. The sequence number of the message is described as an example, which does not constitute a limitation to the embodiment of the present application.
进一步的,当第一报文的TCP选项字段还包括其他种类的TCP选项时,若该TCP选项字段的长度超出预设长度(比如,40字节),第一SDP客户端设备还对该TCP选项字段进行筛选和重新组装,以确保该TCP选项字段的长度不超出该预设长度。第一SDP客户端设备在对该TCP选项字段中的原有TCP选项进行重新组装之后,将用于承载第一SDP客户端设备的设备标识的TCP选项添加在最后一个TCP选项的后面。若第一SDP客户端设备的设备标识未填充满对应的TCP选项,能够通过填充无效字符(比如,NOP)的方式填充满对应的TCP选项。Further, when the TCP option field of the first message also includes other types of TCP options, if the length of the TCP option field exceeds the preset length (for example, 40 bytes), the first SDP client device also includes the TCP The option field is screened and reassembled to ensure that the length of the TCP option field does not exceed the preset length. After the first SDP client device reassembles the original TCP options in the TCP option field, it adds the TCP option for carrying the device identifier of the first SDP client device behind the last TCP option. If the device identifier of the first SDP client device is not filled with the corresponding TCP options, the corresponding TCP options can be filled with invalid characters (for example, NOP).
比如,当该TCP选项字段中还包括用于提升该第一报文的转发性能的TCP选项时,第一SDP客户端设备保留该用于提升该第一报文的转发性能的TCP选项。比如,该用于提升该第一报文的转发性能的TCP选项包括下述三种TCP选项中的一种或者多种:允许选择确认(SACK_PERM)选项,窗口扩大因子(WINDOW)选项,最大段尺寸(maximum segment size,MSS)选项。For example, when the TCP option field further includes a TCP option for improving the forwarding performance of the first packet, the first SDP client device reserves the TCP option for improving the forwarding performance of the first packet. For example, the TCP option used to improve the forwarding performance of the first message includes one or more of the following three TCP options: allow selection of acknowledgment (SACK_PERM) option, window expansion factor (WINDOW) option, maximum segment Size (maximum segment size, MSS) option.
在另一种可能的实施例中,上述S201能够被替换为:第一SDP客户端设备向SDP控制器发送第一报文,该第一报文的安全传输层协议(transport layer security,TLS)选项中携带该SDP客户端设备的设备标识。In another possible embodiment, the above S201 can be replaced by: the first SDP client device sends a first message to the SDP controller, and the transport layer security (transport layer security, TLS) protocol of the first message The option carries the device ID of the SDP client device.
其中,通过第一报文的TLS选项字段携带第一SDP客户端设备的设备标识与通过第一报文的TCP选项字段携带第一SDP客户端设备的设备标识的区别在于:TLS连接是承载在应用层中的,即TLS连接位于TCP连接之上,这样在TLS选项中添加和获取该设备标识时都需要借助套接字(socket)来实现,而套接字的创建、读取和解析应用层数据会带来大量的系统开销。The difference between carrying the device identifier of the first SDP client device in the TLS option field of the first message and carrying the device identifier of the first SDP client device in the TCP option field of the first message is that the TLS connection is carried on In the application layer, that is, the TLS connection is located on top of the TCP connection, so when adding and obtaining the device identifier in the TLS option, it needs to be implemented with the help of a socket (socket), and the creation, reading and parsing of the socket application Layer data can bring a lot of system overhead.
需要说明的是,通过第一报文的TLS选项字段携带第一SDP客户端设备的设备标识的方式中,SDP控制器在接收该第一报文时,也能够通过下文所描述的步骤来实现对第一SDP客户端设备的单包认证,从而能够在多个SDP客户端设备经过同一SNAT设备转换后使用同一源IP地址时识别出不同的SDP客户端设备,保证受保护的应用资源的安全性。It should be noted that, in the method of carrying the device identifier of the first SDP client device through the TLS option field of the first message, when the SDP controller receives the first message, it can also be realized through the steps described below Single-packet authentication for the first SDP client device, so that when multiple SDP client devices use the same source IP address after conversion by the same SNAT device, different SDP client devices can be identified to ensure the security of protected application resources sex.
下文中均以该第一报文的TCP选项携带第一SDP客户端设备的设备标识为例进行说明。In the following, the TCP option of the first packet carries the device identifier of the first SDP client device as an example for illustration.
S202:当SDP控制器接收到该第一报文时,该SDP控制器根据第一SDP客户端设备的设备标识对第一SDP客户端设备进行单包认证。S202: When the SDP controller receives the first packet, the SDP controller performs single-packet authentication on the first SDP client device according to the device identifier of the first SDP client device.
当SDP控制器接收到第一报文,该SDP控制器解析该第一报文的TCP选项字段。如果该第一报文的TCP选项字段中未携带第一SDP客户端设备的设备标识,该SDP控制器确定第一SDP客户端设备的单包认证失败。如果该第一报文的TCP选项字段中携带第一该SDP客户端设备的设备标识,该SDP控制器基于第一SDP客户端设备的设备标识和该第一报文中携带的第一SDP客户端的源IP地址对该SDP客户端设备进行单包认证,如果该设备标识和该源IP地址均认证成功,则对第一SDP客户端设备的单包认证成功,如果该设备标识和该源IP地址中的至少一个认证失败,则对第一SDP客户端设备的单包认证失败。When the SDP controller receives the first packet, the SDP controller parses the TCP option field of the first packet. If the TCP option field of the first packet does not carry the device identifier of the first SDP client device, the SDP controller determines that the single-packet authentication of the first SDP client device fails. If the TCP option field of the first packet carries the device identifier of the first SDP client device, the SDP controller based on the device identifier of the first SDP client device and the first SDP client device carried in the first packet The source IP address of the first SDP client device performs single-packet authentication on the SDP client device. If the device ID and the source IP address are both authenticated successfully, the single-packet authentication of the first SDP client device succeeds. If the device ID and the source IP address If at least one of the addresses fails to be authenticated, the single-packet authentication to the first SDP client device fails.
其中,该SDP控制器对第一SDP客户端的源IP地址进行认证的过程与现有技术中的认证过程一致,本申请实施例在此不再赘述。下面对该SDP控制器对第一SDP客户端设备的设备标识进行认证的过程进行详细说明。Wherein, the process of the SDP controller authenticating the source IP address of the first SDP client is consistent with the authentication process in the prior art, and will not be repeated in this embodiment of the present application. The process in which the SDP controller authenticates the device identifier of the first SDP client device will be described in detail below.
示例性的,当SDP控制器得到第一SDP客户端设备的设备标识时,SDP控制器查询本地存储的信任设备标识列表,其中信任设备标识列表中包括多个SDP客户端设备的明文形式的设备标识。可选地,信任设备标识列表中的多个SDP客户端设备的设备标识是多个SDP客户端设备向该SDP控制器注册时发送给SDP控制器的。在第一报文的TCP选项字段中携带的SDP客户端设备的设备标识为明文形式的设备标识的情况下,如果第一报文的TCP选项字段中携带的SDP客户端设备的设备标识在该信任设备标识列表中,该SDP控制器确定第一客户端设备的设备标识认证成功。如果第一报文的TCP选项字段中携带的SDP客户端设备的设备标识不在该信任设备标识列表中,该SDP控制器确定第一客户端设备的设备标识认证失败。Exemplarily, when the SDP controller obtains the device identifier of the first SDP client device, the SDP controller queries a locally stored trusted device identifier list, wherein the trusted device identifier list includes multiple SDP client devices in plain text logo. Optionally, the device identifiers of the multiple SDP client devices in the trusted device identifier list are sent to the SDP controller when the multiple SDP client devices register with the SDP controller. In the case where the device identification of the SDP client device carried in the TCP option field of the first message is a device identification in clear text form, if the device identification of the SDP client device carried in the TCP option field of the first message is in the In the list of trusted device identifiers, the SDP controller determines that the authentication of the device identifier of the first client device succeeds. If the device identifier of the SDP client device carried in the TCP option field of the first packet is not in the trusted device identifier list, the SDP controller determines that authentication of the device identifier of the first client device fails.
在一种可能的实施例中,在第一报文的TCP选项字段中携带的设备标识为密文形式的设备标识的情况下,SDP控制器解析该第一报文的TCP选项字段,得到该密文形式的设备标识。SDP控制器使用该第一报文(即SYN报文)的序列号解密该密文形式的设备标识,以得到指定长度的字符串。之后,SDP控制器基于该字符串对第一SDP客户端设备的设备标识进行认证。In a possible embodiment, when the device identifier carried in the TCP option field of the first message is a device identifier in ciphertext form, the SDP controller parses the TCP option field of the first message to obtain the Device ID in ciphertext. The SDP controller uses the serial number of the first message (that is, the SYN message) to decrypt the device identification in ciphertext to obtain a character string of a specified length. Afterwards, the SDP controller authenticates the device identification of the first SDP client device based on the character string.
示例性的,当SDP控制器得到第一报文中的SDP客户端设备的设备标识时,该SDP控制器查询本地存储的信任设备标识列表对应的字符串列表。可选地,字符串列表中包括SDP控制器根据信任设备标识列表中的多个SDP客户端设备的明文形式的设备标识分别获得的指定长度的字符串。字符串列表中字符串的获得方式与步骤S201中的描述类似,请参照步骤S201的描述,例如SDP控制器对信任设备标识列表中的一个SDP客户端设备的明文形式的设备标识进行哈希运算后得到的对应的指定长度的字符串。如果SDP控制器从第一报文的TCP选项字段得到的指定长度的字符串在该字符串列表中,SDP控制器确定第一SDP客户端设备的设备标识认证成功;如果从第一报文的TCP选项字段得到的指定长度的字符串不在该字符串列表中,SDP控制器确定第一客户端设备的设备标识认证失败。Exemplarily, when the SDP controller obtains the device identifier of the SDP client device in the first message, the SDP controller queries the string list corresponding to the trusted device identifier list stored locally. Optionally, the character string list includes character strings of a specified length respectively obtained by the SDP controller according to device identifications in clear text of multiple SDP client devices in the trusted device identification list. The way to obtain the character string in the character string list is similar to the description in step S201, please refer to the description in step S201, for example, the SDP controller performs a hash operation on the plaintext device identification of an SDP client device in the trusted device identification list The corresponding character string of the specified length is obtained. If the character string of the specified length obtained by the SDP controller from the TCP option field of the first message is in the list of character strings, the SDP controller determines that the device identification authentication of the first SDP client device is successful; The character string of the specified length obtained in the TCP option field is not in the character string list, and the SDP controller determines that the device identification authentication of the first client device fails.
进一步的,对于第一SDP客户端设备,SDP控制器在注册过程中获取第一SDP客户端设备的设备标识包括:第一SDP客户端设备向SDP控制器发送注册信息,该注册信息包括用户信息和第一SDP客户端设备的设备标识;该SDP控制器接收该注册信息,并在第一SDP客户端设备的设备标识审核通过之后,将第一SDP客户端设备的设备标识添加在该信任设备标识列表中;在该用户信息审核通过之后,将该用户信息添加在信任用户信息列表中。Further, for the first SDP client device, the SDP controller obtaining the device identifier of the first SDP client device during the registration process includes: the first SDP client device sends registration information to the SDP controller, and the registration information includes user information and the device ID of the first SDP client device; the SDP controller receives the registration information, and after the device ID of the first SDP client device is approved, adds the device ID of the first SDP client device to the trusted device In the identification list; after the user information is approved, the user information is added to the trusted user information list.
可选的,注册信息还包括用户等级和访问权限等信息,比如该注册信息还包括用户的工作域,该SDP控制器还根据该工作域将受保护的资源中允许该用户访问的至少一个应用服务器关联至该用户,以形成该用户的资源列表。Optionally, the registration information also includes information such as user level and access rights. For example, the registration information also includes the user's work domain, and the SDP controller also assigns at least one application that the user is allowed to access in the protected resources according to the work domain. A server is associated with the user to form a resource list for the user.
S203a:如果对第一SDP客户端设备的单包认证失败,该SDP控制器关闭该第一报文所属的第一SDP客户端设备和该SDP控制器之间的TCP连接。S203a: If the single-packet authentication of the first SDP client device fails, the SDP controller closes the TCP connection between the first SDP client device to which the first packet belongs and the SDP controller.
其中,SDP控制器关闭第一报文所属的第一SDP客户端设备和该SDP控制器之间的TCP连接,或者称为该SDP控制器阻断该第一报文所属的第一SDP客户端设备和该SDP控制器之间的TCP连接。Wherein, the SDP controller closes the TCP connection between the first SDP client device to which the first message belongs and the SDP controller, or the SDP controller blocks the first SDP client device to which the first message belongs A TCP connection between the device and the SDP controller.
可选的,如果SDP控制器对第一SDP客户端设备的单包认证失败,该SDP控制器还向第一SDP客户端设备发送单包认证响应,该单包认证响应用于指示对第一SDP客户端设备的单包认证失败。Optionally, if the SDP controller fails the single-packet authentication of the first SDP client device, the SDP controller also sends a single-packet authentication response to the first SDP client device, where the single-packet authentication response is used to indicate that the first Single-packet authentication of the SDP client device failed.
在本申请实施例中,当第一SDP客户端设备向SDP控制器发起单包认证时,第一SDP客户端向该SDP控制器发送第一报文,该第一报文的TCP选项字段中携带第一SDP客户端设备的设备标识。当该SDP控制器接收到该第一报文时,该SDP控制器基于该第一报文的TCP选项字段中携带的SDP客户端设备的设备标识对第一SDP客户端设备进行单包认证。如果对第一SDP客户端设备的单包认证失败,该SDP控制器关闭该第一报文所属的SDP客户端设备和该SDP控制器之间的TCP连接。这样,当多个SDP客户端设备经过同一SNAT设备转换后使用同一源IP地址时,该SDP控制器能够识别不同的SDP客户端设备,从而能够保证受保护的应用资源的安全性。In this embodiment of the application, when the first SDP client device initiates single-packet authentication to the SDP controller, the first SDP client sends the first message to the SDP controller, and the TCP option field of the first message Carry the device identifier of the first SDP client device. When the SDP controller receives the first message, the SDP controller performs single-packet authentication on the first SDP client device based on the device identifier of the SDP client device carried in the TCP option field of the first message. If the single-packet authentication of the first SDP client device fails, the SDP controller closes the TCP connection between the SDP client device to which the first packet belongs and the SDP controller. In this way, when multiple SDP client devices use the same source IP address after being converted by the same SNAT device, the SDP controller can identify different SDP client devices, thereby ensuring the security of the protected application resources.
上述图4示出了SDP控制器对第一SDP客户端设备的单包认证失败的情况。下面通过图6示出SDP控制器对第二SDP客户端设备的单包认证成功的情况。其中,第二SDP客户端设备能够通过上述S201相同的方式向SDP控制器发起单包认证,该SDP控制器也能够通过上述S202相同的方式对第二SDP客户端设备进行单包认证,本申请实施例在此不再赘述。The above FIG. 4 shows the situation that the SDP controller fails to authenticate the single packet of the first SDP client device. FIG. 6 below shows the situation that the SDP controller succeeds in single-packet authentication of the second SDP client device. Wherein, the second SDP client device can initiate single-packet authentication to the SDP controller in the same manner as above-mentioned S201, and the SDP controller can also perform single-packet authentication on the second SDP client device in the same manner as above-mentioned S202. The embodiment will not be repeated here.
进一步,如图6所示,如果SDP控制器对第二SDP客户端设备的单包认证成功,该方法还包括S203b-S206。Further, as shown in FIG. 6, if the SDP controller succeeds in single-packet authentication of the second SDP client device, the method further includes S203b-S206.
S203b:第二SDP客户端设备向SDP控制器发送第二报文,该第二报文的TLS选项字段或者应用层报文头中携带鉴权信息,该鉴权信息包括第二SDP客户端设备的用户信息。S203b: The second SDP client device sends a second message to the SDP controller, the TLS option field of the second message or the application layer message header carries authentication information, and the authentication information includes the second SDP client device user information.
其中,第二SDP客户端设备的用户信息包括登录第二SDP客户端设备的用户的信息。可选的,该用户信息包括用户名和密码,该用户名是该用户向该SDP控制器注册时设置的,或者是该用户向该SDP控制器注册时该SDP控制器为该用户分配的。Wherein, the user information of the second SDP client device includes information of a user who logs in to the second SDP client device. Optionally, the user information includes a user name and a password, and the user name is set when the user registers with the SDP controller, or assigned by the SDP controller for the user when the user registers with the SDP controller.
另外,在本实施例中,用“第二报文”表示SDP客户端设备向SDP控制器发送的用于用户认证的报文。该第二报文是承载在TLS应用层上的报文,该第二报文的TLS选项字段或者应用层报文头中携带第二SDP客户端设备的鉴权信息。该TLS选项字段的结构与上述第一报文的TCP选项字段的结构类似,具体描述参见上述TCP选项字段的相关描述,本申请实施例对此不作具体限制。下文中以该第二报文的TLS选项字段携带该鉴权信息为例进行说明。In addition, in this embodiment, a "second message" is used to indicate a message for user authentication sent by the SDP client device to the SDP controller. The second message is a message carried on the TLS application layer, and the TLS option field of the second message or the header of the application layer carries the authentication information of the second SDP client device. The structure of the TLS option field is similar to the structure of the TCP option field in the first packet. For specific description, refer to the relevant description of the above TCP option field, which is not specifically limited in this embodiment of the present application. The authentication information carried in the TLS option field of the second packet is taken as an example for description below.
具体的,如果SDP控制器对第二SDP客户端设备的单包认证成功,第二SDP客户端设备向该SDP控制器发送第二报文,该第二报文的TLS选项字段或者应用层报文头中携带第二SDP客户端设备的鉴权信息,以通过该第二报文向该SDP控制器发起用户认证。Specifically, if the SDP controller successfully authenticates the single packet of the second SDP client device, the second SDP client device sends a second message to the SDP controller, and the TLS option field of the second message or the application layer report The header carries authentication information of the second SDP client device, so as to initiate user authentication to the SDP controller through the second message.
可选的,该SDP控制器在对第二SDP客户端设备进行单包认证之后,如果对第二SDP客户端设备的单包认证成功,该SDP控制器向第二SDP客户端设备发送单包认证响应,该单包认证响应用于指示对第二SDP客户端设备的单包认证成功。当第二SDP客户端设备接收到该单包认证响应时,第二SDP客户端设备向该SDP控制器发送该第二报文。Optionally, after the SDP controller performs single-packet authentication on the second SDP client device, if the single-packet authentication to the second SDP client device succeeds, the SDP controller sends a single-packet authentication to the second SDP client device An authentication response, where the single-packet authentication response is used to indicate that the single-packet authentication of the second SDP client device succeeds. When the second SDP client device receives the single-packet authentication response, the second SDP client device sends the second packet to the SDP controller.
在一种示例中,如图7所示,第二SDP客户端设备通过以下方式生成该第二报文:第二SDP客户端设备中的本地代理在通过在诸如NetFilter等子系统加入的钩子(hook)函数从上层协议栈获取当前的应用报文,并将第二SDP客户端设备的鉴权信息添加在该应用报文中。图6中还示出了相关的NetFilter钩子函数挂接点和路由等,比如,输入本地(LOCAL_IN)、本地输出(LOCAL_OUT)、路由前处理(PRE ROUTING)、直接转发(FORWARD)和路由后处理(POST ROUTING)等。比如,第二SDP客户端设备将该鉴权信息添加在该应用报文的TLS选项字段中,已生成该第二报文。可替换地,该第二报文中携带的鉴权信息携带在超文本传输安全协议(hyper text transfer protocol secure,HTTPS)层中,比如,携带在HTTPS隧道(tunnel)封装报文头中。比如,当该受保护的资源为B/S系统的服务时,该鉴权信息携带在该HTTPS层中;当该受保护的资源为C/S系统的服务时,该鉴权信息携带在该TLS选项字段中。In an example, as shown in FIG. 7, the second SDP client device generates the second message in the following manner: the local agent in the second SDP client device is through a hook added in a subsystem such as NetFilter ( The hook) function obtains the current application message from the upper layer protocol stack, and adds the authentication information of the second SDP client device to the application message. Figure 6 also shows the relevant NetFilter hook function mount points and routes, such as input local (LOCAL_IN), local output (LOCAL_OUT), pre-routing processing (PRE ROUTING), direct forwarding (FORWARD) and post-routing processing ( POST ROUTING), etc. For example, the second SDP client device adds the authentication information to the TLS option field of the application packet, and the second packet has been generated. Alternatively, the authentication information carried in the second packet is carried in a hypertext transfer protocol secure (hyper text transfer protocol secure, HTTPS) layer, for example, carried in an HTTPS tunnel (tunnel) encapsulation packet header. For example, when the protected resource is a service of the B/S system, the authentication information is carried in the HTTPS layer; when the protected resource is a service of the C/S system, the authentication information is carried in the in the TLS options field.
S204:当SDP控制器接收到该第二报文时,该SDP控制器根据第二SDP客户端设备的设备标识和该用户信息对第二SDP客户端设备进行用户认证。S204: When the SDP controller receives the second message, the SDP controller performs user authentication on the second SDP client device according to the device identifier of the second SDP client device and the user information.
当SDP控制器接收到第二报文时,该SDP控制器解析该第二报文的TLS选项字段,以得到该用户信息。之后,该SDP控制器根据该用户信息和第二SDP客户端设备的设备标识对第二SDP客户端设备进行用户认证。可选的,进行用户认证时使用的设备标识可为第一报文的TCP选项字段携带的设备标识,或者该第二报文还携带该设备标识。示例性的,该SDP控制器将第二SDP客户端设备的设备标识和该用户信息分别与第二SDP客户端设备注册时的设备标识和该用户信息进行对比;如果该第一报文携带的设备标识和该第二报文携带的该用户信息与注册时的设备标识和该用户信息一致,该SDP控制器确定对第二SDP客户端设备的用户认证成功;如果该第一报文携带的设备标识和该第二报文携带的该用户信息与注册时的设备标识和该用户信息不一致,该SDP控制器确定对第二SDP客户端设备的用户认证失败。When the SDP controller receives the second packet, the SDP controller parses the TLS option field of the second packet to obtain the user information. Afterwards, the SDP controller performs user authentication on the second SDP client device according to the user information and the device identifier of the second SDP client device. Optionally, the device identifier used for user authentication may be the device identifier carried in the TCP option field of the first packet, or the second packet also carries the device identifier. Exemplarily, the SDP controller compares the device identification and the user information of the second SDP client device with the device identification and the user information when the second SDP client device is registered; if the first packet carries The device identification and the user information carried in the second message are consistent with the device identification and the user information at the time of registration, and the SDP controller determines that the user authentication of the second SDP client device is successful; if the first message carries the The device identifier and the user information carried in the second message are inconsistent with the device identifier and the user information during registration, and the SDP controller determines that the user authentication of the second SDP client device fails.
需要说明的是,SDP控制器对第一报文携带的设备标识与注册时的设备标识进行认证的过程与上述单包认证时的过程一致,具体参见上文中的相关描述,本申请实施例在此不再赘述。此外,SDP控制器对第二报文携带的用户信息与注册时的用户信息进行认证的过程参见相关技术中的描述,本申请实施例对此不作描述。It should be noted that the process for the SDP controller to authenticate the device ID carried in the first message and the device ID at the time of registration is consistent with the above-mentioned single-packet authentication process. For details, refer to the relevant description above. The embodiment of this application is in This will not be repeated here. In addition, for the process of the SDP controller authenticating the user information carried in the second message and the user information at the time of registration, refer to the description in the related art, which is not described in this embodiment of the present application.
在一种可能的实施例中,第二SDP客户端设备发送的第一报文和第二报文为同一个TCP连接中的报文。示例性的,假设该第一报文和该第二报文为第一TCP连接中的报文,该第一报文为SYN报文,该第二报文为应用报文。具体的,在建立该第一TCP连接的过程中,第二SDP客户端设备向该SDP控制器发送该SYN报文,该SYN报文的TCP选项字段携带该SDP客户端设备的设备标识;该SDP控制器向第二SDP客户端设备返回同步确认(SYN+ACK)报文;第二SDP客户端设备向该SDP控制器发送该ACK报文,该第一TCP连接成功建立;第二SDP客户端设备通过该第一TCP连接向该SDP控制器发送该应用报文,该应用报文的TLS选项字段中携带该鉴权信息。In a possible embodiment, the first packet and the second packet sent by the second SDP client device are packets in the same TCP connection. Exemplarily, it is assumed that the first packet and the second packet are packets in the first TCP connection, the first packet is a SYN packet, and the second packet is an application packet. Specifically, in the process of establishing the first TCP connection, the second SDP client device sends the SYN message to the SDP controller, and the TCP option field of the SYN message carries the device identifier of the SDP client device; The SDP controller returns a synchronous confirmation (SYN+ACK) message to the second SDP client device; the second SDP client device sends the ACK message to the SDP controller, and the first TCP connection is successfully established; the second SDP client The end device sends the application message to the SDP controller through the first TCP connection, and the TLS option field of the application message carries the authentication information.
在另一种可能的实施例中,第二SDP客户端设备发送的第一报文和该第二报文为不同TCP连接中的报文。示例性的,假设该第一报文为第一TCP连接中的SYN报文,第二报文为第二TCP连接中的应用报文。具体的,在建立第一TCP连接的过程中,第二SDP客户端设备向该SDP控制器发送SYN报文,该SYN报文的TCP选项字段携带第二SDP客户端设备的设备标识;该SDP控制器向第二SDP客户端设备返回同步确认(SYN+ACK)报文;第二SDP客户端设备向该SDP控制器发送该ACK报文。在第二TCP建立完成后,第二SDP客户端设备向该SDP控制器发送应用报文,该应用报文的TLS选项字段中携带该鉴权信息。In another possible embodiment, the first packet sent by the second SDP client device and the second packet are packets in different TCP connections. Exemplarily, it is assumed that the first packet is a SYN packet in the first TCP connection, and the second packet is an application packet in the second TCP connection. Specifically, in the process of establishing the first TCP connection, the second SDP client device sends a SYN message to the SDP controller, and the TCP option field of the SYN message carries the device identifier of the second SDP client device; the SDP The controller returns a synchronization confirmation (SYN+ACK) message to the second SDP client device; the second SDP client device sends the ACK message to the SDP controller. After the establishment of the second TCP is completed, the second SDP client device sends an application message to the SDP controller, and the TLS option field of the application message carries the authentication information.
可选的,若第二SDP客户端设备发送的第一报文和该第二报文为不同TCP连接中的报文,则第二SDP客户端设备向SDP控制器发送的第二报文还携带有盐值(salt),该盐值可用于关联该第一报文所属的TCP连接和该第二报文所属的TCP连接,该盐值是该SDP控制器在对第二SDP客户端设备的单包认证成功后发送给第二SDP客户端设备。示例性的,第二SDP客户端设备向该SDP控制器发送该第二报文之前,该方法还包括:该SDP控制器根据第二SDP客户端设备发送的第一报文向第二SDP客户端设备发送该盐值。这样,当第二SDP客户端设备接收到该盐值时,第二SDP客户端设备将该盐值携带在第二报文中发送给该SDP控制器。此时,当该SDP控制器接收第二报文时,该SDP控制器能够根据第二报文中携带的该盐值确定第二SDP客户端设备的单包认证已成功。之后,该SDP控制器再按照上述S204对第二SDP客户端设备进行用户认证。Optionally, if the first message sent by the second SDP client device and the second message are messages in different TCP connections, the second message sent by the second SDP client device to the SDP controller is also carry a salt value (salt), the salt value can be used to associate the TCP connection to which the first message belongs and the TCP connection to which the second message belongs, and the salt value is that the SDP controller sends a message to the second SDP client device After successful authentication, the single packet is sent to the second SDP client device. Exemplarily, before the second SDP client device sends the second message to the SDP controller, the method further includes: the SDP controller sends the second SDP client the second message according to the first message sent by the second SDP client device The end device sends the salt value. In this way, when the second SDP client device receives the salt value, the second SDP client device carries the salt value in the second message and sends it to the SDP controller. At this time, when the SDP controller receives the second message, the SDP controller can determine that the single-packet authentication of the second SDP client device has succeeded according to the salt value carried in the second message. Afterwards, the SDP controller performs user authentication on the second SDP client device according to the above S204.
进一步的,如果SDP控制器对第二SDP客户端设备的用户认证失败,则:若第一报文和第二报文为同一TCP连接中的报文,该SDP控制器关闭第一报文所属的第二SDP客户端设备和该SDP控制器之间的TCP连接;若第一报文和第二报文为不同TCP连接中的报文,该SDP控制器关闭第一报文和第二报文所属的第二SDP客户端设备和该SDP控制器之间的TCP连接。如果该SDP控制器对第二SDP客户端设备的用户认证成功,该SDP控制器执行下述S205和S206。图6中还示出了SDP控制器对第二SDP客户端设备的用户认证成功的情况。Further, if the SDP controller fails to authenticate the user of the second SDP client device, then: if the first message and the second message are messages in the same TCP connection, the SDP controller closes the The TCP connection between the second SDP client device and the SDP controller; if the first message and the second message are messages in different TCP connections, the SDP controller closes the first message and the second message A TCP connection between the second SDP client device to which the file belongs and the SDP controller. If the SDP controller successfully authenticates the user of the second SDP client device, the SDP controller executes the following S205 and S206. Fig. 6 also shows the situation that the SDP controller successfully authenticates the user of the second SDP client device.
S205:该SDP控制器向第二SDP客户端设备发送资源列表,该资源列表包括允许第二SDP客户端设备访问的至少一个应用服务器的标识。S205: The SDP controller sends a resource list to the second SDP client device, where the resource list includes an identifier of at least one application server that is allowed to be accessed by the second SDP client device.
其中,允许第二SDP客户端设备访问的至少一个应用服务器属于受保护的资源,该受保护的资源中还包括除该至少一个应用服务器之外的其他的资源。该至少一个应用服务器中每个应用服务器的标识可用于唯一标识该应用服务器。可选的,该至少一个应用服务器中每个应用服务器的标识包括该应用服务器的端口和IP地址。Wherein, at least one application server that is allowed to be accessed by the second SDP client device belongs to a protected resource, and the protected resource also includes other resources except the at least one application server. The identifier of each application server in the at least one application server may be used to uniquely identify the application server. Optionally, the identifier of each application server in the at least one application server includes a port and an IP address of the application server.
另外,允许第二SDP客户端设备访问的至少一个应用服务器是该SDP控制器根据第二SDP客户端设备的用户信息为第二SDP客户端设备分配的。比如,该用户信息可用于指示用户等级和访问权限等信息,该SDP控制器根据该用户等级和该访问权限等信息为第二SDP客户端设备分配允许第二SDP客户端设备访问的应用服务器。In addition, the at least one application server that is allowed to be accessed by the second SDP client device is allocated by the SDP controller for the second SDP client device according to the user information of the second SDP client device. For example, the user information may be used to indicate information such as user level and access rights, and the SDP controller assigns the second SDP client device an application server that is allowed to be accessed by the second SDP client device according to the information such as the user level and the access rights.
具体的,如果SDP控制器对第二SDP客户端设备的用户认证成功,该SDP控制器根据该用户信息获取该至少一个应用服务器的标识,即获取该资源列表,并将该资源列表发送给第二SDP客户端设备。这样,第二SDP客户端设备能够接收到该资源列表,并基于该资源列表向SDP网关发起资源访问。Specifically, if the SDP controller successfully authenticates the user of the second SDP client device, the SDP controller obtains the identifier of the at least one application server according to the user information, that is, obtains the resource list, and sends the resource list to the second SDP client device. Two SDP client devices. In this way, the second SDP client device can receive the resource list, and initiate resource access to the SDP gateway based on the resource list.
可选的,SDP控制器还向第二SDP客户端设备发送令牌(token)信息,比如,该SDP控制器能够通过set cookie的方式将该令牌信息发送给第二SDP客户端设备,后续第二SDP客户端设备在访问该至少一个应用服务器时携带该令牌信息,该令牌信息可用于进行访问校验。其中,该令牌信息中包括一个或者多个令牌。可选的,该一个或者多个令牌包括用户令牌(user_token)、设备令牌(device_token)和应用令牌(app_token)等。Optionally, the SDP controller also sends token (token) information to the second SDP client device. For example, the SDP controller can send the token information to the second SDP client device by means of a set cookie, and the subsequent When the second SDP client device accesses the at least one application server, it carries the token information, and the token information can be used for access verification. Wherein, the token information includes one or more tokens. Optionally, the one or more tokens include a user token (user_token), a device token (device_token), an application token (app_token) and the like.
S206:SDP控制器向SDP网关发送客户端信息,该客户端信息用于指示第二SDP客户端设备认证通过,该客户端信息包括第二SDP客户端设备的设备标识。S206: The SDP controller sends client information to the SDP gateway, where the client information is used to indicate that the second SDP client device has passed the authentication, and the client information includes a device identifier of the second SDP client device.
如果SDP控制器对第二SDP客户端设备的用户认证成功,该SDP控制器向该SDP网关发送第二SDP客户端设备的客户端信息。这样,该SDP网关能够接收到该客户端信息,后续,当第二SDP客户端设备向该SDP网关发起资源访问时,该SDP网关能够基于该客户端信息中的设备标识对第二SDP客户端设备的访问进行合法性校验。If the SDP controller successfully authenticates the user of the second SDP client device, the SDP controller sends the client information of the second SDP client device to the SDP gateway. In this way, the SDP gateway can receive the client information, and subsequently, when the second SDP client device initiates resource access to the SDP gateway, the SDP gateway can send information to the second SDP client based on the device identifier in the client information. The access of the device is checked for legitimacy.
在一种可能的实施例中,SDP控制器向SDP网关发送北向报文,该北向报文中携带客户端信息。该北向报文是指通过Restful或者Netconf等北向协议下发的控制报文。可选的,该SDP控制器还能够向该SDP网关发送需要放行的源IP地址和目的端口,即向该SDP网关发送第二SDP客户端设备的源IP地址和允许第二SDP客户端设备访问的至少一个应用服务器的端口。该源IP地址和目的端口能够承载在该北向报文中。In a possible embodiment, the SDP controller sends a northbound message to the SDP gateway, where the northbound message carries client information. The northbound packet refers to a control packet sent through a northbound protocol such as Restful or Netconf. Optionally, the SDP controller can also send the source IP address and destination port that need to be released to the SDP gateway, that is, send the source IP address of the second SDP client device to the SDP gateway and allow the second SDP client device to access The port of at least one application server. The source IP address and destination port can be carried in the northbound message.
上述过程中,当SDP控制器接收到第二SDP客户端设备发送的第一报文时,该SDP控制器能够按照下述图8所示的流程对第二SDP客户端设备进行认证。示例性的,当该SDP控制器接收到该第一报文时,该认证过程包括:该SDP控制器判断该第一报文是否为SYN报文;若该第一报文不是SYN报文,该SDP控制器忽略该第一报文;若该第一报文是SYN报文,该SDP控制器判断该第一报文的TCP选项字段中是否携带第二SDP客户端设备的设备标识;若该第一报文的TCP选项字段中未携带该设备标识,该SDP控制器关闭该第一报文所属的第二SDP客户端设备与该SDP控制器之间的连接;若该第一报文的TCP选项字段中携带了该设备标识,判断该设备标识是否合法;若该设备标识不合法,则关闭该第一报文所属的第二SDP客户端设备与该SDP控制器之间的连接;若该设备标识合法,判断第二SDP客户端设备发送的第二报文中的用户信息是否合法;若该第二报文中的用户信息不合法,该SDP控制器关闭该第一报文所属的第二SDP客户端设备与该SDP控制器之间的连接;若该第二报文中的用户信息合法,该SDP控制器向第二SDP客户端设备发送资源列表,并向该SDP网关发送客户端信息。In the above process, when the SDP controller receives the first message sent by the second SDP client device, the SDP controller can authenticate the second SDP client device according to the flow shown in FIG. 8 below. Exemplarily, when the SDP controller receives the first message, the authentication process includes: the SDP controller judges whether the first message is a SYN message; if the first message is not a SYN message, The SDP controller ignores the first message; if the first message is a SYN message, the SDP controller judges whether the TCP option field of the first message carries the device identification of the second SDP client device; if The device identifier is not carried in the TCP option field of the first message, and the SDP controller closes the connection between the second SDP client device to which the first message belongs and the SDP controller; if the first message The device identification is carried in the TCP option field of the device, and it is judged whether the device identification is legal; if the device identification is not legal, then close the connection between the second SDP client device to which the first message belongs and the SDP controller; If the device identifier is legal, judge whether the user information in the second message sent by the second SDP client device is legal; if the user information in the second message is illegal, the SDP controller closes the The connection between the second SDP client device and the SDP controller; if the user information in the second message is legal, the SDP controller sends a resource list to the second SDP client device, and sends a resource list to the SDP gateway client information.
上述图6-图8示出了SDP控制器对第二SDP客户端设备的单包认证成功后,第二SDP客户端设备向该SDP控制器发送用于进行用户认证的第二报文,以及SDP控制器对第二SDP客户端设备的用户认证成功后,向第二SDP客户端设备发送的资源列表、向SDP网关发送客户端信息的情况。The above-mentioned Figures 6-8 show that after the SDP controller successfully authenticates the single packet of the second SDP client device, the second SDP client device sends a second message for user authentication to the SDP controller, and After the SDP controller successfully authenticates the user of the second SDP client device, it sends the resource list to the second SDP client device and sends the client information to the SDP gateway.
下面通过图9对第二SDP客户端设备接收到资源列表、以及SDP网关接收到客户端信息之后,第二SDP客户端设备向该SDP网关发起资源访问、以及SDP网关对第二SDP客户端设备的访问进行校验和校验成功后返回业务数据的情况。如图9所示,该方法还包括:S207-S210,图9中未示出S201-S206。After the second SDP client device receives the resource list and the SDP gateway receives the client information through FIG. 9, the second SDP client device initiates resource access to the SDP gateway, and the SDP gateway initiates resource access to the second SDP client device. The case where the business data is returned after the access is verified and the verification is successful. As shown in FIG. 9 , the method further includes: S207-S210, and S201-S206 are not shown in FIG. 9 .
S207:第二SDP客户端设备向SDP网关发送第三报文,该第三报文的TCP选项字段中携带第二SDP客户端设备的设备标识。S207: The second SDP client device sends a third packet to the SDP gateway, where the TCP option field of the third packet carries the device identifier of the second SDP client device.
其中,在本申请实施例中,用“第三报文”表示第二SDP客户端设备向SDP网关发送的用于进行资源访问的报文。可选的,该第三报文是第二SDP客户端设备向该SDP网关发起TCP连接时的同步(synchronous,SYN)报文。Wherein, in the embodiment of the present application, a "third message" is used to represent a message for resource access sent by the second SDP client device to the SDP gateway. Optionally, the third message is a synchronization (synchronous, SYN) message when the second SDP client device initiates a TCP connection to the SDP gateway.
另外,第三报文的TCP选项字段中携带第二SDP客户端设备的设备标识的方式与上述S201中描述的第一报文的TCP选项字段中携带SDP客户端设备的设备标识的方式类似,具体参见S201中的相关描述,本申请实施例在此不再赘述。In addition, the manner in which the device identifier of the second SDP client device is carried in the TCP option field of the third packet is similar to the manner in which the device identifier of the SDP client device is carried in the TCP option field of the first packet described in S201 above, For details, refer to related descriptions in S201 , which will not be repeated in this embodiment of the present application.
可选的,第三报文的TCP选项字段中携带的SDP客户端设备的设备标识为密文形式的设备标识。该密文形式的设备标识通过以下方式获得:第二SDP客户端设备根据第二SDP客户端设备的明文形式的设备标识获取指定长度的字符串,并使用第二SDP客户端设备向该SDP网关发起TCP连接时的SYN报文的序列号对该字符串进行AES对称加密,以得到该密文形式的设备标识。Optionally, the device identifier of the SDP client device carried in the TCP option field of the third message is a device identifier in ciphertext. The device identification in the cipher text form is obtained in the following manner: the second SDP client device obtains a character string of a specified length according to the device identification in the plain text form of the second SDP client device, and uses the second SDP client device to send a message to the SDP gateway The serial number of the SYN message when initiating a TCP connection performs AES symmetric encryption on the character string to obtain the device identification in the ciphertext form.
具体的,当第二SDP客户端设备接收到该SDP控制器发送的资源列表时,第二SDP客户端设备根据该资源列表向SDP网关发送第三报文,该第三报文可用于请求访问该至少一个应用服务器中的应用服务器,该第三报文的TCP选项字段中携带第二SDP客户端设备的设备标识。Specifically, when the second SDP client device receives the resource list sent by the SDP controller, the second SDP client device sends a third message to the SDP gateway according to the resource list, and the third message can be used to request access For the application server in the at least one application server, the TCP option field of the third packet carries the device identifier of the second SDP client device.
可选的,第三报文还携带令牌信息,该令牌信息用于SDP网关对第二SDP客户端设备发起的资源访问进行校验。比如,该令牌信息包括用户令牌、设备令牌和应用令牌,该用户令牌可用于该SDP网关对第二SDP客户端设备的用户信息进行校验,该设备令牌可用于该SDP网关对第二SDP客户端设备进行校验,该应用令牌可用于该SDP网关对第二SDP客户端设备访问的应用服务器进行校验。Optionally, the third message also carries token information, which is used by the SDP gateway to verify the resource access initiated by the second SDP client device. For example, the token information includes a user token, a device token and an application token, the user token can be used by the SDP gateway to verify the user information of the second SDP client device, and the device token can be used in the SDP The gateway verifies the second SDP client device, and the application token can be used by the SDP gateway to verify the application server accessed by the second SDP client device.
在另一种可能的实施例中,上述S207能够被替换为:第二SDP客户端设备向该SDP网关发送第三报文,该第三报文的TLS选项字段中携带第二SDP客户端设备的设备标识。关于第二SDP客户端设备通过该第三报文的TLS选项字段中携带第二SDP客户端设备的设备标识与通过该第三报文的TCP选项字段中携带第二SDP客户端设备的设备标识的区别,与上述S201的第一报文的相关描述一致,本申请实施例在此不再赘述。In another possible embodiment, the above S207 can be replaced by: the second SDP client device sends a third message to the SDP gateway, and the TLS option field of the third message carries the second SDP client device device ID. Regarding the second SDP client device carrying the device identifier of the second SDP client device in the TLS option field of the third message and the device identifier of the second SDP client device carried in the TCP option field of the third message The difference is consistent with the relevant description of the first packet in S201 above, and will not be described again in this embodiment of the present application.
S208:当SDP网关接收到该第三报文时,该SDP网关根据客户端信息包括的设备标识和该第三报文包括的设备标识,确定第二SDP客户端设备是否合法。S208: When the SDP gateway receives the third packet, the SDP gateway determines whether the second SDP client device is legitimate according to the device identifier included in the client information and the device identifier included in the third packet.
当SDP网关接收到SDP控制器发送的该客户端信息时,该SDP网关解析该客户端信息,以得到该客户端信息包括的设备标识。当该SDP网关接收到第三报文时,该SDP网关解析该第三报文的TCP选项字段,以得到该第三报文包括的设备标识。之后,该SDP网关根据该客户端信息包括的设备标识和该第三报文包括的设备标识,确定第二SDP客户端设备是否合法。如果该客户端信息包括的设备标识和该第三报文包括的设备标识一致,则确定第二SDP客户端设备合法;如果该客户端信息包括的设备标识和该第三报文包括的设备标识不一致,则确定第二SDP客户端设备不合法。When the SDP gateway receives the client information sent by the SDP controller, the SDP gateway parses the client information to obtain the device identifier included in the client information. When the SDP gateway receives the third packet, the SDP gateway parses the TCP option field of the third packet to obtain the device identifier included in the third packet. Afterwards, the SDP gateway determines whether the second SDP client device is legitimate according to the device identifier included in the client information and the device identifier included in the third message. If the device identification included in the client information is consistent with the device identification included in the third message, it is determined that the second SDP client device is legal; if the device identification included in the client information is consistent with the device identification included in the third message If they are inconsistent, it is determined that the second SDP client device is illegal.
可选的,若第三报文的TCP选项字段中携带的SDP客户端设备的设备标识为密文形式的设备标识,SDP网关还执行以下步骤:使用该第三报文的序列号对该密文形式的设备标识进行解密,得到指定长度的第一字符串,第一字符串用于SDP网关确定第二SDP客户端设备是否合法。Optionally, if the device identification of the SDP client device carried in the TCP option field of the third message is a device identification in ciphertext form, the SDP gateway also performs the following steps: use the serial number of the third message to the cipher text Decrypt the device identification in text form to obtain a first character string of a specified length, and the first character string is used by the SDP gateway to determine whether the second SDP client device is legitimate.
在一种示例中,SDP网关根据客户端信息包括的设备标识和第三报文包括的设备标识,确定第二SDP客户端设备是否合法,包括:该SDP网关根据该客户端信息包括的设备标识获取指定长度的第二字符串,比如,该SDP网关通过对该客户端信息包括的设备标识做该哈希运算,获得该指定长度的第二字符串;该SDP网关比较第一字符串和第二字符串;如果第一字符串和第二字符串一致,确定第二SDP客户端设备合法;如果第一字符串和第二字符串不一致,确定第二SDP客户端设备不合法。In an example, the SDP gateway determines whether the second SDP client device is legitimate according to the device identifier included in the client information and the device identifier included in the third message, including: the SDP gateway according to the device identifier included in the client information Obtain a second character string of a specified length, for example, the SDP gateway obtains a second character string of a specified length by performing the hash operation on the device identifier included in the client information; the SDP gateway compares the first character string with the second character string Two character strings; if the first character string is consistent with the second character string, it is determined that the second SDP client device is legal; if the first character string is inconsistent with the second character string, it is determined that the second SDP client device is not legal.
可选的,第三报文还携带第二SDP客户端设备的源IP地址,该客户端信息还包括第二SDP客户端设备的源IP地址,该SDP网关还能够在该客户端信息中的源IP地址与该第三报文中的源IP地址一致时,确定第二SDP客户端设备的源IP地址合法。Optionally, the third message also carries the source IP address of the second SDP client device, and the client information also includes the source IP address of the second SDP client device, and the SDP gateway can also include the source IP address in the client information. When the source IP address is consistent with the source IP address in the third packet, it is determined that the source IP address of the second SDP client device is legal.
在一种可能的实施例中,第三报文还携带令牌信息,该令牌信息用于该SDP网关对第二SDP客户端设备发起的资源访问进行校验。相应的,当该SDP网关接收到该第三报文时,该SDP网关还能够将该令牌信息发送给SDP控制器,以请求该SDP控制器对该令牌信息进行校验;当该SDP网关接收到该SDP控制器发送的令牌校验成功的信息时,该SDP网关确定第二SDP客户端设备发起的资源访问合法。In a possible embodiment, the third message further carries token information, and the token information is used by the SDP gateway to verify the resource access initiated by the second SDP client device. Correspondingly, when the SDP gateway receives the third message, the SDP gateway can also send the token information to the SDP controller to request the SDP controller to verify the token information; when the SDP When the gateway receives the information that the token verification is successful sent by the SDP controller, the SDP gateway determines that the resource access initiated by the second SDP client device is legal.
S209:如果确定第二SDP客户端设备合法,该SDP网关将第三报文发送给应用服务器。S209: If it is determined that the second SDP client device is legal, the SDP gateway sends the third packet to the application server.
其中,该应用服务器为第二SDP客户端设备请求访问的应用服务器,该应用服务器属于允许第二SDP客户端设备访问的至少一个应用服务器中。Wherein, the application server is an application server that the second SDP client device requests to access, and the application server belongs to at least one application server that is allowed to be accessed by the second SDP client device.
在一种示例中,第三报文中还携带应用服务器的端口,当该SDP网关确定第二SDP客户端设备合法时,该SDP网关根据该应用服务器的端口,将该第三报文发送给该应用服务器。In an example, the port of the application server is also carried in the third message, and when the SDP gateway determines that the second SDP client device is legal, the SDP gateway sends the third message to the The application server.
S210:该SDP网关接收该应用服务器返回的业务数据,并将该业务数据转发给第二SDP客户端设备。S210: The SDP gateway receives the service data returned by the application server, and forwards the service data to the second SDP client device.
当SDP网关将第三报文发送给应用服务器,该应用服务器接收到该第三报文时,该应用服务器能够根据第三报文向该SDP网关返回对应的业务数据。当该SDP网关接收到该应用服务器返回的业务数据时,该SDP网关将该业务数据转发给第二SDP客户端设备。这样,第二SDP客户端设备能够接收到该业务数据,从而实现第二SDP客户端设备对于该应用服务器的访问。When the SDP gateway sends the third message to the application server, and the application server receives the third message, the application server can return corresponding service data to the SDP gateway according to the third message. When the SDP gateway receives the service data returned by the application server, the SDP gateway forwards the service data to the second SDP client device. In this way, the second SDP client device can receive the service data, so that the second SDP client device can access the application server.
在本申请实施例中,第二SDP客户端设备向SDP网关发送第三报文,该第三报文的TCP选项字段中携带第二SDP客户端设备的设备标识。当该SDP网关接收到该第三报文时,该SDP网关能够基于该第三报文的携带的设备标识和该SDP控制器下发的客户端信息中的设备标识对第二SDP客户端设备进行合法性认证。如果确定第二SDP客户端设备合法,该SDP网关向应用服务器转发第三报文,并将该应用服务器返回的业务数据转发给第二SDP客户端设备。这样,当多个SDP客户端设备经过同一SNAT设备转换后使用同一源IP地址时,该SDP网关能够识别出不同的SDP客户端设备,从而能够保证受保护的应用资源的安全性。In the embodiment of the present application, the second SDP client device sends a third message to the SDP gateway, and the TCP option field of the third message carries the device identifier of the second SDP client device. When the SDP gateway receives the third message, the SDP gateway can identify the second SDP client device based on the device identifier carried in the third message and the device identifier in the client information issued by the SDP controller. Validate legality. If it is determined that the second SDP client device is legal, the SDP gateway forwards the third message to the application server, and forwards the service data returned by the application server to the second SDP client device. In this way, when multiple SDP client devices use the same source IP address after being converted by the same SNAT device, the SDP gateway can identify different SDP client devices, thereby ensuring the security of protected application resources.
上述主要从各个设备之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,上述SDP控制器、SDP客户端设备和SDP网关等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solutions provided by the embodiments of the present application from the perspective of interaction between various devices. It can be understood that, in order to realize the above-mentioned functions, the above-mentioned SDP controller, SDP client device, and SDP gateway include corresponding hardware structures and/or software modules for performing various functions. Those skilled in the art should easily realize that the present application can be implemented in the form of hardware or a combination of hardware and computer software in combination with the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
本申请实施例可以根据上述方法示例对SDP控制器、SDP客户端设备和SDP网关进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application can divide the functional modules of the SDP controller, the SDP client device and the SDP gateway according to the above method example, for example, each functional module can be divided corresponding to each function, or two or more functions can be integrated in a processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
在采用集成的单元的情况下,图10示出了本申请实施例中所涉及的访问控制装置的一种可能的结构示意图,该装置可以作为SDP控制器或者SDP控制器内置的芯片,该装置包括:接收单元301,处理单元302和发送单元303。具有图10所示结构的SDP控制器能够实现上述方法实施例描述的方案中SDP控制器的功能。In the case of using an integrated unit, FIG. 10 shows a possible structural diagram of the access control device involved in the embodiment of the present application. The device can be used as an SDP controller or a built-in chip of the SDP controller. The device It includes: a receiving
在一种可能的实施例中,接收单元301用于接收第一SDP客户端设备发送的第一报文,第一报文的传输控制协议TCP选项字段中携带第一SDP客户端设备的设备标识。处理单元302用于根据第一SDP客户端设备的设备标识对第一SDP客户端设备进行单包认证,如果对第一SDP客户端设备的单包认证失败,关闭第一报文所属的第一SDP客户端设备和该SDP控制器之间的TCP连接。In a possible embodiment, the receiving
在另一种可能的实施例中,接收单元301还用于接收第二SDP客户端设备发送的第一报文,第二SDP客户端设备发送的第一报文的TCP选项字段中携带第二SDP客户端设备的设备标识。处理单元302还用于根据第二SDP客户端设备的设备标识对第二SDP客户端设备进行单包认证;接收单元301还用于如果对第二SDP客户端设备的单包认证成功,接收第二SDP客户端设备发送的第二报文,第二报文的安全传输层协议TLS选项字段或者应用层中携带鉴权信息,该鉴权信息包括第二SDP客户端设备的用户信息。处理单元302还用于根据第二SDP客户端设备的设备标识和该用户信息对第二SDP客户端设备进行用户认证。发送单元303用于如果对第二SDP客户端设备的用户认证成功,向第二SDP客户端设备发送资源列表,该资源列表包括允许第二SDP客户端设备访问的至少一个应用服务器的标识。In another possible embodiment, the receiving
可选的,第二SDP客户端设备发送的第一报文和第二报文为同一个TCP连接中的报文;或者,第二SDP客户端设备发送的第一报文和第二报文为不同TCP连接中的报文。Optionally, the first packet and the second packet sent by the second SDP client device are packets in the same TCP connection; or, the first packet and the second packet sent by the second SDP client device are packets in different TCP connections.
进一步的,若第二SDP客户端设备发送的第一报文和第二报文为不同TCP连接中的报文:发送单元303还用于根据第二SDP客户端设备发送的第一报文向第二SDP客户端设备发送盐值。相应的,第二报文还携带该盐值,处理单元302还用于根据第二报文中携带的该盐值确定第二SDP客户端设备的单包认证已成功。Further, if the first packet and the second packet sent by the second SDP client device are packets in different TCP connections: the sending
可选的,第一SDP客户端设备发送的第一报文是SYN报文。进一步的,第一SDP客户端设备发送的第一报文中携带的该设备标识为密文形式的设备标识,处理单元302还用于:使用该SYN报文的序列号对该密文形式的设备标识进行解密,得到指定长度的字符串,该字符串用于该SDP控制器对第一SDP客户端设备进行单包认证。同理,第二SDP客户端设备发送的第一报文也满足上述描述。Optionally, the first packet sent by the first SDP client device is a SYN packet. Further, the device identification carried in the first message sent by the first SDP client device is a device identification in ciphertext form, and the
进一步的,如果对第二SDP客户端设备的用户认证成功,发送单元303还用于:向SDP网关发送客户端信息,该客户端信息用于指示第二SDP客户端设备认证通过,该客户端信息包括第二SDP客户端设备的设备标识。Further, if the user authentication of the second SDP client device is successful, the sending
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of the steps involved in the above method embodiments can be referred to the function description of the corresponding function module, and will not be repeated here.
在采用硬件实现的基础上,本申请实施例中的处理单元302可以为该装置的处理器,发送单元303可以为该装置的发送器,接收单元301可以为该装置的接收器,发送器通常可以和接收器集成在一起用作收发器,具体的收发器还可以称为通信接口或接口电路。On the basis of hardware implementation, the
如图11所示,为本申请实施例提供的上述实施例所涉及的访问控制装置的另一种可能的结构示意图,该装置可以作为可以作为SDP控制器或者SDP控制器内置的芯片,该装置包括:处理器311,还可以包括存储器312、通信接口313和总线314,处理器311、存储器312和通信接口313通过总线314连接。As shown in Figure 11, it is a schematic diagram of another possible structure of the access control device involved in the above embodiment provided by the embodiment of the present application. The device can be used as an SDP controller or a built-in chip of the SDP controller. The device It includes: a
其中,处理器311用于对该装置的动作进行控制管理。在一种可能的实施例中,处理器311可用于支持该装置执行上述方法实施例中S202、S203a、S204、S208、和/或本文所描述的其他技术过程中的一个或者多个步骤。通信接口313用于支持该装置进行通信,比如支持该装置与SDP客户端设备和SDP网关进行通信。Wherein, the
在本申请实施例中,处理器311可以是中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。上述图11中的总线314可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extendedindustry standard architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,上述图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。In the embodiment of the present application, the
在采用集成的单元的情况下,图12示出了本申请实施例中所涉及的访问控制装置的一种可能的结构示意图,该装置可以作为SDP客户端设备或者SDP客户端设备内置的芯片,该装置包括:发送单元401,接收单元402和处理单元403。具有图12所示结构的SDP客户端设备能够实现上述方法实施例描述的方案中SDP客户端设备的功能。In the case of using an integrated unit, FIG. 12 shows a possible structural diagram of the access control device involved in the embodiment of the present application. The device can be used as an SDP client device or a built-in chip of the SDP client device. The device includes: a sending
在一种可能的实施例中,发送单元401用于向SDP控制器发送第一报文,第一报文的传输控制协议TCP选项字段中携带该SDP客户端设备的设备标识。如果SDP控制器对该SDP客户端设备的单包认证失败,SDP控制器关闭第一报文对应的TCP连接。In a possible embodiment, the sending
在另一种可能的实施例中,如果SDP控制器对该SDP客户端设备的单包认证成功,发送单元401还用于向该SDP控制器发送第二报文,第二报文的安全传输层协议TLS选项字段或者应用层中携带鉴权信息,该鉴权信息包括该SDP客户端设备的用户信息。接收单元402还用于接收该SDP控制器返回的资源列表,该资源列表包括允许该SDP客户端设备访问的至少一个应用服务器的标识。In another possible embodiment, if the single-packet authentication of the SDP client device by the SDP controller succeeds, the sending
可选的,第一报文和第二报文为同一个TCP连接中的报文;或者,第一报文和第二报文为不同TCP连接中的报文。进一步的,当第一报文和第二报文为不同TCP连接中的报文时,接收单元402还用于:接收该SDP控制器根据第一报文返回的盐值;相应的,第二报文中还携带该盐值,第二报文携带的该盐值用于该SDP控制器确定第二SDP客户端设备的单包认证已成功。Optionally, the first packet and the second packet are packets in the same TCP connection; or, the first packet and the second packet are packets in different TCP connections. Further, when the first message and the second message are messages in different TCP connections, the receiving
可选的,第一报文是同步SYN报文。进一步的,该TCP选项字段中携带的该设备标识为密文形式的设备标识,处理单元403用于基于该SDP客户端设备的明文形式的设备标识获取指定长度的字符串,并使用该SYN报文的序列号对该字符串进行加密,得到该密文形式的设备标识。在一种实施例中,该指定长度的字符串是通过对该明文的设备标识进行哈希运算得到的。Optionally, the first packet is a synchronous SYN packet. Further, the device identification carried in the TCP option field is a device identification in ciphertext form, and the
进一步的,发送单元401还用于向SDP网关发送第三报文,第三报文的TCP选项字段中携带该SDP客户端设备的设备标识。接收单元402用于接收该应用服务器返回的业务数据,该业务数据是该SDP网关根据第三报文的TCP选项字段中携带的该设备标识确定该SDP客户端设备合法后将第三报文转发给该应用服务器后,该应用服务器发送的。Further, the sending
可选的,第三报文是SYN报文。第三报文的TCP选项字段中携带的该设备标识为密文形式的设备标识。Optionally, the third packet is a SYN packet. The device identifier carried in the TCP option field of the third packet is a device identifier in cipher text.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of the steps involved in the above method embodiments can be referred to the function description of the corresponding function module, and will not be repeated here.
在采用硬件实现的基础上,本申请实施例中的处理单元403可以为该装置的处理器,发送单元401可以为该装置的发送器,接收单元402可以为该装置的接收器,发送器通常可以和接收器集成在一起用作收发器,具体的收发器还可以称为通信接口或接口电路。On the basis of hardware implementation, the
如图13所示,为本申请实施例提供的上述实施例所涉及的访问控制装置的另一种可能的结构示意图,该装置可以作为可以作为SDP客户端设备或者SDP客户端设备内置的芯片,该装置包括:处理器411,还可以包括存储器412、通信接口413和总线414,处理器411、存储器412和通信接口413通过总线414连接。As shown in FIG. 13 , it is a schematic diagram of another possible structure of the access control device involved in the above-mentioned embodiment provided by the embodiment of the present application. The device can be used as an SDP client device or a built-in chip of the SDP client device. The device includes: a
其中,处理器411用于对该装置的动作进行控制管理。在一种可能的实施例中,处理器411可用于支持该装置执行上述方法实施例中的对该SDP客户端设备的设备标识进行加密、生成第一报文至第三报文、解析SDP控制器和SDP网关发送的信息的等步骤中的一个或者多个。通信接口413用于支持该装置进行通信,比如支持该装置与SDP控制器和SDP网关进行通信。Wherein, the
在本申请实施例中,处理器411可以是中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。上述图13中的总线414可以是PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,上述图13中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。In the embodiment of the present application, the
在采用集成的单元的情况下,图14示出了本申请实施例中所涉及的访问控制装置的一种可能的结构示意图,该装置可以作为SDP网关或者SDP网关内置的芯片,该装置包括:接收单元501,处理单元502和发送单元503。具有图14所示结构的SDP网关能够实现上述方法实施例描述的方案中SDP网关的功能。In the case of using an integrated unit, Fig. 14 shows a possible structural diagram of the access control device involved in the embodiment of the present application. The device can be used as an SDP gateway or a built-in chip of the SDP gateway. The device includes: A receiving
其中,接收单元501用于接收SDP控制器发送的客户端信息,该客户端信息用于指示SDP客户端设备认证通过,该客户端信息包括该SDP客户端设备的设备标识。接收单元501还用于接收该SDP客户端设备发送的第三报文,第三报文的TCP选项字段中携带该SDP客户端设备的设备标识。处理单元502用于根据该客户端信息包括的该设备标识和第三报文包括的该设备标识,确定该SDP客户端设备是否合法。发送单元503用于如果确定该SDP客户端设备合法,将第三报文发送给应用服务器,并将该应用服务器返回的业务数据转发给该SDP客户端设备。Wherein, the receiving
在一种实施例中,第三报文是SYN报文。可选的,该TCP选项字段中携带的该设备标识为密文形式的设备标识,处理单元502还用于:使用该SYN报文的序列号对该密文形式的设备标识进行解密,得到指定长度的第一字符串,第一字符串用于该SDP网关确定该SDP客户端设备是否合法。进一步的,处理单元502还用于:根据该客户端信息包括的该设备标识获取该指定长度的第二字符串;比较第一字符串和第二字符串;如果第一字符串和第二字符串一致,确定该SDP客户端设备合法。In one embodiment, the third message is a SYN message. Optionally, the device identifier carried in the TCP option field is a device identifier in ciphertext, and the
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of the steps involved in the above method embodiments can be referred to the function description of the corresponding function module, and will not be repeated here.
在采用硬件实现的基础上,本申请实施例中的处理单元502可以为该装置的处理器,接收单元501可以为该装置的接收器,发送单元503可以为该装置的发送器,发送器通常可以和接收器集成在一起用作收发器,具体的收发器还可以称为通信接口或接口电路。On the basis of hardware implementation, the
如图15所示,为本申请实施例提供的上述实施例所涉及的访问控制装置的另一种可能的结构示意图,该装置可以作为可以作为SDP网关或者SDP网关内置的芯片,该装置包括:处理器511,还可以包括存储器512、通信接口513和总线514,处理器511、存储器512和通信接口513通过总线514连接。As shown in Figure 15, another possible structural diagram of the access control device involved in the above-mentioned embodiment provided by the embodiment of the present application, the device can be used as an SDP gateway or a built-in chip of the SDP gateway, and the device includes: The
其中,处理器511用于对该装置的动作进行控制管理。在一种可能的实施例中,处理器511可用于支持该装置接收上述方法实施例中的S208,和/或本文所描述的其他技术过程。通信接口513用于支持该装置进行通信,比如支持该装置与SDP控制器和SDP客户端设备进行通信。Wherein, the
在本申请实施例中,处理器511可以是中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。上述图15中的总线514可以是PCI总线或EISA总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,上述图15中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。In the embodiment of the present application, the
本申请实施例还提供一种访问控制系统,该访问控制系统中可以包括SDP控制器、SDP客户端设备和SDP网关。该SDP控制器、SDP客户端设备和SDP网关可以用于实现上述方法实施例中提供的任意一种访问控制方法。The embodiment of the present application also provides an access control system, which may include an SDP controller, an SDP client device, and an SDP gateway. The SDP controller, the SDP client device and the SDP gateway can be used to implement any one of the access control methods provided in the foregoing method embodiments.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。本申请实施例提供的各个设备(SDP控制器、SDP客户端设备和SDP网关),用于执行上述实施例中对应设备的功能,因此可以达到与上述方法实施例相同的效果。It should be noted that all relevant content of the steps involved in the above method embodiments can be referred to the function description of the corresponding function module, and will not be repeated here. Each device (SDP controller, SDP client device, and SDP gateway) provided in the embodiment of the present application is used to perform the function of the corresponding device in the above embodiment, so the same effect as the above method embodiment can be achieved.
在上述实施例中的功能或动作或操作或步骤等,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包括一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。The functions or actions or operations or steps in the above-mentioned embodiments may be fully or partially implemented by software, hardware, firmware or any combination thereof. When implemented using a software program, it may 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 the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server, or data center Transmission to another website site, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or may include one or more data storage devices such as servers and data centers that can be integrated with the medium. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.
基于此,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当该计算机指令在计算机设备上运行时,执行上述方法实施例中的SDP控制器的步骤。Based on this, an embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium includes computer instructions, and when the computer instructions are run on a computer device, the steps of the SDP controller in the above-mentioned method embodiments are executed .
在本申请的又一方面,提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当该计算机指令在计算机设备上运行时,执行上述方法实施例中的SDP客户端设备的步骤。In yet another aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium includes computer instructions, and when the computer instructions are run on a computer device, the SDP client device in the above-mentioned method embodiment is executed. step.
在本申请的又一方面,提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当该计算机指令运行时,执行上述方法实施例中的SDP网关的步骤。In yet another aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium includes computer instructions, and when the computer instructions are executed, the steps of the SDP gateway in the above method embodiments are executed.
在本申请的又一方面,提供一种包含指令的计算机程序产品,当计算机程序产品在计算机设备上运行时,使得计算机设备执行上述方法实施例中的SDP控制器的步骤。In yet another aspect of the present application, a computer program product containing instructions is provided, and when the computer program product is run on a computer device, the computer device is made to execute the steps of the SDP controller in the above method embodiments.
在本申请的又一方面,提供一种包含指令的计算机程序产品,当计算机程序产品在计算机设备上运行时,使得计算机设备执行上述方法实施例中的SDP客户端设备的步骤。In yet another aspect of the present application, a computer program product containing instructions is provided, and when the computer program product is run on the computer device, the computer device is made to execute the steps of the SDP client device in the above method embodiments.
在本申请的又一方面,提供一种包含指令的计算机程序产品,当计算机程序产品在计算机上设备运行时,使得计算机设备执行上述方法实施例中的SDP网关的步骤。In yet another aspect of the present application, a computer program product containing instructions is provided, and when the computer program product is run on a computer device, the computer device is made to execute the steps of the SDP gateway in the above method embodiments.
最后应说明的是:以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that: the above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the application shall be covered by this application. within the scope of the application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.
Claims (47)
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2022/083469 WO2023279782A1 (en) | 2021-07-08 | 2022-03-28 | Access control method, access control system and related device |
JP2024500208A JP2024525557A (en) | 2021-07-08 | 2022-03-28 | Access control method, access control system, and related device |
EP22836541.7A EP4351086A4 (en) | 2021-07-08 | 2022-03-28 | ACCESS CONTROL METHOD, ACCESS CONTROL SYSTEM AND ASSOCIATED DEVICE |
US18/403,744 US20240146728A1 (en) | 2021-07-08 | 2024-01-04 | Access control method, access control system, and related device |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2021107708533 | 2021-07-08 | ||
CN202110770853 | 2021-07-08 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115603932A true CN115603932A (en) | 2023-01-13 |
Family
ID=84841837
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110838315.3A Pending CN115603932A (en) | 2021-07-08 | 2021-07-23 | An access control method, access control system and related equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115603932A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116319099A (en) * | 2023-05-22 | 2023-06-23 | 威海海洋职业学院 | Multi-terminal financial data management method and system |
CN116708039A (en) * | 2023-08-07 | 2023-09-05 | 深圳竹云科技股份有限公司 | Access method, device and system based on zero-trust single-package authentication |
CN117201192A (en) * | 2023-11-06 | 2023-12-08 | 国家计算机网络与信息安全管理中心 | Zero-trust single-packet communication method and system based on environment measurement |
-
2021
- 2021-07-23 CN CN202110838315.3A patent/CN115603932A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116319099A (en) * | 2023-05-22 | 2023-06-23 | 威海海洋职业学院 | Multi-terminal financial data management method and system |
CN116708039A (en) * | 2023-08-07 | 2023-09-05 | 深圳竹云科技股份有限公司 | Access method, device and system based on zero-trust single-package authentication |
CN116708039B (en) * | 2023-08-07 | 2023-11-21 | 深圳竹云科技股份有限公司 | Access method, device and system based on zero-trust single-package authentication |
CN117201192A (en) * | 2023-11-06 | 2023-12-08 | 国家计算机网络与信息安全管理中心 | Zero-trust single-packet communication method and system based on environment measurement |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023279782A1 (en) | Access control method, access control system and related device | |
US7552323B2 (en) | System, apparatuses, methods, and computer-readable media using identification data in packet communications | |
CN104322001B (en) | The Transport Layer Security flow control identified using service name | |
WO2017067160A1 (en) | Main stream connection establishment method and device based on mptcp | |
EP3272059B1 (en) | Apparatus and method for using certificate data to route data | |
WO2022100356A1 (en) | Identity authentication system, method and apparatus, device, and computer readable storage medium | |
CN115603932A (en) | An access control method, access control system and related equipment | |
CN113904826B (en) | Data transmission method, device, equipment and storage medium | |
CA2506418C (en) | Systems and apparatuses using identification data in network communication | |
US11784993B2 (en) | Cross site request forgery (CSRF) protection for web browsers | |
JP5864598B2 (en) | Method and system for providing service access to a user | |
US20210377239A1 (en) | Method for distributed application segmentation through authorization | |
WO2023174143A1 (en) | Data transmission method, device, medium and product | |
JP5869552B2 (en) | Method for securing access to data or services accessible through a device performing the method and corresponding device | |
CN115499177A (en) | Cloud desktop access method, zero-trust gateway, cloud desktop client and server | |
US10931662B1 (en) | Methods for ephemeral authentication screening and devices thereof | |
CN109040059A (en) | Protected TCP communication method, communication device and storage medium | |
Zhang et al. | Edp: An ebpf-based dynamic perimeter for sdp in data center | |
CN118449736A (en) | Anti-attack message processing method, device, electronic device and storage medium | |
KR101971995B1 (en) | Method for decryping secure sockets layer for security | |
CN117278275A (en) | Access right adjustment method, device and storage medium | |
CN116633562A (en) | Network zero trust security interaction method and system based on WireGuard | |
CN118802149A (en) | Access processing method and device based on zero-trust network, electronic device, and medium | |
CN116684113A (en) | Service processing method and related device based on SDP (software defined boundary) | |
JP2017521954A (en) | Method for unblocking an external computer system in a computer network infrastructure, a distributed computer network having such a computer network infrastructure, and a computer program product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |