opal icon indicating copy to clipboard operation
opal copied to clipboard

"detail": "policy repo was not found"

Open iduras3 opened this issue 1 year ago • 4 comments

The /policy returns : "detail": "policy repo was not found", when configured for Bundle API

To Reproduce OPAL_POLICY_BUNDLE_URL=... OPAL_POLICY_SOURCE_TYPE = API

Expected behavior /policy returns 200

OPAL version

  • Version: latest

iduras3 avatar Sep 21 '22 15:09 iduras3

hi @iduras3, can you please provide your full OPAL server API, this looks like a configuration issue. @obsd the feature owner will assist.

asafc avatar Oct 03 '22 20:10 asafc

These two were the only settings I used. Rest should be the default. The data used was the example data from opal, in a bundle. The log showed me the correct url of the bundle location. @obsd

iduras3 avatar Oct 04 '22 09:10 iduras3

@iduras3, I will check this, are you using our docker? If so, sharing it (without sensitive data) would help me reproduce.

obsd avatar Oct 06 '22 07:10 obsd

@obsd I tested it again, with following settings:

  {
    "name": "OPAL_DATA_CONFIG_SOURCES",
    "value": "{\"config\":{\"entries\":[{\"url\":\"http://localhost7002/policy-data\",\"topics\":[\"policy_data\"]}]}}",
  },
  {
    "name": "OPAL_POLICY_BUNDLE_URL",
    "value": "<api>",
  },
  {
    "name": "OPAL_POLICY_SOURCE_TYPE",
    "value": "API",
  },

It seems that error comes from the bundle. I created a bundle with the data.json and rbac.rego file from this repo using the opa build data.json rbac.rego command and run into that error.

It worked after using the bundle from this repo.

iduras3 avatar Oct 06 '22 13:10 iduras3

@iduras3 glad to hear that it worked

obsd avatar Oct 19 '22 13:10 obsd