Skip to main content

What are you looking for?

Explore our services and discover how we can help you achieve your goals

Client Workspace

Secrets management in cloud delivery: vaults, rotation and pipeline access

Good secrets management in cloud delivery means storing as few secrets as possible: pipelines and services prove their identity and receive short-lived credentials, a central secrets manager holds what must stay static, and rotation is automated. Netbase sequences this work as inventory first, pipeline federation second and rotation last.

Book a solution review See the related solution

By Netbase Commerce and Platform Engineering Desk · Reviewed by David (CEO) · Updated · 10 min read

star

This guide is for CTOs, tech leads and platform owners whose deployment pipelines still hold long-lived cloud keys, or whose database passwords have not changed since launch. It belongs to Netbase's cloud platform engineering work and sits next to the DevOps and platform engineering service, where pipeline access is designed.

In this guide

Why is a vault on its own not enough?

A vault moves secrets into one place, but it does not shorten their life. A cloud access key copied into a CI variable, a vault and a developer laptop is still one key with three copies, and a leak from any of them stays useful until someone notices and revokes it.

The bigger gain comes from removing the secret. The GitHub Actions documentation on OpenID Connect describes the pattern: the cloud provider trusts a signed identity token from the pipeline and issues an access token that is valid for a single job and then expires. Nothing long-lived is stored in the pipeline.

The OWASP list of CI/CD risks names insufficient credential hygiene as its own risk (CICD-SEC-6), next to weak identity and access management. Most findings in that area are credentials that live too long, reach too far or are copied into too many places.

Which credentials can become short-lived?

Each credential type has a different replacement. Start from what the credential is used for, not from the tool.

Credential Short-lived pattern When it must stay static Rotation rule for what stays
Pipeline access to the cloud account OIDC federation: the pipeline's identity token is exchanged for a per-job role Old CI servers that cannot issue identity tokens Replace the server; until then rotate on a schedule and on every staff change
Application access to the database Dynamic credentials from a vault, or cloud identity-based database login Legacy drivers or tools that cannot refresh credentials Two-version rotation by the secrets manager
Third-party API keys Rarely available; some providers issue scoped, expiring tokens Most payment, mail and SaaS APIs Two keys in parallel, swap, revoke the old one
Certificates and signing keys Automated issuance with short validity Shared certificates or hardware-held keys Renewal well before expiry, with an alert
Human break-glass access Just-in-time elevation with approval and expiry None that should be accepted Review every use; no standing admin keys

The HashiCorp guidance on dynamic and static secrets draws the same line: dynamic secrets are created on request and expire on their own, while third-party API keys, shared certificates and legacy systems keep some static secrets in place.

Where should secrets live?

Pick one primary store per environment and make every other copy a reference to it. The OWASP secrets management cheat sheet recommends standardising and centralising the solution, and limiting human interaction with the actual secret values.

A small team on one cloud is usually best served by that cloud's own secrets manager: it already uses the cloud's identity, audit log and network controls. A self-hosted vault earns its place when the product spans several clouds or on-premise systems, or when dynamic database credentials are needed across all of them. Kubernetes Secrets are not a vault: the Kubernetes documentation notes that they are stored unencrypted in etcd by default, so encryption at rest, tight read access and an external store driver come first.

For runtime secrets, the cheat sheet's recommended pattern is that the pipeline deploys with a platform identity and the running service fetches its own secrets from the secrets manager. The pipeline then never sees the database password at all.

How do you move to short-lived credentials?

  1. Inventory

    List every secret in code, CI variables, infrastructure state and runbooks, with an owner, a consumer and a last-rotated date. Rotate anything found in a repository history.

  2. Federate the pipelines

    Replace stored cloud keys with OIDC trust. Restrict each trust to one repository, branch or deployment environment, and give the production role only the permissions a release needs.

  3. Take runtime secrets out of the pipeline

    Deploy with a platform identity; let workloads read their own secrets at start-up or through a sidecar or driver.

  4. Add dynamic credentials where they pay

    Production databases and shared data stores first; low-change internal tools can wait.

  5. Automate rotation for the rest

    Use two-version rotation so the old and new value both work during the swap, then revoke the old one.

  6. Detect and alert

    Scan commits and container images for secrets before merge, alert on secrets nearing expiry and on unusual reads from the store.

The AWS Secrets Manager rotation documentation describes managed rotation for supported services and rotation by function for other secret types, which covers most of step 5 on that cloud.

When should you not add more secrets machinery?

Do not build a vault cluster for a single application on a single cloud; the managed secrets service and federation cover it with less to operate. Do not introduce dynamic database credentials for a tool that three people use and that changes twice a year. Do not rotate on a fixed short schedule a secret that nothing can rotate safely yet: fix the consumer first, or rotation becomes an outage generator.

Short-lived credentials also move risk rather than removing it. If the identity provider trust is too broad, for example any branch of any repository in an organisation, every pull request can reach production. The trust conditions deserve the same review as the code.

Where AI fits

AI helps find and sort secrets, never hold or issue them. An assistant can scan a repository and its pipeline definitions for strings that look like credentials, draft inventory rows with likely owners and compare trust policies against the intended repository and branch. AI is integrated into every Netbase service, and Netbase works with the major commercial and open-source AI tools and models, chosen per project.

Engineers confirm every finding, perform each rotation and own the trust policies. No model receives read access to the secrets store or rights to change production identity settings.

What delivery record exists, and what does not

Netbase's published security practices include secure code review and version control, TLS in transit and AES at rest, role-based access control, MFA for admin dashboards, vulnerability scanning and penetration testing, and disaster recovery. The cloud providers Netbase uses are AWS, Google Cloud, DigitalOcean and Cloudflare; no partner tier or cloud certification is claimed.

Netbase works as offshore development partner on a multi-tenant cloud ERP for a US client, delivered as SaaS to small and mid-sized businesses, the kind of shared platform where pipeline access, tenant data and service credentials must be kept apart.

Netbase holds ISO 27001 certification and a SOC 2 Type II attestation for its own operations; neither certifies a client's application or its secrets setup. Delivery follows a six-step lifecycle with weekly reviews, and most projects run on fixed-price contracts. Netbase does not publish rotation results, incident figures or a timeline for a secrets migration; this guide explains a method, not a case study.

Alternatives: who should own secrets management, and how do you choose?

Option Fits when Watch for
Cloud provider's secrets manager plus OIDC federation One cloud, a small platform team Cross-cloud workloads need a second pattern
Self-hosted or managed vault Several clouds or on-premise systems, dynamic credentials everywhere A vault is itself a production system to run, back up and upgrade
Encrypted secrets in Git with a GitOps operator Kubernetes delivery with Argo CD or Flux Decryption keys become the new long-lived secret
An external partner designs it, your team runs it No in-house platform engineer yet Ownership of trust policies must transfer at handover

Choose by three criteria: how many clouds and runtimes the product spans, whether the team can operate another stateful service, and who will own the trust policies after launch. The Helm, Kustomize and GitOps release pattern guide covers the GitOps side, and the Terraform state and environment layout guide explains why remote state must never expose secrets. Encryption keys behind stored data follow their own lifecycle, set out in key management for application teams, and the CI controls that catch committed secrets are mapped in the secure development lifecycle guide.

Limits of this guide

  • It does not cover encryption key hierarchies, hardware security modules or certificate authority design.
  • It does not compare vault or secrets manager products by feature or vendor score.
  • Provider features change; check the cited documentation before each design decision.

Plan the next step with a Netbase consultant

Frequently asked questions

Usually yes, but a smaller one. OIDC removes the stored cloud keys from the pipeline, while third-party API keys, database credentials and certificates still need a central store with rotation and audit.

Set the schedule per secret type by risk and rotate at once after a trigger: a leak, a departure of someone with access or a provider incident. Automated two-version rotation makes frequent rotation safe; manual rotation makes it risky.

Only with encryption at rest configured, tight read permissions and preferably an external store behind them. By default Kubernetes stores Secret data unencrypted in etcd.

Any committed credential should block the merge, and the fix is to revoke and rotate it, not only to delete the line, because the value stays in the repository history.

Next step

If you want your pipeline access and secrets reviewed before the next release, book a solution review with Netbase.

AI-ready cloud platform engineering for SaaS and commerce workloads AI-ready cloud platform engineering for SaaS and commerce workloads

Netbase provides cloud platform engineering for SaaS and commerce teams that need a secure, repeatable home for their software and its AI features, on AWS, Google Cloud, DigitalOcean or Cloudflare. We design the architecture, write the environments as code, connect managed and AI services and hand over a platform your team can run, built the way we run ours.

Learn More
line
AI-assisted DevOps and platform engineering for routine releases AI-assisted DevOps and platform engineering for routine releases

Netbase provides DevOps and platform engineering for SaaS and commerce teams to make releases routine instead of risky. We set up CI/CD pipelines, repeatable environments and observability on AWS, Google Cloud, DigitalOcean or Cloudflare, with AI assistance for tests, reviews and incident triage, so every change ships the same way and problems surface before customers notice.

Learn More
line
Application security assurance for web, SaaS and AI features Application security assurance for web, SaaS and AI features

Netbase provides application security testing for product and engineering leaders to find and fix vulnerabilities before release, including in AI features. We review code with AI-assisted triage, scan dependencies and test running applications, then rank findings and retest fixes. Netbase's own alignment with ISO 27001 and SOC 2 Type II covers Netbase's operations, never your application.

Learn More
line
SaaS product accelerator: launch an AI-ready SaaS on proven Netbase modules SaaS product accelerator: launch an AI-ready SaaS on proven Netbase modules

A SaaS product accelerator is a set of reusable Netbase modules for accounts, billing, roles and integrations that helps founders and product teams launch subscription software faster, with room for in-product AI from the first release. Reusing these modules can shorten development time, and the approach is proven on Printcart, Netbase's own web-to-print SaaS.

Learn More
line

Work with Netbase remotely

Every Netbase engagement is delivered remotely, so clients in any country and any industry can work with us; Netbase has worked with clients in 80 countries. Contracts and invoices are issued by Netbase JSC, and payment is made by bank transfer to Netbase JSC's company account or PayPal Business. Talk to the CEO, Huy Nguyen (David), on WhatsApp or by email.

Contact Netbase

Discuss a project

Netbase JSC helps organizations design, build, modernize, and operate digital products and AI-enabled business systems.
Project enquiries

project@netbasejsc.com

WhatsApp

+84 937 869 689

Office address

91 Nguyen Chi Thanh, Dong Da, Hanoi, Vietnam

Get in touch

Tell us what you want to build, modernize, or operate.

Tell us what you want to build, modernize, or operate.

Contact Netbase