Security Risks for Sidecar Containers in Kubernetes
Loading...
URL
Journal Title
Journal ISSN
Volume Title
Perustieteiden korkeakoulu |
Master's thesis
Unless otherwise stated, all rights belong to the author. You may download, display and print this publication for Your own personal use. Commercial use is prohibited.
Authors
Date
2024-01-22
Department
Major/Subject
Computer Science
Mcode
SCI3042
Degree programme
Master’s Programme in Computer, Communication and Information Sciences
Language
en
Pages
62+11
Series
Abstract
The widespread adoption of containers has been a driving force behind the shift from monolithic applications to microservices. The modular nature of microservice architecture has allowed the development of distributed system design patterns such as the sidecar pattern, in which peripheral tasks are separated from the application containers as their own distinct containers. The sidecar pattern is often used to implement observability, logging, and improving security with service meshes. This thesis examines the security risks associated with sidecar containers in Kubernetes container orchestration. It focuses on Kubernetes networking and Zero Trust security architecture to identify potential vulnerabilities that adversaries could exploit. The research reveals that Kubernetes only offers built-in security measures on the Pod-level, which can leave sidecar containers exposed to attacks. The thesis introduces two proof-of-concept solutions aimed at establishing network isolation between application and sidecar containers. The first solution utilizes IPTables to enforce isolation, while the second employs Multus to mimic shared network namespace between containers in distinct Pods. Despite the demonstrated solutions for network isolation, the complexities of implementation and the need for specialized infrastructure pose challenges that outweigh the benefits of such architectural modifications. Due to the challenges, the thesis explores the merits of sidecarless service mesh architectures such as Cilium and Istio Ambient Mesh, as an example of avoiding the risks with sidecars altogether. Ultimately, while the thesis presents viable proof-of-concept solutions for network isolation between application and sidecar containers, it advocates for a cautious approach, emphasizing the preference for established and well-tested components over custom-made implementations that need to be actively maintained.Konttiteknologian yleistyminen on ollut merkittävä tekijä siirryttäessä monoliittisista sovelluksista mikropalveluihin. Mikropalveluarkkitehtuurin modulaarisuus on mahdollistanut hajautettujen järjestelmäsuunnittelumallien, kuten sivuvaunumallin, kehittymisen. Sivuvaunumallissa sovelluksesta erilliset sivutehtävät kuten havainnointi, lokien kirjoittaminen tai palveluverkkojen välityspalvelimet voidaan toteuttaa omina erillisinä kontteinaan pääsovelluksen rinnalla. Tämä diplomityö tutkii turvallisuusriskejä, jotka liittyvät sivuvaunukontteihin Kubernetes-orkestraatiossa. Työ keskittyy Kuberneteksen verkkototeutukseen ja nollaluottamuksen tietoturva-arkkitehtuuriin ja tutkii sivuvaunukontteihin liittyviä tietoturvariskejä, joita hyökkääjät voisivat hyödyntää. Kubernetes tarjoaa valmiita tietoturvaominaisuuksia vain Pod-abstraktiotasolla, mikä altistaa sivuvaunukontteja hyökkäyksille. Työssä esotellään kaksi alustavaa ratkaisua, joiden avulla voidaan eristää sovellusja sivuvaunukonttien verkot toisistaan. Ensimmäinen ratkaisu perustuu IPTables-sääntöhin, kun taas toinen luo Multus-konttiverkkoliitännäisen avulla sivuvaunumallia imitoivan verkon kahden eristetyn kontin välille. Molemmat toteutukset ratkaisevat ongelman, mutta niiden monimutkaisuus ja tarve erikoistuneelle intrastruktuurille voi merkittävästi hankaloittaa ratkaisujen käyttöönottoa ja hyödyllisyyttä tuotantoympäristöissä. Kohdattujen haasteiden vuoksi työ tutkii myös sivuvaunuttomia palveluverkkoja, kuten Cilium ja Istio Ambient Mesh, keinona välttää sivuvaunuihin liittyvät turvallisuusriskit. Vaikka diplomityössä esitetäänkin ratkaisut sivuvaunukonttien verkkoeristykseen, on välttämätöntä korostaa vakiintuneiden ja hyvin testattujen komponenttien suosimista räätälöityjen ja aktiivista ylläpitoa vaativien toteutusten sijaan.Description
Supervisor
Di Francesco, MarioThesis advisor
Bufalino, JacopoMartin Navarro, José Luis
Keywords
Kubernetes, container, sidecar pattern, network security