Re: permission denied to create extension "ltree" Must be superuser to create this extension.

Lists: pgsql-general
From: "krzf83(at)gmail(dot)com " <krzf83(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: permission denied to create extension "ltree" Must be superuser to create this extension.
Date: 2012-03-10 03:57:44
Message-ID: CAJ1PRS=ADhRd+4+mAR8fcNU2ykZd3m0r5z=JnbQSpEFrq2CjUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

psql (9.1.2)

CREATE EXTENSION ltree;
ERROR: permission denied to create extension "ltree"
HINT: Must be superuser to create this extension.

Why does ltree require superuser privledge? Is it dangerous and allow
circumventing server security? No mention of this in manual so it is
either documentation problem or a too strict check problem. Which one
is that?


From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: "krzf83(at)gmail(dot)com" <krzf83(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: permission denied to create extension "ltree" Must be superuser to create this extension.
Date: 2012-03-11 13:10:54
Message-ID: CAL_0b1uPvjh3naZzN2AO88vqgxyYnSp2oTWELzQiXhM8oLk9RA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Sat, Mar 10, 2012 at 7:57 AM, krzf83(at)gmail(dot)com <krzf83(at)gmail(dot)com> wrote:
> Why does ltree require superuser privledge? Is it dangerous and allow

CREATE EXTENSION must be run by superusers only.

> circumventing server security? No mention of this in manual so it is

There is a mention here http://www.postgresql.org/docs/9.1/static/contrib.html

> either documentation problem or a too strict check problem. Which one
> is that?
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

--
Sergey Konoplev

Blog: http://gray-hemp.blogspot.com
LinkedIn: http://ru.linkedin.com/in/grayhemp
JID/GTalk: gray(dot)ru(at)gmail(dot)com Skype: gray-hemp


From: "krzf83(at)gmail(dot)com " <krzf83(at)gmail(dot)com>
To: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: permission denied to create extension "ltree" Must be superuser to create this extension.
Date: 2012-03-15 03:28:58
Message-ID: CAJ1PRSmJbZygtEObq-pYoq6Jfed5g+uxXWU6wPj4gW1TEspDiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Ok, but can someone comment, document something on security of
installing extensions for normal users? Does allowing access to
extension provides a way to circumvent security model? If not why
can't it be allowed for user installations (provided that extension
was previously allowed in some conf file)?


From: Abel Abraham Camarillo Ojeda <acamari(at)the00z(dot)org>
To: "krzf83(at)gmail(dot)com" <krzf83(at)gmail(dot)com>
Cc: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: permission denied to create extension "ltree" Must be superuser to create this extension.
Date: 2012-03-15 05:45:18
Message-ID: CAPD=2Ni2a_ZBYUGxyY=9JrF2cYOgaP1Juj+hddVA2cTeMVMbZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Wed, Mar 14, 2012 at 9:28 PM, krzf83(at)gmail(dot)com <krzf83(at)gmail(dot)com> wrote:
> Ok, but can someone comment, document something on security of
> installing extensions for normal users? Does allowing access to
> extension provides a way to circumvent security model? If not why
> can't it be allowed for user installations (provided that extension
> was previously allowed in some conf file)?
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

Extensions can be written in C, to me that seems like enough reason...


From: "krzf83(at)gmail(dot)com " <krzf83(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: permission denied to create extension "ltree" Must be superuser to create this extension.
Date: 2013-02-11 23:15:58
Message-ID: CAJ1PRSkOZYy3fxqMV2XDKq-gmufn2mgk30KOb=utGHN2t86meA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Year has passed and still no answer here or in documentation. I wonder
if I get to live that long so I can find out answer.


From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: "krzf83(at)gmail(dot)com" <krzf83(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: permission denied to create extension "ltree" Must be superuser to create this extension.
Date: 2013-02-13 00:10:00
Message-ID: 511AD9D8.2000807@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg스포츠 토토 결과SQL

On 02/11/2013 03:15 PM, krzf83(at)gmail(dot)com wrote:
> Year has passed and still no answer here or in documentation. I wonder
> if I get to live that long so I can find out answer.

As far as I know your question was answered previously. ltree uses C
functions and they need to be installed by a superuser as they could be
a security risk.

>
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com


From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: permission denied to create extension "ltree" Must be superuser to create this extension.
Date: 2013-02-13 00:48:58
Message-ID: 511AE2FA.6040507@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On 2/11/2013 3:15 PM, krzf83(at)gmail(dot)com wrote:
> Year has passed and still no answer here or in documentation. I wonder
> if I get to live that long so I can find out answer.

answer to what question?

this message didn't thread onto anything in my list history (goes back
3-4 months), and your subject is simply a quote of an error message.
the error message seems self-explanatory.

--
john r pierce 37N 122W
somewhere on the middle of the left coast


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: "krzf83(at)gmail(dot)com " <krzf83(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Re: permission denied to create extension "ltree" Must be superuser to create this extension.
Date: 2013-02-13 13:02:47
Message-ID: 20130213130247.GA4546@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

krzf83(at)gmail(dot)com escribió:
> Year has passed and still no answer here or in documentation. I wonder
> if I get to live that long so I can find out answer.

The question was:

> Ok, but can someone comment, document something on security of
> installing extensions for normal users? Does allowing access to
> extension provides a way to circumvent security model? If not why
> can't it be allowed for user installations (provided that extension
> was previously allowed in some conf file)?

I see you got some answers, but they weren't fully correct. Really,
CREATE EXTENSION can be run by any user, no special privileges
necessary; but all commands inside the extension script will go through
the normal privilege checks, so if you're not superuser you will not be
able to install extensions that try to install C-language functions, for
example. The documentation for CREATE EXTENSION does say this, so I'm
not sure what else you want. Quoth that page:

Loading an extension requires the same privileges that would be required to
create its component objects. For most extensions this means superuser or
database owner privileges are needed. The user who runs CREATE EXTENSION
becomes the owner of the extension for purposes of later privilege checks, as
well as the owner of any objects created by the extension's script.
http://www.postgresql.org/docs/current/static/sql-createextension.html

What we don't yet have is something that was proposed some time ago: the
possibility of "whitelisting" extensions so that any database owner
is able to install it regardless of privileges.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services