CN117478392A - Software-defined boundary implementation method and system using client APP to scan QR codes - Google Patents
Software-defined boundary implementation method and system using client APP to scan QR codes Download PDFInfo
- Publication number
- CN117478392A CN117478392A CN202311465038.1A CN202311465038A CN117478392A CN 117478392 A CN117478392 A CN 117478392A CN 202311465038 A CN202311465038 A CN 202311465038A CN 117478392 A CN117478392 A CN 117478392A
- Authority
- CN
- China
- Prior art keywords
- authentication
- service
- user
- spa
- packet
- 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
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000012795 verification Methods 0.000 claims description 69
- 230000008569 process Effects 0.000 claims description 12
- 230000000903 blocking effect Effects 0.000 claims description 6
- 230000003993 interaction Effects 0.000 claims description 4
- 238000012544 monitoring process Methods 0.000 claims description 4
- 238000013475 authorization Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000002087 whitening effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
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/02—Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
- H04L63/0227—Filtering policies
- H04L63/0236—Filtering by address, protocol, port number or service, e.g. IP-address or URL
-
- 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/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0435—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
-
- 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/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
- H04L63/101—Access control lists [ACL]
-
- 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/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1408—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
-
- 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/30—Network architectures or network communication protocols for network security for supporting lawful interception, monitoring or retaining of communications or communication related information
- H04L63/306—Network architectures or network communication protocols for network security for supporting lawful interception, monitoring or retaining of communications or communication related information intercepting packet switched data communications, e.g. Web, Internet or IMS communications
-
- 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/40—Network security protocols
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)
- Technology Law (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域Technical field
本发明涉及数据安全传输技术领域,具体涉及一种使用客户端APP扫描二维码的软件定义边界实现方法及系统。The present invention relates to the technical field of data secure transmission, and specifically relates to a software-defined boundary implementation method and system that uses a client APP to scan a QR code.
背景技术Background technique
软件定义边界(Software Defined Perimeter,SDP)是一种网络安全架构,用于为云环境和移动设备提供安全访问和连接。SDP的主要目标是保护网络资源和应用程序免受外部攻击,同时提供更灵活的、可扩展的和可定制的安全性。Software Defined Perimeter (SDP) is a network security architecture used to provide secure access and connections to cloud environments and mobile devices. The main goal of SDP is to protect network resources and applications from external attacks while providing more flexible, scalable and customizable security.
SDP实现了一种"零信任"(Zero Trust)安全模型,它只允许经过验证的用户和设备连接到网络资源。在SDP架构中,网络资源和应用程序不可见,只有被授权的用户和设备才能访问它们。此外,SDP还提供了一些其他的安全功能,例如动态访问控制、加密通信和威胁检测。SDP implements a "Zero Trust" security model that only allows authenticated users and devices to connect to network resources. In an SDP architecture, network resources and applications are invisible and only authorized users and devices can access them. In addition, SDP also provides some other security features, such as dynamic access control, encrypted communication and threat detection.
软件定义边界(SDP)是云安全联盟(CSA)提出一种创新性较强的网络安全解决方案,根据用户身份控制其对资源的访问,用安全隐身取代安全防护对目标进行保护。其核心思路是围绕某个应用或某组应用创建基于身份和上下文的逻辑访问边界,受SDP保护的应用是隐藏的,无法被直接发现和访问,并且通过信任代理或设备限制一组指定实体访问;每个实体在访问前,必须通过单包认证(SPA)后,才允许接入。该解决方案将应用资源隐藏,使攻击者在网络空间中看不到攻击目标,无法对其进行攻击,代理或设备会验证指定访问者的身份、上下文和策略合规性,以保护应用资源,显著缩小攻击面。Software Defined Perimeter (SDP) is an innovative network security solution proposed by the Cloud Security Alliance (CSA). It controls user access to resources based on their identity and uses secure invisibility to replace security protection to protect targets. The core idea is to create a logical access boundary based on identity and context around an application or a group of applications. Applications protected by SDP are hidden and cannot be directly discovered and accessed, and access is restricted to a group of designated entities through trust agents or devices. ;Each entity must pass Single Packet Authentication (SPA) before access is allowed. The solution hides application resources so that attackers cannot see the target in cyberspace and cannot attack it. The agent or device verifies the identity, context and policy compliance of the designated visitor to protect application resources. Significantly reduces the attack surface.
传统SDP软件定义边界的架构如图1所示:The architecture of the traditional SDP software-defined boundary is shown in Figure 1:
(1)SDP控制器负责建立和维护客户端与受保护的应用服务的访问规则,对授权后的客户端和服务开放策略,访问规则包含密钥和策略,访问规则动态生成且仅供单次使用;(1) The SDP controller is responsible for establishing and maintaining access rules for clients and protected application services, and opening policies for authorized clients and services. Access rules include keys and policies. Access rules are dynamically generated and are only available once use;
(2)SDP网关负责控制和维护客户端与受保护的应用服务的网络访问;(2) The SDP gateway is responsible for controlling and maintaining network access between clients and protected application services;
(3)SDP客户端负责发起SPA认证,完成认证后,与SDP网关建立连接,并于受保护的应用服务正常通信。(3) The SDP client is responsible for initiating SPA authentication. After completing the authentication, it establishes a connection with the SDP gateway and communicates normally with the protected application service.
通过这种访问控制形式,未授权用户的网络访问在TCP三次握手阶段就被屏蔽和拒绝,无法建立网络连接。传统SDP架构通过单一访问控制方式,将受保护的应用服务对未授权用户完全屏蔽,可抵御DDoS拒绝服务攻击、APT攻击、漏洞利用攻击、扫描探测等,有效缩减网络的暴露面。Through this form of access control, network access by unauthorized users is blocked and denied during the TCP three-way handshake stage, and network connections cannot be established. The traditional SDP architecture uses a single access control method to completely shield protected application services from unauthorized users. It can resist DDoS denial-of-service attacks, APT attacks, vulnerability exploitation attacks, scanning detection, etc., effectively reducing the exposure surface of the network.
但是,SDP客户端仅支持以可执行客户端程序的方式,用户必须在电脑上安装相应的客户端程序才可以使用SDP服务。其次,SDP网关串联在网络中单点部署,作为受保护的应用服务的统一流量入口,对所有网络流量进行转发,网络性能压力较大,一旦宕机,其保护的应用服务都不可访问。另外,SDP控制器作为SPA控制中心,客户端和受保护的应用服务都需要与SDP控制器进行网络连接,因此SDP控制器需要暴露在互联网,容易受到黑客攻击,一旦被控制,可对任意用户进行授权,威胁受保护的应用服务安全;如被恶意关停可导致受保护的应用服务无法正常访问。而且,SDP网关由于采用串联部署方案,只可防御外部网络攻击,无法有效防御发自内网的攻击。However, the SDP client only supports executable client programs, and users must install the corresponding client programs on their computers to use SDP services. Secondly, the SDP gateway is deployed in series at a single point in the network. As a unified traffic entrance for protected application services, it forwards all network traffic. The network performance is under great pressure. Once it goes down, the application services it protects will be inaccessible. In addition, the SDP controller serves as the SPA control center. Both the client and protected application services need to be connected to the SDP controller. Therefore, the SDP controller needs to be exposed to the Internet and is vulnerable to hacker attacks. Once controlled, it can target any user. Authorization threatens the security of the protected application service; if it is maliciously shut down, the protected application service cannot be accessed normally. Moreover, due to the serial deployment scheme, the SDP gateway can only defend against external network attacks and cannot effectively defend against attacks from the internal network.
发明内容Contents of the invention
针对现有技术的不足,本发明旨在提供一种使用客户端APP扫描二维码的软件定义边界实现方法及系统。In view of the shortcomings of the existing technology, the present invention aims to provide a software-defined boundary implementation method and system that uses a client APP to scan a QR code.
为了实现上述目的,本发明采用如下技术方案:In order to achieve the above objects, the present invention adopts the following technical solutions:
使用客户端APP扫描二维码的软件定义边界实现方法,包括以下步骤:The software-defined boundary implementation method using client APP to scan QR codes includes the following steps:
(1)在SDP系统为每一个受保护的应用服务生成专用注册信息,所述专用注册信息包括服务IP、服务端口、SPA认证端口、服务绑定验证码、单次认证有效时长、公私钥对和对称加密密钥;(1) Generate dedicated registration information for each protected application service in the SDP system. The dedicated registration information includes service IP, service port, SPA authentication port, service binding verification code, single authentication validity period, public and private key pair and symmetric encryption keys;
(2)用户通过浏览器访问受保护的目标应用服务;(2) The user accesses the protected target application service through the browser;
(3)SDP系统监测到未认证的用户浏览器访问流量,对访问进行拦截,并向用户的浏览器返回基于访问服务生成的二维码;(3) The SDP system detects unauthenticated user browser access traffic, intercepts the access, and returns a QR code generated based on the access service to the user's browser;
(4)用户在移动设备安装客户端APP,客户端APP获取包括SPA认证端口、服务绑定验证码和公钥在内的服务认证信息;(4) The user installs the client APP on the mobile device, and the client APP obtains the service authentication information including the SPA authentication port, service binding verification code and public key;
(5)用户使用客户端APP扫描步骤(3)中浏览器加载的二维码;(5) The user uses the client APP to scan the QR code loaded by the browser in step (3);
(6)客户端APP解析所述二维码的信息,并使用步骤(4)获取的服务绑定验证码构造认证令牌,向目标应用服务发送包含认证令牌的SPA单包认证数据包;(6) The client APP parses the information of the QR code, constructs an authentication token using the service binding verification code obtained in step (4), and sends a SPA single-packet authentication data packet containing the authentication token to the target application service;
(7)SDP系统实时监测流量,当监测到SPA单包认证数据包时,如能成功解析该SPA单包认证数据包,并完成认证令牌的校验,则通过SPA单包认证;(7) The SDP system monitors traffic in real time. When the SPA single-packet authentication data packet is detected, if it can successfully parse the SPA single-packet authentication data packet and complete the verification of the authentication token, it will pass the SPA single-packet authentication;
(8)通过SPA单包认证后,SDP系统将访问用户的IP与目标应用服务的服务IP和服务端口绑定,增加用户的IP与目标应用服务的成对加白白名单,完成SPA认证过程,对用户授权,在后续网络流量监测中,监测到当前授权用户的IP访问受保护的应用服务时,将放过访问报文至目标应用服务。(8) After passing the SPA single package authentication, the SDP system will bind the accessing user's IP to the service IP and service port of the target application service, add the user's IP and the target application service to the paired whitelist, and complete the SPA authentication process. After authorizing the user, during subsequent network traffic monitoring, if it is detected that the currently authorized user's IP accesses the protected application service, the access packet will be passed to the target application service.
进一步地,上述方法中,针对未通过SPA单包认证的用户浏览器访问流量,SDP系统在监测到该未通过SPA单包认证的用户浏览器尝试与目标应用服务建立连接进行TCP三次握手时,SDP系统会同时向该未通过SPA单包认证的用户浏览器和目标应用服务分别发送reset包,阻断网络连接。Furthermore, in the above method, for user browser access traffic that has not passed SPA single-packet authentication, when the SDP system detects that the user's browser that has not passed SPA single-packet authentication attempts to establish a connection with the target application service and perform a TCP three-way handshake, The SDP system will simultaneously send reset packets to the user's browser and target application service that have not passed SPA single packet authentication, blocking network connections.
进一步地,步骤(1)中,在SDP系统为受保护的应用服务的专用注册信息生成过程为:Further, in step (1), the process of generating special registration information for protected application services in the SDP system is:
1)在SDP系统中新建受保护的应用服务,录入服务名称、服务IP、服务端口、SPA认证端口、服务绑定验证码和单次认证有效时长;1) Create a new protected application service in the SDP system, enter the service name, service IP, service port, SPA authentication port, service binding verification code and single authentication validity period;
2)为受保护的应用服务生成一对非对称加密公私钥对以及一个对称加密密钥;公钥将传递给客户端APP保存,用于客户端APP生成认证令牌;私钥由SDP系统保存,用于对接收到的认证令牌进行解密,获取认证令牌的明文数据;SDP系统和客户端APP都要保存所述对称加密密钥,其中SDP系统生成唯一的校验数据并用对称加密算法加密,客户端APP用对称加密算法解密获取校验数据,确认二维码的真实性;2) Generate an asymmetric encryption public and private key pair and a symmetric encryption key for the protected application service; the public key will be passed to the client APP for storage and used for the client APP to generate an authentication token; the private key is saved by the SDP system , used to decrypt the received authentication token and obtain the plaintext data of the authentication token; both the SDP system and the client APP must save the symmetric encryption key, in which the SDP system generates unique verification data and uses a symmetric encryption algorithm Encryption, the client APP uses a symmetric encryption algorithm to decrypt and obtain the verification data to confirm the authenticity of the QR code;
3)受保护的应用服务的信息录入后,SDP系统开始监听所有发往受保护的应用服务的服务IP和SPA认证端口的SPA单包认证数据包。3) After the protected application service information is entered, the SDP system begins to monitor all SPA single-packet authentication data packets sent to the service IP and SPA authentication port of the protected application service.
进一步地,步骤(4)中,用户通过离线方式或在线方式,从SDP系统管理员处获取到服务IP、服务端口、公钥、服务绑定验证码、SPA认证端口,客户端APP必须获取到上述信息才能使用。Further, in step (4), the user obtains the service IP, service port, public key, service binding verification code, and SPA authentication port from the SDP system administrator through offline or online methods. The client APP must obtain The above information can only be used.
进一步地,步骤(6)中,客户端APP用内置的令牌算法计算生成认证令牌后,将令牌组装成SPA单包认证数据包,并向受保护的应用服务的服务IP和SPA认证端口发送该SPA单包认证数据包。Further, in step (6), after the client APP uses the built-in token algorithm to calculate and generate an authentication token, it assembles the token into a SPA single-packet authentication data packet, and authenticates to the service IP and SPA of the protected application service. The port sends the SPA single packet authentication data packet.
进一步地,认证令牌是客户端APP用公钥加密的密文数据,其内容包括时间戳、服务绑定验证码和校验数据。Furthermore, the authentication token is ciphertext data encrypted by the client APP with the public key, and its content includes timestamp, service binding verification code and verification data.
进一步地,步骤(7)中,SDP系统对认证令牌进行校验的具体过程为:Further, in step (7), the specific process of the SDP system verifying the authentication token is as follows:
SDP系统监听到网络流量中的SPA单包认证数据包后,根据配置列表中的服务IP和对应的SPA认证端口,对匹配到的SPA单包认证数据包进行过滤,获取SPA单包认证数据包中的认证令牌,并确认使用的公私钥对;After the SDP system monitors the SPA single-packet authentication data packets in the network traffic, it filters the matching SPA single-packet authentication data packets based on the service IP and the corresponding SPA authentication port in the configuration list, and obtains the SPA single-packet authentication data packets. Authentication token in and confirm the public and private key pair used;
然后,SDP系统采用私钥对认证令牌进行解密,若解密失败,抛弃当前SPA单包认证数据包,若解密成功,可获得认证令牌的明文数据,此时进一步验证认证令牌中的校验数据、服务绑定验证码和时间戳进行验证,如果出现校验数据不正确、服务绑定验证码不正确以及认证令牌中的时间戳和系统当前时间戳的差值大于或等于预设差值阈值中的任一种情况时,校验不通过,否则校验通过。Then, the SDP system uses the private key to decrypt the authentication token. If the decryption fails, the current SPA single-packet authentication data packet is discarded. If the decryption is successful, the plaintext data of the authentication token can be obtained. At this time, the verification in the authentication token can be further verified. Verify the verification data, service binding verification code and timestamp. If the verification data is incorrect, the service binding verification code is incorrect, and the difference between the timestamp in the authentication token and the current system timestamp is greater than or equal to the preset In any case of the difference threshold, the verification fails, otherwise the verification passes.
进一步地,步骤(8)中,认证成功后,用户浏览器可正常访问受保护的应用服务,SDP系统持续监测流量,会放过该用户浏览器IP对受保护的应用服务端的请求,数据正常交互;超过单次认证有效时长后,用户浏览器与目标应用服务的成对加白白名单失效,SDP系统将会对用户浏览器IP的访问进行阻断,用户需要重新使用客户端APP扫码,重新进行SPA单包认证。Further, in step (8), after the authentication is successful, the user's browser can normally access the protected application service. The SDP system continues to monitor the traffic and will let go of the user's browser IP's request to the protected application server. The data is normal. Interaction; after the single authentication validity period exceeds, the paired whitelist of the user's browser and the target application service becomes invalid, and the SDP system will block access to the user's browser IP, and the user needs to use the client APP to scan the code again. Re-authenticate the SPA single package.
本发明还提供一种实现上述方法的系统,包括SDP系统、交换机、应用服务、用户浏览器和客户端APP;SDP系统、应用服务、用户浏览器和客户端APP之间通过交换机进行交互;The present invention also provides a system for implementing the above method, including an SDP system, a switch, an application service, a user browser and a client APP; the SDP system, the application service, the user browser and the client APP interact through the switch;
所述SDP系统用于对受保护的应用服务生成专用注册信息,对未认证的用户浏览器对受保护的应用服务的访问请求进行监测,并按照上述方法的步骤(3)、(7)和(8)对未认证的用户浏览器进行认证和授权,对于授权的用户浏览器对受保护的应用服务的访问放行,阻断未授权的用户浏览器对受保护的应用服务的访问;The SDP system is used to generate special registration information for protected application services, monitor access requests of unauthenticated user browsers to protected application services, and follow steps (3), (7) and (8) Authentication and authorization for unauthenticated user browsers, allowing authorized user browsers to access protected application services, and blocking unauthorized user browsers from accessing protected application services;
客户端APP安装在用户的移动设备,用于上述方法的步骤(4)-(6),通过与SDP系统的交互完成用户浏览器的认证。The client APP is installed on the user's mobile device and is used in steps (4)-(6) of the above method to complete the authentication of the user's browser through interaction with the SDP system.
本发明的有益效果在于:本发明只需部署SDP系统,通过特定的认证流程实现SPA单包认证业务逻辑,具有以下优势:The beneficial effects of the present invention are: the present invention only needs to deploy the SDP system and implement the SPA single-package authentication business logic through a specific authentication process, which has the following advantages:
(1)用户通过使用专用的客户端APP扫码,可实现通过浏览器快速完成SPA认证后,简便访问受保护的应用服务,用户在电脑上无需安装客户端程序;(1) By using a dedicated client APP to scan the code, users can quickly complete SPA authentication through the browser and easily access protected application services. Users do not need to install client programs on their computers;
(2)旁路部署,镜像接入交换机流量,不进行数据转发,性能较强,仅对涉及受保护的应用服务的镜像流量进行监测,并对未认证流量进行阻断,可有效解决单点部署性能问题和正常访问误拦截的问题,避免一旦出现单点故障,导致SDP系统保护的应用服务都不可访问;(2) Bypass deployment, mirroring access switch traffic, no data forwarding, strong performance, only monitoring the mirrored traffic involving protected application services, and blocking unauthenticated traffic, which can effectively solve single points Deployment performance issues and misinterpretation of normal access can prevent application services protected by the SDP system from being inaccessible in the event of a single point of failure;
(3)本发明中,SDP系统的控制端无需与客户端建立预连接,进而无需对互联网暴露,避免被攻击控制后,授权任意用户访问;(3) In the present invention, the control end of the SDP system does not need to establish a pre-connection with the client, and does not need to be exposed to the Internet to avoid being controlled by attacks and authorizing any user to access;
(4)SDP系统不仅可通过镜像外网访问内网的流量,实现外网访问内网的防御,也可以镜像内网访问内网的流量,实现内部用户访问内部应用时的SDP功能,实现内部服务的防护,有效抵御内部攻击;(4) The SDP system can not only mirror the traffic from the external network to the internal network to protect the internal network from the external network, but also mirror the traffic from the internal network to the internal network to realize the SDP function when internal users access internal applications. Service protection to effectively resist internal attacks;
(5)SDP系统仅需要并联连接交换机,镜像接入流量,即可实现防护功能,不改变用户的网络结构,不用改造被保护的应用服务,可实现透明部署。(5) The SDP system only needs to connect switches in parallel and mirror access traffic to achieve protection functions. It does not change the user's network structure or modify the protected application services, and can achieve transparent deployment.
附图说明Description of the drawings
图1为传统SDP软件定义边界的架构图;Figure 1 is the architecture diagram of traditional SDP software-defined boundaries;
图2为本发明实施例1方法的流程图;Figure 2 is a flow chart of the method of Embodiment 1 of the present invention;
图3为本发明实施例2方法的流程图;Figure 3 is a flow chart of the method in Embodiment 2 of the present invention;
图4为本发明实施例3方法的架构图;Figure 4 is an architecture diagram of the method in Embodiment 3 of the present invention;
图5为本发明实施例3方法的流程图。Figure 5 is a flow chart of the method in Embodiment 3 of the present invention.
具体实施方式Detailed ways
以下将结合附图对本发明作进一步的描述,需要说明的是,本实施例以本技术方案为前提,给出了详细的实施方式和具体的操作过程,但本发明的保护范围并不限于本实施例。The present invention will be further described below in conjunction with the accompanying drawings. It should be noted that this embodiment is based on the technical solution and provides detailed implementation modes and specific operating processes. However, the protection scope of the present invention is not limited to this invention. Example.
实施例1Example 1
本实施例提供一种使用客户端APP扫描二维码的软件定义边界实现方法,通过SDP系统保护应用和服务,实现受保护应用和服务的隐身,用户进行授权认证,SDP系统在确认请求者合法身份后,授权其访问应用和服务。如图2所示,包括以下步骤:This embodiment provides a software-defined boundary implementation method that uses a client APP to scan QR codes, protects applications and services through the SDP system, and realizes the invisibility of protected applications and services. The user performs authorization authentication, and the SDP system confirms that the requester is legitimate. Once identified, authorize them to access applications and services. As shown in Figure 2, it includes the following steps:
(1)在SDP系统为每一个受保护的应用服务生成专用注册信息,所述专用注册信息包括服务IP、服务端口、SPA认证端口、服务绑定验证码、单次认证有效时长、公私钥对和对称加密密钥。在本实施例中,SDP系统为一体化硬件,采取并联方式旁路接入交换机,接入镜像流量。(1) Generate dedicated registration information for each protected application service in the SDP system. The dedicated registration information includes service IP, service port, SPA authentication port, service binding verification code, single authentication validity period, public and private key pair and symmetric encryption keys. In this embodiment, the SDP system is an integrated hardware that adopts a parallel bypass access switch to access mirrored traffic.
(2)用户通过浏览器访问受保护的目标应用服务。(2) The user accesses the protected target application service through the browser.
(3)SDP系统监测到未认证的用户浏览器访问流量,对访问进行拦截,并向用户的浏览器返回基于访问服务生成的二维码。(3) The SDP system detects unauthenticated user browser access traffic, intercepts the access, and returns a QR code generated based on the access service to the user's browser.
(4)用户在移动设备安装客户端APP,客户端APP获取包括SPA认证端口、服务绑定验证码和公钥在内的服务认证信息。(4) The user installs the client APP on the mobile device, and the client APP obtains the service authentication information including the SPA authentication port, service binding verification code and public key.
(5)用户使用客户端APP扫描步骤(3)中浏览器加载的二维码。(5) The user uses the client APP to scan the QR code loaded by the browser in step (3).
(6)客户端APP解析所述二维码的信息,并使用步骤(4)获取的服务绑定验证码构造认证令牌,向目标应用服务发送包含认证令牌的SPA单包认证数据包。(6) The client APP parses the information of the QR code, constructs an authentication token using the service binding verification code obtained in step (4), and sends a SPA single-packet authentication data packet containing the authentication token to the target application service.
(7)SDP系统实时监测流量,当监测到SPA单包认证数据包时,如能成功解析该SPA单包认证数据包,并完成认证令牌的校验,则通过SPA单包认证。(7) The SDP system monitors traffic in real time. When the SPA single-packet authentication data packet is detected, if it can successfully parse the SPA single-packet authentication data packet and complete the verification of the authentication token, it will pass the SPA single-packet authentication.
(8)通过SPA单包认证后,SDP系统将访问用户的IP与目标应用服务的服务IP和服务端口绑定,增加用户的IP与目标应用服务的成对加白白名单,完成SPA认证过程,对用户授权,在后续网络流量监测中,监测到当前授权用户的IP访问受保护的应用服务时,将放过访问报文至目标应用服务。(8) After passing the SPA single package authentication, the SDP system will bind the accessing user's IP to the service IP and service port of the target application service, add the user's IP and the target application service to the paired whitelist, and complete the SPA authentication process. After authorizing the user, during subsequent network traffic monitoring, if it is detected that the currently authorized user's IP accesses the protected application service, the access packet will be passed to the target application service.
针对未通过SPA单包认证的用户浏览器访问流量,SDP系统在监测到该未通过SPA单包认证的用户浏览器尝试与目标应用服务建立连接进行TCP三次握手时,SDP系统会同时向该未通过SPA单包认证的用户浏览器和目标应用服务分别发送reset包,阻断网络连接。For user browser access traffic that has not passed SPA single packet authentication, when the SDP system detects that the user's browser that has not passed SPA single packet authentication attempts to establish a connection with the target application service for a TCP three-way handshake, the SDP system will simultaneously The user's browser and the target application service that pass SPA single-packet authentication send reset packets respectively to block network connections.
任何未授权的用户浏览器访问将直接被阻断。Any unauthorized user browser access will be blocked directly.
在本实施例中,步骤(1)中,在SDP系统为受保护的应用服务的专用注册信息生成过程为:In this embodiment, in step (1), the process of generating special registration information for protected application services in the SDP system is:
1)在SDP系统中新建受保护的应用服务,录入服务名称、服务IP、服务端口、互联网映射IP、互联网映射端口、SPA认证端口、界面跳转URL、服务绑定验证码、单次认证有效时长、创建时间、备注和状态。1) Create a new protected application service in the SDP system, enter the service name, service IP, service port, Internet mapping IP, Internet mapping port, SPA authentication port, interface jump URL, service binding verification code, single authentication is valid Duration, creation time, notes and status.
2)为受保护的应用服务生成一对非对称加密公私钥对以及一个对称加密密钥;公钥将传递给客户端APP保存,用于客户端APP生成认证令牌;私钥由SDP系统保存,用于对接收到的认证令牌进行解密,获取认证令牌的明文数据;SDP系统和客户端APP都要保存所述对称加密密钥,其中SDP系统生成唯一的校验数据并用对称加密算法加密,客户端APP用对称加密算法解密获取校验数据,确认二维码的真实性。2) Generate an asymmetric encryption public and private key pair and a symmetric encryption key for the protected application service; the public key will be passed to the client APP for storage and used for the client APP to generate an authentication token; the private key is saved by the SDP system , used to decrypt the received authentication token and obtain the plaintext data of the authentication token; both the SDP system and the client APP must save the symmetric encryption key, in which the SDP system generates unique verification data and uses a symmetric encryption algorithm Encryption, the client APP uses a symmetric encryption algorithm to decrypt and obtain the verification data to confirm the authenticity of the QR code.
3)受保护的应用服务的信息录入后,SDP系统开始监听所有发往受保护的应用服务的服务IP和SPA认证端口的UDP报文。3) After the protected application service information is entered, the SDP system begins to monitor all UDP packets sent to the service IP and SPA authentication port of the protected application service.
更具体地,客户端APP是一个移动应用,可以运行在用户的手机、PAD等移动设备上。More specifically, the client APP is a mobile application that can run on the user's mobile phone, PAD and other mobile devices.
在本实施例中,步骤(4)中,用户可通过离线方式(例如U盘拷贝)或在线方式(例如电子邮件、社交软件、网盘等),从SDP系统管理员处获取到服务IP、服务端口、公钥、服务绑定验证码、SPA认证端口等信息,客户端APP必须获取到上述信息才能使用。In this embodiment, in step (4), the user can obtain the service IP, Service port, public key, service binding verification code, SPA authentication port and other information, the client APP must obtain the above information before it can be used.
进一步地,步骤(6)中,客户端APP用内置的令牌算法计算生成认证令牌后,将令牌组装成SPA单包认证数据包,并向受保护的应用服务的服务IP和SPA认证端口发送该SPA单包认证数据包,具体为UDP认证数据包。Further, in step (6), after the client APP uses the built-in token algorithm to calculate and generate an authentication token, it assembles the token into a SPA single-packet authentication data packet, and authenticates to the service IP and SPA of the protected application service. The port sends the SPA single-packet authentication data packet, specifically a UDP authentication data packet.
客户端APP经过源代码混淆、加壳等方式,可有效抵抗逆向分析,避免源代码泄露,保护客户端认证流程的安全。Through source code obfuscation, packaging, etc., the client APP can effectively resist reverse analysis, avoid source code leakage, and protect the security of the client authentication process.
在本实施例中,步骤(3)中,二维码返回的数据为经过SM4对称加密算法加密的密文,解密后的结构为:IP版本|校验数据|认证IP|认证端口|业务端口。In this embodiment, in step (3), the data returned by the QR code is ciphertext encrypted by the SM4 symmetric encryption algorithm. The decrypted structure is: IP version|verification data|authentication IP|authentication port|service port .
在本实施例中,认证令牌(Token)是客户端APP用公钥加密的密文数据,其内容包括时间戳(客户端APP发起SPA认证请求时的本地系统时间戳)、服务绑定验证码和校验数据,采用SM2算法进行非对称加密。In this embodiment, the authentication token (Token) is ciphertext data encrypted by the client APP with a public key. Its content includes a timestamp (the local system timestamp when the client APP initiates the SPA authentication request), service binding verification The code and check data are asymmetrically encrypted using the SM2 algorithm.
具体地,认证令牌的计算公式为:Token=Publ icKeyEncrypt(时间戳-服务绑定验证码-校验数据)。Specifically, the calculation formula of the authentication token is: Token=PublicKeyEncrypt (timestamp-service binding verification code-verification data).
在本实施例中,步骤(7)中,SDP系统对认证令牌进行校验的具体过程为:In this embodiment, in step (7), the specific process of the SDP system verifying the authentication token is as follows:
SDP系统监听到网络流量中的SPA单包认证数据包后,根据配置列表中的服务IP和对应的SPA认证端口,对匹配到的SPA单包认证数据包进行过滤,获取SPA单包认证数据包中的认证令牌,并确认使用的公私钥对;After the SDP system monitors the SPA single-packet authentication data packets in the network traffic, it filters the matching SPA single-packet authentication data packets based on the service IP and the corresponding SPA authentication port in the configuration list, and obtains the SPA single-packet authentication data packets. Authentication token in and confirm the public and private key pair used;
然后,SDP系统采用私钥对认证令牌(Token)进行解密,若解密失败,抛弃当前SPA单包认证数据包,若解密成功,可获得认证令牌的明文数据,此时进一步验证认证令牌中的校验数据的正确性,如果不正确,抛弃当前SPA单包认证数据包,若验证成功,SDP系统取出认证令牌中的时间戳,并计算和系统当前时间戳的差值,若小于10分钟,则认为认证令牌有效,从而进一步对服务绑定验证码进行校验,否则抛弃当前SPA单包认证数据包;对服务绑定验证码进行校验时,SDP系统使用本地保存的受保护的应用服务的服务绑定验证码与客户端APP发送的认证令牌中的服务绑定验证码进行比较,若相同,则认为验证通过。Then, the SDP system uses the private key to decrypt the authentication token (Token). If the decryption fails, the current SPA single-packet authentication data packet is discarded. If the decryption is successful, the plaintext data of the authentication token can be obtained, and the authentication token can be further verified. The correctness of the verification data in the verification token. If it is incorrect, the current SPA single-packet authentication data packet is discarded. If the verification is successful, the SDP system takes out the timestamp in the authentication token and calculates the difference with the current timestamp of the system. If it is less than 10 minutes, the authentication token is considered valid, and the service binding verification code is further verified, otherwise the current SPA single-packet authentication data packet is discarded; when verifying the service binding verification code, the SDP system uses the locally saved recipient The service binding verification code of the protected application service is compared with the service binding verification code in the authentication token sent by the client APP. If they are the same, the verification is considered passed.
需要说明的是,校验数据、时间戳和服务绑定验证码的校验顺序可以调换,本实施例给出的仅是其中一种校验顺序实施方式。It should be noted that the verification order of the verification data, timestamp, and service binding verification code can be exchanged. This embodiment only provides one implementation of the verification order.
进一步地,在本实施例中,步骤(8)中,认证成功后,用户浏览器可正常访问受保护的应用服务,SDP系统持续监测流量,会放过该用户浏览器IP对受保护的应用服务端的请求,数据正常交互;超过单次认证有效时长后,用户浏览器与目标应用服务的成对加白白名单失效,SDP系统将会对用户浏览器IP的访问进行阻断,用户需要重新使用客户端APP扫码,重新进行SPA单包认证。Further, in this embodiment, in step (8), after the authentication is successful, the user's browser can normally access the protected application service. The SDP system continues to monitor the traffic and will let the user's browser IP access the protected application. Server requests and data interact normally; after the single authentication validity period exceeds, the paired whitelist of the user's browser and the target application service becomes invalid, and the SDP system will block access to the user's browser IP, and the user needs to use it again. Scan the QR code on the client APP and re-authenticate the SPA single package.
实施例2Example 2
本实施例提供一种实施例1所述方法的具体应用实例,如图3所示,包括以下步骤:This embodiment provides a specific application example of the method described in Embodiment 1, as shown in Figure 3, including the following steps:
第一步:未进行校验,Brower(浏览器)向Server(服务端)发起连接,连接建立成功后,再接收到请求,SDP系统会对连接进行阻断,即向Server端发送阻断包。Step 1: No verification is performed. The browser initiates a connection to the server. After the connection is successfully established and the request is received, the SDP system blocks the connection, that is, sends a blocking packet to the server. .
第二步:阻断Server端的同时,如果经检测协议为HTTP,则将请求源IP、目的IP、目的端口、认证IP、认证端口、业务端口(当部署在核心交换机时,目的IP和目的端口为内网的IP和端口)等信息生成二维码图片,构造响应包返给Brower。Step 2: While blocking the server side, if the detected protocol is HTTP, the source IP, destination IP, destination port, authentication IP, authentication port, and service port will be requested (when deployed on a core switch, the destination IP and destination port Generate a QR code image for the intranet IP and port) and other information, construct a response packet and return it to the Brower.
第三步:Brower接受到K01返回的数据,开始定时地向Server进行请求,此时未加白访问失败。Step 3: The Brower receives the data returned by K01 and starts to make regular requests to the Server. At this time, the access fails without adding white.
第四步:与此同时,Brower页面显示二维码,通过手机的客户端APP扫描二维码后解密获取其中校验数据(包含源IP、目的IP和端口)、认证IP、认证端口、业务端口。Step 4: At the same time, the Brower page displays the QR code. Scan the QR code through the mobile client APP and decrypt it to obtain the verification data (including source IP, destination IP and port), authentication IP, authentication port, and business port.
第五步:手机构造UDP的认证包,再将认证包发送到认证IP的认证端口,K01设备对其进行校验,校验成功后对源IP进行加白处理。Step 5: The mobile phone constructs a UDP authentication packet, and then sends the authentication packet to the authentication port of the authentication IP. The K01 device verifies it. After the verification is successful, the source IP is whitened.
第六步:Brower再次请求,此时携带判断二维码请求的特征,如果命中加白且包含该特征且策略配置跳转URL则需要返回一个重定向URL的响应包给Brower。Step 6: Brower makes another request, this time carrying the characteristics for judging the QR code request. If whitening is hit and contains this characteristic and the policy configures the jump URL, a response packet of a redirect URL needs to be returned to Brower.
第七步:如果返回了重定向URL,Brower将访问重定向后的URL。Step 7: If the redirect URL is returned, Brower will access the redirected URL.
实施例3Example 3
本实施例以数据库和VPN接入本SDP系统场景为例,提供SDP系统进行SPA单包认证并进行访问控制的应用实例,如图4、5所示。This embodiment takes the scenario of database and VPN access to the SDP system as an example to provide an application example of the SDP system performing SPA single packet authentication and access control, as shown in Figures 4 and 5.
第一步:SDP系统持续监测网络流量,并基于访问控制列表对用户的网络访问权限进行判断:1)若用户的网络访问流量匹配到允许访问规则,SDP系统会对访问放行;2)若用户的网络访问流量匹配到禁止访问规则,SDP系统直接阻断访问;3)若用户的网络访问流量未匹配到访问控制列表中的规则,则执行第二步。Step 1: The SDP system continuously monitors network traffic and determines the user's network access rights based on the access control list: 1) If the user's network access traffic matches the allowed access rules, the SDP system will grant access; 2) If the user If the user's network access traffic matches the access prohibition rule, the SDP system directly blocks access; 3) If the user's network access traffic does not match the rules in the access control list, perform the second step.
第二步:当SDP系统持续监测镜像接入的网络流量,当监测到UDP报文时,检测UDP报文的目的端口是否匹配SPA认证端口:若匹配,则执行第三步;若不匹配则丢弃该UDP报文。Step 2: When the SDP system continuously monitors the network traffic of the mirrored access, when a UDP packet is detected, it detects whether the destination port of the UDP packet matches the SPA authentication port: if it matches, proceed to step 3; if it does not match, proceed to step 3. Discard the UDP packet.
第三步:SDP系统根据UDP报文的目的地址、认证端口匹配对应的私钥,对UDP报文数据部分,使用私钥解密:若解密成功,则获取到明文的认证令牌,继续执行第四步;若解密失败则丢弃该UDP报文。Step 3: The SDP system matches the corresponding private key based on the destination address and authentication port of the UDP message, and uses the private key to decrypt the data part of the UDP message: If the decryption is successful, the plaintext authentication token is obtained, and the execution of step 1 continues. Four steps; if decryption fails, discard the UDP message.
第四步:SDP系统从明文的认证令牌中获取认证时间戳、服务绑定验证码和校验数据,SDP系统对验证码进行校验:若校验通过,则执行第五步;若校验不通过,则丢弃该UDP报文。Step 4: The SDP system obtains the authentication timestamp, service binding verification code and verification data from the clear text authentication token. The SDP system verifies the verification code: if the verification passes, proceed to step five; If the verification fails, the UDP packet is discarded.
第五步:SDP系统对校验数据进行校验:若校验通过,则执行第六步;若校验不通过,则丢弃该UDP报文。Step 5: The SDP system verifies the verification data: if the verification passes, step 6 is performed; if the verification fails, the UDP message is discarded.
第六步:SDP系统校验UDP报文包含的认证时间戳是否在有效认证时间内:若认证包有效,则完成单包认证,对UDP包的源IP、目的IP和目的端口增加一条访问控制规则,实现客户端和服务的成对加白;若认证时间戳已经超时,则丢弃该UDP报文。Step 6: The SDP system verifies whether the authentication timestamp contained in the UDP packet is within the valid authentication time: If the authentication packet is valid, single-packet authentication is completed, and an access control is added to the source IP, destination IP and destination port of the UDP packet. Rules to implement paired whitening of clients and services; if the authentication timestamp has expired, the UDP packet will be discarded.
对于本领域的技术人员来说,可以根据以上的技术方案和构思,给出各种相应的改变和变形,而所有的这些改变和变形,都应该包括在本发明权利要求的保护范围之内。For those skilled in the art, various corresponding changes and modifications can be made based on the above technical solutions and concepts, and all these changes and modifications should be included in the protection scope of the claims of the present invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311465038.1A CN117478392A (en) | 2023-11-06 | 2023-11-06 | Software-defined boundary implementation method and system using client APP to scan QR codes |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311465038.1A CN117478392A (en) | 2023-11-06 | 2023-11-06 | Software-defined boundary implementation method and system using client APP to scan QR codes |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117478392A true CN117478392A (en) | 2024-01-30 |
Family
ID=89636010
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311465038.1A Pending CN117478392A (en) | 2023-11-06 | 2023-11-06 | Software-defined boundary implementation method and system using client APP to scan QR codes |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117478392A (en) |
-
2023
- 2023-11-06 CN CN202311465038.1A patent/CN117478392A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11647003B2 (en) | Concealing internal applications that are accessed over a network | |
US9781114B2 (en) | Computer security system | |
KR101076848B1 (en) | Reducing network configuration complexity with transparent virtual private networks | |
CN114553568A (en) | Resource access control method based on zero-trust single packet authentication and authorization | |
US7552323B2 (en) | System, apparatuses, methods, and computer-readable media using identification data in packet communications | |
US9699158B2 (en) | Network user identification and authentication | |
Kumar et al. | Performance analysis of sdp for secure internal enterprises | |
Degraaf et al. | Improved port knocking with strong authentication | |
US20090031399A1 (en) | Method and Apparatus for Content Based Authentication for Network Access | |
CN116032533B (en) | Remote office access method and system based on zero trust | |
AU2003294304B2 (en) | Systems and apparatuses using identification data in network communication | |
JP4783340B2 (en) | Protecting data traffic in a mobile network environment | |
CN115242430B (en) | A method and system for implementing software-defined boundaries | |
Al-Bahadili et al. | Network security using hybrid port knocking | |
US10313305B2 (en) | Method of unblocking external computer systems in a computer network infrastructure, distributed computer network having such a computer network infrastructure as well as computer program product | |
CN113645115B (en) | Virtual private network access method and system | |
CN118449742A (en) | A network security control method, system and device based on zero trust | |
CN106576050B (en) | Three-tier security and computing architecture | |
Khandelwal et al. | Frontline techniques to prevent web application vulnerability | |
Maidine et al. | Cloud identity management mechanisms and issues | |
CN117834218A (en) | A unified identity authentication method and platform based on zero trust architecture | |
CN117478392A (en) | Software-defined boundary implementation method and system using client APP to scan QR codes | |
WO2009005698A1 (en) | Computer security system | |
Zhu et al. | A web database Security model using the Host identity protocol | |
CN116321165B (en) | Secure access control method and apparatus |
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 |