Zero-privilege architecture: Why better security can make software delivery faster
On this page
At KubeCon Europe 2023 in Amsterdam, I attended a presentation by ING’s Thijs Ebbers and Diana Iordan titled Zero Privilege Architectures. Of all the presentations I attended, this was the one that most challenged my thinking about infrastructure and security.
The premise is simple. Instead of asking how we can securely grant engineers privileged access to production, we should ask why the architecture requires them to have it in the first place.
What interests me about this approach is its relationship with software delivery performance. Many of the architectural decisions that eliminate privileged access are also the practices that Nicole Forsgren, Jez Humble and Gene Kim associate with high-performing engineering organisations in their book Accelerate.
Beyond least privilege
The principle of least privilegeLeast privilege Giving an identity only the permissions its job needs, and no more. It limits the damage an identity can do, but it still assumes the identity needs privileged access in the first place. dictates that an identity should receive only the permissions it needs to perform its responsibilities. Zero trust builds on this by requiring explicit verification and authorisation of access rather than assuming that an identity is trustworthy because of its network location.
Zero-privilege architectureZero privilege Designing a system so that no engineer needs privileged access to production during normal operations. Least privilege limits what privileged access may do; zero privilege removes the need for it. addresses a different question. Can we design systems that eliminate the operational need for privileged human access altogether?Consider an engineer who needs to SSH into a production server to apply a security patch. Least privilege restricts what the engineer can access. Zero trustZero trust Authorising every request on its own merits, with no trust granted for being on a trusted network. It verifies access more strictly, and still assumes the access will be needed. verifies their identity and authorises the operation. Zero-privilege architecture requires us to redesign the patching process so that the engineer never needs to access the server.
These approaches are complementary. Automated processes and workloads still require permissions, and those permissions must remain subject to least privilege and zero trust.
The objective is to eliminate routine standing privileged accessStanding privileges Access that is granted permanently and sits idle until someone uses it. It is the credential an attacker looks for, because it is always there to steal. to production.
Two architectural principles
Ebbers and Iordan presented two principles for achieving zero privilege.
Controlled changes
Every change to production must result from a controlled process. No individual should be able to modify production independently during normal operations.
Engineers declare the desired state of a system through version-controlled code and configuration. Automated delivery pipelines validate and deploy changes according to established policies. This is the shape of GitOps, and
GitOpsGitOps Keeping the desired state of every environment in Git, and running a controller that keeps the live system matching it. A change is a pull request that a pipeline applies, so there is no other way to change production. is the practice most teams reach for first.This applies equally to application deployments, infrastructure provisioning, configuration changes and security remediations.
When production changes occur through a consistent process, an organisation can reconstruct what changed, who proposed it, who reviewed it and which controls were applied before deployment.
A manually executed command on a production server is much harder to reproduce and verify.
Immutable and ephemeral infrastructure
Running components should remain unchanged throughout their lifetime. When a component no longer conforms to its desired state, automation replaces it. Immutable infrastructureImmutable infrastructure Servers and containers that are never modified once running. To change one you build a new one with the change in it and swap it in, so the running system is always reproducible from its definition. is the property; the ephemeral part follows from it, because a component that is replaced rather than repaired has a short lifetime by design.
If a container image contains a vulnerability, engineers build and deploy a patched image. If a server’s configuration driftsConfiguration drift A running system slowly diverging from its declared configuration as people patch, tune and hot-fix it in place. The live state no longer matches the code, so the code stops being the source of truth. from its declared state, automation replaces or restores the server using its declared configuration.
This eliminates several common operational practices:
- Applying security patches directly to running servers.
- Modifying application configuration inside containers.
- Using SSH or
kubectl execfor routine maintenance. - Maintaining permanent human administrator credentials.
There are practical limitations. Databases and other stateful systems require careful management of persistent data, schema migrations and recovery procedures. Immutable infrastructure does not imply immutable business data.
Engineers must still be able to diagnose and recover these systems without relying on unrestricted administrative access.
The connection with Accelerate
In Accelerate, Forsgren, Humble and Kim identify engineering capabilities associated with high software delivery performance. Among them are deployment automation, version control, continuous integrationCI Continuous integration. A server builds and tests every push, so problems show up before code is merged., loosely coupled architecture, observability and the integration of security into software delivery.
These capabilities are also what make zero-privilege architecture practical.
| Engineering capability | Application in zero-privilege architecture |
|---|---|
| Version control | Records the desired state and the history of production changes. |
| Deployment automation | Removes the need for manual production modifications. |
| Continuous testing | Detects defects before changes reach production. |
| Integrated security | Evaluates changes against security policies during development and deployment. |
| Observability | Allows engineers to investigate failures without accessing running components. |
| Loosely coupled architecture | Allows teams to deploy and recover their services independently. |
Consider a security vulnerability that requires an organisation to patch hundreds of running applications.
In an environment that relies on manual administration, engineers must obtain access, execute changes and verify the resulting state across individual systems.
In an environment built around immutable infrastructure and automated delivery, teams can update the affected dependency or base image and rebuild, validate and deploy their applications through existing pipelines.
The second approach reduces the opportunities for human error. It also makes security remediation more repeatable and easier to audit.
The security improvement comes from the same engineering capabilities that improve delivery performance.
Removing privileges without removing autonomy
There is one aspect of zero-privilege architecture that deserves particular attention.
Organisations can eliminate privileged access in two ways. They can automate the operations engineers previously performed, or they can transfer responsibility for those operations to another team.
The latter creates an organisational dependency.
If an application team must raise a ticket with an infrastructure team every time it needs to deploy, modify configuration or recover a service, production access has become more restrictive, but software delivery has become less efficient.
This conflicts with the findings presented in Accelerate. High-performing teams can make changes to their systems without extensive coordination with other teams.
DORA’s research on change approval also recommends peer review and automated controls over routine approval by external
change advisory boardsChange advisory board A committee that meets to approve production changes before they ship. It reviews change requests in batches, so changes queue behind the meeting, and its members rarely know the system being changed..A well-designed internal developer platform allows teams to perform routine operations independently within centrally defined security policies. Engineers retain ownership of their applications, while the platform enforces the restrictions on how production changes occur. Policy engines such as Open Policy Agent and Kyverno express those restrictions as code that the platform enforces on every change.
Removing privileges should never mean removing autonomy.
Observability becomes an operational requirement
Without privileged access to running workloads, engineers need other ways to understand their systems.
Imagine an application experiencing intermittent database timeouts. An engineer accustomed to privileged production access might enter a running container, inspect network connections and execute diagnostic commands.
In a zero-privilege architecture, the engineer should already have access to the information required to investigate the problem through distributed tracesDistributed tracing Following one request across every service it touches, by giving it an identifier that each hop records. A trace shows where the time in a request went without anyone logging into a machine., application metrics, structured logsStructured logs Log lines as fields with names, such as service, request id and status, instead of a sentence. A query can filter on the fields, and a request id links a log line to the trace it belongs to. and other authorised diagnostic tools. ObservabilityObservability Being able to answer new questions about a running system from the data it emits, rather than only the questions you thought to log in advance. It rests on traces, metrics and logs. built on OpenTelemetry carries each request’s spanSpan One timed step in a trace, such as an HTTP request or a model call. Spans nest inside each other, so a trace shows where the time in a request went. identifier into its logs, so an engineer can move from a slow trace to the exact log lines behind it without touching the running container.
This makes comprehensive observability a prerequisite for removing privileged access.
It also changes how engineers should respond to operational problems. If diagnosing an incident repeatedly requires privileged access, the team should investigate which diagnostic capabilities are missing.
Perhaps the application lacks sufficient instrumentation. Perhaps the platform does not expose the necessary network telemetry. Perhaps the recovery procedure has never been automated.
Each of these is an engineering problem that can be addressed.
Restricting access without providing adequate diagnostic and recovery capabilities risks increasing the duration of production incidents.
The security of the delivery pipeline
Zero-privilege architecture concentrates significant authority in automated systems.
A deployment pipelineDeployment pipeline The automated path a change takes from a commit to running in production: build, test, sign, deploy. It holds the credentials that can write to production, which makes it the most privileged system in the estate. that can modify production is itself a privileged system. If an attacker compromises the pipeline, they could bypass the protections imposed on individual engineers.
The security of the software supply chain therefore becomes particularly important.
I would consider the following controls necessary for implementing this architecture:
- Protected source code repositories and reviewed changes.
- Short-lived, narrowly scoped workload identitiesWorkload identity A short-lived identity issued to a running process by the platform, tied to the workload itself rather than to a human or a shared secret. It expires on its own, so there is nothing long-lived to steal., as issued by systems such as SPIFFE.
- Isolated build environments.
- Signed deployment artefacts and verified build provenanceBuild provenance A signed record of exactly how a binary was produced: which source commit, which build machine, which steps. It lets a deployment policy check that a running artefact came from a trusted build rather than being asserted by whoever uploaded it., using tooling such as Sigstore and SLSA.
- Deployment policies that independently verify which artefacts are authorised to run.
- Auditable changes to pipeline definitions and security policies.
- Separation of dutiesSeparation of duties Requiring two independent people for one sensitive action, so nobody can both make and approve it. A developer who can edit the pipeline that gates their own deployment has no gate at all. between application deployment permissions and the authority to modify the controls governing those deployments.
The last point matters because a pipeline cannot provide meaningful governance if the people subject to its controls can independently disable them.
Zero-privilege architecture removes standing human privileges, but it does not eliminate privileged operations. Those operations still need to occur through systems whose authority is restricted and whose behaviour can be verified. Secrets that those systems need belong in a managed store such as SOPS with encrypted values in version control, never in a pipeline’s plain-text configuration.
Preparing for emergencies
Production systems fail in unexpected ways. Organisations need emergency procedures for situations where existing automation cannot resolve an incident.
A break-glass mechanismBreak-glass access Emergency privileged access that is locked away in normal operation, granted only for a named incident, time-limited, fully logged, and revoked automatically afterwards. should provide temporary, narrowly scoped and audited access under exceptional circumstances. Once the incident is resolved, affected infrastructure should return to a known and trusted state.
Emergency access should also produce actionable engineering work.
If an engineer required privileged access to recover a service, the
incident reviewBlameless post-mortem A written review of an incident that asks what in the system allowed it to happen, not who to blame. Blame punishes the reporting of problems, so the next one goes unreported. should establish why the existing architecture could not support that recovery. Where practical, the team should automate the missing operation or improve its diagnostic capabilities.Repeated use of break-glass access for the same problem indicates an architectural or operational deficiency.
An organisation should also regularly test whether it can recover its systems when its deployment infrastructure is unavailable. Depending entirely on automation introduces its own availability requirements.
Measuring success
The effectiveness of zero-privilege architecture should be measured through both security and software delivery outcomes.
The four original software delivery metrics described in Accelerate provide a useful starting point. The DORA research behind them is what makes the comparison between security and delivery performance meaningful rather than anecdotal.
| Metric | Expected outcome |
|---|---|
| Deployment frequencyDeployment frequency How often the team successfully ships code to production. High performers deploy on demand, many times a day; low performers deploy monthly or less. One of the four DORA metrics. | More frequent, smaller changes become routine, because every change follows the same automated path. |
| Lead time for changesLead time for changes The time from committing a change to it running in production. It measures the whole delivery path, including review, approval and queueing, not just the build. One of the four DORA metrics. | Shorter, as changes no longer queue behind manual approvals and hand-offs. |
| Change failure rateChange failure rate The share of production deployments that cause a degraded service and need a fix such as a rollback or hotfix. One of the four DORA metrics. | Lower, because unreviewed, manually applied changes stop reaching production. |
| Time to restore serviceTime to restore service How long it takes to bring a degraded service back to normal after an incident starts. One of the four DORA metrics, and the one that measures recovery rather than prevention. | Faster, because recovery means redeploying a known-good component rather than repairing a running one. |
Security outcomes belong in the same review: the number of standing privileged credentials in the estate, how often break-glass access is used, and how quickly a vulnerability can be remediated across every running service.
A security change that leaves all four delivery metrics unchanged is worth keeping. One that degrades them is a design problem, not an unavoidable cost. The argument of this architecture is that both improve together, so measuring only one side leaves the case unproven.