Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly document how to "Drastically reduce security for profiles which need to open stuff in [browser name]" #3471

Open
ssokolow opened this issue Jun 18, 2020 · 9 comments
Labels
documentation Issues and pull requests related to the documentation enhancement New feature request sandbox-ipc Opening links and talking to programs outside of the sandbox (see #6462)

Comments

@ssokolow
Copy link

ssokolow commented Jun 18, 2020

Regarding this:

Cannot open hyperlink with web browser using another application

It is recommended to copy-paste links from with application with the hyperlink into an already running web browser. This will always be the safest bet, allbeit not very user-friendly. See #2228 and #2047

I consider copy-pasting links from within the application an unacceptable workflow regression, even without the Qt bug in Kubuntu 16.05 LTS that causes clipboard functionality in Qt apps to die once uptime hits 50 days, and the paste URLs in #2228 time out, so I can't work from those.

Please consider providing proper documentation for what one must take into account when writing a custom "Firefox, locked down as far as can be done without compromising workflow" profile as a defense-in-depth strategy.

(At the moment, having no idea where I'm going wrong and I'm waffling between abandoning Firejail, using Rust to write an "expose Firefox remoting on the D-Bus session bus" daemon which could get launched alongside Firefox in its jail, or checking how onerous it would be to use Bubblewrap or locally-customized Flatpaks to achieve the desired effect.)

(My goal is to have apps, Firejail'd or not, using a Firejaild Firefox as an HTTP/HTTPS handler, and Firejail'd Firefox and Chromium using a Firejaild Deluge as a magnet link handler.)

EDIT: Sorry for the (repeated) typo in the old version of the previous paragraph. I'm not fully alert right now.

@SkewedZeppelin
Copy link
Collaborator

SkewedZeppelin commented Jun 18, 2020 via email

@ssokolow
Copy link
Author

ssokolow commented Jun 18, 2020

I will as soon as I finish writing the improved tooling so it doesn't take me 15 minutes of acute time after each reboot and another ~15 of "diffuse waste" over the rest of the day whenever I have to rebuild my desktop session state after logging out.

(And no, "as soon as I finish writing the improved tooling" is not a joke. At the moment, the first thing in line for completion is something half-way between Leafpad and desktop sticky notes, which auto-saves, remembers all geometry and state for each window, and treats manually-specified filenames as optional. After that, maybe a Vim plugin which does something similar for open Vim windows without the workflow warts I see in existing options. ...neither of which are tools that get along with DE-level session-persistence functionality. Then probably something which jerry-rigs some smarter window-geometry persistence onto multi-window Firefox sessions using my prior experience using libwnck and python-xlib to write "non-desktop-specific window manager extensions". Having the budget for an SSD and a CPU faster than an Athlon II X2 270 would probably also help.)

@glitsj16
Copy link
Collaborator

(At the moment, having no idea where I'm going wrong and I'm waffling between abandoning Firejail, using Rust to write an "expose Firefox remoting on the D-Bus session bus" daemon which could get launched alongside Firefox in its jail, or checking how onerous it would be to use Bubblewrap or locally-customized Flatpaks to achieve the desired effect.)

Perhaps exposing Firefox remoting on the D-Bus session bus can be integrated into the recent D-Bus work (see #3265, #3326 and #3406)?

@rusty-snake
Copy link
Collaborator

Assuming firefox is already running, I think it would look like this.

# IF HAS_WHITELIST
noblacklist ${HOME}/.mozilla
whitelist ${HOME}/.mozilla/firefox/profiles.ini
read-only ${HOME}/.mozilla/firefox/profiles.ini
# ELSE
noblacklist ${HOME}/.mozilla
read-only ${HOME}/.mozilla
# FI

# IF DBUS_USER_NONE
ignore dbus-user none
dbus-user filter
dbus-user.talk org.mozilla.firefox.* // or own?
# ELIF DBUS_USER_FILTER
dbus-user.talk org.mozilla.firefox.* // or own?
# FI

# IF HAS_PRIVATE_BIN
private-bin firefox,bash,sh,mkdir,…
# FI

# IF HAS_PRIVATE_LIB
private-lib mozilla
# FI

@rusty-snake
Copy link
Collaborator

The customizations differ between firefox-x11 and firefox-wayland.

@ssokolow
Copy link
Author

Sorry for not responding. I've been sleeping terribly the last couple of days, so I haven't done anything with Firejail.

I'll give you a proper response as soon as I'm in a proper state of mind again.

@ssokolow
Copy link
Author

...and now I'm getting signs of impending hardware failure, so I need to deal with that before I can respond.

@glitsj16
Copy link
Collaborator

@ssokolow Hoping you're okay, including the hardware. As a FYI I've recently put together a few basic shell scripts to open stuff in a firejailed web browser that might be helpful/inspirational. See this for more context.

@ssokolow
Copy link
Author

Better than I was before.

My sleep is still on and off, and I still have to finish with the hardware work, but I've made sure the backups of everything on the potentially failing drive are up to date and viable, ordered and received the replacement hardware (I'm taking the opportunity to expand my storage and finally get an SSD), and I'm now just making preparations to get my upgrade from Kubuntu 16.04 LTS to 20.04 LTS done as part of the hardware upgrade to save time and effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues and pull requests related to the documentation enhancement New feature request sandbox-ipc Opening links and talking to programs outside of the sandbox (see #6462)
Projects
None yet
Development

No branches or pull requests

5 participants