<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>Robert Haas: superuser</title><description>Sr. Staff Software Engineer @ Databricks, PostgreSQL Developer and Committer</description><link>https://rhaas.dev/</link><item><title>Surviving Without A Superuser - Coming to v16</title><link>https://rhaas.dev/blog/2023/01/surviving-without-superuser-coming-to/</link><guid isPermaLink="false">tag:blogger.com,1999:blog-20038672.post-1616893523180862762</guid><description>&lt;p&gt;As &lt;a href=&quot;/blog/2020/12/cve-2019-9193/&quot;&gt;I’ve written about before&lt;/a&gt;, a PostgreSQL superuser always has the ability to take over the operating system account in which PostgreSQL is running, but &lt;a href=&quot;/blog/2021/12/surviving-without-superuser-part-one/&quot;&gt;sometimes you’d like&lt;/a&gt; to &lt;a href=&quot;/blog/2022/01/surviving-without-superuser-part-two/&quot;&gt;have a role&lt;/a&gt; that can administer the database but not break out of it. In existing releases, there’s no good way to accomplish that. You can either make a new role so weak that it can’t perform ordinary administration tasks, or you can make it so strong that it can easily break into the operating system account and thus take over the superuser role as well. Unless you hack the source code, which some people have done, there’s no real way to set up an account that has enough power to usefully administer the database in meaningful ways but yet not enough power to take over everything. I’ve committed a number of patches to v16 to try to improve the situation, and I think that we can look forward to big improvements in this area once it is released.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rhaas.dev/blog/2023/01/surviving-without-superuser-coming-to/&quot;&gt;Read more »&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 24 Jan 2023 18:27:00 GMT</pubDate><category>postgresql</category><category>superuser</category></item><item><title>Surviving Without A Superuser - Part Two</title><link>https://rhaas.dev/blog/2022/01/surviving-without-superuser-part-two/</link><guid isPermaLink="false">tag:blogger.com,1999:blog-20038672.post-4708839013573935156</guid><description>&lt;p&gt;If PostgreSQL &lt;a href=&quot;/blog/2021/12/surviving-without-superuser-part-one/&quot;&gt;had the ability to give to a privileged non-superuser&lt;/a&gt; the right to administer objects belonging to some designated group of superusers just as if the privileged account were superuser, it would get us much closer to a world in which the database can be effectively administered by a non-superuser. A highly privileged user - let’s call him &lt;code&gt;sauron&lt;/code&gt; - could be given the right to administer tables, schemas, functions, procedures, and a variety of other objects owned by dependent users &lt;code&gt;witchking&lt;/code&gt; and &lt;code&gt;khamul&lt;/code&gt; just as if &lt;code&gt;sauron&lt;/code&gt; were superuser. &lt;code&gt;sauron&lt;/code&gt; might indeed feel himself to be virtually a superuser, at least within his own domain, as long as he didn’t spend too much time thinking about the users over which he had not been given administrative rights. However, &lt;code&gt;sauron&lt;/code&gt; might notice a few irksome limitations.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rhaas.dev/blog/2022/01/surviving-without-superuser-part-two/&quot;&gt;Read more »&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 18 Jan 2022 13:00:00 GMT</pubDate><category>postgresql</category><category>superuser</category></item><item><title>Surviving Without A Superuser - Part One</title><link>https://rhaas.dev/blog/2021/12/surviving-without-superuser-part-one/</link><guid isPermaLink="false">tag:blogger.com,1999:blog-20038672.post-6035403676848798202</guid><description>&lt;p&gt;PostgreSQL users and developers are generally aware that it is best to minimize the number of tasks performed as superuser, just as at the operating system level most Linux and UNIX users are aware that it’s best not to do too many things as root. For that reason, PostgreSQL has over the last few years introduced a number of predefined roles that have special privileges and which in some case can be used in place of the superuser role. For instance, the pg_read_all_data role, &lt;a href=&quot;https://www.postgresql.org/docs/14/predefined-roles.html&quot;&gt;new in version 14&lt;/a&gt;, has the ability to read all data in every table in the database - not only the tables that currently exist, but any that are created in the future. In earlier versions, you could achieve this effect only by handing out superuser permissions, which is not great, because the superuser role can do much more than just read all the data in the database. The new predefined role allows for a very desirable application of the &lt;a href=&quot;https://en.wikipedia.org/wiki/Principle_of_least_privilege&quot;&gt;principle of least privilege&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rhaas.dev/blog/2021/12/surviving-without-superuser-part-one/&quot;&gt;Read more »&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 08 Dec 2021 16:44:00 GMT</pubDate><category>postgresql</category><category>superuser</category></item><item><title>CVE-2019-9193</title><link>https://rhaas.dev/blog/2020/12/cve-2019-9193/</link><guid isPermaLink="false">tag:blogger.com,1999:blog-20038672.post-9206553386329621804</guid><description>&lt;p&gt;There’s a new article out in &lt;a href=&quot;https://www.computerweekly.com/news/252493527/Disputed-PostgreSQL-bug-exploited-in-cryptomining-botnet&quot;&gt;Computer Weekly&lt;/a&gt; talking about &lt;a href=&quot;https://nvd.nist.gov/vuln/detail/CVE-2019-9193&quot;&gt;CVE-2019-9193&lt;/a&gt;. The PostgreSQL project has issued a statement saying that &lt;a href=&quot;https://www.postgresql.org/about/news/cve-2019-9193-not-a-security-vulnerability-1935/&quot;&gt;this is not a security vulnerability&lt;/a&gt;, and PostgreSQL core team member Magnus Hagander also &lt;a href=&quot;https://blog.hagander.net/when-a-vulnerability-is-not-a-vulnerability-244/&quot;&gt;wrote a blog about it,&lt;/a&gt; saying the same thing. If you’re curious about this issue, I suggest reading not only what Magnus wrote but also the comments section of that blog post, where you can see some of the perspectives that other people have on what Magnus said. But, in this blog post, I’d like to comment a bit on what is said in the Computer Weekly article: is there any truth to the allegations offered there?&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rhaas.dev/blog/2020/12/cve-2019-9193/&quot;&gt;Read more »&lt;/a&gt;&lt;/p&gt;</description><pubDate>Tue, 15 Dec 2020 19:06:00 GMT</pubDate><category>postgresql</category><category>superuser</category></item></channel></rss>