Ad
 
Learn More

Bundle root is the Important line in OPA v1.23.0

OPA v1.23.0 makes the directory holding .manifest the bundle root. Hand-made tarballs with a nested .manifest are rejected, older signatures must be redone, and the MySQL Compile API target now refuses startswith, endswith and contains.

Written by Watch Changelog Team

•3 min read

Bundle root is the OPA line

Open Policy Agent shipped v1.23.0 on November 26, and we flagged it as Important on Open Policy Agent. The headline is a new Solr target for the Compile API, but the line that matters is a breaking change to what counts as the root of a bundle. If you sign, build or load bundles from disk, this release can change what OPA loads or reject it outright.

Until now the bundle root depended on the path you typed. OPA now treats the directory that holds the .manifest file as the root, the way the bundle documentation always described it. Directories passed to opa build -b, opa run -b, opa eval -b and opa sign --bundle are rooted at the .manifest, even when it sits below the path you gave, and files above it are not part of the bundle. opa build and opa sign warn about files they leave out. The other commands do not, so a stray .manifest in a test fixture folder can quietly shrink a bundle.

The tarball case is the one that will bite. A bundle built by hand with tar, with .manifest under a bundle/ prefix, used to load with data.json placed under data.bundle. It is now rejected because .manifest must sit at the root of the archive. opa build always writes it there, so bundles made by opa build are fine.

Signatures change too. File names in .signatures.json are now relative to the bundle root, with / separators on every platform. Bundles signed by opa sign or opa build -b on an older OPA must be re-signed, and any --exclude-files-verify patterns may need updating. If you merge several bundles with opa build, each one's files now land under the path given to -b with a new .manifest at the top, and signatures from the separate sources cannot verify the merged output.

The release notes include one softer landing. Bundles the bundle plugin downloads over HTTP or from an OCI registry, and their persisted copies, still load the old way, but OPA logs a warning each time a bundle with a misplaced .manifest, .signatures.json or patch.json is loaded. Those bundles will fail to load in a future release. Go users of the bundle.Reader API should also know that directory loaders using the SlashRooted or Passthrough path formats now have their manifests rejected, and custom loaders that wrap a directory loader should forward RootOffset.

There is a second breaking change for anyone using the Compile API to filter data in MySQL. The MySQL target now rejects startswith, endswith and contains. They were translated to LIKE, which is case and accent insensitive in MySQL's default collations, so startswith on APP also matched apple. Policies that use them now fail to compile for the MySQL target and for multitarget requests that include it. That is a correctness fix, but it turns a silent over-match into a build failure, so find it in CI before production does.

What I would do: before bumping, run opa build on a copy of each bundle with v1.23.0 and read the warnings about omitted files. Search your repos for hand-made tarballs and for extra .manifest files under bundle directories. Re-sign any signed bundles built with an older OPA and check your exclude patterns. Grep the policies behind MySQL filtering for startswith, endswith and contains. Then watch the logs of any running OPA for the misplaced-manifest warning, since that is your deadline for the HTTP and OCI bundles. If you use none of this, the release is mostly additive. The rest of the day's flagged changes are on /sources/important.

Official sources: OPA v1.23.0 release notes and the bundle file format documentation.

Ad
Favicon