<@U08614ZV82F> I have an opal server to read polic...
# opal
v
@Ask Inkeep I have an opal server to read policies from the github branch from the
policies
folder I am trying to use the
.manifest
in the root folder to specify which libraries I want to load. The directory structure is like this:
Copy code
policies
│   ├── .manifest
│   ├── dir1
│   │   ├── .manifest
│   │   └── authz
│   │       └── policy.rego
│   ├── dir2
│   │   ├── .manifest
│   │   └── authz
│   │       └── policy.rego
│   └── library
│       └── utils
│           ├── .manifest
│           └── policy.rego
The root
.manifest
contents:
Copy code
dir1/
dir2/
In each dir the
.manifest
is the same:
Copy code
../library/utils/policy.rego
authz/policy.rego
On the server I am getting warnings:
Copy code
2026-08-20T20:49:16.204656+0000 | opal_common.git_utils.bundle_maker      |WARNING |   Path 'policies/dir1/../library/utils/policy.rego' is outside current .manifest directory
2026-08-20T20:49:16.213027+0000 | opal_common.git_utils.bundle_maker      |WARNING |   Path 'policies/dir2/../library/utils/policy.rego' is outside current .manifest directory
Can't I reference rego policies outside of the current tree?
a
Thanks for tagging me @Vitaly Orbidan. I'll look through relevant sources and get back to you shortly.
Based on how
.manifest
files work, each
.manifest
file's paths must be relative to that manifest's own location, and are meant to reference files within that directory tree — either policy/data files or subfolders containing another
.manifest
to be loaded recursively (1) . The documented format states each line should contain a path that is either a policy/data file or a folder containing another
.manifest
, listed in the order you want them loaded into OPA . The sources don't document support for
../
traversal outside a manifest's own directory tree, which lines up with the warning you're seeing — the bundle maker is telling you that
policies/dir1/../library/utils/policy.rego
resolves to a path outside the
dir1
manifest's own directory scope . For your shared
library/utils/policy.rego
, a documented alternative is to point
OPAL_POLICY_REPO_MANIFEST_PATH
at a different manifest location, or rely on the default alphabetical loading order if you omit manifests altogether . Since your case involves module dependencies (
utils.rego
needing to load before
policy.rego
) , the documented pattern is to place the shared/dependency file so its manifest lists it before the dependent file within the same manifest scope — as shown in the example where
utils.rego
appears before
rbac.rego
in a single manifest because
rbac.rego
imports it . If you want to confirm whether cross-directory references are supported at all, or if this is a known limitation, I'd want more detail: 1. Which Workspace / Project / Env are you using 2. The exact OPAL server config/CURL calls you're using to fetch the bundle 3. Your OPAL server version 4. The full server logs around the bundle build (not just the warning lines) That'll help pin down whether this is expected behavior or something worth deeper investigation.
To learn more, see the sources I considered: [[1] Track a Git Repo | OPAL](https://docs.opal.ac/tutorials/track_a_git_repo)
Thanks for the feedback, glad I was helpful.
d
Hi @Vitaly Orbidan the agent gave a nice answer. Let me know if you have any other questions 🙂