<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>freedom blog reloaded &#187; pyttpd</title>
	<atom:link href="http://blog.peijnik.at/topics/python/pyttpd/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.peijnik.at</link>
	<description>Stephan's Free Software blog</description>
	<lastBuildDate>Tue, 10 Nov 2009 18:04:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Introducing pyttpd</title>
		<link>http://blog.peijnik.at/2009/03/31/introducing-pyttpd/</link>
		<comments>http://blog.peijnik.at/2009/03/31/introducing-pyttpd/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 23:27:07 +0000</pubDate>
		<dc:creator>stephan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[foss]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[pyttpd]]></category>

		<guid isPermaLink="false">http://blog.peijnik.at/?p=85</guid>
		<description><![CDATA[In this article I would like to inform you about my newest pet-project: pyttpd.
pyttpd is my effort of implementing a webserver in Python, with a focus on security (through privilege separation), extensibility and scalability.
I started this project because I was not entirely happy with the lack of flexibility and support for privilege separation by popular [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I would like to inform you about my newest pet-project: <a title="pyttpd project @ code.sp-its.at" href="http://code.sp-its.at/projects/pyttpd">pyttpd</a>.</p>
<p>pyttpd is my effort of implementing a webserver in Python, with a focus on security (through privilege separation), extensibility and scalability.</p>
<p>I started this project because I was not entirely happy with the lack of flexibility and support for privilege separation by popular webservers. Whilst both <a title="lighttpd.net" href="http://lighttpd.net">lighttpd</a> and <a title="httpd.apache.org" href="http://httpd.apache.org">Apache httpd</a> provide means of running processes under different users these usually require hacks like <a title="suexec (apache 2.0 documentation)" href="http://httpd.apache.org/docs/2.0/suexec.html">suexec</a>. Additionally I am somehow curious about how a fully-fledged webserver implemented in Python would perform compared to the mentioned daemons.</p>
<p><span id="more-85"></span></p>
<p><strong>Security through extensive use of Privilege Separation</strong></p>
<p>Whilst it is common for daemons to initially run as a privileged user and drop privileges as soon as possible it is possible to make more extensive use of setuid and friends.<br />
pyttpd&#8217;s design aims at creating one <a title="pmaster (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#privileged-master-process-pmaster">privileged process</a>, which only binds to privileged ports and spawns subprocesses.<br />
All subprocesses have specific tasks, such as routing <a title="umaster (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#unprivileged-master-process-umaster">between all processes</a>, <a title="listener process (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#id1">protocol-specific parsing</a> of incoming requests and handling <a title="vhost process (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts/process_layout.html#id2">processing</a> of those requests.<br />
The point is that all these processes do not run as &#8220;<em>www-data</em>&#8221; or another common account, but that a logic separation takes place on a per-host basis. This means that if the webserver is hosting <em>www.example.org</em> and <em>webapp.example.org</em> those will be running under different system accounts, making it hard to interfere with each other. This method should also enable the use of <a title="Mandatory Access Control @ en.wikipedia.org" href="http://en.wikipedia.org/wiki/Mandatory_access_control">MAC</a> mechanisms such as <a title="SELinux @ en.wikipedia.org" href="http://en.wikipedia.org/wiki/SELinux">SELinux</a> or <a title="SMACK @ en.wikipedia.org" href="http://en.wikipedia.org/wiki/Simplified_Mandatory_Access_Control_Kernel">SMACK</a> more efficiently.</p>
<p>The design choice of having separate processes for each vhost comes with another benefit: users (or customers) &#8220;owning&#8221; a vhost could potentionally be allowed to modify parts of the vhost&#8217;s configuration (excluding UID, GID, and other security-relevant options) on their own.</p>
<p><strong>Early status</strong></p>
<p>Right now pyttpd is in a very early planning stage, with no code to show yet. I am still in the middle of the process of writing down all ideas that come to my mind, weeding some out and documenting the others.<br />
So what do I have to show you then? Well, the the concept section of the <a title="Concepts (pyttpd documentation)" href="http://code.sp-its.at/doc/pyttpd/tip/concepts">documentation</a> is online now and I am planning on extending it in the next few days and eventually start writing code rather sooner than later.</p>
<p><strong>Your ideas&#8230;</strong></p>
<p>&#8230;and opinions are what I am really interested in. If you are interested in this project I would love if you got involved in some way. Feel free to create tickets at pyttpd&#8217;s <a title="pyttpd project @ code.sp-its.at" href="http://code.sp-its.at/projects/pyttpd">project page</a> if you have an idea you feel is worth adding or if one of my ideas is flawed, create a comment here or send me an <a title="send email to stephan at peijnik dot at" href="mailto:stephan at peijnik dot at">email</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peijnik.at/2009/03/31/introducing-pyttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
