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

# Credential rotation

# How Does Credential Rotation Work in NullBridge?

NullBridge supports on-demand and scheduled credential rotation for AI agents without requiring the agent to be deregistered or its authorization policies to be reconfigured. When a credential is rotated, the old key is invalidated and a new one is issued — the agent's identity, scope, and audit history remain intact.

***

## Why credential rotation matters for AI agents

Static, long-lived credentials are one of the most common attack vectors in any identity system. For AI agents that may be running continuously and calling external APIs, credentials that never rotate are a standing risk — if they're ever leaked or extracted from logs, an attacker has indefinite access. Regular rotation limits that window without requiring a full agent rebuild.

## How rotation works in NullBridge

Credential rotation in NullBridge is non-destructive to the agent's identity. When you rotate a credential:

1. NullBridge generates a new credential for that agent
2. The new credential is returned to you via the dashboard or API
3. The old credential is immediately invalidated
4. The agent's registration, authorization scope, and audit log are unchanged

The agent itself needs to be updated to use the new credential — NullBridge does not push credentials to agents directly. Your deployment process should handle distributing the new credential to the running agent.

## On-demand vs scheduled rotation

**On-demand rotation** is triggered manually from the dashboard or via the API — useful after a suspected exposure or as part of a security incident response.

**Scheduled rotation** allows you to define a rotation interval so credentials are refreshed automatically on a cadence without requiring manual intervention each time.

## Frequently asked questions

**Does rotating a credential change the agent's permissions?**
No. The agent's authorization scope, group memberships, and policies are tied to its registered identity, not its credential. Rotation only replaces the authentication key.

**What happens to requests in flight when a credential is rotated?**
Requests already authenticated before rotation completes are not interrupted. Any new request using the old credential after rotation is rejected.

**Can I rotate all agent credentials at once?**
Bulk rotation via the API is possible by iterating agent IDs — see the [API reference](/api-reference) for the credential rotation endpoint.

***

*Related: [Agent Authentication](/concepts/agent-authentication) · [Kill Switch](/concepts/kill-switch) · [Audit Logging](/concepts/audit-logging)*
