Re: [HACKERS] What about CREATE OR REPLACE FUNCTION? - Mailing list pgadmin-hackers

From Christopher Kings-Lynne
Subject Re: [HACKERS] What about CREATE OR REPLACE FUNCTION?
Date
Msg-id ECEHIKNFIMMECLEBJFIGGECNCCAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: [HACKERS] What about CREATE OR REPLACE FUNCTION?  (Peter Eisentraut <peter_e@gmx.net>)
List pgadmin-hackers
I seem to recall that Oracle has all sorts of fancy resource limits that can
be applied to users.  If such resource limits were implemented, then maybe
the DBA could have the power to limit someone to a maximum of 20% cpu and a
few transactions per second or something.

Chris

> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Peter Eisentraut
> Sent: Wednesday, 10 October 2001 6:36 AM
> To: Tom Lane
> Cc: Jean-Michel POURE; pgsql-hackers@postgresql.org; Bruce Momjian;
> pgadmin-hackers@postgresql.org
> Subject: Re: [HACKERS] What about CREATE OR REPLACE FUNCTION?
>
>
> Tom Lane writes:
>
> > I believe the primary reason why PL languages aren't installed by
> > default is security considerations
>
> Well, that argumentation seems to be analogous to giving someone login
> access on a multiuser computer system but not letting him execute, say,
> perl because he might write recursive functions with it.  Such setups
> exist (perhaps with something else instead of perl and recursive
> functions) but they are not the norm and usually fine-tuned by the
> administrator.
>
> We have realized time and time again that giving someone access to a
> PostgreSQL server is already a security risk.  Any person can easily crash
> the server (select cash_out(2) is prominently documented as doing that) or
> exhaust time and space resources by writing appropriate queries.
> Privilege systems do not guard against that.  Privilege systems are for
> guarding against a reasonable user "cheating".
>
> Now, if a procedural language is not safe (at least as safe as the rest of
> the system that's accessible to an ordinary user), then it shouldn't be
> marked "trusted".  Otherwise, the consequence of this chain of arguments
> is that createlang selectively introduces a security whole into your
> system.  Of course, we may warn, "Be careful when installing procedural
> languages, because ...".  But are users going to be careful?  How do they
> know what kind of care to exercise, and just *how* to do that?
>
> No, I don't think this is the ideal situation.  I don't want to press for
> changing it right now because I'm not particularly bothered by it, and the
> second sentence of the previous paragraph might just be true.  In a future
> life, a privilege system should give finer grained control about access to
> PLs, but we might want to think about what the default should be.
>
> --
> Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>


pgadmin-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] What about CREATE OR REPLACE FUNCTION?
Next
From: Mike Mascari
Date:
Subject: Re: [HACKERS] What about CREATE OR REPLACE FUNCTION?