Open
Conversation
e5e9bc7 to
1802c4c
Compare
Add default value of 0 to KeeperFileData.lastModified so that kotlinx-serialization does not throw MissingFieldException when file metadata uploaded by non-SDK clients omits the field. Also bumps version to 17.2.1 and adds regression tests for the missing-field case plus guards for the integer and fractional cases.
… SecretsManager
Replace manual open/close patterns with Kotlin .use {} blocks and
try/finally + disconnect() to guarantee resource closure on exceptions.
LocalConfigStorage.kt:
- init block: BufferedReader now closed via .use {} (previously always leaked)
- saveToFile(): BufferedWriter wrapped in .use {}
- saveCachedValue(): FileOutputStream wrapped in .use {}
- getCachedValue(): FileInputStream wrapped in .use {}
SecretsManager.kt:
- postFunction(): replace with() block with try/finally + connection.disconnect()
- downloadFile(): same pattern; stream read via .use {}
- uploadFile(): same pattern; outputStream and response stream via .use {}
SecretsManagerTest.kt:
- uploadFile test: FileInputStream wrapped in .use {}
1802c4c to
b1f61c1
Compare
…yload KeeperRecordData.custom defaulted to null, causing kotlinx-serialization to omit the field from the V3 API payload when no custom fields were set. Commander and Vault always include "custom": [] on every record. - Change custom default from null to mutableListOf() - Add @EncodeDefault to force serialization even when list is empty (kotlinx-serialization skips default-valued fields without this) - Remove now-redundant null guards in SecretsManager.kt - Add regression test: testRecordCreateEmptyCustomSerialized
KSM-902: add IL5 region mapping (il5.keepersecurity.us)
…setup-gradle to v4
…rage and SecretsManager" This reverts commit b1f61c1.
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 Java SDK v17.2.1 — three changes: IL5 region support, serialization correctness for record create, and file attachment crash fix.
Changes
New Features
\"IL5\" -> \"il5.keepersecurity.us\"to theinitializeStorage()region map inSecretsManager.kt. Tokens prefixedIL5:now route to the DoD Impact Level 5 environment.Bug Fixes
KeeperRecordData.customdefaulted tonull, causingkotlinx-serializationto omit\"custom\"from the V3 API payload when no custom fields were set. Changed default tomutableListOf()and added@EncodeDefaultto force inclusion. Regression test added.lastModifiedabsent (KSM-854): files uploaded by non-SDK clients (iOS, Android, Web Vault) omitlastModified;kotlinx-serializationtreated it as required, throwingMissingFieldExceptionand silently dropping the attachment. Added= 0default, consistent with .NET SDK behavior (KSM-674).Deferred to v17.2.2
LocalConfigStorageandSecretsManager(KSM-855): deferred to v17.2.2 for faster v17.2.1 QA cycle. Full implementation available in feature branchfeature/java-ksm-855-resource-leaks.Breaking Changes
None.
Related Issues