zalando / skipper

An HTTP router and reverse proxy for service composition, including use cases like Kubernetes Ingress
https://opensource.zalando.com/skipper/
Other
3.12k stars 351 forks source link

OPA: Enable support for print() from Reno #3304

Open mjungsbluth opened 3 weeks ago

mjungsbluth commented 3 weeks ago

Is your feature request related to a problem? Please describe. OPA allows to print() information from within the policy. This can be helpful to for example output conditions that led to a token being invalid and can cut down debugging times considerably.

Describe the solution you would like Since we already have support for sending open tracing Spans for the OPA filters, it would be helpful to include the print() output that happened as part of an evaluation in the Span's events via the LogKV method.

Describe alternatives you've considered (optional) The envoy plugin logs the print output which looses context to the decision made.

Additional context (optional) This requires an upgrade to OPA v0.70 as the corresponding envoy plugin was changed to allow configuring a print hook. There is a test that demonstrates using such a hook.

Would you like to work on it? Yes