---
title: "Customer-Managed Keys for Integrations and AI Agents: Answering the Security Review"
slug: customer-managed-keys-security-reviews-integrations-ai-agents
date: 2026-12-03
author: Sidharth Verma
categories: [Guides]
excerpt: "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."
tldr: "Enterprise security reviews ask where your customers' OAuth tokens and API keys live, who can decrypt them, who logs each read, and how fast you can cut your vendor off. With Truto's key store (Pro add-on), those secrets sit in your own AWS Secrets Manager, encrypted with your KMS key. Truto keeps only a reference, has no fallback copy, and loses access when you deactivate one IAM access key. Your code, your agents and your MCP servers call Truto the same way as before."
canonical: https://truto.one/blog/customer-managed-keys-security-reviews-integrations-ai-agents/
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://truto.one/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# 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](https://truto.one/pricing/): 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](https://truto.one/docs/guides/team-security/key-store) 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](https://docs.aws.amazon.com/secretsmanager/latest/userguide/security-encryption.html): 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](https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) 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`](https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html) 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](https://docs.aws.amazon.com/secretsmanager/latest/userguide/monitoring-cloudtrail.html), and [records the KMS calls](https://docs.aws.amazon.com/kms/latest/developerguide/logging-using-cloudtrail.html) 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](https://truto.one/blog/revoke-key-store-access-what-happens-to-connection-secrets/).

### 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](https://truto.one/docs/api-reference/admin/key-stores).

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](https://truto.one/proxy-api/), unified APIs, sync jobs and webhooks use the same connected account IDs.
- **Same MCP servers.** Each [MCP server](https://truto.one/mcp/) 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](https://truto.one/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](https://truto.one/blog/bring-your-own-key-store-byok-truto-aws-secrets-manager-kms/) walks through each step with the policy, and the [key store guide](https://truto.one/docs/guides/team-security/key-store) has every rule.
