Re: Adding support for SE-Linux security

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: "David P(dot) Quigley" <dpquigl(at)tycho(dot)nsa(dot)gov>, KaiGai Kohhookei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Chad Sellers <csellers(at)tresys(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, jd <jd(at)commandprompt(dot)com>, David Fetter <david(at)fetter(dot)org>, Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adding support for SE-Linux security
Date: 2009-12-11 21:41:36
Message-ID: 603c8f070912111341m59cf3a39kb049544581d6f204@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 11, 2009 at 4:26 PM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> Hrm, I thought I had given a specific example.  Didn't do a good job of
> it, apparently.  Let me try to be a bit more clear:
>
> ALTER TABLE x OWNER TO y;
>
> If given the table OID, there's a ton of information we can then pull
> about the table- the tablespace, the owner, the schema, the columns, the
> privileges, etc, etc.
>
> What we can't possibly figure out from the OID is the value of y.  Yet,
> in the PG security model, the value of y matters!  You have to know what
> y is to check if y has 'create' rights on the schema.  If it doesn't
> (and the user executing the command isn't the superuser) then the
> request (under the PG model) is denied.
>
> Does that help clarify my example case?

That case doesn't seem terribly problematic to me. It seems clear
that we'll want to pass some information about both x and y. What is
less clear is exactly what the argument types will be, and the right
answer probably depends somewhat on the structure of the existing
code, which I have not looked at. What I'm more concerned about is if
the access control decision in this case were based on u for PG DAC, v
for SE-PostgreSQL, and w for Robert Haas's Personal Defensive System.
If that's the case, and our function signature looks like (x,y,u,v,w),
the we should worry.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Scott Marlowe 2009-12-11 21:57:56 Re: 8.4.1 ubuntu karmic slow createdb
Previous Message Nikolas Everett 2009-12-11 21:39:34 Re: 8.4.1 ubuntu karmic slow createdb