SlideShare a Scribd company logo
Flux Security Deep Dive
Stefan Prodan
Flux & Flagger Maintainer
Principal Engineer @ Weaveworks
Flux - Project overview
The Flux project aims to provide a complete Continuous Delivery platform on
top of Kubernetes, supporting all the common practices and tooling in the field.
Flux v2 is powered by the GitOps Toolkit, a set of composable APIs and specialized tools for
keeping Kubernetes clusters in sync with sources of configuration, and automating updates to
configuration when there is new code to deploy.
Flagger is a Progressive Delivery tool that automates the release process for applications
running on Kubernetes. Flagger comes with a declarative model for decoupling the
deployment of apps on Kubernetes from the release process.
https://github.com/fluxcd/flux2
https://github.com/fluxcd/flagger
Flux - GitOps Continuous Delivery
Agenda
● How is Flux made
● How secure is Flux
● Are my secrets safe in Git
● Is Kubernetes really multi-tenant
● Flux soft vs hard multi-tenancy
● When will Flux v2 be GA
Flux is made of many things
● Kubernetes API extensions (CRDs)
● Specialized Kubernetes operators (powered by controller-runtime)
● Flux command-line tool (powered by Kubernetes cli-utils)
● Flux Terraform provider
● Go & C libraries (Go stdlib, Kubernetes client-go, kstatus, go-git,
libgit2, kustomize, helm, minio, oras, sops, age, aws, azure, gcp,
github, gitlab, bitbucket SDKs… and some more)
What is Flux made of?
WELCOME TO VALENCIA
How can a
handful of people
maintain such a
project?
With care…
A helpful community
And lots of automations
Flux
Libraries, controllers and CLI
UNIT TEST OSS FUZZ BUILD RELEASE
E2E TEST
Flux - release pipeline
ASSEMBLE AMD64 E2E ARM64 E2E RELEASE
CLOUD E2E
GitHub Linux &
macOS
Equinix Metal
Linux
AKS + DevOps,
EKS, GKE
Kubernetes KIND
1.20…1.24
Flux GitHub Bot
SCAN
GitHub CodeQL,
Snyk
Cosign & SBOM
A Flux release is comprised of
● Multi-arch container images (GHCR & DockerHub)
● Signed images and checksums (Cosign + GitHub OIDC)
● Software Bill of Materials (SBOM SPDX)
● Deployment manifests (YAML)
● OpenAPI specs (JSON)
● CLI binaries (Linux, macOS & Windows)
● Packages (Homebrew, Arch Aur, NIX, Chocolatey)
● Flux Terraform provider (Terraform Registry)
● Flux GitHub Action (AMD64 & ARM64 runners)
Flux - release artifacts
What makes the
Flux controllers
secure?
● No shell-out to 3rd party binaries
● All Linux capabilities are dropped
● The root filesystem is set to read-only
● The seccomp profile is runtime default
● Controllers run as non-root
● Uses Kubernetes impersonation API
Unlike most CD products, Flux has a small attack surface
● Flux controllers are statically built and have no dependencies on OS packages
● No shell-exec to git, kubectl, helm, kustomize, sops, aws, gcloud, etc
● No HTTP APIs, you can control Flux only via Kubernetes API
● All actions performed on the cluster are auditable and subject to Kubernetes RBAC
● Flux execution is predictable, there are no plugins nor scripting
● Flux can only be extended with other controllers that adhere to the GitOps Toolkit std
Flux vs competition?
Flux is embedded in
● Azure Arc
● Amazon EKS Anywhere
● VMware Tanzu
● D2iQ Enterprise Kubernetes Platform
● Platform One (US DoD & US Air Force)
● Deutsche Telekom Das Schiff
● And many more
Who trusts in Flux?
● In 2021 Flux has undergone a security audit (OSTIF & ADA Logics)
○ We’ve addressed all the security issues found in record time
○ We’ve put in place an RFC process for changes to Flux security posture
● In 2022 the Flux team focused on security hardening
○ We’ve found and addressed a series of multi-tenancy vulnerabilities
○ We’ve made secrets decryption safer on multi-tenant environments
○ We’ve improved the test coverage of sensitive operations
● Flux is scheduled to undergo a security review by CNCF TAG Security
How secure is Flux?
Is Flux bulletproof?
How to keep Flux up-to-date?
Flux is able to update itself from Git.
We offer a GitHub Action that checks for new
releases and opens a pull request on your
bootstrap repository when a newer Flux version
is available.
For GitLab, BitBucket, Azure DevOps and other
platforms, you can use Renovate Bot which
offers the same update automation for Flux.
What security
challenges come
with GitOps?
● Keeping secrets safe
● Restricting access to sensitive data
● Compromised Git credentials
● Prevent destructive cluster ops
Flux comes with built-in secrets management
● Client-side encryption with Mozilla SOPS
● Server-side decryption with Flux
● Supported technologies
○ Age Encryption and OpenPGP
○ Hashicorp Vault
○ AWS Key Management Service
○ Azure Key Vault
○ Google Cloud KMS
The Flux team is committed to SOPS’ development and maintenance
Are my secrets safe in Git?
Secrets operations
WELCOME TO VALENCIA
Is Kubernetes truly
multi-tenant?
In some regards YES but soft
multi-tenancy is difficult to secure
while hard multi-tenancy can be
easier to reason with but hard to
orchestrate.
Flux bridges the gap between Kubernetes and Git tenancy models.
● Kubernetes
○ Dedicated clusters per tenant (hard multi-tenancy)
○ Namespaces and role bindings
○ Node groups, taints and tolerations
○ Resource quotas and network policies
○ 3rd party policies (OPA & Kyverno)
● Git
○ Dedicated repositories per tenant (hard multi-tenancy)
○ Protected branches
○ Team access management (GitHub, GitLab, etc)
Tenant isolation boundaries
Flux - GitOps Multi-Tenancy
Flux enables multi-tenancy by
allowing platform admins to assign
restricted Kubernetes accounts to
the tenants’ sources.
When Flux reconciles the tenant’s
Kubernetes resources, it does so
by impersonating the tenant’s
account, thus enforcing the
isolation boundary as defined by
platform admins in their Git repo.
Demo
Multi-tenancy with Flux and Kubernetes
namespace-as-a-service
https://github.com/fluxcd/flux2-multi-tenancy
When will Flux
v2 reach GA?
TODOs
● Adopt kstatus for all Flux APIs
● Helm controller refactoring
● Support for Helm OCI
● Notification API improvements
● Documentation refactoring
https://fluxcd.io/roadmap
Additional
Resources
https://fluxcd.io/security
https://fluxcd.io/docs/security
https://github.com/fluxcd/flux
2-multi-tenancy
https://fluxcd.io/docs/guides/
mozilla-sops/
THANK YOU!
https://twitter.com/stefanprodan

More Related Content

PPTX
Terraform and Weave GitOps: Build a Fully Automated Application Stack
PPTX
K8s in 3h - Kubernetes Fundamentals Training
PPSX
Docker Kubernetes Istio
PDF
Container Security Deep Dive & Kubernetes
PPTX
Github in Action
PPTX
CICD Pipeline Using Github Actions
PDF
Prometheus monitoring
PDF
Gitops Hands On
Terraform and Weave GitOps: Build a Fully Automated Application Stack
K8s in 3h - Kubernetes Fundamentals Training
Docker Kubernetes Istio
Container Security Deep Dive & Kubernetes
Github in Action
CICD Pipeline Using Github Actions
Prometheus monitoring
Gitops Hands On

What's hot (20)

PDF
GitOps with ArgoCD
PPTX
Fundamentals of DevOps and CI/CD
PDF
Kubernetes architecture
PDF
Gitlab, GitOps & ArgoCD
PDF
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
PDF
Kubernetes 101
PDF
The Power of GitOps with Flux & GitOps Toolkit
PPTX
Jenkins CI presentation
PDF
Introduction to kubernetes
PDF
Kubernetes security
PPTX
Understanding container security
PPTX
Steering the Course with Helm
PDF
Gitlab ci-cd
PDF
Free GitOps Workshop + Intro to Kubernetes & GitOps
PDF
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
PPTX
Introduction to CI/CD
PDF
Introduction to GitHub Actions
PDF
Intro to containerization
PDF
API Testing: The heart of functional testing" with Bj Rollison
PPTX
DevOps with Kubernetes
GitOps with ArgoCD
Fundamentals of DevOps and CI/CD
Kubernetes architecture
Gitlab, GitOps & ArgoCD
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes 101
The Power of GitOps with Flux & GitOps Toolkit
Jenkins CI presentation
Introduction to kubernetes
Kubernetes security
Understanding container security
Steering the Course with Helm
Gitlab ci-cd
Free GitOps Workshop + Intro to Kubernetes & GitOps
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Introduction to CI/CD
Introduction to GitHub Actions
Intro to containerization
API Testing: The heart of functional testing" with Bj Rollison
DevOps with Kubernetes
Ad

Similar to KubeCon 2022 EU Flux Security.pdf (20)

PDF
How to manage Kubernetes at scale with just git
PDF
The Story of Flux Reaching Graduation in the CNCF
PDF
WTF is GitOps & Why Should You Care?
PDF
WTF is GitOps and Why You Should Care?
PPTX
Moby Open Source Summit North America 2017
PDF
Intro to GitOps & Flux.pdf
PDF
GitOps & Flux - A Refresher with Priyanka Ravi
PDF
Implementing Flux for Scale with Soft Multi-tenancy
PDF
[Global logic] container runtimes and kubernetes
PPTX
Moby KubeCon 2017
PDF
Flux is incubating + the road ahead
PDF
20221130 - Luxembourg HUG Meetup
PDF
Free GitOps Workshop
PDF
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
PDF
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
PDF
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
PPTX
Kata Container - The Security of VM and The Speed of Container | Yuntong Jin
PPTX
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
PDF
Flux Beyond Git Harnessing the Power of OCI
PDF
Flux Beyond Git Harnessing the Power of OCI
How to manage Kubernetes at scale with just git
The Story of Flux Reaching Graduation in the CNCF
WTF is GitOps & Why Should You Care?
WTF is GitOps and Why You Should Care?
Moby Open Source Summit North America 2017
Intro to GitOps & Flux.pdf
GitOps & Flux - A Refresher with Priyanka Ravi
Implementing Flux for Scale with Soft Multi-tenancy
[Global logic] container runtimes and kubernetes
Moby KubeCon 2017
Flux is incubating + the road ahead
20221130 - Luxembourg HUG Meetup
Free GitOps Workshop
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Free GitOps Workshop (with Intro to Kubernetes & GitOps)
Kata Container - The Security of VM and The Speed of Container | Yuntong Jin
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
Flux Beyond Git Harnessing the Power of OCI
Flux Beyond Git Harnessing the Power of OCI
Ad

More from Weaveworks (20)

PDF
Weave AI Controllers (Weave GitOps Office Hours)
PDF
Flamingo: Expand ArgoCD with Flux (Office Hours)
PDF
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
PDF
Six Signs You Need Platform Engineering
PDF
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
PDF
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
PDF
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
PDF
How to Avoid Kubernetes Multi-tenancy Catastrophes
PDF
Building internal developer platform with EKS and GitOps
PDF
GitOps Testing in Kubernetes with Flux and Testkube.pdf
PDF
Intro to GitOps with Weave GitOps, Flagger and Linkerd
PDF
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKS
PDF
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
PDF
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
PDF
Flux’s Security & Scalability with OCI & Helm Slides.pdf
PDF
Flux Security & Scalability using VS Code GitOps Extension
PDF
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps
PDF
Robust Network Security and Observability with GitOps and Cilium
PDF
Simplifying Hybrid Kubernetes with Weaveworks and EKS.pdf
PDF
Weave GitOps 2022.09 Release: A Fast & Reliable Path to Production with Progr...
Weave AI Controllers (Weave GitOps Office Hours)
Flamingo: Expand ArgoCD with Flux (Office Hours)
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Six Signs You Need Platform Engineering
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
How to Avoid Kubernetes Multi-tenancy Catastrophes
Building internal developer platform with EKS and GitOps
GitOps Testing in Kubernetes with Flux and Testkube.pdf
Intro to GitOps with Weave GitOps, Flagger and Linkerd
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKS
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
Flux’s Security & Scalability with OCI & Helm Slides.pdf
Flux Security & Scalability using VS Code GitOps Extension
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps
Robust Network Security and Observability with GitOps and Cilium
Simplifying Hybrid Kubernetes with Weaveworks and EKS.pdf
Weave GitOps 2022.09 Release: A Fast & Reliable Path to Production with Progr...

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
August Patch Tuesday
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
A Presentation on Artificial Intelligence
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Tartificialntelligence_presentation.pptx
PDF
Mushroom cultivation and it's methods.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Approach and Philosophy of On baking technology
August Patch Tuesday
Programs and apps: productivity, graphics, security and other tools
A Presentation on Artificial Intelligence
MIND Revenue Release Quarter 2 2025 Press Release
A comparative analysis of optical character recognition models for extracting...
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
cloud_computing_Infrastucture_as_cloud_p
Group 1 Presentation -Planning and Decision Making .pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Enhancing emotion recognition model for a student engagement use case through...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Getting Started with Data Integration: FME Form 101
Tartificialntelligence_presentation.pptx
Mushroom cultivation and it's methods.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
A comparative study of natural language inference in Swahili using monolingua...
Zenith AI: Advanced Artificial Intelligence
Building Integrated photovoltaic BIPV_UPV.pdf

KubeCon 2022 EU Flux Security.pdf

  • 1. Flux Security Deep Dive Stefan Prodan Flux & Flagger Maintainer Principal Engineer @ Weaveworks
  • 2. Flux - Project overview The Flux project aims to provide a complete Continuous Delivery platform on top of Kubernetes, supporting all the common practices and tooling in the field. Flux v2 is powered by the GitOps Toolkit, a set of composable APIs and specialized tools for keeping Kubernetes clusters in sync with sources of configuration, and automating updates to configuration when there is new code to deploy. Flagger is a Progressive Delivery tool that automates the release process for applications running on Kubernetes. Flagger comes with a declarative model for decoupling the deployment of apps on Kubernetes from the release process. https://github.com/fluxcd/flux2 https://github.com/fluxcd/flagger
  • 3. Flux - GitOps Continuous Delivery
  • 4. Agenda ● How is Flux made ● How secure is Flux ● Are my secrets safe in Git ● Is Kubernetes really multi-tenant ● Flux soft vs hard multi-tenancy ● When will Flux v2 be GA
  • 5. Flux is made of many things ● Kubernetes API extensions (CRDs) ● Specialized Kubernetes operators (powered by controller-runtime) ● Flux command-line tool (powered by Kubernetes cli-utils) ● Flux Terraform provider ● Go & C libraries (Go stdlib, Kubernetes client-go, kstatus, go-git, libgit2, kustomize, helm, minio, oras, sops, age, aws, azure, gcp, github, gitlab, bitbucket SDKs… and some more) What is Flux made of?
  • 6. WELCOME TO VALENCIA How can a handful of people maintain such a project? With care… A helpful community And lots of automations
  • 7. Flux Libraries, controllers and CLI UNIT TEST OSS FUZZ BUILD RELEASE E2E TEST Flux - release pipeline ASSEMBLE AMD64 E2E ARM64 E2E RELEASE CLOUD E2E GitHub Linux & macOS Equinix Metal Linux AKS + DevOps, EKS, GKE Kubernetes KIND 1.20…1.24 Flux GitHub Bot SCAN GitHub CodeQL, Snyk Cosign & SBOM
  • 8. A Flux release is comprised of ● Multi-arch container images (GHCR & DockerHub) ● Signed images and checksums (Cosign + GitHub OIDC) ● Software Bill of Materials (SBOM SPDX) ● Deployment manifests (YAML) ● OpenAPI specs (JSON) ● CLI binaries (Linux, macOS & Windows) ● Packages (Homebrew, Arch Aur, NIX, Chocolatey) ● Flux Terraform provider (Terraform Registry) ● Flux GitHub Action (AMD64 & ARM64 runners) Flux - release artifacts
  • 9. What makes the Flux controllers secure? ● No shell-out to 3rd party binaries ● All Linux capabilities are dropped ● The root filesystem is set to read-only ● The seccomp profile is runtime default ● Controllers run as non-root ● Uses Kubernetes impersonation API
  • 10. Unlike most CD products, Flux has a small attack surface ● Flux controllers are statically built and have no dependencies on OS packages ● No shell-exec to git, kubectl, helm, kustomize, sops, aws, gcloud, etc ● No HTTP APIs, you can control Flux only via Kubernetes API ● All actions performed on the cluster are auditable and subject to Kubernetes RBAC ● Flux execution is predictable, there are no plugins nor scripting ● Flux can only be extended with other controllers that adhere to the GitOps Toolkit std Flux vs competition?
  • 11. Flux is embedded in ● Azure Arc ● Amazon EKS Anywhere ● VMware Tanzu ● D2iQ Enterprise Kubernetes Platform ● Platform One (US DoD & US Air Force) ● Deutsche Telekom Das Schiff ● And many more Who trusts in Flux?
  • 12. ● In 2021 Flux has undergone a security audit (OSTIF & ADA Logics) ○ We’ve addressed all the security issues found in record time ○ We’ve put in place an RFC process for changes to Flux security posture ● In 2022 the Flux team focused on security hardening ○ We’ve found and addressed a series of multi-tenancy vulnerabilities ○ We’ve made secrets decryption safer on multi-tenant environments ○ We’ve improved the test coverage of sensitive operations ● Flux is scheduled to undergo a security review by CNCF TAG Security How secure is Flux?
  • 14. How to keep Flux up-to-date? Flux is able to update itself from Git. We offer a GitHub Action that checks for new releases and opens a pull request on your bootstrap repository when a newer Flux version is available. For GitLab, BitBucket, Azure DevOps and other platforms, you can use Renovate Bot which offers the same update automation for Flux.
  • 15. What security challenges come with GitOps? ● Keeping secrets safe ● Restricting access to sensitive data ● Compromised Git credentials ● Prevent destructive cluster ops
  • 16. Flux comes with built-in secrets management ● Client-side encryption with Mozilla SOPS ● Server-side decryption with Flux ● Supported technologies ○ Age Encryption and OpenPGP ○ Hashicorp Vault ○ AWS Key Management Service ○ Azure Key Vault ○ Google Cloud KMS The Flux team is committed to SOPS’ development and maintenance Are my secrets safe in Git?
  • 18. WELCOME TO VALENCIA Is Kubernetes truly multi-tenant? In some regards YES but soft multi-tenancy is difficult to secure while hard multi-tenancy can be easier to reason with but hard to orchestrate.
  • 19. Flux bridges the gap between Kubernetes and Git tenancy models. ● Kubernetes ○ Dedicated clusters per tenant (hard multi-tenancy) ○ Namespaces and role bindings ○ Node groups, taints and tolerations ○ Resource quotas and network policies ○ 3rd party policies (OPA & Kyverno) ● Git ○ Dedicated repositories per tenant (hard multi-tenancy) ○ Protected branches ○ Team access management (GitHub, GitLab, etc) Tenant isolation boundaries
  • 20. Flux - GitOps Multi-Tenancy Flux enables multi-tenancy by allowing platform admins to assign restricted Kubernetes accounts to the tenants’ sources. When Flux reconciles the tenant’s Kubernetes resources, it does so by impersonating the tenant’s account, thus enforcing the isolation boundary as defined by platform admins in their Git repo.
  • 21. Demo Multi-tenancy with Flux and Kubernetes namespace-as-a-service https://github.com/fluxcd/flux2-multi-tenancy
  • 22. When will Flux v2 reach GA? TODOs ● Adopt kstatus for all Flux APIs ● Helm controller refactoring ● Support for Helm OCI ● Notification API improvements ● Documentation refactoring https://fluxcd.io/roadmap