Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

I'm working on a Rego/OPA policy, specifically for checking azure resources diagnostic settings compliant based on specified parameters. However, I'm having several issues when trying to compile my ...
delucaezequiel's user avatar
0 votes
1 answer
123 views

The OPA WASM documentation mentions that built-in functions like http.send are not natively supported by WASM. However, I was able to successfully compile and evaluate WASM modules from Rego policies ...
Tarang's user avatar
  • 1
0 votes
1 answer
64 views

I'm trying to get a simple expansion of some relations using Rego's graph.reachable. For some reason this isn't printing leaf nodes and I've not yet figured out why. inherits_from[role_id] contains ...
Philip Couling's user avatar
1 vote
0 answers
96 views

In the project I'm working on, we're getting OPA failures because our policy checks for tags on resources, but some resources do not allow tags, such as SNS. Is it possible to write a policy that can ...
Wilveren's user avatar
2 votes
0 answers
68 views

I have the following dummy Rego policy is_permitted if { owner := dataowner.resources[input.resource][input.resource_id].owner permitted_members := data.owners[owner].permissions[input....
shays10's user avatar
  • 539
0 votes
1 answer
492 views

I have the following rego: retry_count_key := "retry" get_retries_count(str) := {x | some i parts := split(str[i], ":") parts[0] == retry_count_key x := to_number(...
Joey Stout's user avatar
1 vote
1 answer
125 views

I whish to combine two arrays of Boolean value using AND. For example: a1 := [true, true, false], a2 := [false, true, false]. the resulting AND operation: a3 = a1 AND a2 would be [false, true, false]
PsychicPuppy's user avatar
0 votes
1 answer
789 views

I am new to OPA rule engine and have tried a few things out, I am unable to write a nested if in opa rule engine like output := someValue if { someValue := someOtherValue if { } } I know ...
Rohit Soni's user avatar
1 vote
1 answer
249 views

In rego, I want to convert this: d := {"a": "aye", "B": "bEe"} to: l := {"a": "aye", "b": "bEe"} where the keys are ...
theherk's user avatar
  • 7,617
0 votes
1 answer
76 views

I am new to OPA and have tried a lot to get this result: I want OPA to only allow access to /index. I am working on minikube with docker installed and I have a mciroservice as webserver. But the ...
Andrea's user avatar
  • 11
0 votes
1 answer
107 views

I followed all these steps here: https://istio.io/latest/docs/setup/getting-started/ And then all steps for the Opa-Istio-Tutorial here: https://www.openpolicyagent.org/docs/envoy/tutorial-istio I don'...
Andrea's user avatar
  • 11
0 votes
1 answer
780 views

I am very new to OPA but testing something very simple. I would like to create a policy to ensure my s3 is not public. my simple TF file: terraform { required_providers { aws = { source = ...
Tate_87's user avatar
  • 161
0 votes
1 answer
131 views

I have the following Rego policy: package authz import future.keywords.in # The permissions the user has for each property permissions[property_id][permission] { some property_id, property_roles ...
dario's user avatar
  • 5,279
2 votes
1 answer
205 views

I have the following helper function in a test of my OPA policy. I would like to make it more generic and return the resource with the commonName field only if cn is not empty. Any ideas on how I can ...
Erkan's user avatar
  • 163
1 vote
1 answer
701 views

I created a Rego Policy but I would like to hide some of the objects from the output of the Rego. Lets take this simple Rego as an example. package cats default cats := false cats{ input.cat == ...
Matwo's user avatar
  • 11
0 votes
2 answers
1k views

How can I merge the values of an object in rego (set type) into a single set containing all the object values ? This is my input object : input_data = { "1": { "bob": {"...
navi's user avatar
  • 1
1 vote
0 answers
275 views

I am trying to validate some policies using the /opa/rego package. The policies are evaluated as expected in this script. But, I also want to count the number of rules and the rule names evaluated as ...
santoshdts's user avatar
0 votes
1 answer
283 views

I got data something like this: { "TENANT1":{ <-- Multiple tenants "SITE1":{ <-- Every tenant can have multiple sites "SITE1_DEVICE1":[ <-- Every ...
Martin Hoang's user avatar
1 vote
1 answer
631 views

While I was trying to compile the code, getting below error. I have imported "github.com/open-policy-agent/opa/rego" but still getting the error. -bash-4.2$ go build main.go # command-line-...
van neilsen's user avatar
3 votes
1 answer
1k views

According to the Open Policy Agent documentation, in Rego, every evaluates either to true or undefined. Why not true or false? What is it about Rego that suggests false is the wrong value? By ...
Old Pro's user avatar
  • 25.8k
2 votes
2 answers
4k views

I have a simple rego file like this: package example default isApplicable := false isApplicable if { timeNow := time.now_ns() timeNow >= input.startDatetime } and I keep getting parse ...
rsc's user avatar
  • 10.7k
0 votes
1 answer
296 views

I have an array as defined below ["dev=devA", "instance=instanceA", "domain=domainA", "namespace=namespaceA", "...
raj ramalingam's user avatar
1 vote
3 answers
922 views

I am still in the testing phase and would like to allow merging of my PR even if the policy_check is FAIlING. What flag I can pass to enable that ? My current config: repos: - id: /.*/ ...
chan214's user avatar
  • 31
0 votes
1 answer
474 views

I have a rule that I expect to be reused by a variety of modules. I figured, let's turn that into a function, have the modules pass their input into a function and use a set comprehension like ...
Szymon Rozga's user avatar
  • 18.2k
0 votes
1 answer
2k views

I'm experimenting with OPA and securing HTTP REST API. I want to implement ABAC authorization. My question is if it's possible to create rules in such a way that only those relevant to the request ...
goatrenz's user avatar