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

Separate getting app location into another app #6

Open
Kixunil opened this issue Jan 30, 2021 · 0 comments
Open

Separate getting app location into another app #6

Kixunil opened this issue Jan 30, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Kixunil
Copy link
Collaborator

Kixunil commented Jan 30, 2021

Problem
At the beginning of the project it was reasoned that pwning dashboard => getting access to all apps => running as non-root doesn't matter. This is not entirely true. pwning all selfhost apps and pwning whole system are not the same thing. The user could run other non-selfhost stuff on the machine and it's not nice that we're making it more vulnerable (even if probably not the case today).

Solution
Create a separate command-line application calle selfhost-open that launches open scripts. This application will be owned by root, have group set to selfhost-open-app and mode 4750. It will accept three parameters: name of the app, name of the user, prefix (optional). If prefix is not given, it will run get_default_domain.sh to figure it out.

selfhost-dashboard will run as a separate user added to selfhost-open-app group. It will exec selfhost-open whenever trying to determine the redirect location. We're already running an external command so the code will not be more complex. selfhost-open can be written mostly using existing code in selfhost-dashboard.

We will also need an upgrade script to provide migration from previous version - we will need to fix file permissions in /etc/selfhost-dashboard.

Nice side effect
This will also allow people to launch apps from CLI, without selfhost-dashboard. It may be helpful for paranoid people or for some exotic dashboard alternative using SSH or whatever.

@Kixunil Kixunil added the enhancement New feature or request label Jan 30, 2021
Kixunil added a commit that referenced this issue Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant