chore(deps): update dependency open-policy-agent/opa to v0.45.0 (opa/dockerfile) (master) #578
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.44.0->0.45.0⚠ Dependency Lookup Warnings ⚠
Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.
Release Notes
open-policy-agent/opa
v0.45.0Compare Source
This release contains a mix of bugfixes, optimizations, and new features.
Improved Decision Logging with
nd_builtin_cacheOPA has several non-deterministic built-ins, such as
rand.intnandhttp.sendthat can make debugging policies from decision log resultsa surprisingly tricky and involved process. To improve the situation
around debugging policies that use those built-ins, OPA now provides
an opt-in system for caching the inputs and outputs of these built-ins
during policy evaluation, and can include this information in decision
log entries.
A new top-level config key is used to enable the non-deterministic
builtin caching feature, as shown below:
This data is exposed to OPA's decision log masking system
under the
/nd_builtin_cachepath, which allows masking or droppingsensitive values from decision logs selectively. This can be useful
in situations where only some information about a non-deterministic
built-in was needed, or the arguments to the built-in involved
sensitive data.
To prevent unexpected decision log size growth from non-deterministic
built-ins like
http.send, the new cache information is included indecision logs on a best-effort basis. If a decision log event exceeds
the
decision_logs.reporting.upload_size_limit_byteslimit for an OPAinstance, OPA will reattempt uploading it, after dropping the non-
deterministic builtin cache information from the event. This behavior
will trigger a log error when it happens, and will increment the
decision_logs_nd_builtin_cache_droppedmetrics counter, so that itwill be possible to debug cases where the cache information is unexpectedly
missing from a decision log entry.
Decision Logging Example
To observe the change in decision logging we can run OPA in server mode
with
nd_builtin_cacheenabled:After sending it the query
x := rand.intn("a", 15)we should seesomething like the following in the decision logs:
The new information is included under the optional
nd_builtin_cacheJSON key, and shows what arguments were provided for each unique
invocation of
rand.intn, as well as what the output of that builtincall was (in this case,
3).If we sent the query
x := rand.intn("a", 15); y := rand.intn("b", 150)"we can see how unique input arguments get recorded in the cache:
With this information, it's now easier to debug exactly why a particular
rule is used or why a rule fails when non-deterministic builtins are used in
a policy.
New Built-in Function:
regex.replaceThis release introduces a new builtin for regex-based search/replace on
strings:
regex.replace.See the built-in functions docs for all the details
This implementation fixes #5162 and was authored by @boranx.
object.union_nOptimizationThe
object.union_nbuiltin allows easily merging together an array of Objects.Unfortunately, as noted in #4985
its implementation generated unnecessary intermediate copies from doing
pairwise, recursive Object merges. These pairwise merges resulted in poor
performance for large inputs; in many cases worse than writing the
equivalent operation in pure Rego.
This release changes the
object.union_nbuiltin's implementation to usea more efficient merge algorithm that respects the original implementation's
sequential, left-to-right merging semantics. The
object.union_nbuiltinnow provides a 2-3x improvement in speed and memory efficiency over the pure
Rego equivalent.
Tooling, SDK, and Runtime
internal/irpackage public asir.Rego
SetAllowNet. (#5187) authored and reported by @liamgwithclauses. (#5148) authored and reported by @liu-duTopdown
object.union_nto use in-place merge algorithm. (reported by @charlesdaniels)expandnbffields are numbers when present. (#5165) authored and reported by @charlieflowersInterQueryCacheonly dropping one entry when over the size limit. (authored by @vinhph0906)json.filteron empty JSON paths.intersectionbuiltin tests.Documentation
#developmentto#contributors. (authored by @charlieflowers)Website + Ecosystem
Miscellaneous
ci: Add
prealloclinter check and linter fixes.ci: Add govulncheck to Nightly CI.
build/wasm: Use golang1.16
go:embedmechanism.util/backoff: Seed from math/rand source.
version: Use
runtime/debug.BuildInfo.Dependency bumps, notably:
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Renovate Bot.