Who Should Own Secrets Management in DevSecOps?
Who runs the vault, who writes access policy, who rotates secrets: a three-layer ownership model and RACI for platform, security and app teams.
In a DevSecOps team, a platform or security engineering group should own and run the secrets management system itself, security should own the policies and audits, and each application team should own its own secrets and how its code uses them. Shared responsibility works only when every one of those duties has a named owner.
This post answers the ownership question: who runs the vault, who writes access policy, who rotates what, and who gets paged when a secret leaks. For the tooling side, see our guides on where to integrate secret management in CI/CD and enforcing secret management in GitOps.
Key takeaways
- Split ownership into three layers: the platform (the vault service), the policy (who may read what), and the secret itself (its value and lifecycle).
- A platform team usually runs the secrets service; security defines policy and reviews access; application teams own their own secrets.
- Write the split down as a RACI so that rotation, revocation and incident response each have one accountable owner.
- Prefer dynamic or short-lived credentials where the tool supports them; they shrink what anyone has to rotate by hand.
- CI systems should get cloud access through short-lived tokens, not long-lived keys stored as pipeline secrets.
- Measure ownership with a few signals: secrets past their rotation date, unused access grants, and time to revoke after a leak.
Why "who owns secrets" is a hard question
Secrets sit between teams. The database password belongs to the database, which the platform team may run. The application that uses it belongs to a product team. The policy that says only that application may read it belongs to security. When a password leaks, all three teams have a reason to act and a reason to assume someone else will.
Many organisations fall into one of two failure modes. In the first, security owns everything: every new secret needs a ticket, every rotation waits in a queue, and developers start keeping credentials in environment files to get work done. In the second, nobody owns anything: each team picks its own storage, some secrets live in a wiki, and nobody can answer "which systems use this key?" when it leaks.
The way out is to stop treating "secrets management" as one job. It is at least three jobs with different skills and different cadences.
The three layers of ownership
Layer 1: the secrets platform
Someone has to run the service that stores and issues secrets, whether that is HashiCorp Vault, a cloud provider's secrets manager, or a Kubernetes operator that syncs from one of them. Running it means upgrades, backups, high availability, unsealing or key management, monitoring, capacity and disaster recovery testing. This is operations work, and it usually sits with a platform or infrastructure team, sometimes with a dedicated security engineering group that has operations skills.
Layer 2: the access policy
Someone has to decide who can read which secret, under what identity, for how long. That includes the authentication methods the platform accepts, the naming conventions for paths, the default lease lengths, and the rules for break-glass access. This is the natural home of the security team, because it is policy and because it needs an owner who is not also the main consumer.
Layer 3: the secret and its lifecycle
Each secret has a purpose and a consumer. The team that owns the consuming service knows when the secret is needed, what breaks when it changes, and whether it is still used at all. That team should own creating it through the approved path, rotating it on schedule, and deleting it when the service retires.
A RACI you can adapt
A RACI table names who is Responsible (does the work), Accountable (answers for it), Consulted and Informed. The version below is a starting point, not a standard; adjust it to your org chart.
| Activity | Platform team | Security team | Application team |
|---|---|---|---|
| Run, patch and back up the secrets service | A/R | C | I |
| Define auth methods and access policy | R | A | C |
| Create a new application secret | I | C (if policy exception) | A/R |
| Rotate an application secret | C | I | A/R |
| Rotate platform root or unseal material | R | A | I |
| Review access grants quarterly | C | A | R |
| Respond to a leaked secret | R (revoke) | A (incident lead) | R (rotate and redeploy) |
| Secret scanning in repositories | R (tooling) | A | R (fix findings) |
What the platform team owns in practice
The platform team's job is to make the safe path the easy path. That means a secrets service that is available, a documented way to request access, and integrations with the places secrets are used: CI pipelines, Kubernetes clusters, serverless functions and virtual machines.
It also means choosing defaults. If the default lease on a database credential is short, most teams will get short-lived credentials without thinking about it. If the default is a static password stored forever, that is what most teams will use. Vault's documentation states that every dynamic secret has a lease with a duration, that consumers must renew before it expires, and that revoking a lease invalidates the secret immediately. A platform team that turns those mechanics on by default removes a lot of manual rotation from everyone else.
Finally, the platform team owns the tooling for incident response: the ability to revoke by prefix, list which identities hold which leases, and see audit logs. Vault, for example, supports revoking leases by prefix, which the documentation notes can clear a whole group of secrets quickly after an intrusion.
What the security team owns in practice
Security writes the rules and checks they are followed. Typical responsibilities include:
- Approving which authentication methods the platform accepts, such as Kubernetes service accounts, cloud IAM roles or OIDC from the CI system.
- Setting maximum lease lengths and rotation intervals by secret class.
- Running access reviews and removing grants that are no longer used.
- Owning secret scanning policy across repositories and build logs, and deciding which findings block a merge.
- Leading incident response when a secret is exposed, including deciding what counts as exposure.
Security should avoid becoming the team that creates every secret by hand. That puts it on the critical path of every release and turns a policy function into a ticket queue. Secret scanning is a good example of where security sets the rule and others do the work; our post on how secret scanning tools prevent credential leaks covers the tools.
What application teams own in practice
Application teams are closest to the secret's actual use. They know which services read it, what a rotation will break, and whether the dependency still exists. They should own:
- Requesting secrets through the approved path, never creating side stores.
- Reading secrets at runtime from the platform rather than baking them into images or committing them to Git.
- Handling rotation gracefully, for example by reloading credentials without a redeploy or supporting two valid credentials during a changeover.
- Rotating their own static secrets on the agreed schedule.
- Deleting secrets and access grants when a service is retired.
- Fixing secret scanning findings in their repositories.
Our list of secret management practices for DevOps pipelines is a good checklist for application teams.
Where CI/CD fits in the ownership model
Pipelines are a special consumer because they often need powerful credentials: deploy rights, registry push, infrastructure apply. Ownership of pipeline secrets usually follows ownership of the pipeline. If a central DevOps team runs shared pipeline templates, it owns the credentials those templates use. If each product team runs its own pipeline, it owns its own.
The bigger improvement is removing stored pipeline credentials altogether. GitHub's documentation describes how OpenID Connect lets a workflow exchange a short-lived token with the cloud provider, so you do not need to duplicate cloud credentials as long-lived GitHub secrets, and the token is valid for a single job. Other CI systems offer similar features. When nobody has to store or rotate a cloud key for CI, a whole row of the RACI disappears.
Rotation: the duty that most often falls through the cracks
Rotation fails for predictable reasons. Nobody remembers when a secret was created. Nobody knows which services use it. Rotating it once broke production, so people stopped. Clear ownership fixes the first two; automation fixes the third.
Cloud secret stores can rotate some secrets on a schedule. AWS Secrets Manager, for example, describes managed rotation for many service-managed secrets, which does not use a Lambda function, and rotation through a Lambda function for other secret types. Whatever tool you use, the owner of the secret still has to make sure the consuming application tolerates a change in value.
A practical approach is to classify secrets:
- Dynamic credentials issued per workload with a short lease. Rotation is built in; the owner's job is renewal handling.
- Static secrets that the tool can rotate automatically. The owner configures the schedule and tests the application against it.
- Static secrets that must be rotated by hand, such as some third-party API keys. The owner keeps a calendar, a runbook and a record of every consumer.
Incident response: one leader, several hands
When a secret leaks, speed matters more than elegance. The ownership model should make the first hour boring:
- Security declares the incident and leads it.
- The platform team revokes the credential or the whole lease prefix, and pulls audit logs for its use.
- The application team issues a replacement, redeploys or reloads, and confirms the service works.
- Security decides whether further investigation is needed, based on the audit logs.
- Everyone writes up what allowed the leak and fixes that, for example a missing scanning rule or a log that printed variables.
Practise this with a drill on a non-production secret. The first drill usually reveals at least one secret with no known owner, which is exactly what you want to find before a real incident.
Signs your ownership model is working
You do not need a large metrics program, but a few numbers tell you whether the model is real or only written down:
- The share of secrets with a named owning team.
- The number of static secrets past their rotation date.
- Access grants not used in the last review period.
- Time from a leak report to revocation, measured in drills and real events.
- Open secret scanning findings older than your agreed fix window.
Pick target values that fit your team and review them with security and platform leads on a regular cadence.
Kubernetes clusters add a fourth party
In Kubernetes, secrets often pass through one more hand: the cluster operators. A secret may live in a vault, be synced into the cluster by an operator, and be mounted into a pod. Each hop needs an owner. The platform team usually owns the sync operator and the cluster-level configuration, such as encryption of Secret objects at rest and who can list Secrets through the API. Application teams own the mapping from vault path to the Secret their workload reads. Security owns the rule that says which namespaces may sync which paths.
A common gap is Kubernetes RBAC. Teams carefully restrict the vault but then grant broad read access to Secret objects in the cluster, which quietly undoes the vault policy. Include cluster RBAC in the quarterly access review, and treat "can read Secrets in this namespace" as equivalent to "can read the vault path that syncs into it".
Writing the ownership model down
An ownership model that exists only in people's heads disappears at the first reorganisation. Keep a short document next to the secrets platform's code that lists the RACI, the secret classes and their rotation rules, the request process, and the incident runbook. Tag each secret or path with its owning team in the tool itself, using metadata or path naming, so ownership is visible where the secret lives. Review the document when teams change, not only on a fixed schedule.
Small teams and startups
In a team of five, the "platform team", "security team" and "application team" may be the same two people. The layers still help. Write down who runs the service, who approves access, and who owns each secret, even if the names repeat. Using a managed secrets service from your cloud provider removes most of the platform layer's work, which lets a small team focus on policy and lifecycle.
Related reading and training
If you store secrets in infrastructure code, see storing secrets in Ansible and Terraform. For hands-on practice with pipelines, scanning and secrets tooling, our DevSecOps training runs in the Kharadi, Pune classroom and live online.
Frequently asked questions
Should the security team run the secrets vault?
It can, if it has operations skills, but many organisations let a platform team run the service while security owns policy and audits. Separating the operator from the policy owner also gives you a useful check on each other.
Who should rotate application secrets?
The team that owns the application that uses the secret. That team knows what breaks on rotation and can test the change. The platform team should make rotation easy, and security should set the maximum interval.
What is a RACI for secrets management?
A table listing each activity, such as running the vault, approving access or rotating a key, and marking which team is responsible, accountable, consulted or informed. It turns "shared responsibility" into named duties.
How do dynamic secrets change ownership?
Dynamic secrets are created on request with a lease and revoked when it expires, so nobody rotates them by hand. Ownership shifts toward the platform team, which sets lease defaults, and the application team, which must handle renewal.
How should CI pipelines get cloud credentials?
Through short-lived tokens, for example OpenID Connect between the CI system and the cloud provider, instead of long-lived keys stored as pipeline secrets. Each token is valid only for the job that requested it.
Who leads response when a secret leaks?
Security usually leads the incident. The platform team revokes access and provides audit logs, and the application team issues a replacement secret and restores the service.
How often should access to secrets be reviewed?
Set a regular cadence, often quarterly, and review sooner after reorganisations or service retirements. Security should own the review, and application teams should confirm which grants they still need.
References
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0