By Dre Armeda
Head of Security Products & Customer Trust
An agent may need to call a tool thousands of times. Does it ever need to see the secret? If that secret lives in the agent’s environment, a compromised dependency, a prompt injection hidden in an email or web page, or an unexpected tool call can expose it. When that happens, you may not know who used it. A leaked secret can remain usable long after the agent’s work is done. DigitalOcean Secrets Manager is now generally available to eligible customers in supported regions, giving you one place to manage the credentials your agents and applications use.
In DigitalOcean Managed Agents, your agent can use a connected tool without receiving its secret. When you connect the tool, the credential for that connection is stored in Secrets Manager, and Managed Agents uses it to authenticate permitted calls outside the agent’s sandbox. Learn more about how DigitalOcean manages credentials for autonomous agents.
Agents you run outside Managed Agents do receive their secrets, so the goal changes: keep each secret out of the agent’s code and config, and keep it short-lived so a leaked secret stops working sooner. Each agent retrieves its secrets from Secrets Manager at runtime with a read-only token. If you suspect a leak, revoke the exposed secret with the service that issued it and store its replacement under the same secret name. Your agents get the replacement the next time they retrieve it. DigitalOcean IAM controls who can retrieve or change the stored secret, and audit logs are designed to record who retrieved or changed it.
On DigitalOcean Kubernetes (DOKS), an agent with access to your cluster can set up the Secrets Manager integration and configure your pods to read secrets as mounted files. That keeps secret values out of your deployment manifests. With automatic secret rotation enabled, the integration checks for new versions and updates the mounted files, so your application reads the replacement from the same file path without a redeploy.
A secret written into an agent’s code or .env file gets copied wherever that agent is deployed, and it can end up in images, logs, and source control. Instead, store the secrets your agents use for models and tools in Secrets Manager. Each agent retrieves its secrets through the API or doctl when it needs them.
Give each agent its own token with only the secret:read scope, so it can retrieve secrets without being able to change them. Audit logs are designed to record who requested a secret and whether the request succeeded, which gives you a record of your agents’ access to review. Each successful retrieval counts toward your monthly allowance (see pricing below).
Secrets Manager controls who can retrieve a secret, not what an agent does with it afterward. Once an agent retrieves a value, it’s in the agent’s process, so also limit each credential at the service that issues it: grant only the permissions the agent needs, and set an expiry where the provider supports it.
As more people and agents work on your application, access to its credentials needs to remain deliberate. Secrets Manager checks each request against DigitalOcean IAM, so your team decides who can create, view, retrieve, or administer secrets. You remain responsible for the credentials you store, for granting access appropriately, and for securing your applications and the services that issue those credentials.
Audit logs are designed to record who requested or changed a secret and whether the request succeeded, without including the secret value. When something unexpected happens, audit logs can help provide a record to work from.
Secrets Manager is designed to encrypt secret values at rest with AES-256 and to protect requests in transit with TLS. The NSA continues to recommend AES-256 for symmetric encryption in CNSA 2.0, its suite of quantum-resistant cryptographic requirements for protecting national security systems against quantum attacks.
When you replace an API key, you can save the new value as a version of the existing secret. The secret’s name stays the same, so applications referencing it can retrieve the active version without needing a new secret reference in their configuration. Secrets Manager keeps the five most recent versions, so you can revert in the Control Panel or API if a new value causes problems.
This helps provide your team a consistent way to manage credential changes, while leaving you in control of the transition. Coordinate the replacement with the service that issues the credential and verify that your application is using the new value before revoking the old one. Secrets Manager manages the stored versions; it does not automatically change credentials in the service that issued them.
On DigitalOcean Kubernetes, a DigitalOcean provider for the Kubernetes Secrets Store CSI Driver mounts selected secret values as files in your pods, so application code doesn’t need to call the Secrets Manager API. When automatic secret rotation is enabled in the CSI Driver, the driver periodically checks for new secret versions and refreshes the mounted files. Each check counts as a retrieval request. Your application picks up the new value the next time it reads the file. That includes long-running agents: if your agent reads the secret from the file each time it needs it, it starts using the new value without a redeploy.
If your agent or application reads secrets from environment variables, the integration can also sync values to a Kubernetes Secret, though the pod needs a restart to use the new value. Secrets Manager stays the source of truth for the credential. See the DOKS integration documentation to set it up.
Secrets Manager currently includes a monthly allowance of 25 secret-month equivalents and 100,000 successful retrieval requests per billing account. Beyond that allowance, you pay for how long you store secrets and how often they’re retrieved.
| Capability | Monthly allowance | Rate above allowance |
|---|---|---|
| Secret storage | 25 secret-month equivalents | $0.40/secret-month equivalent |
| Successful retrieval requests | 100,000 requests | $0.05/10,000 requests |
One secret stored for a full month equals one secret-month, with storage prorated for partial-month use. The allowance applies across your account’s projects and regions. Versioning and management operations currently carry no separate charge, and failed requests are currently not billed. Retrievals through the DigitalOcean Kubernetes integration count toward the same allowance and rate, including the checks the provider makes for new versions when automatic secret rotation is enabled. Your request volume depends on how many secrets your pods mount and how often the provider checks. To keep request counts low, have agents that use the API or doctl retrieve a secret once and reuse it, rather than fetching it on every call. On DOKS, reading a mounted file doesn’t add requests, however often your agent reads it.
For example, storing 100 secrets for a full month (672 hours) and making 500,000 successful retrieval requests would cost $32: $30 for storage above the allowance and $2 for retrievals. See the pricing page for details. Prices are in U.S. dollars, exclude applicable taxes, and are subject to change. The example is illustrative only.
Start with a sample database password so you can try the workflow without using a live credential. Make sure you’re working in the intended DigitalOcean team and have permission to create secrets.
Open Security → Secrets in the DigitalOcean Control Panel and select Create Secret.
Name the secret app-database and select a supported region.
Add a key named password with the dummy value demo-password-not-for-production. You can add related values, such as a username, as additional key-value pairs.
Select Create Secret to save it.
Open the secret’s details page and confirm that app-database appears in the region you selected. Check that the password key is present and an active version is shown. Secret values are masked after they are stored.
Install a supported version of doctl and authenticate it for the intended account and team. Check your account connection with:
- doctl account get
The following example creates a separate secret named app-database-cli. Replace YOUR_SUPPORTED_REGION with a region available to your team. The password is a dummy value.
- doctl secrets create app-database-cli \
- --region YOUR_SUPPORTED_REGION \
- --value password=demo-password-not-for-production
Passing a real credential directly on the command line can leave it in shell history. For real credentials, use --interactive, which prompts for masked values, or --from-env-file.
Use the supported retrieval command to read the value back and confirm the workflow before connecting your application.
- doctl secrets get app-database-cli --region YOUR_SUPPORTED_REGION --show
Use only the dummy credential for this example. Your application can then use the Secrets Manager API to retrieve its credentials.
Install the Secrets Store CSI Driver and the DigitalOcean provider on your cluster. Create a SecretProviderClass that references app-database, then configure your pod to mount a CSI volume that uses that class.
See the Secrets Manager documentation for full setup instructions and supported commands. Have additional questions or need assistance? Contact our support team.
We are evaluating bringing Secrets Manager to more of the DigitalOcean services your applications run on, with priorities informed by customer feedback and other factors.
DigitalOcean Secrets Manager is now generally available. Create your first secret and connect it to the workloads that need it.
Following the U.S. government’s December 2 guidance for national security systems to accelerate the move to post-quantum cryptography, we are also working on post-quantum protection for the connections your agents and applications use to retrieve secrets. Keep doctl and the DigitalOcean provider for the Secrets Store CSI Driver up to date so your workloads can use it if and when it becomes available.
This blog post contains forward-looking statements within the meaning of the Private Securities Litigation Reform Act of 1995, including statements about planned product availability, features, and integrations. These statements reflect our current plans, are subject to risks and uncertainties that could cause actual results to differ materially, and are not a commitment to deliver any material, feature, or functionality. For more information on these risks, see the “Risk Factors” sections of DigitalOcean’s most recent Annual Report on Form 10-K and subsequent Quarterly Reports on Form 10-Q filed with the SEC. DigitalOcean undertakes no obligation to update these statements except as required by law.
Kubernetes is a registered trademark of The Linux Foundation. Other names and marks are the property of their respective owners. Their use does not imply affiliation with or endorsement by those owners.
Product Leader | Building & Scaling SaaS, Cloud & Platform Products | Product Strategy, UX/UI & Commercialization | Founder | Navy Veteran

Shridhar Pandey


DigitalOcean