Skip to content

Access authorisation

When a step asks for anything beyond reading, Oren asks before running:

write-report-sh requests access:
medium workspace directory write /work
critical docker engine/docker /var/run/docker.sock (from the implementation, not from the contract)
Grant 2 accesses to this step? [y/N]

Note the (from the implementation, not from the contract): that dependency is not required by the task — it is a choice made by whoever implemented it. Another implementation of the same contract may not need it.

In .oren/consent.json, and meant to be committed:

{
"version": 1,
"grants": {
"c887c99929c347fb": {
"task": "example/write-report@1.0.0",
"implementation": "example/write-report-sh@1.0.0",
"image": "docker.io/library/alpine@sha256:d9e853...",
"dependencies": [
{ "name": "workspace", "type": "directory", "privilege": "medium" }
]
}
}
}

Committed, the whole team inherits the decision — and a privilege escalation shows up as a diff in code review. Reviewing privilege stops being a prompt somebody accepts without reading and becomes part of the flow that already exists.

The key covers the worker’s identity and the set of dependencies. Any of these requires a new authorisation:

  • a different image (by digest, not by tag)
  • a new dependency
  • a directory that became mutable

Because the identity comes from oren.lock, republishing a tag with different content does not inherit the previous authorisation.

Terminal window
oren authorize entrega --properties main

It resolves the pipeline, shows what each step asks for, asks, and records — and runs nothing. No container starts.

This is the command to use before the first CI run. The alternative would be “run the pipeline locally once”, which for a delivery pipeline means building, publishing, deploying and committing — a production deploy from your machine, to record an authorisation.

It asks, so it needs a terminal: it does not work with redirected stdin, nor inside a CI job.

With no terminal and no recorded authorisation, the pipeline fails:

error Step "report" requires authorisation and there is no interactive terminal
Run the pipeline locally once to authorise, and commit the file
.oren/consent.json, or pass --yes to authorise without asking.

New privilege is not granted on its own. --yes exists, but it is an explicit decision of yours — and in CI it is worth little: consent.json does not come back from the runner, so every run re-authorises and the record stops meaning anything.

The path that works is oren authorize on your machine, with .oren/consent.json committed together with oren.lock and .oren/registry/. The three describe the same decision: a lock pointing at an image the consent never authorised leaves CI stopped, asking.

A low-privilege dependency — a read-only directory — does not ask. Too much ceremony is what makes the mechanism stop being read.