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
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.mdxnew file mode 100644index 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.mdxnew file mode 100644index 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.mdxnew file mode 100644index 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.mdxnew file mode 100644index 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.mdxnew file mode 100644index 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.mdxnew file mode 100644index 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.mdxnew file mode 100644index 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.jsonindex 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.mdxnew file mode 100644index 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.++ ++ 2. Select the **DBT Service Token** option.++ ++ 3. Configure the rotation behavior, then click **Next**.++ ++ - **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**.++ ++ 5. Specify the secret names that the service token should be mapped to. Then click **Next**.++ ++ - **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**.++ ++ - **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**.++ ++ 8. Your **DBT Service Token** credentials are now available for use via the mapped secrets.++ + </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.pngnew file mode 100644index 0000000000..74c0e30f93Binary files /dev/null and b/docs/images/app-connections/dbt/account-settings.png differdiff --git a/docs/images/app-connections/dbt/connection-created.png b/docs/images/app-connections/dbt/connection-created.pngnew file mode 100644index 0000000000..98f9dfa7eeBinary files /dev/null and b/docs/images/app-connections/dbt/connection-created.png differdiff --git a/docs/images/app-connections/dbt/connection-modal.png b/docs/images/app-connections/dbt/connection-modal.pngnew file mode 100644index 0000000000..6d2df8e230Binary files /dev/null and b/docs/images/app-connections/dbt/connection-modal.png differdiff --git a/docs/images/app-connections/dbt/copy-token.png b/docs/images/app-connections/dbt/copy-token.pngnew file mode 100644index 0000000000..65380f9803Binary files /dev/null and b/docs/images/app-connections/dbt/copy-token.png differdiff --git a/docs/images/app-connections/dbt/create-token.png b/docs/images/app-connections/dbt/create-token.pngnew file mode 100644index 0000000000..99fdfc0c2eBinary files /dev/null and b/docs/images/app-connections/dbt/create-token.png differdiff --git a/docs/images/app-connections/dbt/select-dbt-connection.png b/docs/images/app-connections/dbt/select-dbt-connection.pngnew file mode 100644index 0000000000..2d36c9dc61Binary files /dev/null and b/docs/images/app-connections/dbt/select-dbt-connection.png differdiff --git a/docs/images/app-connections/dbt/token-details.png b/docs/images/app-connections/dbt/token-details.pngnew file mode 100644index 0000000000..f913defe62Binary files /dev/null and b/docs/images/app-connections/dbt/token-details.png differdiff --git a/docs/images/secret-rotations-v2/dbt-service-token/configuration.png b/docs/images/secret-rotations-v2/dbt-service-token/configuration.pngnew file mode 100644index 0000000000..3bb4bf4ec8Binary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/configuration.png differdiff --git a/docs/images/secret-rotations-v2/dbt-service-token/created.png b/docs/images/secret-rotations-v2/dbt-service-token/created.pngnew file mode 100644index 0000000000..facfb008d1Binary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/created.png differdiff --git a/docs/images/secret-rotations-v2/dbt-service-token/details.png b/docs/images/secret-rotations-v2/dbt-service-token/details.pngnew file mode 100644index 0000000000..c8054562afBinary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/details.png differdiff --git a/docs/images/secret-rotations-v2/dbt-service-token/mappings.png b/docs/images/secret-rotations-v2/dbt-service-token/mappings.pngnew file mode 100644index 0000000000..5702ad0aebBinary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/mappings.png differdiff --git a/docs/images/secret-rotations-v2/dbt-service-token/parameters.png b/docs/images/secret-rotations-v2/dbt-service-token/parameters.pngnew file mode 100644index 0000000000..4ea7a3fdcfBinary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/parameters.png differdiff --git a/docs/images/secret-rotations-v2/dbt-service-token/review.png b/docs/images/secret-rotations-v2/dbt-service-token/review.pngnew file mode 100644index 0000000000..2cc689fc3cBinary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/review.png differdiff --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.pngnew file mode 100644index 0000000000..2807ebf3d8Binary files /dev/null and b/docs/images/secret-rotations-v2/dbt-service-token/select-dbt-service-token.png differdiff --git a/docs/integrations/app-connections/dbt.mdx b/docs/integrations/app-connections/dbt.mdxnew file mode 100644index 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**.++ + </Step>+ <Step title="Create Personal Access Token">+ Click on the **Personal Access Tokens** tab and click **Create personal access token**.++ + </Step>+ <Step title="Enter Token Name">+ Enter a descriptive name for the token and click **Save**.++ + </Step>+ <Step title="Copy Token">+ Copy the token from the modal for later steps.++ + </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.++ + </Step>+ <Step title="Select DBT Connection">+ Click the **Add Connection** button and select **DBT** from the list of available connections.++ + </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++ + </Step>+ <Step title="Connection Created">+ After clicking Create, your **DBT Connection** is established and ready to use with your Infisical project.++ + </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.jsxindex 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.jsxindex 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",