Giter VIP home page Giter VIP logo

subuser's Introduction

Subuser - Securing the Linux desktop with Docker

http://subuser.org/_static/images/subuser-logo.png

Visit us at subuser.org

As free software developers we like to share. We surf the web and discover new code. We are eager to try it out. We live out an orgy of love and trust, unafraid that some code we cloned from Git might be faulty or malicious. We live in the 60s, carefree hippies.

This is utopia.

But sharing code isn't safe. Every time we try out some stranger's script, we put ourselves at risk. Despite the occasional claim that Linux is a secure operating system, haphazardly sharing programs is NOT secure.

Furthermore, the fragmentation of the Linux desktop means that packaging work is needlessly repeated. Programs that build and run on Fedora must be repackaged for Ubuntu.

Subuser with Docker attacks both problems simultaneously. Docker provides an isolated and consistent environment for your programs to run in. Subuser gives your desktop programs access to the resources they need in order to function normally.

Subuser turns Docker containers into normal Linux programs:

Right now I'm editing this file in vim. vim is not installed on my computer though. It is installed in a docker container. However, in order to edit this file, all I had to do was type:

$ vim README.md

Subuser turns a docker container into a normal program. But this program is not fully privileged. It can only access the directory from which it was called, not my entire home dir. Each subuser is assigned a specific set of permissions, just like in Android. You can see an example permissions.json file bellow.

{
  "description"                : "A web browser."
  ,"maintainer"                : "Timothy Hobbs <timothyhobbs (at) seznam dot cz>"
  ,"executable"                : "/usr/bin/firefox"
  ,"user-dirs"                 : [ "Downloads"]
  ,"gui"                       : {"clipboard":true,"cursors":true}
  ,"sound-card"                : true
  ,"allow-network-access"      : true
}

For a list of all permissions supported by subuser, please see the subuser standard.

Installation

System Requirements

  • Docker 1.3 or higher
  • Python >= 3
  • Git
  • X11 and the xauth utility (You almost certainly have this)

Install with pip3: Stable version

  1. Add yourself to the docker group.

Note

Being a member of the docker group is equivalent to having root access.

$ sudo nano /etc/group

Find docker and add your username to the end of the line.

  1. Install subuser from pip3.
$ sudo pip3 install subuser
  1. Add ~/.subuser/bin to your path by adding the line PATH=$HOME/.subuser/bin:$PATH to the end of your .bashrc file.
  2. Log out and then back in again.
  3. Done!

Install from git: Development version

  1. Add yourself to the docker group.

Note

Being a member of the docker group is equivalent to having root access.

  1. Download the subuser repository
$ cd
$ git clone https://github.com/subuser-security/subuser
  1. Add subuser/logic and ~/.subuser/bin to your path by adding the line PATH=$HOME/subuser/logic:$HOME/.subuser/bin:$PATH to the end of your .bashrc file.

Note

You will need to change the path to subuser/logic to refer to the location to which you downloaded subuser.

  1. Log out and then back in again.
  2. Done!

To learn more and read the full manual please visit subuser.org

subuser's People

Contributors

berendt avatar danmbox avatar fak3 avatar folti avatar kenkeiras avatar marclaporte avatar shannara avatar spowers-gb avatar takluyver avatar talwrii avatar timthelion avatar ypid avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.