Let's Deploy with ayedo, Part 1: GitLab CI/CD, Harbor Registry, Vault Secrets
TL;DR GitLab CI/CD becomes the central orchestrator of your delivery workflow: clearly structured …
Diese Serie erklärt systematisch, wie moderne Software compliant entwickelt und betrieben wird – von EU-Regulierungen bis zur technischen Umsetzung.
Secrets management is not just a security issue but a prerequisite for any serious compliance strategy. Losing access credentials, tokens, or encryption keys can mean losing control over data, systems, and reputation.
With the GDPR (applicable since 25.05.2018), the NIS-2 directive (effective since 16.01.2023, with an implementation deadline of 17.10.2024), and the DORA regulation (effective from 17.01.2025), the pressure to implement security measures in a structured and demonstrable way is increasing. Article 32 GDPR explicitly demands “appropriate technical and organizational measures,” particularly encryption and access control.
In modern, distributed infrastructures—with multiple Kubernetes clusters, GitOps, multi-cloud, and supply chains from third-party providers—it’s no longer enough to “store secrets securely somewhere.” A contemporary concept must:
HashiCorp Vault in combination with the External Secrets Operator addresses exactly these requirements—without sacrificing developer productivity.
Storing secrets directly in the Git repository is hardly justifiable today:
Even with encryption solutions around Git (e.g., SOPS), the challenge remains: Access to Git often also means access to the encrypted artifacts and their key material if governance and key management are not very strictly set up.
Kubernetes secrets are an improvement over plaintext environment variables but are conceptually limited:
For simple scenarios, Kubernetes secrets are sufficient. In regulated environments with many applications, tenants, or clusters, they reach their limits.
Vault brings a dedicated secret store with:
In a zero-trust approach, Vault becomes the “source of truth” for all secrets—Kubernetes is then just a controlled consumer via ESO.
Vault abstracts secrets through so-called Secrets Engines. Important examples:
Dynamic Secrets are particularly relevant here: For a PostgreSQL database, Vault generates short-lived credentials on request, with:
This replaces classic “shared credentials” with temporary, application- or service-specific identities—a significant security gain.
With the Transit Secrets Engine, Vault offers “Encryption as a Service”:
This not only meets encryption requirements from Article 32 GDPR but also significantly reduces the attack surface for key theft.
Every access attempt to Vault—successful or not—can be logged in audit backends like files, syslog, or SIEM systems:
Together with clearly defined policies, a traceable, audit-proof control system is created that provides reliable evidence for NIS‑2 and DORA audits.
The External Secrets Operator (ESO) is a Kubernetes operator that connects external secret stores like Vault with the cluster:
This means application teams do not have to work directly with Vault APIs or policies. They simply define which secrets they need, in which namespace, and which backend is responsible. ESO takes care of:
From the pod’s perspective, everything remains the same: It consumes regular Kubernetes secrets. The complex but necessary security and compliance framework lies behind it.
A practical zero-trust workflow might look like this:
Platform Admin
Responsible for central infrastructure like databases, Vault clusters, and Kubernetes base components. They define which systems are managed via Vault and set policies.
Vault
Contains all relevant credentials, whether in KV stores or as dynamic secrets. For databases like PostgreSQL, roles are set up to generate and rotate application-specific credentials.
External Secrets Operator
Runs in the respective clusters and is configured to access the appropriate Vault paths—strictly limited via policies and Kubernetes service accounts.
Kubernetes & GitOps
Application teams define ExternalSecret resources in their Git repositories. GitOps tools like Argo CD deploy these into the cluster. ESO generates the concrete Kubernetes secrets from them.
Application
Uses the provided secrets via environment variables or volume mounts without knowing their origin. Rotation is handled transparently; ideally, a rolling restart occurs automatically when critical secrets change.
In this model, sensitive information never touches Git or CI/CD systems. They remain in Vault and are controlled by ESO into the runtime environments.
Consider a PostgreSQL database provided by a platform team—perhaps via CloudNativePG or a managed cloud service.
Database Provisioning
The Platform Admin creates the database and configures a Database Secrets Engine for PostgreSQL in Vault. Roles are defined there to create application-specific users with limited rights and a clear TTL.
Vault Configuration
For each application, there is a Vault path (e.g., per team or service). Policies allow ESO access only to the paths belonging to the respective namespace. Dynamic secrets ensure that credentials are regularly renewed.
ESO Integration
In the Kubernetes cluster, ESO is configured to authenticate against Vault (e.g., via the Kubernetes Auth Method). A SecretStore object describes where Vault is accessible and how authentication works.
ExternalSecret by the App Team
The application team describes an ExternalSecret in their Git repository that:
Runtime Behavior
ESO creates the Kubernetes secret, updates it during rotations, and ensures that the application always receives valid credentials. Neither developers nor CI/CD pipelines ever see the plaintext passwords.
This pattern can be applied to many other systems: message brokers, external APIs, cloud resources—anywhere credentials are involved.
A Vault+ESO setup helps not only to “somehow” meet regulatory requirements but to demonstrate them in a structured way.
Article 32 GDPR requires, among other things:
Vault addresses this by:
ESO complements this by ensuring that secrets only reach the Kubernetes runtime in a controlled manner—without scattering in Git or CI/CD systems.
The NIS‑2 directive requires operators of critical and important facilities to maintain a high level of cybersecurity, including:
Vault+ESO supports this by:
DORA focuses on digital operational resilience in the financial sector. Relevant for secrets management are:
Vault and ESO provide a robust framework to address these requirements effectively.
TL;DR GitLab CI/CD becomes the central orchestrator of your delivery workflow: clearly structured …
TL;DR Guardrails are automated guidelines around your deployments: They prevent typical …
TL;DR Traditional container builds with Docker Daemon, root privileges, and docker.sock in CI …