CN112511504A - 一种Kubernetes Pod通信加密方法 - Google Patents

一种Kubernetes Pod通信加密方法 Download PDF

Info

Publication number
CN112511504A
CN112511504A CN202011271900.1A CN202011271900A CN112511504A CN 112511504 A CN112511504 A CN 112511504A CN 202011271900 A CN202011271900 A CN 202011271900A CN 112511504 A CN112511504 A CN 112511504A
Authority
CN
China
Prior art keywords
container
haproxy
pod
kubernetes
communication
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.)
Granted
Application number
CN202011271900.1A
Other languages
English (en)
Other versions
CN112511504B (zh
Inventor
杨博
张帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Moshen Information Technology Co ltd
Nanjing Tech University
Original Assignee
Nanjing Moshen Information Technology Co ltd
Nanjing Tech University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nanjing Moshen Information Technology Co ltd, Nanjing Tech University filed Critical Nanjing Moshen Information Technology Co ltd
Priority to CN202011271900.1A priority Critical patent/CN112511504B/zh
Publication of CN112511504A publication Critical patent/CN112511504A/zh
Application granted granted Critical
Publication of CN112511504B publication Critical patent/CN112511504B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

一种Kubernetes Pod通信加密方法,该方法适用于基于Kubernetes的容器平台,在应用程序的Pod中加入HAProxy容器,采用HAProxy容器对应用程序的通信进行加密。本发明使用HAProxy容器,对基于Kubernetes的容器云平台中的Pod进行通信加密,通信过程中通过数字证书进行身份认证,不法人员无法通过安全认证,从而提高了网络的安全性;本发明是统一、灵活和通用的Kubernetes Pod通信加密方法,适用于基于Kubernetes的容器平台中所有的Pod。

Description

一种Kubernetes Pod通信加密方法
技术领域
本发明涉及通信加密领域,更具体地,涉及一种Kubernetes Pod通信加密方法。
背景技术
基于Kubernetes的容器云平台的安全和隐私问题是一个重要方面的问题。Kubernetes中的所有容器和Pod都需要相互交互才能完成工作,应用程序的访问和数据传输的暴露是最为常见的安全威胁。如何确保Kubernetes中应用程序的通信安全成为了一个重要问题。在实践中,基于微服务的应用程序被容器化并作为Pod部署在Kubernetes集群上。因此,需要对Kubernetes Pod进行通信加密。目前主要采用的方法是使用服务网格,服务网格提供了基于策略的身份验证,可以在两个服务之间建立双向的TLS配置,以实现服务之间(service-to-service)的安全加密通信,和最终用户的身份验证。
但是,服务网格是复杂且高度自治的技术,这在很大程度上限制了它们对Kubernetes上“greenfield”应用程序的适用性。并且,服务网格的孤立性限制了安全性。
发明内容
本发明的目的是针对服务网格的孤立性限制了安全性的问题,提出一种Kubernetes Pod通信加密方法。本发明的目的在于提供一种Kubernetes Pod通信加密方法。这种Pod的加密方法可以为企业提供了一种有效的模式来保护基于Kubernetes的容器云上应用程序内外部通信安全,它无需内部硬件或者庞大预算即可集成安全服务,进而达到保护应用程序通信安全的目的。与服务网格不同,该方法是一种简单、灵活、通用的Kubernetes Pod通信加密方法。该方法对加密之后的Pod性能影响较小。
本发明的技术方案是:
本发明提供一种Kubernetes Pod通信加密方法,该方法适用于基于Kubernetes的容器平台,在应用程序的Pod中加入HAProxy容器,采用HAProxy容器对应用程序的通信进行加密。
进一步地,它包括以下步骤:
S1、在应用程序的yaml文件中加入HAProxy容器代码,使得HAProxy容器加入到应用程序的Pod中;
S2、设置HAProxy容器开放的端口;
S3、根据需求配置haproxy.cfg文件,存放在Kubernetes的容器平台的Configmap资源中,通过Configmap配置应用程序Pod中HAProxy容器;
S4、采用任一通信模块进行通信时,利用HAProxy容器监听所选通信模块的端口,对端口进行代理转发,并且开启HAProxy SSL终止证书对通信模块的传输流量进行加密。
进一步地,通信过程中通过数字证书进行身份认证。
本发明的有益效果:
本发明使用HAProxy容器,对基于Kubernetes的容器云平台中的Pod进行通信加密,通信过程中通过数字证书进行身份认证,不法人员无法通过安全认证,从而提高了网络的安全性。
本发明的方法能够保护基于Kubernetes的容器云平台上应用程序内外部通信安全,无需内部硬件或者庞大预算即可集成安全服务,进而达到保护应用程序通信安全的目的。
本发明是统一、灵活和通用的Kubernetes Pod通信加密方法,适用于基于Kubernetes的容器平台中所有的Pod。
本发明的其它特征和优点将在随后具体实施方式部分予以详细说明。
附图说明
通过结合附图对本发明示例性实施方式进行更详细的描述,本发明的上述以及其它目的、特征和优势将变得更加明显,其中,在本发明示例性实施方式中,相同的参考标号通常代表相同部件。
图1示出了本发明实施例中以基于微服务的Elasticsearch为例实现的架构图。
具体实施方式
下面将参照附图更详细地描述本发明的优选实施方式。虽然附图中显示了本发明的优选实施方式,然而应该理解,可以以各种形式实现本发明而不应被这里阐述的实施方式所限制。
本发明提供一种Kubernetes Pod通信加密方法,该方法适用于基于Kubernetes的容器平台,在应用程序的Pod中加入HAProxy容器,采用HAProxy容器对应用程序的通信进行加密,它包括以下步骤:
S1、在应用程序的yaml文件中加入HAProxy容器代码,使得HAProxy容器加入到应用程序的Pod中;
S2、设置HAProxy容器开放的端口;
S3、根据需求配置haproxy.cfg文件,存放在Kubernetes的容器平台的Configmap资源中,通过Configmap配置应用程序Pod中HAProxy容器;
S4、采用任一通信模块进行通信时,利用HAProxy容器监听所选通信模块的端口,对端口进行代理转发,并且开启HAProxy SSL终止证书对通信模块的传输流量进行加密。
该方法中容器化的HAProxy没有默认设置。haproxy.cfg是HAProxy的配置文件。根据需求将配置好haproxy.cfg文件存放在Kubernetes的Configmap资源中,通过Configmap配置应用程序Pod中HAProxy容器;如图1,以基于微服务的Elasticsearch通信加密为例,我们把HAProxy容器加入Elasticsearch的Pod里面,利用HAProxy容器监听Elasticsearch的端口,对端口进行代理转发,并且开启HAProxy SSL终止对Elasticsearch的传输流量进行加密。
本发明使用HAProxy容器,对基于Kubernetes的容器云平台中的Pod进行通信加密,通信过程中通过数字证书进行身份认证,不法人员无法通过安全认证,从而提高了网络的安全性。
本发明的方法能够保护基于Kubernetes的容器云平台上应用程序内外部通信安全,无需内部硬件或者庞大预算即可集成安全服务,进而达到保护应用程序通信安全的目的。
本发明是统一、灵活和通用的Kubernetes Pod通信加密方法,适用于基于Kubernetes的容器平台中所有的Pod。
以上已经描述了本发明的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。

Claims (3)

1.一种Kubernetes Pod通信加密方法,其特征在于:该方法适用于基于Kubernetes的容器平台,在应用程序的Pod中加入HAProxy容器,采用HAProxy容器对应用程序的通信进行加密。
2.根据权利要求1所述的Kubernetes Pod通信加密方法,其特征在于:它包括以下步骤:
S1、在应用程序的yaml文件中加入HAProxy容器代码,使得HAProxy容器加入到应用程序的Pod中;
S2、设置HAProxy容器开放的端口;
S3、根据需求配置haproxy.cfg文件,存放在Kubernetes的容器平台的Configmap资源中,通过Configmap配置应用程序Pod中HAProxy容器;
S4、采用任一通信模块进行通信时,利用HAProxy容器监听所选通信模块的端口,对端口进行代理转发,并且开启HAProxy SSL终止证书对通信模块的传输流量进行加密。
3.根据权利要求1所述的Kubernetes Pod通信加密方法,其特征在于:通信过程中通过数字证书进行身份认证。
CN202011271900.1A 2020-11-13 2020-11-13 一种Kubernetes Pod通信加密方法 Active CN112511504B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011271900.1A CN112511504B (zh) 2020-11-13 2020-11-13 一种Kubernetes Pod通信加密方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011271900.1A CN112511504B (zh) 2020-11-13 2020-11-13 一种Kubernetes Pod通信加密方法

Publications (2)

Publication Number Publication Date
CN112511504A true CN112511504A (zh) 2021-03-16
CN112511504B CN112511504B (zh) 2023-06-06

Family

ID=74957714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011271900.1A Active CN112511504B (zh) 2020-11-13 2020-11-13 一种Kubernetes Pod通信加密方法

Country Status (1)

Country Link
CN (1) CN112511504B (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101765105A (zh) * 2009-12-17 2010-06-30 北京握奇数据系统有限公司 实现通信加密的方法和系统、移动终端
CN110266789A (zh) * 2019-06-13 2019-09-20 四川长虹电器股份有限公司 一种提高Kubernetes的WEB能力的方法
US20190349357A1 (en) * 2018-05-10 2019-11-14 Jayant Shukla Cloud-based identity management and authentication system for containers and applications
CN111371696A (zh) * 2020-03-24 2020-07-03 广西梯度科技有限公司 一种在Kubernetes中实现Pod网络流控的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101765105A (zh) * 2009-12-17 2010-06-30 北京握奇数据系统有限公司 实现通信加密的方法和系统、移动终端
US20190349357A1 (en) * 2018-05-10 2019-11-14 Jayant Shukla Cloud-based identity management and authentication system for containers and applications
CN110266789A (zh) * 2019-06-13 2019-09-20 四川长虹电器股份有限公司 一种提高Kubernetes的WEB能力的方法
CN111371696A (zh) * 2020-03-24 2020-07-03 广西梯度科技有限公司 一种在Kubernetes中实现Pod网络流控的方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
冯福伟: "基于集群架构的物联网身份认证系统", 计算机应用 *

Also Published As

Publication number Publication date
CN112511504B (zh) 2023-06-06

Similar Documents

Publication Publication Date Title
US8438631B1 (en) Security enclave device to extend a virtual secure processing environment to a client device
US9219709B2 (en) Multi-wrapped virtual private network
CN102349264A (zh) 卸载密码保护处理
CN103441991A (zh) 一种移动终端安全接入平台
WO2013007525A1 (en) Method and system to share or storage personal data without loss of privacy
EP2706717A1 (en) Method and devices for registering a client to a server
CN102857520A (zh) 一种字符终端Telnet协议安全访问系统及方法
Kravets et al. Mobile security solution for enterprise network
CN104065485A (zh) 电网调度移动平台安全保障管控方法
WO2014105914A1 (en) Security enclave device to extend a virtual secure processing environment to a client device
CN104219077A (zh) 一种中小企业信息管理系统
CN109302432A (zh) 基于网络安全隔离技术的网络通信数据组合加密传输方法
CN112866197A (zh) 实现物联网终端安全的密码边缘计算方法、系统及终端
CN112511504B (zh) 一种Kubernetes Pod通信加密方法
CN103269301A (zh) 桌面型IPSecVPN密码机及组网方法
KR20210001728A (ko) 이더넷 기반의 선박 네트워크 보호를 위한 선박 보안 시스템
CN114024767B (zh) 密码定义网络安全体系构建方法、体系架构及数据转发方法
US20030196082A1 (en) Security management system
KR101784240B1 (ko) 넌어드레스 네트워크 장비를 이용한 통신 보안 시스템 및 방법
US9419800B2 (en) Secure network systems and methods
KR100777537B1 (ko) 분산 네트워크 시스템의 통합관리를 위한 플랫폼 시스템및 통합관리 방법
CN103532958A (zh) 一种对网站资源进行加密的方法
JP7226784B2 (ja) データ収集側装置、データ利用側装置及び通信方法
Reimair et al. In Certificates We Trust--Revisited
Magin et al. Security analysis of OpenRadio and SoftRAN with STRIDE framework

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
GR01 Patent grant
GR01 Patent grant