Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 2.2 KB

File metadata and controls

73 lines (48 loc) · 2.2 KB

Snyk Broker for Azure DevOps

This guide provides the complete workflow for deploying the Snyk Universal Broker to connect to Azure DevOps.

Part 1: Configure the Snyk Backend for Azure DevOps

Prerequisites for Azure DevOps

  • A Snyk Enterprise plan with Tenant Admin permissions.
  • Node.js and npm installed locally.
  • An Azure DevOps Personal Access Token (PAT) with Code (Read & write), Build (Read), and Project and Team (Read) scopes.
  • Helm v3 installed if you plan to deploy to Kubernetes.

Step 1: Install the CLI Tool and Authenticate for Azure DevOps

Install the latest version of the Snyk configuration tool.

npm install -g @snyk-broker-config

Authenticate the CLI with your Snyk account.

snyk auth

Step 2: Run the Connection Creation Workflow for Azure DevOps

This command starts the wizard. You will define the name of the environment variable that will hold your PAT.

snyk-broker-config workflows connections create

Follow the prompts from the wizard:

  1. When asked for the connection type, select azure-devops.
  2. When prompted to create a credential reference, give it the name AZURE_DEVOPS_TOKEN.
  3. Provide your Azure DevOps Organization URL when asked.

At the end of the workflow, the wizard will output the client's identity credential.

  • CLIENT_ID
  • CLIENT_SECRET
  • DEPLOYMENT_ID

Part 2: Deploy the Broker Client for Azure DevOps

Run the Broker client, injecting your Azure DevOps PAT into an environment variable that matches the credential reference name.

Deploy with Helm

Add the Snyk Helm Repository:

helm repo add snyk-universal-broker https://snyk.github.io/snyk-universal-broker-helm
helm repo update

Install the Helm Chart:

The credentialReferences.AZURE_DEVOPS_TOKEN key tells Helm to create the AZURE_DEVOPS_TOKEN environment variable in the pod.

helm install snyk-broker snyk-universal-broker/snyk-universal-broker \
  --namespace snyk-broker --create-namespace \
  --set snyk.clientID='<YOUR_CLIENT_ID>' \
  --set snyk.clientSecret='<YOUR_CLIENT_SECRET>' \
  --set snyk.deploymentID='<YOUR_DEPLOYMENT_ID>' \
  --set credentialReferences.AZURE_DEVOPS_TOKEN='<YOUR_ACTUAL_AZURE_PAT>'