Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
---
title: "{Product} {credential name}"
description: "Learn how to automatically rotate {Product} {credential name, plural}."
---
{/*
NOTE: Template for docs/documentation/platform/secret-rotation/{rotation-slug}.mdx. Read
templates/README.md first for what each kind of markup means.
Example page: documentation/platform/secret-rotation/databricks-service-principal-secret.mdx.
That page uses labels from an older rotation wizard. The labels in this template come from
frontend/src/components/secret-rotations-v2/forms/; check them there again before publishing.
The rotation page creates a project-scoped app connection inline, like the sync page. If the
rotation needs more setup in {Product} than the connection does, put the setup in
{setup-snippet-file}-for-rotation.mdx, which imports the base snippet and adds the extra steps.
*/}
import {SetupSnippetName} from "/snippets/app-connections/{product-slug}/{setup-snippet-file}.mdx";
import ConnectionFormFields from "/snippets/app-connections/{product-slug}/form-fields.mdx";
Rotate {the credential} of {the {Product} resource that owns the credential} on a schedule.
{/* IF: the rotation is dual-phase in the backend */}
<Info>
**Rotation Type: Dual-Phase**
This rotation maintains two active credential sets with overlapping validity, ensuring zero-downtime during rotation cycles.
</Info>
{/* END IF */}
{/* IF: the rotation is not dual-phase */}
<Info>
**Rotation Type: {The rotation type}**
{What the rotation type means for downtime during a rotation}
</Info>
{/* END IF */}
<Note>
This rotation needs a [{Product} app connection](/integrations/app-connections/{product-slug}). This guide walks you through creating a project-scoped app connection.
</Note>
## Prerequisites
- A [project with secrets configured](/documentation/platform/secrets-mgmt/quick-starts/deliver-first-secret)
- {The {Product} access needed to do the setup in Step 1, asking for the least access that works}
{/* IF: Infisical connects to {Product} over a network the reader controls */}
- Network access from Infisical to {Product}, if network restrictions apply
{/* END IF */}
## Step 1: {The same heading text as Step 1 on the app connection page}
{One sentence stating what Infisical needs in {Product}, including the permission that lets Infisical rotate the credential}
<{SetupSnippetName} />
## Step 2: Set up the rotation in Infisical
<Tip>
To create the rotation using the API, use the [Create {Rotation name} Rotation](/api-reference/endpoints/secret-rotations/{rotation-slug}/create) endpoint.
</Tip>
<Steps>
<Step>
In your Secrets Manager project, open the dashboard and select **Add Secret Rotation** from the actions dropdown.

Then, select the **{Rotation option label}** option.
</Step>
<Step>
Under **Configuration**, choose the app connection and when the rotation runs:
{/* IF: the form shows an Environment field */}
- **Environment**: The project environment the rotated secrets are stored in
{/* END IF */}
- **{Product} Connection**: The app connection the rotation uses
- **Rotation Interval (In Days)**: The number of days between rotations
- **Rotate At (Local Time)**: The time of day the rotation runs
- **Auto-Rotation Enabled**: When enabled, the credential rotates on the schedule; turn it off to rotate manually only
<Tabs>
<Tab title="Create a new app connection">
Under **{Product} Connection**, select **Create Connection** in the dropdown, then fill in:
<ConnectionFormFields />
Select **Connect to {Product}**. Infisical returns you to the rotation form with the new connection selected.
<Note>
This creates a connection scoped to the current project. To share the connection across other projects, [create it at the organization level](/integrations/app-connections/{product-slug}#step-2-create-the-app-connection) first, then select it here.
</Note>
</Tab>
<Tab title="Use an existing connection">
Under **{Product} Connection**, select the app connection you'd like to use.
</Tab>
</Tabs>

Then select **Continue**.
</Step>
<Step>
Under **Parameters**, choose {the {Product} resource whose credential Infisical rotates}:
{/* NOTE: One bullet per field in SecretRotationV2ParametersFields/ for this rotation. */}
- **{Field label}**: {What the field selects in {Product}}

Then select **Continue**.
</Step>
<Step>
Under **Mappings**, choose the names of the Infisical secrets that hold the rotated values:
{/* NOTE: One bullet per field in SecretRotationV2SecretsMappingFields/ for this rotation. */}
- **{Field label}**: The name of the secret that holds {the rotated value}

Then select **Continue**.
</Step>
<Step>
Give the rotation a **Name** and an optional **Description**. The name must be slug-friendly.

Then select **Continue**.
</Step>
<Step>
Review your {Rotation name} Rotation configuration, then select **Create secret rotation**.

<Check>
The rotated credentials are now available through the mapped secrets. If auto-rotation is enabled, they rotate on your configured schedule.
</Check>
</Step>
</Steps>
{/* NOTE: Link to what a reader does after creating the rotation, such as the {Product} app connection page, the secret rotation overview, or a page on delivering the mapped secrets to an application. */}
## Next steps
<CardGroup cols={2}>
<Card title="{The linked page's sidebar label}" icon="{Lucide icon name}" href="{Path of the linked page}">
{What the reader can do on the linked page}
</Card>
<Card title="{The linked page's sidebar label}" icon="{Lucide icon name}" href="{Path of the linked page}">
{What the reader can do on the linked page}
</Card>
</CardGroup>