KC-1315, KC-1329: Fix share-folder expiration, remove semantics, and record permissions#2203
Merged
Conversation
…#2168) * Fix share-folder record expiration removing owner records and breaking re-shares When share-folder was used with -r and --expire-in, expiration was applied to SharedFolderUpdateRecord, which caused the record to be removed from the owner's vault when the timer expired. Route per-record expiration and -roe through the record share API (revoke then re-grant) instead, keep folder user updates for access only, sync before granting, and skip redundant user updates when sharing additional records to the same recipient. * Share-folder: expire folder and record access together; log expiry in output * updated test file * Fix share-folder remove vault deletion; clean up access grant/remove logs * Fix share folder expire in and -r combination * Separate folder and record flag usage to fix multiple remove related issue * Fix -p and -o flags and 1mi expiry * Restrict outside records to be shared via -r * Update help --------- Co-authored-by: amangalampalli-ks <amangalampalli@keepersecurity.com>
sk-keeper
approved these changes
Jul 9, 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
Fixes KC-1315 and KC-1329.
This PR aligns
share-folderwith Keeper Vault by separating folder access from record permissions. Folder access expiration now applies only to folder access, while record permissions are managed independently.Issues Fixed
--expire-in/--expire-atwith-rcreated record-level expiration instead of folder access expiration.-a remove -ecould remove records from the folder instead of only revoking user access.-rcould link/add records that were not already in the shared folder.-e,-p,-o,--expire-*,-roe) and record flags (-r,-d,-s) shared the same execution path, causing inconsistent behavior such as permission updates not sticking and intermittent share failures.Changes
-a,-e,-p,-o,--expire-in,--expire-at,-roe) and record permissions (-r,-d,-s) are now handled independently but can still be used in the same command.-rupdates only record permissions.-a remove -enow revokes folder access only; records remain in the shared folder.-ronly updates records already in the folder (no implicitsharedFolderAddRecord).-d/-srequire a record target (-r,-r *, or-r @existing).-p/-owith-r, case-insensitive-elookup, improved error messages, and1miexpiration validation.Tests & Documentation
-ocannot be used with expiration.test_command_register.py.