Mitch
05/08/2024, 9:54 PMmore than one YAML document detected
error when running tests with cerbos?Mitch
05/08/2024, 9:58 PMDennis (Cerbos)
Andrew Haines (Cerbos)
Mitch
05/09/2024, 1:47 PMMitch
05/09/2024, 1:49 PMScopes
is that you need to define a policy with the assigned scope if you wanted different rules for that scope. You'll see here, I have three policies for taskResource
. The empty scope is taskResource.yaml
, the exec
scope is the taskResource_exec.yaml
file and the exec.manager
scope is the taskResource_manager.yaml
file.
Something with the taskResource_manager.yaml
file is causing the error to pop up because it goes away if I comment out the contents of that file.Mitch
05/09/2024, 1:49 PMAndrew Haines (Cerbos)
taskResource_manager.yaml
- due to the bug I linked, unfortunately sometimes the parser reports more than one YAML document detected
when the issue is actually something differentMitch
05/09/2024, 1:51 PMMitch
05/09/2024, 1:56 PMAndrew Haines (Cerbos)
expr: >
some complicated expression
The block scalar syntax >
helps avoid issues with YAML special charactersMitch
05/09/2024, 2:01 PMexpr: >
(
Condition A &&
Condition B
)
and I think the indentation was causing issues. I consolidated the same logic to get rid of the weird indentation with the parenthesis and it works now.Andrew Haines (Cerbos)
more than one YAML document detected
error in the current release. I've raised a new issue: https://github.com/cerbos/cerbos/issues/2146