Skip to content

OPAL's bundle path has no signature verification - does a signed-bundle fetcher fit? #940

Description

@LNSHRIVAS

OPAL's bundle path has no signature verification

I've been reading the policy bundle code path and wanted to flag something I found, then check whether a contribution would fit.

bundle_utils.py sorts policy and data modules by the manifest, but there is no signature verification anywhere in the bundle path. The PolicyBundle schema carries manifest, hash, and old_hash - no signature field - and PolicyFetcher pulls from the OPAL server's /policy endpoint with an auth token. The HttpFetchProvider can fetch an arbitrary URL, but it hands back the raw response without verifying it.

Proposed design

A fetcher that takes a signed OPA bundle (a tarball with a .signatures.json):

  1. Fetch the bundle from a configured URL
  2. Verify the RS256 signature against a configured public key (out-of-band, not from the same server)
  3. Extract the data files as JsonableValue for OPAL's data path, leaving Rego to the existing policy channel

Question

Would this fit as a community fetcher, or would you prefer signature verification inside OPAL's own bundle path instead? Happy to build either way.

As a test fixture, there's a signed bundle already published at stigmer.network/opa/bundle.tar.gz (RS256, public key at /opa/signing.pub) that a fetcher can be pointed at to verify the flow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions