Release Go SDK v1.7.0 - #51
Merged
Merged
Conversation
stas-schaller
force-pushed
the
release/sdk/golang/core/v1.7.0
branch
from
April 1, 2026 19:59
5bc1526 to
2556d2f
Compare
stas-schaller
force-pushed
the
release/sdk/golang/core/v1.7.0
branch
from
April 22, 2026 16:22
2556d2f to
9d81dcf
Compare
BREAKING CHANGE: minimum Go version raised to 1.16 (was 1.14) Security: - KSM-701: write client-config.json with mode 0600 - KSM-745: add transmission public key #18 for Gov Cloud Dev Bug fixes: - KSM-736: deduplicate records to fix notation lookup with shortcuts - KSM-663: handle broken records, files, and folders gracefully - KSM-826: RecordCreate.ToDict() always emits "custom" key - KSM-860: RecordField JSON struct tags + value unwrapping fix - KSM-756: use folder key for flat records carrying folderUid - KSM-912: use ProxyFromEnvironment when ProxyUrl is not set - KSM-911: skip records on AES-GCM decryption failure (return nil) - KSM-913: return nil from NewFolderFromJson on decryption failure - KSM-914: return nil from NewKeeperFileFromJson on decryption failure - KSM-916: return error on app key decryption failure in GetSecrets - KSM-917: return nil from NewKeeperFolder on json.Unmarshal failure - KSM-919: KeeperHTTPError typed error; HTTP status on JSON-error path - KSM-921: consult cache on network-level errors in PostQuery Features: - KSM-565: parse KSM tokens with region prefix (US:, EU:, AU:, GOV:, JP:, CA:) - KSM-532: HTTP proxy support via ClientOptions.ProxyUrl - KSM-665: include HTTP status codes in error messages - KSM-632: add links2Remove parameter for file removal - KSM-626: add GraphSync links support - KSM-583: upgrade SetNotes to UPSERT behavior - KSM-920: custom-cache example demonstrating offline-fallback semantics Technical: - KSM-616: remove deprecated ioutil; raise minimum Go to 1.16 - KSM-658: ICache and IKeyValueStorage godoc; custom-cache example - CI matrix: test Go 1.16.x, 1.20.x, 1.22.x
stas-schaller
force-pushed
the
release/sdk/golang/core/v1.7.0
branch
from
April 30, 2026 18:56
f1d2ffc to
8644a49
Compare
maksimu
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Release branch for v1.7.0 — adds HTTP proxy support, regional token parsing, Gov Cloud Dev environment support, security hardening for config file permissions, graceful handling of broken vault data, custom cache documentation, and CI/CD publish workflow.
Changes
New Features
ClientOptions.ProxyUrlfor network environments requiring intermediariesUS:,EU:,AU:,GOV:,JP:,CA:) to automatically set the correct backend hostnameLinksToRemoveparameter for file removal operationsICacheinterface with godoc and add a thread-safe in-memory TTL cache example inexample/custom-cache/Bug Fixes
ToDict()omitted the"custom"key when no custom fields were set; Commander and Vault always include"custom": []and the backend expects it presentjsonstruct tags toRecordFieldso keys serialize lowercase ("type","label","value","required") matching the KSM V3 API; fixNewRecordFieldto unwrap concrete slice types via reflection so values produce["x"]instead of[["x"]]records[]array with afolderUidwere decrypted with the app key instead of the folder key, silently producing empty field values. SDK now looks up the folder infolders[]and decrypts with the correct folder keygetTransportused a bare&http.Transport{}whenProxyUrlwas not set, leaving theProxyfield nil and silently ignoringHTTPS_PROXY/HTTP_PROXYenv vars. Now useshttp.ProxyFromEnvironmentin the fallback path, matchinghttp.DefaultTransportNewRecordFromJsonnever returnednilon AES-GCM decryption failure — callers received empty record stubs. Fixed by returningnilon both failure paths: record key decryption and record data decryptionNewFolderFromJsonandNewKeeperFoldernow returnnilwhen folder key or name decryption fails instead of non-nil stubs; fixed latent nil-guard incore.goNewKeeperFileFromJsonnow returnsnilwhen file key decryption fails;GetMeta()short-circuits on an empty key;GetFileData()logs the error on data decryption failureGetSecretssilently returned an empty record list whenencryptedAppKeydecryption failed in the just-bound flow (first call after token exchange). Now returns an error immediatelyNewKeeperFolderreturned a non-nil stub withName = ""when CBC-decrypted folder name bytes failedjson.Unmarshal; now returnsnil, completing the nil-return contract KSM-913 established for theDecryptAesCbcfailure path in the same functionSaveFilereturnedtrueeven whenos.WriteFilefailed — the write error was logged but the caller received a success signal.SaveFile,DownloadFileByTitle, andDownloadFilenow returnerrorso callers receive the failure reasonHandleHttpErrornow returns*KeeperHTTPErroron all non-200 paths; the JSON-error path previously omitted the status code fromerr.Error()while the non-JSON path already included it. ThePOST Error:wrapper usesfmt.Errorf("POST Error: %w", err)to preserve the error chain forerrors.AsPostQuerynow consultsICache.GetCachedValuewhenPostFunctionreturns a transport-level error (DNS failure, connection refused, TLS error, timeout). Previously the cache-check was unreachable on theerr != nilpath, providing no resilience for the most common outage modestrings.Cut()(Go 1.18+) withstrings.SplitN()in regional token parsingMaintenance
ioutildependency, raise minimum Go version to 1.16github.shainstead ofmaster;--notes-file CHANGELOG.mdreplaces--generate-notes// Package core...comment tocore.goso pkg.go.dev indexes a package summary in search resultsDocumentation and Examples
example/custom-cache/rewritten to demonstrate offline-fallback semantics — the first call populates the cache; a second call against an unreachable host returns cached records via the KSM-921 fallback; afterPurge()the network error surfaces. README and CHANGELOG updated to describeICacheas an offline resilience mechanism, not a request-rate limiterBreaking Changes
Minimum Go version: Now requires Go 1.16+ (previously 1.14+). Update your
go.mod:Nil returns on decryption failure: The following functions previously returned non-nil empty stubs on decryption failure and now return
nil. Callers that did not nil-check the return value will panic on dereference:NewRecordFromJson(KSM-911)NewFolderFromJson/NewKeeperFolder(KSM-913, KSM-917)NewKeeperFileFromJson(KSM-914)GetSecretsnow returns an error (not nil-error + empty list) when app key decryption fails (KSM-916)File download return type (KSM-918):
SaveFile,DownloadFileByTitle, andDownloadFilenow returnerrorinstead ofbool. Update call sites that check the boolean return:HTTP error string format (KSM-919):
err.Error()on the JSON-error path now includesHTTPStatus=Nas a prefix (e.g."POST Error: HTTPStatus=403 Error: access_denied, ..."). Code that string-matched the old format will no longer match. Migrate toerrors.As:Related Issues
KSM-532, KSM-565, KSM-583, KSM-616, KSM-626, KSM-632, KSM-658, KSM-663, KSM-665, KSM-701, KSM-736, KSM-745, KSM-756, KSM-826, KSM-860, KSM-911, KSM-912, KSM-913, KSM-914, KSM-916, KSM-917, KSM-918, KSM-919, KSM-920, KSM-921