GUACAMOLE-1969: Implement recording-include-clipboard connection parameter
This PR introduces new recording-include-clipboard into all supported protocols that dumps the clipboard instruction, along with the relevant stream blobs, into recording.
Few key notes:
- because clipboard can contain sensitive data, it's opt-in in the same way as
recording-include-keysand administrators need to explicitly set the parameter totrue - as the recording components are responsible for handling the recording dumps,
guac_recording_createincludes the new parameter (i've opted for making it the last argument, but let me know if I should switch it to be next to theinclude_keys) - the keyboard dumps are hooked into user clipboard handler, so should only handle changes from user side and not from the server side
- as clipboard instruction merely creates stream, even the simplest paste is essentially at least 3 instructions (clipboard, 1+ blobs, end), which can be seen like this in some testing recording
$ sed 's/;/\n/g' recording-clipboard | grep clipboard -A 2
9.clipboard,1.0,10.text/plain
4.blob,1.0,20.UHVsbCBjb21wbGV0ZQ==
3.end,1.0
Once this PR is approved from technical perspective, I will create respective PRs for guacamole-client and guacamole-manual to accomodate for both documentation change as well the client side option
Hi, thanks for putting together this PR!
I've been working on a similar implementation but when I went to see if an issue for clipboard recordings already existed I found this PR.
I'd love to merge your PR instead as it's already looking great. I just have one change I'd suggest: in addition to recording clipboard data sent to the RDP server (via the guac_rdp_clipboard_handler, guac_rdp_clipboard_blob_handler, and guac_rdp_clipboard_end_handler flow), it would be valuable to also record clipboard data received from the RDP server by adding a call within guac_rdp_cliprdr_format_data_response where we call guac_common_clipboard_send.
Currently, this PR captures clipboard content when a user pastes into the remote session (client → server), but it doesn't capture when the clipboard is modified on the remote desktop itself (server → client). Adding recording support in guac_rdp_cliprdr_format_data_response would capture both directions, providing a complete picture of clipboard activity during the session.