Re: security hook on table creation

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>
Cc: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, PgSQL-Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: security hook on table creation
Date: 2010-09-29 13:00:47
Message-ID: AANLkTinLZp17++e3uMRk8Ty3Msq36RUNTdvz0mvdtwY7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 29, 2010 at 6:38 AM, KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp> wrote:
> I don't think it is an option to move the hook after the pollution
> of system catalogs, although we can pull out any information about
> the new relation from syscache.

Why not?

> Sorry, it seems to me the idea simplifies the issue too much to implement
> access control features correctly.
> For example, we need to provide security modules the supplied label on
> the SECURITY LABEL hook, so it has to take one more argument at least.
> For example, we will need to provide them OID of the new schema on
> the ALTER TABLE SET SCHEMA at least too.
>  :

So what? The patch you submitted doesn't provide the OID of the new
schema when someone does ALTER TABLE SET SCHEMA, either. I proposed a
design which was much more general than what you submitted, and you're
now complaining that it's not general enough. It's unrealistic to
think you're going to solve every problem with one patch. Moreover,
it's far from obvious that you actually do need the details that
you're proposing anyway. Are you really going to write an SE-Linux
policy that allows people to change the schema of table A to schema B
but not schema C? Or that allows a hypothetical smack plugin to label
a given object with one label but not another? And if so, are those
absolutely must-have features for the first version or are those
things that would be nice to have in version 3 or 4?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-09-29 13:11:10 Re: recovery.conf location
Previous Message Alvaro Herrera 2010-09-29 12:44:27 Re: I: About "Our CLUSTER implementation is pessimal" patch