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

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
月光博客
月光博客
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
Jina AI
Jina AI
小众软件
小众软件
U
Unit 42
云风的 BLOG
云风的 BLOG
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
宝玉的分享
宝玉的分享
B
Blog
C
Check Point Blog
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
量子位
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News
酷 壳 – CoolShell
酷 壳 – CoolShell

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 Buildkite
Alex Olivier · 2025-07-09 · via Cerbos - All Posts

This guide will help you set up a CI/CD pipeline in Buildkite to automatically upload your Cerbos policies to a Cerbos Hub store whenever you push changes to the main branch of your Git repository.

Prerequisites

  • A Buildkite account and a configured "Pipeline".
  • Your own "agent" running on a machine that has Docker installed.
  • 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: Configure Secrets on Your Agent Machine

Buildkite agents pull secrets from their environment. The simplest way is to define them directly on the agent machine.

  1. Log into the server where your Buildkite agent is running.
  2. Add your secrets to a system-wide environment file, like /etc/environment. Open it with a text editor (e.g., sudo nano /etc/environment) and add these lines:
CERBOS_HUB_CLIENT_ID="your-client-id-here"
CERBOS_HUB_CLIENT_SECRET="your-client-secret-here"
  1. Save the file and restart your Buildkite agent service for the changes to take effect (e.g., sudo systemctl restart buildkite-agent).

Step 2: Create the Pipeline File

  1. In your repository, create a directory named .buildkite.
  2. Inside .buildkite, create a file named pipeline.yml.
  3. Copy and paste the following code into it:
  4. Replace [STORE_ID] with the ID of your Cerbos Hub store. You can find this in the Cerbos Hub UI under the store settings.
# .buildkite/pipeline.yml
steps:
  - command: |
      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 "$PWD":/app \
        ghcr.io/cerbos/cerbosctl:latest \
        hub store replace-files /app --message="Policy upload from Buildkite"
    
    if: build.branch == 'main'
    label: "Upload Cerbos Policies"

Step 3: Commit and Push

  1. Commit the .buildkite/pipeline.yml file.
  2. Push your changes to the main branch.

Step 4: Verify the Run

  1. Go to your pipeline in the Buildkite dashboard.
  2. A new build will be triggered. Click on it to watch the "Upload Cerbos Policies" step execute on your agent.