Skip to content

Guides

Customer-Managed Keys for Integrations and AI Agents: Answering the Security Review

The six questions enterprise security teams ask about the OAuth tokens your integrations and AI agents hold, and how a key store in your own AWS account answers each one.

Sidharth Verma Sidharth Verma · · 7 min read

Your team’s apps in Elaichi, from the team behind Truto, free for 14 days. Try Elaichi
Customer-Managed Keys for Integrations and AI Agents: Answering the Security Review

Your product connects to your customers' Salesforce, HubSpot, Workday or Google accounts. Your AI agents act in those accounts. Every connection is an OAuth token or an API key, and an enterprise security team will ask who holds it.

This guide lists the questions those reviews ask about integration credentials, and gives the answer a key store in your own cloud lets you write. On Truto, the key store is part of the Pro add-on: the secrets of your connected accounts live in your own AWS Secrets Manager, encrypted with your KMS key. Every Truto fact below comes from the key store guide in Truto's docs.

Why integration credentials get extra questions

A connected account's token can read and write your customer's data in another system. For an AI agent, that is the whole point: the agent books the meeting, updates the deal, files the ticket. So the reviewer wants to know three things about every token:

  1. Where it is stored, and under whose key.
  2. Who can read it, and whether each read is logged.
  3. How fast access stops when someone decides it must.

"Our integration vendor encrypts them" answers the first question only in part. A customer-managed key answers all three on infrastructure the reviewer can see.

The six questions, and the answers

1. Where are our OAuth tokens and API keys stored?

Answer with a key store: "In our AWS account. Each connected account's secrets are a secret in our AWS Secrets Manager, under our own name prefix."

Once an environment's key store is in use, three kinds of secret go to it:

  • Connected account credentials. Everything in the account's context: OAuth access and refresh tokens, API keys, passwords and other values the integration keeps.
  • Overrides on a connected account, such as that account's own OAuth app credentials.
  • Overrides on an integration in the environment, such as your own OAuth app's client ID and secret.

Each secret has a predictable name, for example truto/<environment_id>/<integrated_account_id>, so your team can find it, tag it and check it. In place of each secret, Truto keeps a reference. Non-secret metadata (account ID, tenant, integration, status) stays in Truto, because Truto needs it to route requests.

One boundary to state plainly in the review: OAuth apps that Truto provides are Truto's own credentials, and they stay with Truto.

2. Who holds the encryption key?

Answer: "We do. Secrets Manager encrypts each secret with our KMS key."

You name a KMS key when you connect the store (a key ARN, key ID or alias). Truto writes each secret through Secrets Manager, which uses envelope encryption: it gets a new data key from AWS KMS each time the value changes and encrypts that data key under your KMS key. Truto never holds your key material. If you name no key, Secrets Manager uses its AWS-managed key, so name one if the review asks for a customer-managed key.

Key rotation and the key policy stay in KMS, under your team's rules.

3. What can the vendor's access reach?

Answer: "One IAM user that we created, with a policy that reaches only secrets under our prefix, and our KMS key only through Secrets Manager."

Truto has no AWS identity of its own in your account. You create an IAM user and give Truto its access key. Truto then generates the inline policy for your settings. It allows five Secrets Manager actions (create, read, write, delete, restore) on secret:<your prefix>* (truto/* by default) in your region and account, and nothing else. The KMS statement allows kms:GenerateDataKey and kms:Decrypt on your key, with a kms:ViaService condition, so the IAM user can use the key only through Secrets Manager.

Before Truto writes a real secret, Verify runs a round trip on a test secret: write, read, delete, restore, delete for good. That proves every permission works and leaves nothing behind.

4. Is every read logged?

Answer: "Yes, in our own AWS account."

Truto reads a secret with GetSecretValue when a request needs it. AWS CloudTrail records Secrets Manager API calls, and records the KMS calls that Secrets Manager makes with your key. That is AWS behaviour, so the trail is yours to keep and query, with the retention and alerts your team already uses.

Truto caches a value in memory for up to 5 minutes after it reads it, so the trail shows reads, not every API request.

5. How fast can we cut the vendor off?

Answer: "Deactivate one IAM access key. Truto's cached values expire within 5 minutes, and every request that needs a secret then fails."

There is no fallback. If Truto can't read your store, the request fails with HTTP 503 and truto_error_code: key_store_unavailable. Truto never uses a copy of its own for a secret that's in your store. To restore access, you reactivate the key or save a new one. The full timeline, including token refreshes, is in What happens to connection secrets when you revoke your key.

6. Who can change where secrets go?

Answer: "Only a signed-in team admin, in the dashboard. API tokens can't."

That is separation of duties on the vendor side. Your developers and your agents use API tokens to call integrations. They can't create, edit, verify, activate or delete a key store with those tokens: Truto refuses every key store change that does not come from a signed-in admin. A leaked token can't point your secrets at another AWS account. Reads, such as listing stores or getting the setup policy, work through the key stores API.

On your side, the duties split the same way: your cloud team owns the AWS account, the IAM user and the KMS key. Your product team owns the integrations.

What stays the same for your developers and agents

A key store changes where secrets live at rest. It does not change how you call Truto.

  • Same calls. The Proxy API, unified APIs, sync jobs and webhooks use the same connected account IDs.
  • Same MCP servers. Each MCP server for a customer account works as before. Truto reads the token from your store when a tool call needs it.
  • No reconnects. Existing secrets move on their next change (a token refresh, say), or all at once when an admin clicks Move all now. No customer has to authorize again.
  • Same token refresh. Truto still refreshes OAuth tokens and writes the new token to your store. Because Secrets Manager keeps at most 100 versions of a secret, Truto writes a given secret at most once every 15 minutes, and holds the newest token encrypted until that write.

Your coding agent can build an integration on Truto and ship it to every customer. The key store keeps the tokens those customers grant in your account.

What you would build yourself

The same answers are possible without Truto. Here is the work behind them.

Part Build yourself On Truto
Token vault Store per account, schema, naming, cleanup One secret per account, named for you
Encryption Envelope encryption with KMS Secrets Manager with your KMS key
Refresh Refresh flows, plus version limits Truto refreshes and writes
Access IAM policy scoped to the vault Policy generated for your settings
Revocation Fail closed, no stale copies 503, no fallback copy
Moves Re-encrypt and move live secrets Move all now, in the background

Each row is code your team writes and keeps working for every integration: token refresh for each provider, retries when the store is slow, deletes when an account goes away. Truto runs that part for every connected account. You keep the key.

Limits to state in the review

Be exact about the boundary. Reviewers trust a vendor more when it says what a control does not do.

  • Truto handles plaintext while it works. To call a third-party API, Truto needs the token. It caches values in memory for up to 5 minutes.
  • A held refresh. A token refresh that has not yet landed in your store is held encrypted on Truto's side until it does.
  • One store per environment. A key store belongs to one Truto environment. All connected accounts in that environment use the same store and KMS key, each in its own secret.
  • AWS Secrets Manager only. The aws and aws-us-gov partitions are supported. AWS China regions, GCP KMS, Azure Key Vault and HashiCorp Vault are not.

How to turn it on

  1. Add the Pro add-on on pricing ($499 a month), or use the 30-day Pro trial on the Free plan.
  2. In AWS, create an IAM user and an access key for Truto.
  3. In the Truto dashboard, open Settings → Key store and connect the store.
  4. Attach the policy that Set up access shows, then click Verify.
  5. Click Move all now to move existing secrets.

The launch post walks through each step with the policy, and the key store guide has every rule.

FAQ

What is a customer-managed key for integrations?
A customer-managed key is an encryption key that you create and control in your own cloud account, not your vendor's. With Truto's key store, the OAuth tokens and API keys of your customers' connected accounts are stored in your AWS Secrets Manager and encrypted with your AWS KMS key. Truto keeps only a reference to each secret.
Which key stores does Truto support?
AWS Secrets Manager, encrypted with your KMS key or with the AWS-managed key if you name none. The aws and aws-us-gov partitions are supported. AWS China regions are not. Truto does not support GCP KMS, Azure Key Vault or HashiCorp Vault today.
Is there an audit trail of every time Truto reads a secret?
Yes, in your own AWS account. Truto reads each secret with Secrets Manager's GetSecretValue, and AWS CloudTrail records Secrets Manager API calls and the KMS calls Secrets Manager makes with your key. The trail is AWS's, so your team keeps and queries it with your own tools.
Do my developers or AI agents need to change anything?
No. Connected account IDs, Proxy API calls, unified API calls, MCP servers and webhooks work the same way. Truto reads the secret from your store when a request needs it. Existing connections move in the background, and no customer has to reconnect.
Which plan includes the key store?
The key store is part of the Pro add-on, $499 a month on top of a Truto plan. The Free plan includes a 30-day trial of Pro.
Can an API token change where secrets are stored?
No. Every change to a key store must come from a signed-in team admin in the Truto dashboard. Truto refuses key store changes made with an API token, so a leaked token cannot point your secrets at another store.

Blog

More from our Blog

Start free today. Pay only for the calls you make.

Connections are free. 25,000 calls a month on the Free plan, no card.