KC-1353: Add PAM recording list-by-user and download commands#2204
Open
jeremy-london wants to merge 1 commit into
Open
KC-1353: Add PAM recording list-by-user and download commands#2204jeremy-london wants to merge 1 commit into
jeremy-london wants to merge 1 commit into
Conversation
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.
Ticket KC-1353
Summary
Implements PR-212 (
get_recordings_for_usersKRouter endpoint) with full download support in Commander CLI.pam rec lbu <username...>— List PAM session recordings for one or more users with flexible filtering, output formats (table/JSON/CSV/markdown), and optional inline download.pam rec dl— Download and decrypt recording files by username or specific connection UIDs.session-recordings-util.ts(HKDF key derivation + per-file recording secret).Files Changed
keepercommander/commands/pam/recording_commands.pykeepercommander/commands/pam/router_helper.pyrouter_get_recordings_for_usersandrouter_download_recordingkeepercommander/commands/discoveryrotation.pyPAMRecordingCommandgroup (pam rec/pam recording)keepercommander/proto/pam_pb2.pyPAMRecordingsForUsersRequestprotobuf messagetests/test_pam_recording_commands.pyQA Test Guide
Prerequisites
sync-downto populate the vault cache (needed for record key lookup / decryption).1. List recordings for a user (table)
Expected: table with columns ConnUID, RecordUID, User, Type, Protocol, Started, Duration, Risk.
2. List with filters
Expected: only SSH session recordings with critical AI risk level.
3. Date range filter
4. JSON output (stdout)
Expected: JSON with
recordingsarray andhasMorebool. UseconnectionUidandrecordUidvalues for download commands.5. Save listing to file (format auto-detected from extension)
6. List and download in one step
Expected: table printed, then files downloaded + decrypted into
./downloads/. Filenames are<base64url-connection-uid>.<ext>.7. Download all file types for a specific session (by connection UID)
Get the full connection UID from
--format jsonabove, then:Expected: up to 4 files per session —
.ses(session),.tys(typescript),.tim(timing),.sum(AI summary). 404s are silently logged and mean that file type doesn't exist for that session (normal).8. Download all recordings for a user (bulk)
9. Download with type filter
10. Multiple users or connection UIDs
Decryption verification
Decrypted
.sesfiles are raw terminal session data (text). You can inspect them:The
.sumfile contains the AI-generated session summary as JSON.Test Results (live against dev)
All 8 test scenarios run against
jlondon+keeperai@keepersecurity.comon dev:.ses(62,724 bytes),.tys,.tim,.sumfilesUnit tests: 54/54 passing, 100% line coverage