惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
大猫的无限游戏
大猫的无限游戏
B
Blog
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
Jina AI
Jina AI
博客园 - 聂微东
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
L
LangChain Blog
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
腾讯CDC
酷 壳 – CoolShell
酷 壳 – CoolShell
Y
Y Combinator Blog
F
Fortinet All Blogs
H
Help Net Security
B
Blog RSS Feed
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
S
SegmentFault 最新的问题

Cerbos - All Posts

Authentik vs Keycloak: Self-hosted IdP comparison Mapping business requirements to authorization policy for automotive Fine-grained authorization for AI gateways EIC 2026: Stop counting agents, protect what they can touch Agent skill for writing authorization policies in Claude Desktop Identity security in 2026 EIC 2026 takeaways: the identity stack built for humans will not hold up for AI agents Already have authentication? Here's the authorization layer you still need. Tokens are authorization decisions: a guide to policy-driven token issuance What is a Runtime Authorization Platform It's a dimmer switch, not a kill switch. How CISOs are rethinking AI agent governance From maps to bitmaps (and from bitmaps to bitmaps) AuthZEN, Shared Signals, SCIM Events, IPSIE: Notes from the OpenID Enterprise Panel How do you update authorization policies without redeploying your application? IIW42 recap: Where agent authorization got real Cerbos PDP v0.52.0/v0.53.0: Engine performance, security hardening, and CEL path functions Authorization Management Platforms: what they do, how they work, and where they fit PocketOS AI coding agent deleted a production database in 9 seconds Non-Human Identity management still has a blind spot Supabase alternative in 2026: Best open source auth options Benefits of on-premise authorization: Why enterprises are moving toward self-hosted Authorization policies: How to write, test, and validate them (faster with AI) Agent skill for writing authorization policies How much does it cost to build authorization in-house? Why centralized authorization governance reduces incident response time OPA alternative Why AI agents make authorization a right now problem Modernizing legacy application authorization: why it’s your biggest security blind spot How to add authorization to legacy applications without code changes 5 authorization blind spots auditors find, and how to fix them
Automating Cerbos Policy deployments with Azure DevOps Pi...
Alex Olivier · 2025-07-09 · via Cerbos - All Posts

This guide shows you how to set up an Azure DevOps Pipeline to automatically upload your Cerbos policies to a Cerbos Hub store whenever you push changes to the main branch of your repository.

Prerequisites

  • An Azure DevOps organization and a Project.
  • Your policies is hosted in a repository (either Azure Repos or linked from GitHub, Bitbucket).
  • The ID of your Cerbos Hub store, which you can find in the store section of the Cerbos Hub.
  • Your CERBOS_HUB_CLIENT_ID and CERBOS_HUB_CLIENT_SECRET values generated in the Client credentials section of the Cerbos Hub store. Make sure to select the Read & Write option when creating the credentials to allow uploading policies.

Step 1: Create the Pipeline YAML File

. In the root directory of your repository, create a new file named azure-pipelines.yml. . Copy and paste the following code into the file. This code defines the trigger, the agent environment, and the steps to run. . Replace [STORE_ID] with the ID of your Cerbos Hub store. You can find this in the Cerbos Hub UI under the store settings.

----
# azure-pipelines.yml
trigger:
  branches:
    include:
      - main # This pipeline runs on pushes to the main branch

pool:
  vmImage: 'ubuntu-latest' # Use a Microsoft-hosted Linux agent

jobs:
- job: UploadCerbosPolicies
  displayName: 'Upload Cerbos Policies'
  steps:
    # Step 1: Check out the source code from the repository
    - checkout: self

    # Step 2: Run the docker command to upload policies
    - script: |
        docker run --rm \
          -e CERBOS_HUB_STORE_ID="[STORE_ID]" \
          -e CERBOS_HUB_CLIENT_ID=$CERBOS_HUB_CLIENT_ID \
          -e CERBOS_HUB_CLIENT_SECRET=$CERBOS_HUB_CLIENT_SECRET \
          -v "$(System.DefaultWorkingDirectory)":/app \
          ghcr.io/cerbos/cerbosctl:latest \
          hub store replace-files /app --message="Policy upload from Azure DevOps"
      displayName: 'Upload Policies to Cerbos Hub'
      env:
        # Map the secret variables created in the UI to environment variables for this script
        CERBOS_HUB_CLIENT_ID: $(CERBOS_HUB_CLIENT_ID)
        CERBOS_HUB_CLIENT_SECRET: $(CERBOS_HUB_CLIENT_SECRET)

Key Azure DevOps Concepts Used:

  • trigger: Defines when the pipeline runs, equivalent to on: in GitHub Actions.
  • pool: Specifies the type of build agent to use, equivalent to runs-on.
  • job and steps: Structure the work to be done.
  • checkout: self: The task to get your source code.
  • script: A simple task to run a shell script.
  • $(System.DefaultWorkingDirectory): The predefined variable for the checkout directory, like $PWD or $CI_PROJECT_DIR.
  • env:: The section where you map pipeline variables to environment variables for the script, note the $(VariableName) syntax.

Step 2: Create the Pipeline in Azure DevOps

  • Go to your Azure DevOps project. In the left sidebar, click on Pipelines.
  • Click the New pipeline button (or Create pipeline if it is your first one).
  • Where is your code? Select the correct location, for example, Azure Repos Git, GitHub. You may need to authorize access.
  • Select a repository: Choose the repository where you just added the azure-pipelines.yml file.
  • Configure your pipeline: Azure DevOps detects your YAML file. Select Existing Azure Pipelines YAML file.
  • Select the branch, for example, main and the path, /azure-pipelines.yml, then click Continue.

Step 3: Add Your Secrets

  • You now see the YAML file in the pipeline editor view. Do not run it yet.
  • In the top right corner, click the Variables button.
  • Click New variable -- Name: CERBOS_HUB_CLIENT_ID -- Value: Paste your client ID.
  • Check the box for Keep this value secret.
  • Click OK.
  • Click New variable again. -- Name: CERBOS_HUB_CLIENT_SECRET -- Value: Paste your client secret.
  • Check the box for Keep this value secret.
  • Click OK.
  • Click the Save button at the bottom of the variables pane.

Step 4: Save and Run the Pipeline

  • Now that the secrets are saved, click the Save and run button, or just Run, in the top right corner.
  • Confirm the branch and commit message, and click Save and run again.

Step 5: Verify the Run

  • You are taken to the pipeline run summary page.
  • Click on the Upload Cerbos Policies job to see the live logs.
  • If everything is configured correctly, all steps complete with a green checkmark, and your policies are uploaded to Cerbos Hub.