Skip to main content
Rotation Type: Dual-PhaseThis rotation maintains two active credential sets with overlapping validity, ensuring zero-downtime during rotation cycles.

Prerequisites

  • Create an OpenAI Connection using an Admin API key. That connection is used to create and delete project service accounts on your behalf during rotation.

Create an OpenAI Service Account Rotation in Infisical

  1. Navigate to your Secret Manager Project’s Dashboard and select Add Secret Rotation from the actions dropdown. Secret Manager Dashboard
  2. Select the OpenAI Service Account option. Select OpenAI Service Account
  3. Configure the rotation behavior, then click Next. Rotation Configuration
  • OpenAI Connection – The connection that will create and delete service accounts during rotation.
  • Rotation Interval – The interval, in days, after which a rotation is triggered.
  • Rotate At – The local time of day when rotation runs once the interval has elapsed.
  • Auto-Rotation Enabled – Whether to rotate automatically on the interval. Turn off to rotate only manually or pause rotation.
  1. Set the OpenAI Service Account parameters, then click Next. Rotation Parameters
  • Project – The OpenAI project to create service accounts in. Projects are listed via your OpenAI connection. This cannot be changed after the rotation is created.
  • Service Account Name – The name for the generated OpenAI service account (required, up to 100 characters). Infisical appends a timestamp suffix to this name in the OpenAI dashboard (e.g. my-app-service-account-1720268400000) so that the active and previous service accounts stay distinguishable during the overlap window. Service accounts are deleted by their ID, so the name is used only for identification.
  1. Specify the secret name that the rotated API key will be mapped to. Then click Next. Rotation Secrets Mapping
  • API Key – The name of the secret in Infisical where the rotated service account API key value will be stored.
  1. Give your rotation a name and description (optional). Then click Next. Rotation Details
  • Name – A slug-friendly name for this rotation configuration.
  • Description (optional) – Notes about this rotation.
  1. Review your configuration, then click Create Secret Rotation. Rotation Review
  2. Your OpenAI Service Account rotation is created. The current service account’s API key is available as a secret at the mapped path. Rotations will create a new service account, switch the active secret to its API key, then delete the previous service account for zero-downtime rotation. Rotation Created