open-policy-agent / contrib

Integrations, examples, and proof-of-concepts that are not part of OPA proper.

Home Page:http://www.openpolicyagent.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does exist an example to generate on fly a bundle.tar.gz?

jabrena opened this issue · comments

HI,

Reading the documentation, exist a section to define bundles:
https://www.openpolicyagent.org/docs/latest/configuration/

bundles:
  authz:
    service: acmecorp
    resource: bundles/http/example/authz.tar.gz
    polling:
      min_delay_seconds: 60
      max_delay_seconds: 120
    signing:
      keyid: global_key
      scope: write

https://www.openpolicyagent.org/docs/v0.12.2/bundles/

$ tar tzf bundle.tar.gz
.manifest
roles
roles/bindings
roles/bindings/data.json
roles/permissions
roles/permissions/data.json
http
http/example
http/example/authz
http/example/authz/authz.rego

I would like to know if exist an example generating a bundle.tar.gz on fly to be consumed by Open Policy Agent

@jabrena bundles are just gzipped tarballs so you can easily create one using tar. You can also create one using the opa build command that was added in v0.20.0.