RATATOSK
← 전체 릴리스

Open Policy Agent (OPA)v1.23.0

보안 3호환성 변경 15폐기 예정 1중요 수정 18기능·개선 14의존성 갱신 21기타 49

Open Policy Agent (OPA) 알림 받기

확인할 변경이 있을 때만 주 1회, critical 보안 공지는 즉시 발송

보안3

MySQL Compile API의 문자열 내장 함수 거부

영향 대상MySQL을 대상으로 하는 Compile API에서 startswith, endswith 또는 contains를 사용하는 정책

생성된 LIKE 필터는 MySQL의 기본 collation이 대소문자와 악센트를 구분하지 않아 정책에서 허용하지 않은 행까지 일치시킬 수 있었습니다. 이제 이러한 정책은 필터를 생성하는 대신 컴파일에 실패합니다.

원문 보기
### Compile API: no `startswith`, `endswith` or `contains` for MySQL ([#9624](https://github.com/open-policy-agent/opa/issues/9624))
Breaking change: the MySQL target rejects `startswith`, `endswith` and `contains`, as the SQLite target
already did. They were translated to `LIKE`, which is case- and accent-insensitive in MySQL's default
collations, so `startswith(input.fruits.name, "APP")` also matched `apple`. Policies using them now fail
to compile for `application/vnd.opa.sql.mysql+json`, and for multitarget requests that include `mysql`.
Reported by @kianwang0610, authored by @srenatus
- Hardening of the MySQL Compile API target: use of `startswith`, `endswith` and `contains` built-in functions is rejected
github.com/open-policy-agent/opa/releases/tag/v1.23.0

units.parse와 units.parse_bytes에 입력 크기 상한 추가

영향 대상units.parse 또는 units.parse_bytes를 사용하는 정책이나 임시 쿼리

이번 릴리스 전에는 큰 크기의 입력을 처리할 때 다른 숫자 처리 경로에 적용되는 상한을 훨씬 넘는 값이 생성될 수 있었습니다. 이런 값이 정책이나 임시 쿼리에서 평가되면 평가 시간이 늘어났습니다. 이제 상한을 넘는 입력은 확장하기 전에 명확한 오류와 함께 거부됩니다.

원문 보기
- topdown: Bound magnitude of units.parse/parse_bytes results ([#9404](https://github.com/open-policy-agent/opa/issues/9404)) reported and authored by @leandrocosta-git
github.com/open-policy-agent/opa/releases/tag/v1.23.0

IPv4-mapped CIDR에서 발생하는 net.cidr_merge panic 수정

영향 대상net.cidr_merge를 사용하는 정책 또는 쿼리

중복을 포함해 IPv4-mapped IPv6 CIDR을 두 개 이상 받으면 net.cidr_merge에서 panic이 발생해 프로세스 전체가 중단될 수 있었습니다. 이제 이런 입력을 일반 IPv4 CIDR로 병합합니다. 처음 보고된 예시는 ["10.0.0.0/7]을 반환합니다.

원문 보기
- topdown: Fix net.cidr_merge panic on IPv4-mapped IPv6 CIDRs ([#9528](https://github.com/open-policy-agent/opa/issues/9528)) reported and authored by @nikpivkin
github.com/open-policy-agent/opa/releases/tag/v1.23.0

호환성 변경15

번들 루트를 .manifest 위치 기준으로 변경

영향 대상번들 디렉터리, 디스크에서 로드하는 번들 tarball, 구버전 OPA로 서명하거나 검증한 번들
필요 조치디스크에서 로드하는 번들 tarball의 아카이브 루트에 .manifest 배치 필요; 구버전 OPA에서 opa sign <dir> 또는 opa build -b <dir>로 서명한 번들의 재서명 필요; --exclude-files-verify 패턴 업데이트 가능성
제거 시점미상

이전에는 로드 경로를 어떻게 입력했는지에 따라 번들 콘텐츠, 데이터 배치, 서명이 달라질 수 있었습니다. 이제 .manifest보다 상위 경로에 있는 파일은 제외되며, opa build와 opa sign 이외의 명령은 해당 파일을 경고 없이 제외할 수도 있습니다. 번들 플러그인이 HTTP나 OCI 레지스트리에서 다운로드한 번들과 저장된 복사본은 .manifest, .signatures.json 또는 patch.json의 위치가 잘못되어도 경고와 함께 계속 로드됩니다.

근거“To avoid breaking existing deployments, bundles that the bundle plugin downloads over HTTP or from an OCI registry (and their persisted copies) are still loaded as before, and OPA logs a warning each time a bundle with a misplaced `.manifest`, `.signatures.json`, or `patch.json` is loaded.” open-policy-agent/opa/releases/tag/v1.23.0 ↗
원문 보기
- Enforcement of bundle structure: now rooted at their `.manifest` file
and signatures depend on how a path was typed.
github.com/open-policy-agent/opa/releases/tag/v1.23.0

.manifest 디렉터리 기준으로 바뀐 번들 루트

영향 대상제공된 경로 아래에 .manifest가 중첩된 번들 디렉터리
필요 조치이전 OPA 버전의 opa sign <dir> 또는 opa build -b <dir>로 서명한 번들의 재서명 필요; --exclude-files-verify 패턴 업데이트 필요 가능성

이전에는 번들 콘텐츠와 데이터 배치가 번들을 불러오는 데 사용한 경로에 따라 달라질 수 있었습니다. 이제 .manifest가 들어 있는 디렉터리가 루트가 되며, 그 상위 경로에 있는 파일은 제외됩니다. 제외된 정책 및 데이터 파일에 대한 경고는 opa build와 opa sign에서만 표시됩니다.

원문 보기
Breaking change: OPA now treats the directory containing a bundle's `.manifest` file as the bundle root, as the
[bundle documentation](https://www.openpolicyagent.org/docs/management-bundles#bundle-file-format) describes.
Previously, the root depended on the path a bundle was loaded from, which made bundle contents, data placement,
- **Bundle directories** (`opa build -b`, `opa run -b`, `opa eval -b`, `opa sign --bundle`, ...) are rooted at
  the directory containing `.manifest`, even when it is nested below the provided path. Files above it are not
  part of the bundle. `opa build` and `opa sign` warn about policy and data files they leave out, but other
  commands do not, so keep other `.manifest` files (e.g., test fixtures) out of directories loaded as bundles.
github.com/open-policy-agent/opa/releases/tag/v1.23.0

입력 plan과 wasm resolver를 대체하는 Plan·wasm 빌드

영향 대상plan 또는 wasm resolver가 포함되어 있고 opa build -t plan 또는 opa build -t wasm에 사용되는 입력 번들

이전에는 입력 번들에 포함된 plan과 wasm resolver를 빌드에 추가했지만, 이제는 대체합니다. 해당 진입점을 빌드 결과에 유지하려면 빌드 시 -e 인수로 제공해야 합니다.

원문 보기
- **`opa build -t plan` and `-t wasm`** replace any plan, or wasm resolvers that were carried in from the input bundles.
github.com/open-policy-agent/opa/releases/tag/v1.23.0

번들 리더의 SlashRooted 및 Passthrough 매니페스트 거부

영향 대상Go API에서 bundle.Reader를 사용하면서 SlashRooted 또는 Passthrough 디렉터리 로더를 쓰는 설정, 또는 디렉터리 로더를 감싼 커스텀 래퍼

Reader.WithBaseDir를 사용하면 매니페스트가 있는 디렉터리가 모듈 경로에 포함됩니다. 디렉터리 로더는 해당 디렉터리를 RootOffset() string으로 반환합니다. 디렉터리 로더를 감싼 커스텀 래퍼는 RootOffset을 전달해야 합니다.

원문 보기
Go API: the `bundle.Reader` expects bundle-relative descriptor paths, so directory loaders configured with the
`SlashRooted` or `Passthrough` path formats now have their manifests rejected. When `Reader.WithBaseDir` is used,
module paths include the manifest's directory, which directory loaders report through a `RootOffset() string`
method. Custom loaders that wrap a directory loader should forward `RootOffset`.
github.com/open-policy-agent/opa/releases/tag/v1.23.0

인덱싱된 오브젝트 컴프리헨션 충돌, 조회 시 eval_conflict_error 발생

영향 대상인덱싱된 오브젝트 컴프리헨션을 사용하는 정책

이전에는 인덱싱된 오브젝트 컴프리헨션이 같은 키에 서로 다른 값을 만들면 캐시된 빌드가 마지막 값을 유지했습니다. 충돌은 해당 그룹을 조회할 때만 eval_conflict_error를 발생시키며, 조회하지 않은 충돌 그룹에서는 여전히 오류가 발생하지 않습니다.

근거“The build now returns the groups with a conflict, the cache frame records them, and looking up one of those groups raises the error, so groups that are never looked up still don't.” open-policy-agent/opa/pull/9613 ↗
원문 보기
- topdown: Report key conflicts in indexed object comprehensions ([#9613](https://github.com/open-policy-agent/opa/pull/9613)) authored by @srenatus
github.com/open-policy-agent/opa/releases/tag/v1.23.0

기본 규칙 위치 텍스트에 전체 문장 포함

영향 대상기본 규칙의 파싱된 AST 또는 opa parse JSON에서 위치 텍스트를 사용하는 경우(추정)

이전에는 기본 규칙의 위치 텍스트에 default만 포함되고 규칙 헤드 내용은 빠져 있었습니다.

원문 보기
- ast: Correct default rule location text ([#9516](https://github.com/open-policy-agent/opa/pull/9516)) authored by @charlieegan3
github.com/open-policy-agent/opa/releases/tag/v1.23.0

음수 AST 위치 텍스트에 전체 숫자 포함

영향 대상파싱된 음수 수치 항의 AST 위치 텍스트(추정)

x := -1000처럼 음수 수치 항을 파싱하면 디코딩된 위치 텍스트에는 -만 기록됐습니다.

원문 보기
- ast: Fix negative number location text (for issue #9531) ([#9531](https://github.com/open-policy-agent/opa/issues/9531)) authored by @devjoshi2005, reported by @anderseknert
github.com/open-policy-agent/opa/releases/tag/v1.23.0

함수 규칙 AST 위치가 전체 문장을 포함하도록 변경

영향 대상본문이나 값이 없는 함수 규칙의 파싱된 AST 위치

f(1) 같은 규칙에서 이전에는 Location.Text에 규칙 전체가 아니라 f만 들어 있었습니다.

원문 보기
- ast: Give a function without a body the location of its whole statement ([#9579](https://github.com/open-policy-agent/opa/pull/9579)) authored by @srenatus
github.com/open-policy-agent/opa/releases/tag/v1.23.0

types.Unmarshal의 정확한 필드명 검증 및 JSON 깊이 제한

영향 대상Go에서 types.Unmarshal로 디코딩하는 타입 JSON

중첩된 타입 JSON을 매 단계에서 다시 디코딩해 중첩 깊이가 커질수록 디코딩 시간이 제곱에 비례해 늘어났고, 깊이가 매우 깊은 입력이 JSON 디코더의 최대 깊이 제한을 우회할 수도 있었습니다. 이제 디코딩은 중첩 깊이에 선형으로 진행됩니다. 제한을 초과한 입력에는 최대 깊이 오류를 반환하며, 오류 메시지도 달라집니다.

근거“Field names now match exactly, where struct decoding matched them case-insensitively; otherwise only inputs past the max depth change outcome. Error messages differ.” open-policy-agent/opa/pull/9473 ↗
원문 보기
- types: Decode type JSON in linear time ([#9473](https://github.com/open-policy-agent/opa/pull/9473)) authored by @srenatus
github.com/open-policy-agent/opa/releases/tag/v1.23.0

디스크에서 로드하는 번들 tarball에 루트 수준의 .manifest 필요

영향 대상디스크에서 번들 tarball을 로드하는 설정
필요 조치아카이브 루트에 .manifest가 있도록 opa build로 다시 빌드한 디스크 로드 번들 tarball

이전에는 bundle/.manifest와 bundle/data.json이 들어 있는 tarball도 로드되어 데이터가 data.bundle 아래에 배치되었습니다. 이번 릴리스에서는 로드 시점에 해당 tarball을 거부합니다.

원문 보기
- **Bundle tarballs** loaded from disk must have `.manifest` at the root of the archive. `opa build` always writes
  it there.
For example, consider this tarball, built without `opa build`:

```console
$ tar tzf bundle.tar.gz
bundle/.manifest
bundle/data.json
bundle/authz.rego
```
Previously, `opa run -b bundle.tar.gz` loaded it with `bundle/data.json` placed under `data.bundle`. It is now
rejected because `.manifest` is not at the root of the archive. Running `opa build -b bundle/` on the extracted
directory produces a bundle rooted at `bundle/`, with `data.json` placed at the root of `data`.
github.com/open-policy-agent/opa/releases/tag/v1.23.0

번들 서명 경로에 번들 루트 기준 이름과 / 구분자 적용

영향 대상.signatures.json을 사용하거나 이전 OPA 버전으로 생성한 서명 또는 --exclude-files-verify 패턴을 사용하는 설정
필요 조치opa sign <dir> 또는 opa build -b <dir>로 이전 OPA 버전에서 서명한 번들은 다시 서명해야 합니다. --exclude-files-verify 패턴도 업데이트해야 할 수 있습니다.

이전 서명 경로는 이 규칙을 따르지 않았으므로, 이전 OPA 버전에서 생성한 서명은 이번 릴리스와 호환되지 않을 수 있습니다.

원문 보기
- **Signatures**: file names in `.signatures.json` are relative to the bundle root, with `/` separators on every
  platform. Bundles signed by `opa sign <dir>` or `opa build -b <dir>` with older OPA versions must be re-signed,
  and `--exclude-files-verify` patterns may need updating.
github.com/open-policy-agent/opa/releases/tag/v1.23.0

여러 번들 빌드 및 서명 경로 변경

영향 대상여러 번들이나 번들 경로를 사용해 opa build 또는 opa sign을 실행하는 구성. 번들이 같은 경로를 차지하게 되는 병합도 포함

여러 번들을 처리할 때 opa build는 각 번들의 파일을 -b로 지정한 경로 아래에 둡니다. 경로 맨 앞의 .. 세그먼트는 참조 대상 디렉터리 이름으로 바꾸고, 새 루트 .manifest를 씁니다. 두 번들이 같은 경로를 차지하게 되면 빌드에 실패합니다. opa sign은 각 번들의 경로를 기준으로 파일 이름을 기록하므로, 서로 다른 소스 번들의 서명은 병합된 빌드 출력에 대해 검증되지 않습니다.

원문 보기
- **`opa build` with multiple bundles** places each bundle's files under the path it was given with `-b`, with a
  new `.manifest` at the root. Leading `..` segments are replaced with the name of the directory they refer to.
  Merging fails when two bundles would be placed under the same path. `opa sign` with multiple bundle paths
  names files under each bundle's path, like `opa build` does when merging. A merged `opa build` output has its
  own new `.manifest`, so signatures from multiple separate source bundles cannot be used to verify a merged build.
github.com/open-policy-agent/opa/releases/tag/v1.23.0

번들 메타데이터의 루트 위치 및 정확한 .manifest 명명

영향 대상루트 밖에 메타데이터가 있거나 매니페스트 파일명이 정확히 .manifest가 아닌 번들
필요 조치번들 메타데이터는 번들 루트에 있어야 하며 매니페스트 이름은 정확히 .manifest여야 합니다.

이전에는 번들의 어느 폴더에서든 .manifest로 끝나는 파일 하나를 매니페스트로 처리할 수 있었습니다. 이제 번들 루트에 있고 이름이 정확히 .manifest인 파일만 매니페스트로 처리됩니다.

원문 보기
- `.manifest`, `.signatures.json`, and `patch.json` must be at the bundle root, and only files named exactly
github.com/open-policy-agent/opa/releases/tag/v1.23.0

버전 값 기반 CLI 호환성 플래그로 --v2-compatible 대체

영향 대상호환성 플래그를 사용하는 CLI 명령, 특히 v2 동작을 선택하는 명령(추정)

이전에는 --v2-compatible로 v2 사용을 선택했습니다. 이제는 --compatible=v2를 사용합니다. --compatible=v0과 --compatible=v1은 각각 해당 모드를 선택하며, 그 외 값은 거부됩니다. 기존 --v0-compatible과 --v1-compatible 플래그는 변경되지 않습니다.

근거“Adds a single --compatible flag accepting v0, v1 or v2 and rejecting other values, so future versions don't need a flag each. The existing --v0-compatible and --v1-compatible flags are unchanged.” open-policy-agent/opa/pull/9496 ↗
원문 보기
- cmd: Add --v2-compatible flag ([#9251](https://github.com/open-policy-agent/opa/issues/9251)) authored by @sspaink, reported by @johanfylling
- cmd: Replace --v2-compatible with --compatible=<version> ([#9496](https://github.com/open-policy-agent/opa/pull/9496)) authored by @sspaink
github.com/open-policy-agent/opa/releases/tag/v1.23.0

v2 호환 모드에서 요청 크기 초과 시 HTTP 413 반환

영향 대상v2 호환 모드를 활성화한 서버 및 Go 통합

설정된 본문 크기 제한을 초과한 요청은 이전에는 v2 호환 모드에서도 HTTP 400을 반환했습니다. 이제는 HTTP 413을 반환합니다. 기본 모드에서는 계속 HTTP 400을 반환하며, 오류 응답 본문은 변경되지 않았습니다.

근거“This change makes the server return HTTP 413 (Content Too Large) in v2-compatible mode, while keeping the existing HTTP 400 behavior in default mode. The error response body remains unchanged.” open-policy-agent/opa/pull/9497 ↗
원문 보기
- server: Fix oversized request body status in v2-compatible mode ([#9497](https://github.com/open-policy-agent/opa/pull/9497)) authored by @darshpatel1052
github.com/open-policy-agent/opa/releases/tag/v1.23.0

폐기 예정1

잘못 배치된 번들 파일에 대한 로드 경고

영향 대상번들 플러그인이 HTTP 또는 OCI 레지스트리에서 다운로드한 번들과 그 영구 저장본 중 .manifest, .signatures.json 또는 patch.json 파일이 잘못 배치된 번들
제거 시점미상

이러한 번들은 v1.23.0에서 계속 로드되지만, 로드할 때마다 경고가 발생합니다. 향후 OPA 릴리스에서는 로드에 실패합니다.

원문 보기
To avoid breaking existing deployments, bundles that the bundle plugin downloads over HTTP or from an OCI registry
(and their persisted copies) are still loaded as before, and OPA logs a warning each time a bundle with a misplaced `.manifest`, `.signatures.json`,
or `patch.json` is loaded. **These bundles will fail to load in a future OPA release.** Rebuild them with
`opa build` to place the manifest at the root.
github.com/open-policy-agent/opa/releases/tag/v1.23.0

중요 수정18드러나지 않던 결함4

  • 멤버가 혼합된 in 리터럴의 규칙 인덱싱 수정드러나지 않던 결함
    영향 대상상수와 ref 또는 변수가 섞인 리터럴에 in을 사용하는 정책

    일치하는 멤버가 ref 또는 변수이면 규칙 인덱서가 규칙을 누락시켜 본문이 실행되지 않을 수 있었습니다. default가 있으면 이 경우 기본값이 아무런 알림 없이 반환됐습니다.

    - ast: Keep a rule indexed as "anything" for `in` with a var member ([#9506](https://github.com/open-policy-agent/opa/issues/9506)) authored by @srenatus, reported by @kholia
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 표준 입력에서 opa fmt --drop-v0-imports의 import 제거 수정
    영향 대상표준 입력에서 opa fmt --drop-v0-imports로 포맷하는 정책(추정)

    정책을 표준 입력에서 읽을 때는 opa fmt --drop-v0-imports가 플래그를 무시해 제거 대상 import를 남겼습니다. 이제 파일을 포맷할 때와 마찬가지로 옵션이 대상으로 삼는 import를 제거합니다.

    - cmd(fmt): Honor `--drop-v0-imports` when formatting stdin ([#9619](https://github.com/open-policy-agent/opa/pull/9619)) authored by @FayezBast
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • opa inspect -a의 labels 메타데이터 표시 수정
    영향 대상labels 메타데이터가 어노테이션된 규칙이 있는 정책(추정)

    이러한 정책에 opa inspect -a를 실행하면 이전에는 결과에 labels가 표시되지 않았습니다. 이제 어노테이션이 지정된 규칙의 결과에 labels 메타데이터가 포함됩니다.

    - cmd/inspect: Show labels metadata with -a ([#9504](https://github.com/open-policy-agent/opa/issues/9504)) authored by @srenatus, reported by @humbertoc-silva
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • opa fmt의 중첩 비교 괄호 보존드러나지 않던 결함
    영향 대상괄호가 그룹화나 파싱에 영향을 주는 중첩 비교가 포함된 정책

    opa fmt가 이러한 비교를 포맷할 때 괄호를 제거해 정책의 의미가 바뀌거나 컴파일에 실패할 수 있었습니다. 경우에 따라 결과가 true에서 false로 조용히 바뀌기도 했습니다. 이제 포맷 과정에서 필요한 괄호를 유지하므로 포맷된 정책은 원본과 같은 결과를 냅니다.

    - format: Preserve nested comparison grouping ([#9407](https://github.com/open-policy-agent/opa/issues/9407)) authored by @rudraa2005, reported by @alecthomas
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • Wasm with 업서트의 객체가 아닌 값 대체 동작
    영향 대상객체가 아닌 값을 업서트하는 with 표현식의 Wasm 평가(추정)

    입력이 123일 때 Wasm 평가에서는 input.foo with input.foo as input이 undefined를 반환했지만, Rego 평가에서는 123을 반환했습니다.

    - wasm: Replace non-object values when upserting for with ([#6304](https://github.com/open-policy-agent/opa/issues/6304)) authored by @sspaink, reported by @srenatus
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • OPA 고정밀 십진수 비교 수정
    영향 대상float64 정밀도를 넘어서는 값을 포함한 십진수 비교(추정)

    유효 숫자가 15자리를 넘고 끝에 0이 붙은 서로 다른 십진수가 같은 float64 값으로 반올림될 수 있었습니다. 이로 인해 두 값이 같은 것으로 비교되고 순서 관계가 추이성을 만족하지 않을 수 있었습니다. 이제 값과 순서를 정확하게 비교합니다.

    - ast: Compare numbers beyond float64 precision exactly ([#9508](https://github.com/open-policy-agent/opa/pull/9508)) authored by @srenatus
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • Rego v2의 인덱싱된 set 리터럴에서 not 파싱 수정드러나지 않던 결함
    영향 대상Rego v2에서 인덱싱된 set 리터럴과 함께 not을 사용하는 정책

    이전에는 not {"foo"}["bar"]가 쿼리와 규칙 본문에서 서로 다른 결과를 내거나 파싱 오류를 일으킬 수 있었습니다. Rego v2에서는 이 구문을 set 리터럴에 대한 참조로 파싱합니다.

    - ast: Parse not {..}[..] as a ref on a set literal under v2 ([#9540](https://github.com/open-policy-agent/opa/issues/9540)) authored by @sspaink, reported by @anderseknert
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 음수 분수에 대한 ceil 및 floor 결과 수정드러나지 않던 결함
    영향 대상-1과 0 사이의 음수 분수에 ceil 또는 floor를 호출하는 정책이나 쿼리

    이전에는 ceil(-0.5)가 0이 아닌 1을 반환했고, floor(-0.5)는 -1이 아닌 0을 반환했습니다. 이제 각각 0과 -1을 반환합니다.

    - topdown: Fix ceil and floor of negative fractions above -1 ([#9562](https://github.com/open-policy-agent/opa/issues/9562)) reported by @kroekle
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 플러그인 매니저가 교체된 Wasm 리졸버를 닫도록 수정
    영향 대상번들 업데이트로 Wasm 리졸버를 교체하는 플러그인 매니저 사용 환경

    이 변경 전에는 교체된 리졸버를 닫지 않아 사용할수록 메모리 사용량이 증가했습니다. 번들을 업데이트하면 새 리졸버 집합에 유지되는 리졸버를 제외하고 기존 리졸버를 닫습니다.

    - plugins: Close the Wasm resolvers a bundle update replaces ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • Rego.Eval 평가 후 Wasm 엔진 종료
    영향 대상Go API에서 Wasm 타깃을 사용하는 Rego.Eval

    이전에는 평가 중 생성된 엔진을 닫지 않아 사용할수록 메모리가 늘었습니다.

    - rego: Close the Wasm engine after Rego.Eval ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 준비된 쿼리에서 로드된 Wasm 리소스 닫기
    영향 대상Wasm을 사용하는 준비된 평가 쿼리를 사용하는 Go 통합(추정)

    준비된 쿼리에서 Wasm 리졸버를 로드한 뒤 열린 상태로 두면 사용할수록 메모리 사용량이 늘었습니다. 이제 준비된 쿼리를 닫으면 Wasm 엔진도 함께 닫힙니다.

    - rego: Close the Wasm resolvers a prepared query loaded ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • opa test에 엄격한 내장 함수 오류 보고 추가
    영향 대상--strict-builtin-errors를 사용해 실행하는 opa test(추정)

    내장 함수 오류가 발생한 테스트는 문서에 명시된 결과가 ERROR였지만 일반 실패로 보고되었습니다.

    - tester: Add --strict-builtin-errors to opa test ([#6816](https://github.com/open-policy-agent/opa/issues/6816)) authored by @oleksii-udovychenko, reported by @selaux
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • opa test 평가 후 Wasm 엔진 종료
    영향 대상Wasm 타깃을 사용하는 opa test 실행

    이전에는 테스트에서 생성한 Wasm 엔진을 닫지 않아, 사용할수록 메모리 사용량이 증가했습니다.

    - tester: Close the Wasm engine after each test ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • opa test 벤치마크에 추가된 Wasm 엔진 정리
    영향 대상Wasm 타깃을 사용하는 opa test 벤치마크

    이전에는 엔진이 열린 상태로 남아 사용량이 늘수록 메모리가 증가했습니다. 이제 벤치마크 실행기는 준비된 쿼리와 Wasm 엔진을 닫는 작업을 지연 실행합니다.

    - tester: Close the Wasm engine of a benchmark ([#9513](https://github.com/open-policy-agent/opa/pull/9513)) authored by @jbpros
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • Wasm 리졸버의 result 키 누락 패닉 수정
    영향 대상Wasm 리졸버 설정

    키가 정확히 하나인 결과 오브젝트를 받았는데 그 키 이름이 result가 아니면, 리졸버는 형태 검사를 통과한 뒤 누락된 키를 읽으려다 패닉이 발생했습니다. 이제 잘못된 결과에 사용되는 illegal result type 오류를 반환합니다.

    - wasm: Return an error when the result has no "result" key ([#9541](https://github.com/open-policy-agent/opa/pull/9541)) authored by @jbpros
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • OPA 타입 검사기에서 빈 컬렉션 순회 다시 허용
    영향 대상빈 배열 또는 객체 리터럴을 직접 순회하거나 변수를 통해 순회하는 정책

    v1.21.0부터 v1.22.1까지는 이러한 정책이 타입 오류로 거부됐지만, v1.20.2 및 이전 버전에서는 컴파일되고 평가됐습니다. 이제 타입 검사를 통과하고 평가되지만, 빈 컬렉션에서는 결과가 나오지 않습니다.

    - ast: Allow iterating empty collections in the type checker ([#9517](https://github.com/open-policy-agent/opa/issues/9517)) authored by @sspaink, reported by @kholia
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 위치 정보 없이 파싱한 모듈의 메타데이터 처리 수정
    영향 대상ParserOptions.SkipLocations로 파싱한 모듈

    위치 정보를 건너뛰면 컴파일러는 메타데이터 블록과 규칙 어노테이션을 문장에 연결할 때 행 번호에 의존했지만, 이 경우 행 번호를 사용할 수 없었습니다. 이제 컴파일러가 위치 정보 없이도 메타데이터를 처리합니다. 원래 위치를 복원할 수 없으므로 포매팅과 opa build에서는 주석을 생략합니다.

    - ast: Parse modules without locations ([#9485](https://github.com/open-policy-agent/opa/pull/9485)) authored by @srenatus
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 번들 리더 모듈 파싱 동시성을 GOMAXPROCS로 제한
    영향 대상OPA의 번들 리더로 번들을 읽는 설정(추정)

    여러 모듈이 포함된 번들을 읽을 때 이전에는 모듈마다 고루틴을 하나씩 시작했습니다. 동시에 진행할 수 있는 모듈은 GOMAXPROCS개뿐인데도 거의 모든 모듈의 할당 메모리가 계속 유지될 수 있었습니다. ReadManyModules-16 벤치마크에서는 피크 힙 사용량이 3.98% 감소했고, sec/op에는 측정된 변화가 없었습니다.

    - bundle: Parse at most GOMAXPROCS modules at once ([#9484](https://github.com/open-policy-agent/opa/pull/9484)) authored by @srenatus
    github.com/open-policy-agent/opa/releases/tag/v1.23.0

기능·개선14

  • Compile API의 Solr용 Lucene 쿼리 추가

    사용 조건 요청 시 Accept: application/vnd.opa.lucene.solr+json으로 타깃 지정; 멀티타깃 요청에서 다른 타깃과 함께 사용 불가

    - Lucene (Solr) target for the Compile API
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 새 json.pointer_escape 내장 함수
    - A new `json.pointer_escape` built-in function
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • Compile API의 Solr Lucene 쿼리 생성

    사용 조건 Accept: application/vnd.opa.lucene.solr+json으로 Compile API 요청

    ### Lucene (Solr) target for the Compile API ([#9376](https://github.com/open-policy-agent/opa/pull/9376))
    The Compile API can now translate a policy into a Lucene query for Solr's `fq` or `q`, with
    `Accept: application/vnd.opa.lucene.solr+json`. The one unknown is the document searched:
    ```rego
    # METADATA
    # scope: package
    # compile:
    #   unknowns: [input.doc]
    package filters
    
    include if {
        input.doc.owner == input.user
        input.doc.level >= 3
        not input.doc.status == "draft"
    }
    ```
    For the user `alice`, this compiles to `(owner:"alice" AND level:[3 TO *] AND NOT status:"draft")`.
    Multi-valued fields are compared by their elements, as in `"a" in input.doc.tags`; `schemas`
    annotations declare which fields are, and
    [`solr_schema.rego`](https://www.openpolicyagent.org/filtering/solr_schema.rego) generates them from
    Solr's Schema API. The target can't be combined with others in a multitarget request.
    See [Lucene filters](https://www.openpolicyagent.org/docs/filtering/lucene).
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 소스 위치가 없는 생성된 번들 정책 파싱

    사용 조건 번들 매니페스트에서 generated를 true로 설정

    A bundle whose policies are generated, for example from a policy database, can say so in its manifest:
    ```json
    {
      "revision": "...",
      "roots": ["authz"],
      "generated": true
    }
    ```
    OPA then parses its policies without source locations. In a benchmark of 20000 generated rules, that cut
    the memory the compiled policies hold by 40%. Annotations are kept. See the
    [manifest documentation](https://www.openpolicyagent.org/docs/management-bundles#bundle-file-format).
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 더 다양한 정책 형태에서 후보를 좁히는 규칙 인덱스
    ### Rule indexing covers more ways of saying "any of these"
    The rule index now narrows down rules written with:
    - a local iterating a literal set, array or object, in any indexable statement:
      `some g in {"devs", "ops"}; data.groups[g].members[input.subject]`;
    - collection lookups in the operands of `and` and `or`:
      `{data.groups.devs.members[input.subject]} or {data.groups.ops.members[input.subject]}`;
    - a collection lookup keyed by any element of a collection: `data.groups.devs.members[input.subjects[_]]`.
    See [Use indexed statements](https://www.openpolicyagent.org/docs/policy-performance#use-indexed-statements).
    - ast: Index a collection lookup keyed by an element of a collection ([#9461](https://github.com/open-policy-agent/opa/pull/9461)) authored by @srenatus
    - ast: Index collection lookups in `and`/`or` operands ([#9461](https://github.com/open-policy-agent/opa/pull/9461)) authored by @srenatus
    - ast: Index expressions over a local iterating a literal ([#9461](https://github.com/open-policy-agent/opa/pull/9461)) authored by @srenatus
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • JSON Pointer 토큰용 json.pointer_escape 추가
    ### New `json.pointer_escape` built-in function ([#9591](https://github.com/open-policy-agent/opa/issues/9591))
    Escapes a string so it can be used as one reference token of a JSON Pointer, as defined in RFC 6901.
    The characters `~` and `/` are replaced with `~0` and `~1`.
    For example: `json.pointer_escape(\"a/b~c\")` results in `\"a~1b~0c\"`.
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 생성된 번들의 증분 활성화

    사용 조건 번들 매니페스트에서 "generated": true로 해당 번들이 생성된 번들임을 표시해야 합니다.

    - plugins/bundle: Activate generated bundles incrementally ([#9359](https://github.com/open-policy-agent/opa/pull/9359)) authored by @srenatus
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • OPA REPL의 암묵적 함수 본문 형식 지원
    - repl: Allow implicit function bodies ([#9539](https://github.com/open-policy-agent/opa/issues/9539)) authored by @devjoshi2005, reported by @anderseknert
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • with를 적용한 빈 컬렉션 규칙의 상수 키 참조
    - ast: Allow keys of empty collections in rules replaced by `with` ([#9529](https://github.com/open-policy-agent/opa/pull/9529)) authored by @sspaink
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 서로 겹치지 않는 참조 헤드에서 다른 종류의 규칙 컴파일
    - ast: Allow mixed rule kinds on disjoint ref heads ([#7182](https://github.com/open-policy-agent/opa/issues/7182)) authored by @oleksii-udovychenko, reported by @anderseknert
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • AST JSON 언마샬링에서 every 표현식 지원
    - ast: Decode `every` expressions from JSON ([#9544](https://github.com/open-policy-agent/opa/pull/9544)) authored by @srenatus
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • AST JSON 언마샬링에서 some 선언 지원
    - ast: Decode `some` declarations from JSON ([#9544](https://github.com/open-policy-agent/opa/pull/9544)) authored by @srenatus
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • 소스 위치 없이 파싱되는 생성된 번들 정책

    사용 조건 번들 매니페스트에서 정책을 generated: true로 표시

    - bundle: Read generated bundles without locations ([#9359](https://github.com/open-policy-agent/opa/pull/9359)) authored by @srenatus
    github.com/open-policy-agent/opa/releases/tag/v1.23.0
  • types.Unmarshal에서 of 없는 set 타입 지원
    - types: Decode set types without an element type ([#9544](https://github.com/open-policy-agent/opa/pull/9544)) authored by @srenatus
    github.com/open-policy-agent/opa/releases/tag/v1.23.0

의존성 갱신21

    그 외 21건 · 보안 언급 없음
    • - build(go): Bump to 1.27.4 ([#9543](https://github.com/open-policy-agent/opa/pull/9543)) authored by @srenatus
    • - build(deps): Bump github.com/agnivade/levenshtein from 1.2.1 to 1.2.2
    • - build(deps): Bump github.com/foxcpp/go-mockdns from 1.2.0 to 1.3.0
    • - build(deps): Bump github.com/gobwas/glob from 1.0.0 to 1.1.0
    • - build(deps): Bump github.com/huandu/go-sqlbuilder from 1.43.0 to 1.44.1
    • - build(deps): Bump github.com/klauspost/compress from 1.20.0 to 1.20.4
    • - build(deps): Bump github.com/lestrrat-go/jwx/v3 from 3.3.0 to 3.4.0
    • - build(deps): Bump github.com/prometheus/client_golang from 1.24.1 to 1.25.0
    • - build(deps): Bump github.com/sergi/go-diff from 1.4.0 to 1.4.5
    • - build(deps): Bump github.com/spf13/pflag from 1.0.10 to 1.1.0
    • - build(deps): Bump github.com/vektah/gqlparser/v2 from 2.5.58 to 2.5.64
    • - build(deps): bump go.opentelemetry.io deps from 1.46.0/0.71.0 to 1.47.0/0.72.0
    • - build(deps): Bump go.opentelemetry.io/proto/otlp from 1.11.0 to 1.11.1
    • - build(deps): Bump go.yaml.in/yaml/v3 from 3.0.5 to 3.0.6
    • - build(deps): Bump golang.org/x/sync from 0.23.0 to 0.25.0
    • - build(deps): Bump golang.org/x/term from 0.46.0 to 0.48.0
    • - build(deps): Bump golang.org/x/text from 0.42.0 to 0.44.0
    • - build(deps): Bump golang.org/x/net from v0.60.0 to v0.62.0 ([#9555](https://github.com/open-policy-agent/opa/pull/9555)) authored by @anderseknert
    • - build(deps): Bump google.golang.org/grpc from 1.84.0 to 1.85.0
    • - build(deps): Bump gopkg.in/ini.v1 from 1.67.3 to 1.68.0
    • - build(deps): Bump oras.land/oras-go/v2 from 2.6.2 to 2.7.0
    기타49

    정리 내용은 AI가 작성하므로 틀릴 수 있으며, 보증 없이 제공합니다.