内容简介: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 hi
Subuser - Securing the Linux desktop with Docker
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)
- sudo (if you don't want to become a member of the docker group)
OS Requirements
- Linux: Everything supported
- OSX with docker for desktop: Limited support
- inherit-timezone is ignored
- xpra (graphical apps) doesnt work
- Probaly other issues
Install with pip3: Stable version
- Add yourself to the sudo group (or the docker group).
$ sudo nano /etc/group
Find sudo and add your username to the end of the line.
- Install subuser from pip3.
$ sudo pip3 install subuser
- Add
~/.subuser/binto your path by adding the linePATH=$HOME/.subuser/bin:$PATHto the end of your.bashrcfile. - Log out and then back in again.
- Done!
Install from git: Development version
- Add yourself to the sudo group (this is not necesary if you are already a member of the docker group).
- Download the subuser repository
$ cd $ git clone https://github.com/subuser-security/subuser
- Add
subuser/logicand~/.subuser/binto your path by adding the linePATH=$HOME/subuser/logic:$HOME/.subuser/bin:$PATHto the end of your.bashrcfile.
Note
You will need to change the path to subuser/logic to refer to the location to which you downloaded subuser.
- Log out and then back in again.
- Done!
To learn more and read the full manual please visit subuser.org
以上所述就是小编给大家介绍的《subuser: run Linux programs with selectively restricted permissions》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
高性能MySQL
施瓦茨 (Baron Schwartz)、扎伊采夫 (Peter Zaitsev)、特卡琴科 (Vadim Tkachenko) / 宁海元、周振兴、彭立勋、翟卫祥,刘辉 / 电子工业出版社 / 2013-5-1 / 128.00元
《高性能mysql(第3版)》是mysql 领域的经典之作,拥有广泛的影响力。第3 版更新了大量的内容,不但涵盖了最新mysql 5.5版本的新特性,也讲述了关于固态盘、高可扩展性设计和云计算环境下的数据库相关的新内容,原有的基准测试和性能优化部分也做了大量的扩展和补充。全书共分为16 章和6 个附录,内容涵盖mysql 架构和历史,基准测试和性能剖析,数据库软硬件性能优化,复制、备份和恢复,高可......一起来看看 《高性能MySQL》 这本书的介绍吧!