Repository navigation
Description
Summary
The recent discussion we had about OPA reminded me of a minor issue we noticed in our Concourse/OPA deployment.
I will try to prepare the PR to address this, but let's have it officially reported as an issue before.
Context:
When Concourse is integrated with Open Policy Agent (OPA), it sends request data to an external policy engine to authorize actions. This includes metadata about the action being performed, the pipeline involved, and the configuration data being submitted.
Currently, Concourse handles two primary actions for updating configurations:
SaveConfig: Triggered via fly set-pipeline.
SetPipeline: Triggered via the set_pipeline step within an existing pipeline (often used in "bootstrap" or "parent" pipeline patterns).
The Problem
There is an inconsistency in how the pipeline context is reported in the OPA request body between these two actions.
In SaveConfig, the pipeline field represents the pipeline being created or updated.
In SetPipeline, the pipeline field represents the calling pipeline (the one running the step), while the configuration in the data payload refers to the target pipeline.
This creates a limitation for fine-grained security policies. If a user wants to whitelist a specific task or resource within a specific target pipeline, they cannot do so uniquely because the request context doesn't explicitly distinguish the target pipeline name from the source. This forces policies to be overly broad (e.g., whitelisting a task name globally across all pipelines managed by a specific bootstrap pipeline).
Proposed Solution
Modify the Concourse OPA input payload for the SetPipeline action to include both the source (setter) and the target (being set).
I suggest adding a specific field to clarify the relationship. For example:
Current Payload Structure:
{
"action": "SetPipeline",
"pipeline": "parent-pipeline",
"data": { ... }
}Proposed Payload Structure:
{
"action": "SetPipeline",
"pipeline": "target-pipeline-name",
"origin_pipeline": "parent-pipeline",
"data": { ... }
}Steps to Reproduce
- Set up the Concourse with OPA
- Configure a pipeline with a set-pipeline task that sets another pipeline
- Inspect the payload OPA receives from Concourse.
Expected Results
The payload OPA receives from Concourse should include both parent pipeline name and the pipeline name we are trying to set. This allows to write the OPA rules that target the correct pipeline (the one we are trying to set) and not the parent pipeline.
Actual Results
Inspect the payload OPA receives from Concourse. At the moment, only the parent pipeline name is shown, not the actual pipeline we are trying to set.
Web Node(s) configuration
No response
Worker(s) configuration
No response
Concourse Version
7.14.3 (not applicable actually)
Browser (if applicable)
No response
Did this use to work?
No
Activity
Petahhh commentedon May 19, 2026
@taylorsilva Please assign me :) I've understood the requirements and am looking into a solution
taylorsilva commentedon May 19, 2026
Thanks Peter!
atc: behaviour: add origin_pipeline
update: OPA payload includes origin_pipeline
update: OPA payload includes origin_pipeline