Re: security label support, part.2

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: security label support, part.2
Дата
Msg-id AANLkTimM1eOzkamdVBP7dapMU07K4gZ=c4wEiQ+vTmxT@mail.gmail.com
обсуждение исходный текст
Ответ на security label support, part.2  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Ответы Re: security label support, part.2  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Список pgsql-hackers
2010/7/14 KaiGai Kohei <kaigai@ak.jp.nec.com>:
> The attached patch is a part of efforts to support security label
> on database objects.

This is similar to what I had in mind as a design for this feature,
but I have some gripes:

1. I am inclined to suggest the syntax SECURITY LABEL ON ... IS ...,
following COMMENT ON (it's also somewhat similar to the GRANT syntax).While the hook in ExecCheckRTPerms() will only
allowmeaningful
 
permissions checks on the use of relations, there will presumably be
ongoing demand to add additional hooks to cover other types of
objects, and I'd rather add label support all at once rather than
bit-by-bit.  I also think that the SECURITY LABEL syntax is more
future-proof; we don't need to worry about conflicts in other parts of
the grammar.

2. Similarly, the design of the hook in secabel.h is way too
short-sighted and won't scale to any other object type.  We don't need
or want one hook per object type here.  Use an ObjectAddress.

3. I am firmly of the view that we want to allow multiple security
providers.  I think the way this should work here is that we should
keep a list somewhere of security providers known to the system, which
loadable modules should add themselves to.  Each such security
provider should be represented by a struct containing, at least, a
name and a function that gets called on relabel.  The labels should be
stored in the catalog.  That way there is never any possibility of one
security provider getting a label that was originally applied by some
other security provider.  If we were storing these labels in pg_class
or pg_attribute or similar, the storage cost for this might be worth
worrying about, but as this is a separate catalog, it's not.

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: knngist - 0.8
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: bitmap indexes - performance