Blog

Introducing Managed Secrets: Secure credential access for apps and AI agents

Product
·
·
Zeke Mostov

Managed Secrets with Turnkey

Store API keys, passwords, payment details and keyshares in secure enclaves, while Turnkey enforces the policies and approvals you set before any secret is used.

What is the solution? Turnkey Managed Secrets lets teams store API keys, passwords, payment details, keyshares and other sensitive values inside Turnkey's secure enclaves. The same policy engine that governs private keys, also controls who can retrieve them, under what conditions and with whose approval.

What does it solve? Credentials often sit in environment variables, config files or vaults that can expose secrets if the surrounding infrastructure is compromised. Teams running AI agents also face a choice between giving agents unrestricted access and approving every request manually.

How does it solve this? Secrets are encrypted before import and stored encrypted inside the enclave. Each request is evaluated against your policies in the enclave, and if approved, the secret is then re-encrypted so only the intended recipient can use it.

Who is it built for? Developers and product teams at fintechs, onchain apps, trading firms and AI-agent companies whose apps, backend services or agents need credentials to do their work.

Today, we're introducing Turnkey Managed Secrets, which extends Turnkey's support for agents beyond wallets.

Our infrastructure is already battle-tested, securing billions of dollars in onchain transactions by protecting their most sensitive credentials. Managed Secrets extends the secure enclaves and policy engine behind Turnkey's private key management to the other sensitive values apps and agents use: API keys, passwords, payment details, keyshares, and recovery keys.

With Managed Secrets, agents can automatically use the credentials your policies allow without being able to view them.

Until now, those credentials have usually lived elsewhere. An exchange API key typically sits in an environment variable, a config file or a vault that decrypts inside the same infrastructure you are trying to protect, so an attacker who compromises that infrastructure gets the key too.

AI agents make the problem even more difficult. When an agent needs a credential, teams have had to choose between giving it unrestricted access and putting a human in the loop for every request. Managed Secrets gives a third option.

What is Managed Secrets and what does it protect?

Managed Secrets stores sensitive values inside Turnkey's secure enclaves and releases them, encrypted, only when your policies allow. It combines four capabilities:

  • Programmatic credential access. Apps and agents can request a credential and use it as soon as your policies allow, without the secret ever being exposed in plaintext.
  • Policies and approvals you set. Your team decides who can retrieve each secret and with whose approval, enforced within the enclave.
  • Encrypted at every step. Secrets are encrypted before import, kept encrypted in storage and delivered encrypted to a key only the intended recipient holds, so no one else can use them.
  • One secure foundation. Private keys and secrets are backed by the same secure enclaves and policy engine, so teams can protect both within the same platform.

How does Managed Secrets work?

Managed Secrets follows the same secure channel pattern Turnkey already uses for wallet import and export. Each secret moves through four steps:

  1. Your app imports the secret. Your app encrypts it before sending, so Turnkey's API and database only ever see encrypted data.
  2. The enclave stores it. Inside the enclave, the secret is re-encrypted for storage under its own key.
  3. A request is checked. When an app or agent asks for the secret, the enclave checks your policies and confirms any approvals they require.
  4. Only the intended recipient can use it. Once approved, the enclave encrypts the secret to a key that only the intended recipient holds. That recipient can be the app or agent that asked, or a separate service that uses the secret on the agent's behalf. No one else can decrypt it, including the approvers.

Requests for several secrets at once are all-or-nothing: if any secret is not allowed, Turnkey releases none of them.

Set policies for who can retrieve each secret and who must approve it

Your team writes the policies. Each time an app or agent asks for a secret, the enclave checks the request against those policies before anything is released. When you import a secret, you can label it with details such as what kind of secret it is or which website it is used on, so one policy can cover a whole group of secrets, such as every exchange API key.

Each secret can use whichever credential access pattern fits it, from no approval at all to approvals from people, agents or both:

  • Direct access. If your policy permits it, an agent retrieves the secret on its own.
  • Agent asks, human approves. The release completes only after a person approves it in the Turnkey dashboard or through the API.
  • Multi-agent approval. A browser agent and a payment agent must both approve before credential details go to the payment agent, so the browser agent never sees the secret.

Your team can change these policies at any time without re-importing a secret.

How Managed Secrets compares with a vault in your infrastructure

Compared with a secrets vault inside your own infrastructure, the difference is where encryption occurs and where the access check runs:

Managed Secrets
Vault in your infrastructureTurnkey Managed Secrets
Where encryption occursEncrypted at rest, decrypted inside your infrastructureBefore import, in storage and on release to the intended recipient
Who enforces accessSoftware you operateThe policy engine inside the enclave
Who can use a released secretAnyone who sees the responseOnly the intended recipient

Private keys and secrets in one enclave-backed platform, with one audit trail

Managed Secrets runs on the same enclaves, policy engine and activity log behind Turnkey’s wallet infrastructure. Every import, retrieval and approval is attributed to the credential behind it, logged and queryable.

Built for teams whose apps and agents need credentials

  • AI-agent companies. Agents can use passwords, payment details and API keys under policy, with multi-party approvals.
  • Trading firms. Exchange API keys and long-lived tokens are transported encrypted for an authorized trading service to use them.
  • Fintechs and onchain apps. Backend services can retrieve OAuth tokens and service credentials without keeping plaintext in config files.
  • Custodians using multi-party computation (MPC). MPC splits a private key into keyshares held by different parties, and Managed Secrets can be an independent storage for keyshare backups and recovery keys.

Getting started with Turnkey’s Managed Secrets

Learn more about Managed Secrets in the docs, or contact our team to talk through your use case.

Get started with Turnkey today.

Zeke Mostov

Related articles

HSM Signing with Turnkey: a hardware security module icon with a signing pen inside a glowing purple ring

Introducing HSM Signing: Private key generation and signing in your own HSM

Generate and host signing keys in your own HSM, while Turnkey handles authentication, policy, and transaction management.

Product
October 21, 2026

Turnkey Console: Treasury, asset management & security controls for operators

The Turnkey Console brings send, receive, swaps, balances and security controls into one place, so operators can manage onchain funds without code.