Skip to main content

Create a Vibgrate Cloud Data Source with vg dsn create

Use vg dsn create to mint an HMAC-signed DSN token, store it as a secret, and pass it with --dsn to authenticate non-interactive dashboard uploads from CI.

Difficulty
Intermediate
Duration
15 minutes
Steps
5

Browser login is convenient at a desk, but CI cannot click a button. A DSN (data source name) is an HMAC-signed token that authenticates dashboard uploads non-interactively. vg dsn create generates one, which you then store as a secret and pass to pushes. This tutorial sets that up.

Prerequisites

  • The Vibgrate CLI installed (npm i -g @vibgrate/cli)
  • A Vibgrate Cloud workspace and permission to create data sources

Steps

1. Sign in to your workspace

vg login

You need to be signed in to generate a DSN for your workspace.

2. Create a DSN token

vg dsn create

This generates an HMAC-signed DSN token that authorizes dashboard uploads for your data source. Treat the output as a secret.

3. Store the DSN as a secret

Copy the generated token into your CI secret store (for example, a GitHub Actions secret named VIBGRATE_DSN). Never commit it to the repository.

4. Push using the DSN

In CI, pass the DSN with --dsn so the upload authenticates without a browser.

vg scan --push --dsn "$VIBGRATE_DSN"

This scans and uploads in one step, authenticated by the token.

5. Verify the authenticated upload

Check that the scan appears in Vibgrate Cloud under the expected repository and that the CI step exited 0.

Verification

A successful authenticated push exits 0 and produces a new dashboard entry. If you get an auth error, regenerate the token with vg dsn create and confirm the secret was stored correctly.

Next Steps

  • Wire the DSN into a scheduled job: "Schedule Recurring Drift Reporting".
  • Build trends from CI pushes: "Track Drift Trends Over Time in Vibgrate Cloud".

Prerequisites

  • Vibgrate CLI installed
  • A Vibgrate Cloud workspace
  • Permission to create data sources

Steps

  • 1
    Sign in to your workspace
  • 2
    Create a DSN token
  • 3
    Store the DSN as a secret
  • 4
    Push using the DSN
  • 5
    Verify the authenticated upload

Category

Vibgrate