Skip to content

KC-1315, KC-1329: Fix share-folder expiration, remove semantics, and record permissions#2203

Merged
sk-keeper merged 1 commit into
releasefrom
share-folder-roe-fix
Jul 9, 2026
Merged

KC-1315, KC-1329: Fix share-folder expiration, remove semantics, and record permissions#2203
sk-keeper merged 1 commit into
releasefrom
share-folder-roe-fix

Conversation

@amangalampalli-ks

Copy link
Copy Markdown
Contributor

Summary

Fixes KC-1315 and KC-1329.

This PR aligns share-folder with 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-at with -r created record-level expiration instead of folder access expiration.
  • -a remove -e could remove records from the folder instead of only revoking user access.
  • -r could link/add records that were not already in the shared folder.
  • Folder flags (-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

  • Folder access (-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.
  • Expiration and ROE apply only to folder access; -r updates only record permissions.
  • -a remove -e now revokes folder access only; records remain in the shared folder.
  • -r only updates records already in the folder (no implicit sharedFolderAddRecord).
  • -d / -s require a record target (-r, -r *, or -r @existing).
  • Self-removal prompts for confirmation; owners cannot leave unless another participant has full management permissions.
  • Fixed -p / -o with -r, case-insensitive -e lookup, improved error messages, and 1mi expiration validation.

Tests & Documentation

  • Updated help text to separate folder access and record permissions, and documented that -o cannot be used with expiration.
  • Added unit tests in test_command_register.py.

…#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>
@amangalampalli-ks amangalampalli-ks self-assigned this Jul 9, 2026
@amangalampalli-ks amangalampalli-ks marked this pull request as ready for review July 9, 2026 14:45
@sk-keeper sk-keeper merged commit c3154e1 into release Jul 9, 2026
4 checks passed
@sk-keeper sk-keeper deleted the share-folder-roe-fix branch July 9, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants