Skip to content

Restricting profile access

Organization profiles can restrict access to specific Buildkite pipelines using claim-based matching. Match rules evaluate JWT claims from the Buildkite OIDC token against configured patterns, providing fine-grained access control.

See the organization profile reference for complete configuration details.

Pipelines ending in -release on the main branch can publish packages.

organization:
profiles:
- name: "release-publisher"
match:
- claim: pipeline_slug
valuePattern: ".*-release"
- claim: build_branch
value: "main"
repositories: [release-tools, shared-infra]
permissions: [contents:write, packages:write]

Add new release pipelines without updating profile configuration.

Only specific production pipelines on the main branch can deploy infrastructure.

organization:
profiles:
- name: "prod-deploy"
match:
- claim: pipeline_slug
valuePattern: "(silk|cotton)-prod"
- claim: build_branch
value: "main"
repositories: [infra]
permissions: [contents:write, deployments:write]

Enforce both pipeline and branch requirements in a single policy.

All pipelines have read access to shared utilities.

organization:
profiles:
- name: "shared-utilities"
# No `match` = available to all
repositories: [shared-utilities]
permissions: [contents:read]

Profiles without match rules work as before, available to any pipeline.

Use value for known strings. This is the fastest match type.

match:
- claim: pipeline_slug
value: "silk-prod" # Matches only "silk-prod"

Use valuePattern for flexible patterns. Supports RE2 regex syntax.

match:
- claim: pipeline_slug
valuePattern: ".*-release" # Matches any pipeline ending in "-release"

Patterns are automatically anchored to match the full string. Pattern prod matches only “prod”, not “not-prod”.

All conditions must match (AND logic).

match:
- claim: pipeline_slug
valuePattern: "silk-.*"
- claim: build_branch
value: "main"
# Both conditions required

Empty match array makes the profile available to all pipelines.

match: [] # Available to any pipeline

Match rules can evaluate the following JWT claims:

ClaimDescription
pipeline_slugPipeline’s slug
pipeline_idPipeline UUID
build_numberBuild number (as string)
build_branchGit branch name
build_tagGit tag (if present)
build_commitGit commit SHA
cluster_id, cluster_nameCluster identifiers
queue_id, queue_keyQueue identifiers
agent_tag:NAMEDynamic agent tags
sequence diagram showing organization profile token request with claim matching

When match conditions are not met, Chinmina returns 403 immediately after match evaluation, before any external API calls.

Pipeline doesn’t match profile conditions.

The HTTP response returns a generic “Forbidden” message. Check audit logs for attemptedPatterns to see which condition failed and the error field for detailed information. Verify the pipeline’s claim values match the configured patterns.

Profile returns 404 (unavailable: validation failed)

Section titled “Profile returns 404 (unavailable: validation failed)”

Profile failed validation at service startup.

Check service startup logs for validation warnings. Fix the invalid configuration (e.g., invalid regex pattern) and restart the service.

Pattern is overly permissive.

Review audit logs to identify unexpected matches. Make the pattern more specific. Patterns are automatically anchored, but .* can still match broadly.