diff --git a/languages/golang/CHANGELOG.md b/languages/golang/CHANGELOG.md index 12eb89d62..deaa597e5 100644 --- a/languages/golang/CHANGELOG.md +++ b/languages/golang/CHANGELOG.md @@ -13,13 +13,46 @@ and `languages/golang/encrypt/encrypttest/vX.Y.Z` on the same commit. ## [Unreleased] +## [0.1.0-rc.7] - 2026-11-25 + +### Upgrading from rc.6 + +Update the SDK, and `encrypttest` if your program imports it. The two +modules are released at the same version: + +```sh +go get github.com/cipherstash/stack/languages/golang@v0.1.0-rc.7 +go get github.com/cipherstash/stack/languages/golang/encrypt/encrypttest@v0.1.0-rc.7 +``` + +If a `[]byte` field has an order index (`index=ore` or `index=ope`), +remove the index from its tag and run `go generate ./...` again. rc.7 +refuses that index, and the calls that fail until the type is generated +again are listed under Breaking. + +Code generated by rc.6 otherwise still compiles and runs. Generating again +also gives `Children` its new return type, +`encrypt.JSONChildren[eql.JSONEntry]`, which opens the children. Code that +keeps the result as an `encrypt.JSONToken` then takes `.Token()`. + +Before you upgrade, check that no value you have stored is outside the new +range: an `encrypt.Date` from `-9999-01-01` to `9999-12-31`, and a +`time.Time` from `-009999-01-02T01:59:59Z` to +`9999-12-30T22:00:00.999999999Z`. A stored value outside it no longer +decrypts, and is reported as `ErrAuthentication`. The Breaking section +says how to check. + +The EQL SQL has not changed since rc.6. The `eql-v4-install.sql` attached +to this release differs from rc.6's only in its version stamp. If you +installed rc.6's bundle, you do not need to run it again. + ### Added - **Read one child of a JSON node** (#1677). Your app can now read one level of a `JsonSearch` document without fetching the parent's whole subtree. The read takes three steps. 1. Your app calls `Children(ctx, c, path)` on the field. `Children` now - returns an `encrypt.JSONChildren`. + returns an `encrypt.JSONChildren[eql.JSONEntry]`. 2. The database (EQL) runs `eql_v4.json_tree_children(col, $1::text)`, with `Token()` as `$1`. The database returns the parent's direct children as encrypted entries. @@ -41,6 +74,12 @@ and `languages/golang/encrypt/encrypttest/vX.Y.Z` on the same commit. token. - An entry that is not a child of that node is `ErrEncoding`, with code `stack_encrypt::json_wrong_entry`. + - `Open` does not check that the database returned every child, or which + row an entry came from. + - Within an array, the tags are not authenticated, and the database has + the parent's token, so it can compute them. A database that forges them + can return the children of `$.items[0]` for a read of `$.items[1]`, and + `Open` accepts them. See the EQL `json_tree` leakage reference. - A child that is an object or an array with members does not open alone. `Open` refuses it as `ErrEncoding`, with code `stack_encrypt::json_not_a_leaf`. Read such a child with `Subtree` at @@ -71,7 +110,8 @@ and `languages/golang/encrypt/encrypttest/vX.Y.Z` on the same commit. the same key. - A time is sent as RFC 3339 text in UTC. A time outside the years 0 to 9999 is refused with `ErrEncoding`. So is a key or a text that is not - valid UTF-8. + valid UTF-8, and maps and lists nested more than 32 levels deep. A + float that is not finite is sent as null. - Printing an `AuditMetadata` shows its keys, quoted, and never a value. - ZeroKMS does not verify the facts, and a decrypt does not need them. ZeroKMS writes them to its logs. Do not send plaintext, anything @@ -130,8 +170,8 @@ and `languages/golang/encrypt/encrypttest/vX.Y.Z` on the same commit. in the database until the row is written again or the column is dropped. -- **`Children` returns `encrypt.JSONChildren`, not `encrypt.JSONToken`** - (#1677). The new type contains the token and opens the children. +- **`Children` returns `encrypt.JSONChildren[E]`, not `encrypt.JSONToken`** + (#1677). `stashgen` writes `encrypt.JSONChildren[eql.JSONEntry]`. The new type contains the token and opens the children. Regenerate with `stashgen` to get it. - Code that passes the result to a query keeps working, because `JSONChildren` binds as its token. @@ -197,6 +237,12 @@ and `languages/golang/encrypt/encrypttest/vX.Y.Z` on the same commit. the scopes and the binding. A cipher with a binding still refuses `ChildCount`, since a count opens nothing. +- `vcffi` and `vcvalue` move to vitaminc `f1fc9ae74`, the commit vitaminc + 0.10.0 was released from. The host now checks the same date and + timestamp range as the guests. + +### Fixed + - **`Matches` on `TextMatch`, `TextSearch`, and `TextSearchOre` finds a name typed in part again** (#1398). Before this fix, "Mike Ng" did not find "Mike Nguyen". A stored value contains its 3-grams, and each @@ -216,12 +262,6 @@ and `languages/golang/encrypt/encrypttest/vX.Y.Z` on the same commit. `Verify` keeps the same rows that the filter selects. Stored values do not change, so nothing needs re-encrypting. -- `vcffi` and `vcvalue` move to vitaminc `f1fc9ae74`, the commit vitaminc - 0.10.0 was released from. The host now checks the same date and - timestamp range as the guests. - -### Fixed - - **A client goes on working after its RoundTripper panics during a ZeroKMS request** (#1780). A panic in the `http.RoundTripper` given to `WithTransport`, while it sends a ZeroKMS request, reaches the caller,