Skip to main content
Rotate the OAuth client secret of a Databricks service principal on a schedule.
Rotation Type: Dual-PhaseThis rotation maintains two active credential sets with overlapping validity, ensuring zero-downtime during rotation cycles.
This rotation needs a Databricks app connection. This guide walks you through creating a project-scoped app connection.

Prerequisites

Step 1: Set up in Databricks

Create a service principal Infisical can use to reach the workspace and grant it permission to reset the secrets of every service principal you want to rotate.
1

Open workspace settings

In Databricks, open the dropdown in the top right and select Settings.Workspace Settings Page
2

Open service principals

Under Identity & Access, select Manage in the Service Principals section.Manage Service Principals
3

Add a service principal

Select Add Service Principal, then Add New, and create a service principal for Infisical.Add Service PrincipalCreate Service Principal
4

Generate a secret

Open the new service principal, select the Secrets tab, and select Generate Secret. Save the Client ID and Secret for the Infisical form.Generate SecretCopy IDs
5

Grant rotation permissions

The Infisical service principal needs to manage the secrets of every service principal whose secrets you want to rotate.
  1. Navigate to Settings > Identity & Access > Groups and select the admin group (typically named admins or workspace-admins). Select Add and pick the Infisical service principal. Admin Group Add to Admin Group Add to Admin Group Modal
  2. For every service principal whose secrets you want to rotate, open Settings > Identity & Access > Service Principals, select the target, open its Permissions tab, and select Grant access. Select Target Service Principal Permissions Tab
  3. In User, Group or Service Principal, select the Infisical service principal. In Permission, select Manage. Select Save. Repeat for every target. Assign Manage Permission

Step 2: Set up the rotation in Infisical

To create the rotation using the API, use the Create Databricks Service Principal Secret Rotation endpoint.
1

Add the rotation

In your Secrets Manager project, open the dashboard and select Add Secret Rotation from the actions dropdown.Secrets Manager DashboardThen, select the Databricks Service Principal rotation:Select Databricks Service Principal Secret
2

Configure the app connection

Create or select the Databricks app connection the rotation will use.
Under Databricks Connection, select Create Connection, then choose Databricks Connection. Select the Service Principal method and complete the form:
  • Name: A descriptive name for the connection.
  • Description (optional): A note for future reference.
  • Workspace URL: The URL of your Databricks workspace.
  • Client ID: The Client ID of the Databricks service principal created for Infisical.
  • Client Secret: The secret generated for that service principal. Connect via Databricks service principal
Then, select Connect to Databricks.
This creates a connection scoped to the current project. To share the connection across other projects, create it at the organization level first, then select it here.
3

Configure the rotation

Set the rotation behavior.Rotation Configuration
  • Rotation Interval: The interval, in days, that once elapsed triggers a rotation.
  • Rotate At: The local time of day when rotation should occur once the interval has elapsed.
  • Auto-Rotation Enabled: When enabled, secrets rotate automatically once the interval elapses. Disable to rotate manually or pause rotation.
When you’re done, select Next.
4

Pick the target service principal

Select the Databricks service principal whose OAuth secret you want to rotate, then select Next.Rotation Parameters
5

Map the rotated values to secret names

Specify the secret names that the client credentials should be mapped to, then select Next.Rotation Secrets Mapping
  • Client ID: The name of the secret the service principal Client ID is written to.
  • Client Secret: The name of the secret the rotated OAuth Client Secret is written to.
6

Configure the details

Give the rotation a Name and an optional Description, then select Next. The name must be slug-friendly.Rotation Details
7

Review and create

Review your configuration, then select Create Secret Rotation.Rotation ReviewRotation Created
Your Databricks service principal credentials are now available through the mapped secrets. If auto-rotation is enabled, they rotate on your configured schedule.