Re: Adding support for SE-Linux security

From: KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, "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>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adding support for SE-Linux security
Date: 2009-12-12 01:02:49
Message-ID: 4B22EBB9.8070302@kaigai.gr.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> 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.

Theoretically, (x,y,u) -> (x,y,u,v) -> (x,y,u,v,w) may happen.

However, if the new suggested security model is too far from the known
security model, we should consider whether it performs correctly at first
before commit it.
As long as we describe a security model corresponding to database objects,
it is hard to consider a possibility of infinite increasing in the future.

Thanks,
--
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-12-12 01:38:40 status update on Hot Standby and Streaming Replication
Previous Message Tom Lane 2009-12-12 00:52:27 Re: Adding support for SE-Linux security