Possibility to reference remote data sources? #405
Answered
by
anderseknert
manuschillerdev
asked this question in
OPA and Rego
-
I am wondering if it would be possible to reference remote data sources in rego rules - and if this would be desirable at all. Example: package example
import future.keywords
allow := true {
count(violation) == 0
}
violation[server.id] {
# hypothetical keyword "remote"
some server in remote "http://some-serivce.my-ns.svc.cluster.local/data-endpoint/public_servers" # returns a JSON-Reponse with an array
"http" in server.protocols # it contains the insecure "http" protocol.
} this obviously would have some things to consider like
Is this a thing in Rego? |
Beta Was this translation helpful? Give feedback.
Answered by
anderseknert
Apr 21, 2023
Replies: 1 comment 1 reply
-
Might be I don’t understand, but would the http.send builtin function be what you’re looking for? https://www.openpolicyagent.org/docs/latest/policy-reference/#http |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
manuschillerdev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Might be I don’t understand, but would the http.send builtin function be what you’re looking for?
https://www.openpolicyagent.org/docs/latest/policy-reference/#http