From: Joshua Brindle <method@manicmethod.com>
To: Kohei KaiGai <kaigai@kaigai.gr.jp>
Cc: SELinux-NSA <selinux@tycho.nsa.gov>,
refpolicy <refpolicy@oss1.tresys.com>,
Kevin Grittner <kgrittn@ymail.com>
Subject: Re: [PATCH] Add db_materialized_view object class
Date: Mon, 25 Feb 2013 20:16:16 -0500 [thread overview]
Message-ID: <512C0CE0.2050407@manicmethod.com> (raw)
In-Reply-To: <CADyhKSX86k4BwPzZi4EGWBPbU9bHt=w0MEJAFfOu5jckb3ihng@mail.gmail.com>
Kohei KaiGai wrote:
> Hello,
>
> Recent PostgreSQL development newly adds a new feature; materialized
> view.
> However, we have no relevant object class in selinux side, so I'd like
> to add
> a new db_materialized_view object class to support this object type.
Why not just use the db_table object class?
>
> Materialized-view allows to construct its result-set to be returned on
> references
> by user's query preliminarily, to improve performance to scan multiple
> tables
> being combined with complicated joins.
> In contradiction to its name, its behavior is almost identical with
> regular tables
> rather than traditional views. Line SELECT ... INTO command, it saves
> a snapshot when a particular user (with security label, of course)
> references
> the underlying tables onto a regular tables in behalf of MV.
>
> In perspective of SELinux, nothings are different from an operation
> that writes
> data being read from another tables to a regular table; it should check
> permission to write on the destination table and to read from the source
> tables, but materialized-view calls this operation as "refresh".
>
If a user has the ability to update a table backing an mv, but not the
refresh permission on the mv, will the mv now be inconsistent?
> The attached patch adds db_materialized_view object class with select,
> insert, update, delete, lock, refresh and common database permissions.
> These permissions shall be checked on relevant accesses in manner of
> what regular table doing, and "refresh" shall be also checked when MV
> is refreshed.
>
It seems to me that MV's don't really need to be treated specially. If
you have access to the backing table/row you'll see it, otherwise you
won't. Running the query that builds an MV shouldn't yield a different
result from querying the MV, should it?
> I didn't define new types for materialized-views, because its behavior is
> almost same as regular tables, thus I though it is a reasonable solution
> to utilize existing types for tables.
>
> Thanks,
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2013-02-26 1:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-10 15:23 [PATCH] Add db_materialized_view object class Kohei KaiGai
2013-02-10 15:23 ` [refpolicy] " Kohei KaiGai
2013-02-26 1:16 ` Joshua Brindle [this message]
2013-03-11 16:29 ` Kohei KaiGai
2013-03-11 16:29 ` [refpolicy] " Kohei KaiGai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=512C0CE0.2050407@manicmethod.com \
--to=method@manicmethod.com \
--cc=kaigai@kaigai.gr.jp \
--cc=kgrittn@ymail.com \
--cc=refpolicy@oss1.tresys.com \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.