> ## Documentation Index
> Fetch the complete documentation index at: https://docs.komodor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Secrets & credential handling

> How a stored secret reaches the run that needs it without being exposed to a browser, a deploy, a log, or another agent.

A credential is a stored secret bound to the agents allowed to use it, delivered to a run without
its value being exposed. This page explains the path a secret takes, the places it deliberately
never goes, and what rotation and revocation actually do.

## The shape of the guarantee

Three properties, and they are what the rest of this page is about:

* **A value is delivered for the run that needs it**, not held ambiently by an agent.
* **A raw value never passes through your browser or a deployment**, so it is not sitting in a
  console screenshot, a manifest, or a build log.
* **A binding, not a workspace membership, grants access.** Being an agent in the workspace does not
  give you the workspace's secrets.

## The path a secret takes

<Steps>
  <Step title="You store it">
    The value goes into the credential store. Once stored, it is not readable back out through the
    console — the screen manages the credential, not its contents.
  </Step>

  <Step title="You bind it">
    A credential is bound to the agents allowed to use it. An agent with no binding to a credential
    cannot request it, whatever else it can do.
  </Step>

  <Step title="It is delivered to a run">
    When a bound agent starts a run that needs the credential, the value is delivered to the worker
    for that run.
  </Step>

  <Step title="The run ends and it is gone">
    The SDK holds a run's credentials in memory for the run only and never persists them, so a
    worker restart or a crash does not leave a secret on disk.
  </Step>
</Steps>

## What is masked on the way out

Any run-scoped secret is replaced with a redaction marker **before anything leaves the worker** —
recursively, across event names, content, payloads, and metadata. A token echoed into a log line or
returned inside a tool result does not reach the run record in the clear.

<Note>
  This is a platform behavior, not a rule you configure. Configurable redaction — keeping a value out
  of a specific tool call or model prompt — is a
  [guardrail](/security-and-governance/controls/standards-guardrails), and it applies to values that
  are not run-scoped secrets.
</Note>

## Rotation and revocation

| Action                             | Effect                                                                                               |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **Rotate a credential's value**    | Takes effect on the next run. No redeploy, no restart, no manifest change.                           |
| **Disable or delete a credential** | The runs that depended on it stop getting it, immediately.                                           |
| **Rotate a worker token**          | Mints a replacement and stops the old value working — update the worker's secret in the same change. |
| **Revoke a worker token**          | Stops that worker immediately, without a redeploy.                                                   |

Every one of these is recorded in the [audit log](/security-and-governance/controls/audit-log):
creation, updates, value replacement, deletion, and binding changes.

## Practical guidance

<Tip>
  Bind narrowly and rotate freely. The point of per-agent binding plus next-run rotation is that
  scoping a credential tightly costs you nothing operationally — the agent that only reads gets a
  read-only credential, and rotating it does not involve the agent's deployment at all.
</Tip>

Keep a worker's token out of source control: deliver it as an environment variable or a mounted
secret, and rotate it from the console rather than editing it in place.

## Next steps

<CardGroup cols={2}>
  <Card title="Credentials & secrets" href="/manage-your-agents/build/credentials-secrets">
    Creating and binding a credential.
  </Card>

  <Card title="Data handling & redaction" href="/security-and-governance/architecture-considerations/data-handling-redaction">
    What else is masked, and what is not.
  </Card>

  <Card title="Agent identity" href="/security-and-governance/identity-and-access/agent-identity">
    The worker token, and how it is managed.
  </Card>

  <Card title="Audit log" href="/security-and-governance/controls/audit-log">
    The record of every credential change.
  </Card>
</CardGroup>


## Related topics

- [Credentials & secrets](/manage-your-agents/build/credentials-secrets.md)
- [Data handling & redaction](/security-and-governance/architecture-considerations/data-handling-redaction.md)
- [Agent isolation & tenancy](/security-and-governance/architecture-considerations/agent-isolation-tenancy.md)
- [Python SDK](/developer-tools/python-sdk.md)
- [Operating a self-hosted install](/get-started/on-prem/operating.md)
