Update dependency open-policy-agent/opa to v0.58.0 #106
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:
v0.49.2
->v0.58.0
Release Notes
open-policy-agent/opa (open-policy-agent/opa)
v0.58.0
Compare Source
This release contains a mix of performance improvements, bugfixes and security fixes for third-party libraries.
Runtime, Tooling, SDK
= true
as it is implied (#6323) authored by @anderseknertv0.23.0
(#2266) authored by @ashutosh-narkarhttp_request_duration_seconds
metric (#6238) authored by @AdrianArnautuTopdown and Rego
walk
-ing (#6267) authored by @anderseknertDocs
/
) or other special characters (#6264) authored by @dennisgWebsite + Ecosystem
Miscellaneous
hub
tool in GitHub workflows in favor of GitHub CLI tool (#6326) authored by @ashutosh-narkarv0.57.1
Compare Source
This is a bug fix release addressing the following security issues:
Golang security fix GO-2023-2102
OpenTelemetry-Go Contrib security fix CVE-2023-45142
v0.57.0
Compare Source
This release contains an updated Rego syntax to allow general references in rule heads, and a mix of new features and bugfixes.
Support for General References in Rule Heads
In OPA
0.56.0
, we introduced support for general references in rule heads as an experimental feature.It has now graduated to a fully supported feature, and is no longer experimental.
A general reference is a reference with variables at arbitrary locations.
In Rego, partial rules are used for generating sets and objects.
In previous versions of OPA, variables were only allowed in the very last position in the rule's reference.
Now, Rego has been expanded to allow rules to be declared with general references in their head, with variables at arbitrary locations.
This allows for generating nested dynamic object structures:
See the documentation for more information.
Authored by @johanfylling.
Runtime, Tooling, SDK
Topdown and Rego
Miscellaneous
Breaking Changes
GO SDK: the
ast.JSONOptions
struct has changed location toast.json.Options
.v0.56.0
Compare Source
This release contains a mix of new features, bugfixes and a new builtin function.
Support for General References in Rule Heads (Experimental)
A new experimental feature in OPA is support for general refs in rule heads. Where a general ref is a reference with variables at arbitrary locations.
General refs are currently not supported by the OPA planner, making this feature unsupported for Wasm and IR.
Note: this feature is disabled by default, and needs to be enabled by setting the
EXPERIMENTAL_GENERAL_RULE_REFS
environment variable (once the feature is complete - supports Wasm and IR - this requirement will be dropped).Authored by @johanfylling.
New Built-In Function:
numbers.range_step
Similar to the
numbers.range
built-in function,numbers.range_step
returns an array of numbers in a given range. The new built-in function also allows you to control the step between each entry.See the documentation on the new built-in
for all the details.
Authored by @sspaink.
New Ecosystem page on The Website
The OPA Ecosystem of related integrations has been refreshed and moved to a more prominent location on the website.
If you're interested to add any new integrations you've been working on, please see the docs here (updates to existing integrations are very welcome too!).
Runtime, Tooling, SDK
opa test -z
fail with failing tests (#6126) authored by @fdaguinopa test
--ignore
when used together with--bundle
(#6185) authored by @joaobrandt--fail-non-empty
flag toopa exec
(#6153) authored by @Ronnie-personalopa_no_oci
flag to build without containerd (#6159) authored by @slonkaTopdown and Rego
Miscellaneous
Breaking changes
Since its introduction in 0.34.0, the
--exit-zero-on-skipped
option always made theopa test
command return an exit code 0. When used, it now returns the exit code 0 only if no failed tests were found.Test runs on existing projects using
--exit-zero-on-skipped
will fail if any failed tests were inhibited by this behavior.v0.55.0
Compare Source
This release contains a mix of new features, bugfixes and a new builtin function.
Honor
default
keyword on functionsPreviously if a function was defined with a
default
value, OPA would ignore it. Now thedefault
function is honoredif all functions with the same name are undefined. For example,
The value of a
default
function follows the same conditions as that of adefault
rule. In addition, adefault
function satisfies the following properties:
Authored by @ashutosh-narkar.
New Built-In Function: crypto.parse_private_keys
crypto.parse_private_keys
returns zero or more private keys from the given encoded string containing DER certificate data.If the input contains a list of one or more concatenated PEM blocks, then the built-in will output the parsed private keys
represented as objects.
See the documentation on the new built-in
for all the details.
Authored by @volck.
Runtime, Tooling, SDK
discard
output format toopa eval
which discards the result while still showing the output of eval flags like--profile
(#6103) authored by @26tanishabanikTopdown and Rego
WithRoots
compiler option that allows callers to set the roots to include in the output bundle manifest (#6088) authored by @kubajDocs
Website + Ecosystem
Ecosystem:
Website:
Miscellaneous
CRLF
line terminations in the patch output (#6069) authored by @johanfyllingv0.54.0
Compare Source
This release focuses on bug fixes, but also includes some improvements to the SDK and commandline.
Note: This will be the last OPA release to support building with Golang 1.18. (Golang 1.21 is expected to be released in August. Keeping the support for 1.18 is blocking OPA from upgrading OpenTelemetry.)
Topdown and Rego
lazyObj
when compared against other object type (6060) (authored by @johanfylling)fmt
panic in comprehension with comments (#5798) authored by @Trolloldem reported by @Djoustobject.union_n
where nested objects were mutated (#5975) authored by @qshu-splunkobject.subset
method failing to correctly compare array relationships (5968) authored by @DCRUNNNhttp.send
(#5997) authored by @ashutosh-narkartime.format
andtime.parse_ns
(#5945) authored by @tjonsRuntime, Tooling, SDK
--schema
flag toopa test
(#5923) authored by @renatoscpersistence_directory
config (#6042) authored by @blacksailstzdata
is not found on filesystem (6038) authored by @charlieegan3Store
implementation in SDK (5962) authored by @srenatus/v1/config
API result (6056) authored by @srenatusMiscellaneous
v0.53.1
Compare Source
This is a bug fix release addressing the following issues:
Runtime, Tooling, SDK
WWW-Authenticate
header of a401 Unauthorized
response. Errors were returned when downloading a public image as it was assumed that authorization is not necessary for public repositories. This fix addresses this issue by challenging any401 Unauthorized
responses by passing it to the docker.Authorizer (#5902) authored by @DerGutopa fmt
: Fix panic encountered while processing policies with comprehensions written on multiple lines with comments in these lines (#5798) authored by @TrolloldemTopdown and Rego
object.subset
: Fix an issue inobject.subset
related to incorrect results being generated when arrays are provided as an input (#5968) authored by @DCRUNNNv0.53.0
Compare Source
This release contains some enhancements, bugfixes, and a new builtin function.
Runtime, Tooling, SDK
opa eval
: Update OPA eval's--profile-sort
flag description to highlight the valid options to sort the profile results (#5924) authored by @ecbenezraopa fmt
: Fix cases in which invalid code was generated due to parentheses being improperly handled (#5537) authored by @Trolloldemloader
package that provide ability to register handlers for certain file extensions. This feature is currently EXPERIMENTAL (#5940) authored by @srenatusTopdown and Rego
crypto.x509.parse_keypair
: Returns a key pair from a pair of PEM or base64 encoded strings of data. See the documentation on the new built-in for all the details. (#5853) authored by @volck.io.jwt.decode_verify
: Fix issue where token verification succeeded in case whereiss
constraint was required but JWT did not contain it (#5850) authored by @AleksanderBrzozowskihttp.send
: Add a new option to thehttp.send
input object which allows policy authors to specify a retry count for executing a HTTP request. Retries are performed with an exponential backoff delay (#5891) authored by @ashutosh-narkar_
matching only scalars in rule indexing for arrays (#5916) authored by @jaspervdjMiscellaneous
v0.52.0
Compare Source
This release contains some enhancements, bugfixes, and a new builtin function.
Allow Adding Labels via Discovery
Previously OPA did not allow any updates to the labels provided in the boot configuration via the discovered (ie. service)
config. This was done to avoid breaking the discovery configuration. But there are use cases where labels can serve as a convenient
way to pass information that could be used in policies, status updates or decision logs. This change allows
additional labels to be configured in the service config which are then made available during runtime.
See the Discovery documentation for more details.
Authored by @mjungsbluth.
New Built-In Function: crypto.hmac.equal
crypto.hmac.equal
provides a convenient way to compare hashes generated by the MD5, SHA-1, SHA-256 and SHA-512 hashing algorithms.Below is a real world example of how this built-in function can be utilized. Imagine our server is registered as a
GitHub webhook which subscribes to certain events on GitHub.com. Now we want to limit requests to those coming from GitHub.
One of the ways to do that is to first set up a secret token and validate the information. Once we create the token on GitHub,
we'll set up an environment variable that stores this token and makes it available to OPA via the
opa.runtime
built-in.In the case of GitHub webhooks the validation is done by comparing the hash signature received in the
X-Hub-Signature-256
header and calculating a hash using the secret token and payload body. The
check_signature
rule implements this logic.See the documentation on the new built-in for all the details.
Authored by @sandokandias.
Extend Authentication Methods Supported by OCI Downloader
Previously the OCI Downloader had support for only three types of authentication methods, namely
Client TLS Certificates
,Basic Authentication
andBearer Token
. This change adds support for other authentication methods such as AWS Signature,GCP Metadata Token. See the documentation
for more details.
Authored by @DerGut.
Update Profiler Output With Number of Generated Expressions
The number of EVAL/REDO counts in the profile result are sometimes difficult to understand. This is mainly due to the
fact that the compiler rewrites expressions and assigns the same location to each generated expression and the profiler
keys the counters by the location. To provide more clarity, the profile output now includes the number of generated
expressions for each given expression thereby helping to better understand the result and also how the evaluation works.
Here is an example of the updated profiler output with the new
NUM GEN EXPR
column:See the Profiling documentation for more details.
Authored by @ashutosh-narkar.
Runtime, Tooling, SDK
Topdown and Rego
Docs
Website + Ecosystem
Ecosystem:
Website:
MISCELLANEOUS
section to improve content navigation (#4614) authored by @lakhanjindamMiscellaneous
v0.51.0
Compare Source
This release contains improvements to monitoring and an assortment of fixes and improvements.
Monitoring
Surface unauthorized request count from OPA HTTP API authz handler via Status API
Currently when OPA's HTTP server rejects requests per the authz policy, this is not accounted for via the management APIs. This change adds that count in the metric registry that is part of the Status API for more visibility.
(#3378) authored by @ashutosh-narkar.
Surface more decision log errors via Status API
Previously in 5732, we updated the decision log plugin to surface errors via the Status API. However, in that change certain events like encoder errors and log drops due to buffer size limits had no metrics associated with them. This change adds more metrics for these events so that they can be surfaced via the Status API.
(#5637) authored by @ashutosh-narkar.
Include truncated HTTP response in logs
This change updates the client debug log to include the full HTTP response in case of non-200 status codes. Recording the response in the logs can help to provide more information to debug error scenarios.
(#2961) authored by @ashutosh-narkar reported by @gshively11.
Topdown and Rego
object.union_n
built-in function (authored by @Azanul)Fixes
Specifically, by removing superfluous json encoding roundtrip and double work in AST conversion of to-be-logged events. (authored by @srenatus)
Docs, Website, and Ecosystem
Miscellaneous
v0.50.2
Compare Source
This is a bug fix release that addresses a regression in 0.50.1.
This regression impacts policies with rules that, as its else-value, assign a comprehension containing variables.
Such rules would cause the compilation of the policy to fail with a
rego_unsafe_var_error
error.E.g. the following policy would fail to compile with a
policy.rego:5: rego_unsafe_var_error: var x is unsafe
error:Fixes
v0.50.1
Compare Source
This is a bug fix release addressing the following issues:
Fixes
Resolves a performance regression when using large bundles.
Miscellaneous
Resolves an issue with bundle loading on Windows.
v0.50.0
Compare Source
This release contains a mix of new features, bugfixes, security fixes, optimizations and build updates related to
OPA's published images.
New Built-in Functions: JSON Schema Verification and Validation
These new built-in functions add functionality to verify and validate JSON Schema (#5486) (co-authored by @jkulvich and @johanfylling).
json.verify_schema
: Checks that the input is a valid JSON schema objectjson.match_schema
: Checks that the document matches the JSON schemaSee the documentation for all details.
Annotations scoped to
package
carries across modulespackage
scoped schema annotations are now applied across modules instead of only local to the module whereit's declared (#5251) (authored by @johanfylling). This change may cause compile-time errors and behavioural changes to
type checking when the
schemas
annotation is used, and to rules calling therego.metadata.chain()
built-in function:rego_type_error: package annotation redeclared
error if two or more of these are annotated with the
package
scope.package
scope, theschemas
annotation will be applied to type checking also for rules declared inanother file than the annotation declaration, as long as the package is the same.
rego.metadata.chain()
built-in function will now contain an entry for thepackage even if the annotations are declared in another file, if the scope is
package
.Remote bundle URL shorthand for
run
commandTo load a remote bundle using
opa run
, theset
directive can be provided multiple times as shown below:The following command can be used as a shorthand to easily start OPA with a remote bundle (#5674) (authored by @anderseknert):
Performance Improvements for
json.patch
Built-in FunctionPerformance improvements in
json.patch
were achieved with the introduction of a newEditTree
data structure,which is built for applying in-place modifications to an
ast.Term
, and can render the final result of all edits efficientlyby applying all patches in a JSON-Patch sequence rapidly, and then collapsing all edits at the end with minimal wasted
ast.Term
copying (authored by @philipaconrad).For more details and benchmarks refer #5494 and #5390.
Surface decision log errors via status API
Errors encountered during decision log uploads will now be surfaced via the Status API in addition to being logged. This
functionality should give users greater visibility into any issues OPA may face while processing, uploading logs etc (#5637) (authored by @ashutosh-narkar).
See the documentation for more details.
OPA Published Images Update
All published OPA images now run with a non-root uid/gid. The
uid:gid
is set to1000:1000
for all images. As a resultthere is no longer a need for the
-rootless
image variant and hence it will be not be published as part of future releases.This change is in line with container security best practices. OPA can still be run with root privileges by explicitly setting the user,
either with the
--user
argument fordocker run
, or by specifying thesecurityContext
in the Kubernetes Pod specification.Runtime, Tooling, SDK
nil
data (#5703) authored by @anderseknertConfiguration
📅 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 becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.