Skip to content

feat: dbt app connection & service token secret rotation#5307

Merged
varonix0 merged 14 commits intomainfrom
daniel/dbt-rotation
Feb 3, 2026
Merged

feat: dbt app connection & service token secret rotation#5307
varonix0 merged 14 commits intomainfrom
daniel/dbt-rotation

Conversation

@varonix0
Copy link
Member

Context

App connection and secret rotation for https://www.getdbt.com

Type

  • Fix
  • Feature
  • Improvement
  • Breaking
  • Docs
  • Chore

Checklist

  • Title follows the conventional commit format: type(scope): short description (scope is optional, e.g., fix: prevent crash on sync or fix(api): handle null response).
  • Tested locally
  • Updated docs (if needed)
  • Read the contributing guide

@varonix0 varonix0 changed the title feat: DBT app connection & service token secret rotation feat: dbt app connection & service token secret rotation Jan 28, 2026
@maidul98
Copy link
Collaborator

maidul98 commented Jan 28, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@varonix0
Copy link
Member Author

@greptile review this

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 28, 2026

Greptile Overview

Greptile Summary

Adds dbt Cloud app connection and service token rotation capabilities. The implementation includes:

  • App Connection: Allows users to configure dbt Cloud connections using API tokens with instance URL, account ID, and API token validation
  • Secret Rotation: Implements automated rotation of dbt service tokens with configurable permission grants at the account or project level
  • Security: Properly validates and sanitizes URLs to prevent SSRF attacks via blockLocalAndPrivateIpAddresses, uses zod schemas for input validation
  • API: RESTful endpoints with JWT authentication and rate limiting
  • Documentation: Includes comprehensive docs for both app connections and secret rotation

The feature enables users to securely manage dbt Cloud credentials and automate token rotation with fine-grained permissions.

Confidence Score: 5/5

  • Safe to merge with minimal risk - solid implementation with proper security controls
  • Implementation follows security best practices: SSRF protection via blockLocalAndPrivateIpAddresses, proper input validation with zod schemas, no regex vulnerabilities, no SQL joins, comprehensive error handling, and complete documentation
  • No files require special attention

Important Files Changed

Filename Overview
backend/src/services/app-connection/dbt/dbt-connection-fns.ts Adds dbt connection validation with proper URL sanitization and SSRF protection
backend/src/ee/services/secret-rotation-v2/dbt-service-token/dbt-service-token-rotation-fns.ts Implements token rotation logic with proper credential cleanup and error handling
backend/src/services/app-connection/dbt/dbt-connection-schemas.ts Defines zod validation schemas for dbt connection with proper input constraints
backend/src/server/routes/v1/app-connection-routers/dbt-connection-router.ts REST endpoints for dbt connections with JWT auth and rate limiting
backend/src/ee/services/secret-rotation-v2/dbt-service-token/dbt-service-token-rotation-schemas.ts Zod schemas for dbt service token rotation parameters and validation

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Co-authored-by: Victor Hugo dos Santos <115753265+victorvhs017@users.noreply.github.com>
Copy link
Contributor

@victorvhs017 victorvhs017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All tested and looking good!

@varonix0 varonix0 merged commit 22ea87e into main Feb 3, 2026
5 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants