Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

docs: dbt secret rotation and app connection

Daniel Hougaardd91f953f137c
diff --git a/docs/api-reference/endpoints/app-connections/dbt/available.mdx b/docs/api-reference/endpoints/app-connections/dbt/available.mdx
new file mode 100644
index 0000000000..8981b5bcd0
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/dbt/available.mdx
@@ -0,0 +1,4 @@
+---
+title: "Available"
+openapi: "GET /api/v1/app-connections/dbt/available"
+---
diff --git a/docs/api-reference/endpoints/app-connections/dbt/create.mdx b/docs/api-reference/endpoints/app-connections/dbt/create.mdx
new file mode 100644
index 0000000000..9eaaeef36c
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/dbt/create.mdx
@@ -0,0 +1,8 @@
+---
+title: "Create"
+openapi: "POST /api/v1/app-connections/dbt"
+---
+
+<Note>
+ Check out the configuration docs for [DBT Connections](/integrations/app-connections/dbt) to learn how to obtain the required credentials.
+</Note>
diff --git a/docs/api-reference/endpoints/app-connections/dbt/delete.mdx b/docs/api-reference/endpoints/app-connections/dbt/delete.mdx
new file mode 100644
index 0000000000..5194dac185
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/dbt/delete.mdx
@@ -0,0 +1,4 @@
+---
+title: "Delete"
+openapi: "DELETE /api/v1/app-connections/dbt/{connectionId}"
+---
diff --git a/docs/api-reference/endpoints/app-connections/dbt/get-by-id.mdx b/docs/api-reference/endpoints/app-connections/dbt/get-by-id.mdx
new file mode 100644
index 0000000000..df412988c1
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/dbt/get-by-id.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get by ID"
+openapi: "GET /api/v1/app-connections/dbt/{connectionId}"
+---
diff --git a/docs/api-reference/endpoints/app-connections/dbt/get-by-name.mdx b/docs/api-reference/endpoints/app-connections/dbt/get-by-name.mdx
new file mode 100644
index 0000000000..67d6956696
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/dbt/get-by-name.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get by Name"
+openapi: "GET /api/v1/app-connections/dbt/connection-name/{connectionName}"
+---
diff --git a/docs/api-reference/endpoints/app-connections/dbt/list.mdx b/docs/api-reference/endpoints/app-connections/dbt/list.mdx
new file mode 100644
index 0000000000..4e661d75b1
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/dbt/list.mdx
@@ -0,0 +1,4 @@
+---
+title: "List"
+openapi: "GET /api/v1/app-connections/dbt"
+---
diff --git a/docs/api-reference/endpoints/app-connections/dbt/update.mdx b/docs/api-reference/endpoints/app-connections/dbt/update.mdx
new file mode 100644
index 0000000000..a598adeea6
--- /dev/null
+++ b/docs/api-reference/endpoints/app-connections/dbt/update.mdx
@@ -0,0 +1,8 @@
+---
+title: "Update"
+openapi: "PATCH /api/v1/app-connections/dbt/{connectionId}"
+---
+
+<Note>
+ Check out the configuration docs for [DBT Connections](/integrations/app-connections/dbt) to learn how to obtain the required credentials.
+</Note>
diff --git a/docs/docs.json b/docs/docs.json
index a63ebb8ce6..1d7b687a59 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -120,6 +120,7 @@
"integrations/app-connections/chef",
"integrations/app-connections/cloudflare",
"integrations/app-connections/databricks",
+ "integrations/app-connections/dbt",
"integrations/app-connections/digital-ocean",
"integrations/app-connections/dns-made-easy",
"integrations/app-connections/flyio",
@@ -450,6 +451,7 @@
"documentation/platform/secret-rotation/aws-iam-user-secret",
"documentation/platform/secret-rotation/azure-client-secret",
"documentation/platform/secret-rotation/databricks-service-principal-secret",
+ "documentation/platform/secret-rotation/dbt-service-token",
"documentation/platform/secret-rotation/ldap-password",
"documentation/platform/secret-rotation/unix-linux-local-account",
"documentation/platform/secret-rotation/mongodb-credentials",
@@ -1310,6 +1312,18 @@
"api-reference/endpoints/app-connections/databricks/delete"
]
},
+ {
+ "group": "DBT",
+ "pages": [
+ "api-reference/endpoints/app-connections/dbt/list",
+ "api-reference/endpoints/app-connections/dbt/available",
+ "api-reference/endpoints/app-connections/dbt/get-by-id",
+ "api-reference/endpoints/app-connections/dbt/get-by-name",
+ "api-reference/endpoints/app-connections/dbt/create",
+ "api-reference/endpoints/app-connections/dbt/update",
+ "api-reference/endpoints/app-connections/dbt/delete"
+ ]
+ },
{
"group": "Digital Ocean",
"pages": [
@@ -1538,7 +1552,6 @@
"api-reference/endpoints/app-connections/okta/delete"
]
},
-
{
"group": "OracleDB",
"pages": [
@@ -2014,6 +2027,19 @@
"api-reference/endpoints/secret-rotations/databricks-service-principal-secret/update"
]
},
+ {
+ "group": "DBT Service Token",
+ "pages": [
+ "api-reference/endpoints/secret-rotations/dbt-service-token/create",
+ "api-reference/endpoints/secret-rotations/dbt-service-token/delete",
+ "api-reference/endpoints/secret-rotations/dbt-service-token/get-by-id",
+ "api-reference/endpoints/secret-rotations/dbt-service-token/get-by-name",
+ "api-reference/endpoints/secret-rotations/dbt-service-token/get-generated-credentials-by-id",
+ "api-reference/endpoints/secret-rotations/dbt-service-token/list",
+ "api-reference/endpoints/secret-rotations/dbt-service-token/rotate-secrets",
+ "api-reference/endpoints/secret-rotations/dbt-service-token/update"
+ ]
+ },
{
"group": "LDAP Password",
"pages": [
diff --git a/docs/documentation/platform/secret-rotation/dbt-service-token.mdx b/docs/documentation/platform/secret-rotation/dbt-service-token.mdx
new file mode 100644
index 0000000000..c14d6348ab
--- /dev/null
+++ b/docs/documentation/platform/secret-rotation/dbt-service-token.mdx
@@ -0,0 +1,152 @@
+---
+title: "DBT Service Token"
+description: "Learn how to automatically rotate DBT Service Tokens."
+---
+
+## Prerequisites
+
+- Create a [DBT Connection](/integrations/app-connections/dbt).
+
+## Create a DBT Service Token Rotation in Infisical
+
+<Tabs>
+ <Tab title="Infisical UI">
+ 1. Navigate to your Secret Manager Project's Dashboard and select **Add Secret Rotation** from the actions dropdown.
+
+ ![Secret Manager Dashboard](/images/secret-rotations-v2/generic/add-secret-rotation.png)
+
+ 2. Select the **DBT Service Token** option.
+
+ ![Select DBT Service Token](/images/secret-rotations-v2/dbt-service-token/select-dbt-service-token.png)
+
+ 3. Configure the rotation behavior, then click **Next**.
+
+ ![Rotation Configuration](/images/secret-rotations-v2/dbt-service-token/configuration.png)
+
+ - **DBT Connection** - the connection that will perform the rotation of the specified service token.
+ - **Rotation Interval** - the interval, in days, that once elapsed will trigger a rotation.
+ - **Rotate At** - the local time of day when rotation should occur once the interval has elapsed.
+ - **Auto-Rotation Enabled** - whether secrets should automatically be rotated once the rotation interval has elapsed. Disable this option to manually rotate secrets or pause secret rotation.
+
+ <Note>
+ Note that it's important that the DBT connection being used has permissions to create service tokens. Groups such as `Owner` or `Security Admin` are sufficient.
+ </Note>
+
+ 4. Select the permission grants for the service token. Then click **Next**.
+
+ ![Rotation Parameters](/images/secret-rotations-v2/dbt-service-token/parameters.png)
+
+ 5. Specify the secret names that the service token should be mapped to. Then click **Next**.
+
+ ![Rotation Secrets Mapping](/images/secret-rotations-v2/dbt-service-token/mappings.png)
+
+ - **Service Token** - the name of the secret that the service token will be mapped to.
+
+ 6. Give your rotation a name and description (optional). Then click **Next**.
+
+ ![Rotation Details](/images/secret-rotations-v2/dbt-service-token/details.png)
+
+ - **Name** - the name of the secret rotation configuration. Must be slug-friendly.
+ - **Description** (optional) - a description of this rotation configuration.
+
+ 7. Review your configuration, then click **Create Secret Rotation**.
+
+ ![Rotation Review](/images/secret-rotations-v2/dbt-service-token/review.png)
+
+ 8. Your **DBT Service Token** credentials are now available for use via the mapped secrets.
+
+ ![Rotation Created](/images/secret-rotations-v2/dbt-service-token/created.png)
+ </Tab>
+ <Tab title="API">
+ To create a DBT Service Token Rotation, make an API request to the [Create DBT Service Token Rotation](/api-reference/endpoints/secret-rotations/dbt-service-token/create) API endpoint.
+
+ ### Sample request
+
+ ```bash Request
+ curl --request POST \
+ --url https://us.infisical.com/api/v2/secret-rotations/dbt-service-token \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "my-dbt-service-token-rotation",
+ "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
+ "description": "my dbt service token rotation",
+ "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
+ "environment": "dev",
+ "secretPath": "/",
+ "isAutoRotationEnabled": true,
+ "rotationInterval": 30,
+ "rotateAtUtc": {
+ "hours": 0,
+ "minutes": 0
+ },
+ "parameters": {
+ "permissionGrants": [
+ {
+ "permissionSet": "account_admin",
+ "projectId": "<project-id>, <leave empty for all projects>"
+ }
+ ]
+ },
+ "secretsMapping": {
+ "serviceToken": "DBT_SERVICE_TOKEN"
+ }
+ }'
+ ```
+
+ ### Sample response
+
+ ```bash Response
+ {
+ "secretRotation": {
+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
+ "name": "my-dbt-service-token-rotation",
+ "description": "my dbt service token rotation",
+ "secretsMapping": {
+ "serviceToken": "DBT_SERVICE_TOKEN"
+ },
+ "isAutoRotationEnabled": true,
+ "activeIndex": 0,
+ "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
+ "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
+ "createdAt": "2023-11-07T05:31:56Z",
+ "updatedAt": "2023-11-07T05:31:56Z",
+ "rotationInterval": 30,
+ "rotationStatus": "success",
+ "lastRotationAttemptedAt": "2023-11-07T05:31:56Z",
+ "lastRotatedAt": "2023-11-07T05:31:56Z",
+ "lastRotationJobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
+ "nextRotationAt": "2023-11-07T05:31:56Z",
+ "connection": {
+ "app": "dbt",
+ "name": "my-dbt-connection",
+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
+ },
+ "environment": {
+ "slug": "dev",
+ "name": "Development",
+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
+ },
+ "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
+ "folder": {
+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
+ "path": "/"
+ },
+ "rotateAtUtc": {
+ "hours": 0,
+ "minutes": 0
+ },
+ "lastRotationMessage": null,
+ "type": "dbt-service-token",
+ "parameters": {
+ "permissionGrants": [
+ {
+ "permissionSet": "account_admin",
+ "projectId": "<project-id>, <leave empty for all projects>"
+ }
+ ]
+ }
+ }
+ }
+ ```
+ </Tab>
+</Tabs>
diff --git a/docs/images/app-connections/dbt/account-settings.png b/docs/images/app-connections/dbt/account-settings.png
new file mode 100644
index 0000000000..74c0e30f93
Binary files /dev/null and b/docs/images/app-connections/dbt/account-settings.png differ
diff --git a/docs/images/app-connections/dbt/connection-created.png b/docs/images/app-connections/dbt/connection-created.png
new file mode 100644
index 0000000000..98f9dfa7ee
Binary files /dev/null and b/docs/images/app-connections/dbt/connection-created.png differ
diff --git a/docs/images/app-connections/dbt/connection-modal.png b/docs/images/app-connections/dbt/connection-modal.png
new file mode 100644
index 0000000000..6d2df8e230
Binary files /dev/null and b/docs/images/app-connections/dbt/connection-modal.png differ
diff --git a/docs/images/app-connections/dbt/copy-token.png b/docs/images/app-connections/dbt/copy-token.png
new file mode 100644
index 0000000000..65380f9803
Binary files /dev/null and b/docs/images/app-connections/dbt/copy-token.png differ
diff --git a/docs/images/app-connections/dbt/create-token.png b/docs/images/app-connections/dbt/create-token.png
new file mode 100644
index 0000000000..99fdfc0c2e
Binary files /dev/null and b/docs/images/app-connections/dbt/create-token.png differ
diff --git a/docs/images/app-connections/dbt/select-dbt-connection.png b/docs/images/app-connections/dbt/select-dbt-connection.png
new file mode 100644
index 0000000000..2d36c9dc61
Binary files /dev/null and b/docs/images/app-connections/dbt/select-dbt-connection.png differ
diff --git a/docs/images/app-connections/dbt/token-details.png b/docs/images/app-connections/dbt/token-details.png
new file mode 100644
index 0000000000..f913defe62
Binary files /dev/null and b/docs/images/app-connections/dbt/token-details.png differ
diff --git a/docs/images/secret-rotations-v2/dbt-service-token/configuration.png b/docs/images/secret-rotations-v2/dbt-service-token/configuration.png
new file mode 100644
index 0000000000..3bb4bf4ec8
Binary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/configuration.png differ
diff --git a/docs/images/secret-rotations-v2/dbt-service-token/created.png b/docs/images/secret-rotations-v2/dbt-service-token/created.png
new file mode 100644
index 0000000000..facfb008d1
Binary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/created.png differ
diff --git a/docs/images/secret-rotations-v2/dbt-service-token/details.png b/docs/images/secret-rotations-v2/dbt-service-token/details.png
new file mode 100644
index 0000000000..c8054562af
Binary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/details.png differ
diff --git a/docs/images/secret-rotations-v2/dbt-service-token/mappings.png b/docs/images/secret-rotations-v2/dbt-service-token/mappings.png
new file mode 100644
index 0000000000..5702ad0aeb
Binary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/mappings.png differ
diff --git a/docs/images/secret-rotations-v2/dbt-service-token/parameters.png b/docs/images/secret-rotations-v2/dbt-service-token/parameters.png
new file mode 100644
index 0000000000..4ea7a3fdcf
Binary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/parameters.png differ
diff --git a/docs/images/secret-rotations-v2/dbt-service-token/review.png b/docs/images/secret-rotations-v2/dbt-service-token/review.png
new file mode 100644
index 0000000000..2cc689fc3c
Binary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/review.png differ
diff --git a/docs/images/secret-rotations-v2/dbt-service-token/select-dbt-service-token.png b/docs/images/secret-rotations-v2/dbt-service-token/select-dbt-service-token.png
new file mode 100644
index 0000000000..2807ebf3d8
Binary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/select-dbt-service-token.png differ
diff --git a/docs/integrations/app-connections/dbt.mdx b/docs/integrations/app-connections/dbt.mdx
new file mode 100644
index 0000000000..c03a0f32a8
--- /dev/null
+++ b/docs/integrations/app-connections/dbt.mdx
@@ -0,0 +1,111 @@
+---
+title: "DBT Connection"
+description: "Learn how to configure a DBT Connection for Infisical."
+---
+
+Infisical supports the use of [Personal Access Tokens](https://docs.getdbt.com/docs/dbt-cloud-apis/user-tokens) to connect with DBT.
+
+## Create DBT Personal Access Token
+
+<Steps>
+ <Step title="Open DBT Account Settings">
+ On your DBT dashboard, press the organization name in the bottom left corner, and press **Account Settings**.
+
+ ![DBT Account Settings](/images/app-connections/dbt/account-settings.png)
+ </Step>
+ <Step title="Create Personal Access Token">
+ Click on the **Personal Access Tokens** tab and click **Create personal access token**.
+
+ ![Create Personal Access Token](/images/app-connections/dbt/create-token.png)
+ </Step>
+ <Step title="Enter Token Name">
+ Enter a descriptive name for the token and click **Save**.
+
+ ![Enter Token Name](/images/app-connections/dbt/token-details.png)
+ </Step>
+ <Step title="Copy Token">
+ Copy the token from the modal for later steps.
+
+ ![Copy Token](/images/app-connections/dbt/copy-token.png)
+ </Step>
+</Steps>
+
+## Create DBT Connection in Infisical
+
+<Tabs>
+ <Tab title="Infisical UI">
+ <Steps>
+ <Step title="Navigate to App Connections">
+ In your Infisical dashboard, navigate to the **App Connections** page in the desired project.
+
+ ![App Connections Tab](/images/app-connections/general/add-connection.png)
+ </Step>
+ <Step title="Select DBT Connection">
+ Click the **Add Connection** button and select **DBT** from the list of available connections.
+
+ ![Select DBT Connection](/images/app-connections/dbt/select-dbt-connection.png)
+ </Step>
+ <Step title="Fill out Connection Modal">
+ Complete the DBT Connection form by entering:
+ - A descriptive name for the connection
+ - An optional description for future reference
+ - Your DBT instance URL
+ - Your DBT account ID
+ - The Personal Access Token from earlier steps
+
+ ![Connection Modal](/images/app-connections/dbt/connection-modal.png)
+ </Step>
+ <Step title="Connection Created">
+ After clicking Create, your **DBT Connection** is established and ready to use with your Infisical project.
+
+ ![Connection Created](/images/app-connections/dbt/connection-created.png)
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="API">
+ To create a DBT Connection, make an API request to the [Create DBT Connection](/api-reference/endpoints/app-connections/dbt/create) API endpoint.
+
+ ### Sample request
+
+ ```bash Request
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/app-connections/dbt \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "my-dbt-connection",
+ "method": "api-token",
+ "projectId": "7ffbb072-2575-495a-b5b0-127f88caef78",
+ "credentials": {
+ "instanceUrl": "https://example.dbt.com",
+ "accountId": "<YOUR-ACCOUNT-ID>",
+ "apiToken": "<YOUR-API-TOKEN>"
+ }
+ }'
+ ```
+
+ ### Sample response
+
+ ```bash Response
+ {
+ "appConnection": {
+ "id": "e5d18aca-86f7-4026-a95e-efb8aeb0d8e6",
+ "name": "my-dbt-connection",
+ "projectId": "7ffbb072-2575-495a-b5b0-127f88caef78",
+ "description": null,
+ "version": 1,
+ "orgId": "6f03caa1-a5de-43ce-b127-95a145d3464c",
+ "createdAt": "2025-04-23T19:46:34.831Z",
+ "updatedAt": "2025-04-23T19:46:34.831Z",
+ "isPlatformManagedCredentials": false,
+ "credentialsHash": "7c2d371dec195f82a6a0d5b41c970a229cfcaf88e894a5b6395e2dbd0280661f",
+ "app": "dbt",
+ "method": "api-token",
+ "credentials": {
+ "instanceUrl": "https://example.dbt.com",
+ "accountId": "<YOUR-ACCOUNT-ID>"
+ }
+ }
+ }
+ ```
+ </Tab>
+</Tabs>
diff --git a/docs/snippets/AppConnectionsBrowser.jsx b/docs/snippets/AppConnectionsBrowser.jsx
index 0314b5ebfd..0fb173fdb8 100644
--- a/docs/snippets/AppConnectionsBrowser.jsx
+++ b/docs/snippets/AppConnectionsBrowser.jsx
@@ -147,6 +147,14 @@ export const AppConnectionsBrowser = () => {
"Learn how to connect your Heroku application to pull secrets from Infisical.",
category: "Hosting",
},
+ {
+ name: "DBT",
+ slug: "dbt",
+ path: "/integrations/app-connections/dbt",
+ description:
+ "Learn how to connect your DBT application to pull secrets from Infisical.",
+ category: "Data Analytics",
+ },
{
name: "DigitalOcean",
slug: "digital-ocean",
diff --git a/docs/snippets/RotationsBrowser.jsx b/docs/snippets/RotationsBrowser.jsx
index 6ef9082cfd..df3f757518 100644
--- a/docs/snippets/RotationsBrowser.jsx
+++ b/docs/snippets/RotationsBrowser.jsx
@@ -30,6 +30,13 @@ export const RotationsBrowser = () => {
"Learn how to automatically rotate Databricks service principal OAuth secrets.",
category: "Cloud Providers",
},
+ {
+ name: "DBT Service Token",
+ slug: "dbt-service-token",
+ path: "/documentation/platform/secret-rotation/dbt-service-token",
+ description: "Learn how to automatically rotate DBT service tokens.",
+ category: "Cloud Providers",
+ },
{
name: "Auth0 Client Secret",
slug: "auth0-client-secret",