Repository navigation
Add RDP printer redirection - #284
skolarianer wants to merge 6 commits into
Conversation
|
Thanks, printing has been asked for a few times. Some changes needed though:
The |
a8c040f to
d422edb
Compare
|
Thanks for the review. The printer changes are consolidated in d422edb, authored with my GitHub identity. Printing now requires The print-only drive has been removed. Printer redirection uses its own RDP device and does not create a drive path. The The intended experience is that a user selects Print in the remote RDP application, and RustGuac sends the resulting PDF to the browser in memory. The browser then seamlessly opens its local print dialog without opening a visible PDF page, preview, tab, or download step. The user chooses a local printer in that dialog. Because the browser receives the PDF and it can be saved from the print dialog, this remains a data egress path. The hidden I removed |
|
One clarification on print-job logging: the current implementation writes an INFO entry to the RustGuac service log with the session ID, user, and filename only. Did you mean a persistent, user-visible record in Reports or an audit log instead? The Reports page currently covers session history and usage, so print-job entries there would need separate storage and UI/API work. |
3feeb16 to
363dbdb
Compare
|
The CSP change is limited to print-enabled client pages now: only those responses allow |
|
The new With |
caf0821 to
6695523
Compare
6695523 to
2c325b7
Compare
|
oops... there still was a commit by |
|
Keeping this PR in draft until PR #317 is merged. RDP printing depends on the initial file-stream acknowledgement included there. |
Adds optional RDP printer redirection. Print jobs are converted to PDFs by Ghostscript on the guacd host and sent to the browser, which opens the local print dialog. The printer can be enabled and named per connection or ad-hoc session.
Security policy change for review: The automatic print flow loads the generated PDF from a
blob:URL in a hidden iframe, then calls the browser’sprint()function. This requires addingframe-src 'self' blob:to the CSP. Please review whether this scoped allowance for blob frames is acceptable for the project’s security policy.RDP printer redirection requires drive redirection. Print-only sessions therefore use a private per-session drive directory with mode 0750, while keeping the browser file manager disabled and uploads and downloads disabled. When file transfer is separately enabled, its configured permissions apply.
Adds Ghostscript to install packages and includes a client-side test for PDF printing and regular file downloads.
Tested:
git diff --check; node tests/client-print-file.mjscargo test --offlinepassed.