From: KaiGai Kohei <kaigai@ak.jp.nec.com>
To: Andy Warner <warner@rubix.com>
Cc: KaiGai Kohei <kaigai@kaigai.gr.jp>, selinux <selinux@tycho.nsa.gov>
Subject: Re: Some ideas in SE-PostgreSQL enhancement (Re: The status of SE-PostgreSQL)
Date: Thu, 26 Mar 2009 09:13:04 +0900 [thread overview]
Message-ID: <49CAC890.8000305@ak.jp.nec.com> (raw)
In-Reply-To: <49CA63B8.8090101@rubix.com>
Andy Warner wrote:
>>> So, based upon the above I would say that PostgreSQL's database object
>>> (as well as RUBIX's) is analogous to the cluster. I think database is a
>>> much more common term. Based upon the fact that SQL and ODBC (JDBC?)
>>> provide support for directly accessing DBMS objects (e.g., in a select
>>> statement) using the catalog and schema (but not database), I would
>>> still propose that both db_catalog and db_schema support are needed in
>>> SELinux. Obviously, the db_database also needs to be provided, as it is.
>>>
>>> From my rather limited understanding of SELinux I do not believe that
>>> is a technical problem with having an object class, such as db_catalog,
>>> that a particular DBMS does not use. Correct?
>>>
>>
>> At least, I don't oppose to db_catalog class as far as we can make
>> clear the differences between databases, catalogs and schemas.
>> In PostgreSQL, it does not have an idea of catalog as a namespace
>> upper than schema, so we cannot handle these object obviously,
>> even if it is defined in the security policy.
>>
>> I have still a question. Is there any functional differences between
>> a catalog and a schema? If both of them works just a namespace, we
>> can apply db_schema class and its permission on both of catalogs and
>> schema.
>> In other word, when we accesses /var/log/messages, we need to have
>> privileges for /var and /var/log on dir class and /var/log/message
>> on file class. The reason why dir class is applied both of /var
>> and /var/log is these are same kind of object.
>> (Perhaps, this suggestion might be a misdesign.)
>>
> Actually, I think using one object class to represent both schemata and
> catalogs is a possibility. As I said before, we currently use the dir
> object class to represent both, and it provides all of the SELinux
> function we require, at this time. However, I think it may produce a bit
> of confusion for the user (to use dir), as to why we use what appears to
> be an OS object class within the database. Also, it would seem a bit odd
> and possibly confusing to use an object class named db_schema on a
> catalog object, when the DBMS has distinct objects called schema and
> catalog.
>
> From an SQL perspective, the general difference between a schema and a
> catalog is that a catalog may only hold schemata. A schema may only hold
> tables, views, etc. Also, according to the spec there should be an
> Information Schema (which describes objects from all catalogs and
> schemata) within each catalog. Though, we do not support this. There may
> be other distinguishing factors, but I am not aware of them right now.
> Note that a catalog may not hold catalogs and a schema may not hold
> catalogs or schemata. So, in that sense there is a distinction between
> them, where in your /var/log directory comparison there is no such
> distinction. Both the /var and /var/log may each hold files and directories.
>
> So, using one object class to represent both objects could create
> confusion, in my opinion. Also, if in the future it becomes attractive
> to have some distinct SELinux permission for catalogs and schemata, this
> will not be an option if the same object class is chosen for both.
>
> So, the bottom line for me is that I slightly would prefer having both
> the db_catalog and db_schema object classes. If we have a single db
> object class for both catalog and schema, I would suggest using some
> generic name (e.g., db_dir) and not db_schema, to avoid confusion. I
> more strongly prefer using one of the previous two options and have some
> db_ class to cover the catalog and schema. Using the dir object class as
> I have been seems a bit "hackish" to me. I would preface my opinion with
> the fact that I know very little of the impact on the SELinux code of
> having one extra object class or two extra object classes (or none).
OK, indeed, the namespaces in database (catalog and schema) has
a restriction about what kind of objects to be stored under them.
At least, I can agree the selinux policy have two new different
object classes, even if SE-PostgreSQL does not use db_catalog class.
I have one more point interested in. Could you make clear how does
the Trusted RUBIX assigns a security context on the newly created
database objects on the modified design?
We can obtain a security context for a new object using
security_compute_create() which provides us a result of TYPE_TRANSITION
rules, if configured.
In SE-PostgreSQL:
A new database object is labeled based only subject's context.
A new schema object will inherit the context of database, or be labeled
using TYPE_TRANSITION rules on db_schema class and the database.
A new table, procedure ans sequence will inherit the context of database,
or be labeled using TYPE_TRANSITION rules on its class and the schema.
A new column and tuple will inherit the context of table, or be labeled
using TYPE_TRANSITION rules on its class and the table.
A new largeobject is a headache for me. It does not belong to any schema.
Currently, it inherits the context of database, or be labeled using
TYPE_TRANSITION rules on its class and the database.
One considerable idea is to propose a facility to store largeobjects
under certain schema, but it is not an issue in SELinux.
Thanks,
--
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>
--
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:[~2009-03-26 0:13 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-23 10:37 The status of SE-PostgreSQL KaiGai Kohei
2009-03-23 10:37 ` [refpolicy] " KaiGai Kohei
2009-03-23 14:56 ` Shaz
2009-03-23 14:57 ` Shaz
2009-03-23 15:19 ` Andy Warner
2009-03-24 2:14 ` KaiGai Kohei
2009-03-24 2:14 ` [refpolicy] " KaiGai Kohei
2009-03-25 6:54 ` Some ideas in SE-PostgreSQL enhancement (Re: The status of SE-PostgreSQL) KaiGai Kohei
2009-03-25 6:54 ` [refpolicy] " KaiGai Kohei
2009-03-25 7:45 ` Andy Warner
2009-03-25 8:20 ` KaiGai Kohei
2009-03-25 8:59 ` Andy Warner
2009-03-25 12:00 ` KaiGai Kohei
2009-03-25 17:02 ` Andy Warner
2009-03-26 0:13 ` KaiGai Kohei [this message]
2009-03-25 17:43 ` Joshua Brindle
2009-03-25 19:42 ` Andy Warner
2009-03-27 15:43 ` Joshua Brindle
2009-03-27 16:25 ` Andy Warner
2009-03-27 17:15 ` Joshua Brindle
2009-03-27 17:54 ` Andy Warner
2009-03-27 18:12 ` Joshua Brindle
2009-03-27 18:48 ` Andy Warner
2009-03-27 19:53 ` Joshua Brindle
2009-03-27 20:04 ` Andy Warner
2009-03-27 23:59 ` KaiGai Kohei
2009-03-28 7:17 ` Andy Warner
2009-03-30 0:56 ` KaiGai Kohei
2009-03-30 8:21 ` KaiGai Kohei
2009-03-30 9:58 ` Andy Warner
2009-03-30 13:22 ` KaiGai Kohei
2009-04-22 0:08 ` Eamon Walsh
2009-04-22 3:59 ` KaiGai Kohei
2009-05-01 4:54 ` Eamon Walsh
2009-05-07 1:34 ` KaiGai Kohei
2009-05-07 7:24 ` KaiGai Kohei
2009-03-30 9:49 ` Andy Warner
2009-03-26 5:50 ` [PATCH] Expose avc_netlink_loop() for applications (Re: Some ideas in SE-PostgreSQL enhancement) KaiGai Kohei
2009-03-26 23:28 ` Eamon Walsh
2009-03-26 23:41 ` Eamon Walsh
2009-03-27 0:35 ` KaiGai Kohei
2009-03-28 0:54 ` Eamon Walsh
2009-03-28 2:00 ` KaiGai Kohei
2009-03-30 4:56 ` KaiGai Kohei
2009-03-26 6:11 ` [PATCH] database audit integration " KaiGai Kohei
2009-03-26 6:11 ` KaiGai Kohei
2009-03-26 21:45 ` John Dennis
[not found] ` <49CB313B.7020507@redhat.com>
2009-03-27 2:34 ` KaiGai Kohei
2009-03-27 2:34 ` KaiGai Kohei
2009-03-26 8:29 ` [PATCH] Permissive domain in userspace " KaiGai Kohei
2009-03-28 2:41 ` Eamon Walsh
2009-03-30 2:55 ` KaiGai Kohei
2009-03-31 1:45 ` KaiGai Kohei
2009-03-31 16:46 ` Stephen Smalley
2009-04-01 1:07 ` [PATCH] Permissive domain in userspace object manager KaiGai Kohei
2009-04-01 1:41 ` KaiGai Kohei
2009-04-01 12:34 ` Stephen Smalley
2009-04-01 20:07 ` Eric Paris
2009-04-01 22:53 ` James Morris
2009-03-27 8:18 ` [PATCH] Policy rework for SE-PostgreSQL (Re: Some ideas in SE-PostgreSQL enhancement) KaiGai Kohei
2009-03-27 8:18 ` [refpolicy] " KaiGai Kohei
2009-03-27 9:44 ` Andy Warner
2009-03-27 11:20 ` KaiGai Kohei
2009-03-27 11:20 ` [refpolicy] " KaiGai Kohei
2009-03-27 11:45 ` Andy Warner
2009-03-27 11:45 ` [refpolicy] " Andy Warner
2009-03-27 12:17 ` KaiGai Kohei
2009-03-27 12:17 ` [refpolicy] " KaiGai Kohei
2009-04-01 7:26 ` Correct manner to handler undefined classes/permissions? " KaiGai Kohei
2009-04-01 12:45 ` Stephen Smalley
2009-04-02 0:28 ` KaiGai Kohei
2009-03-23 15:25 ` The status of SE-PostgreSQL Stephen Smalley
2009-03-23 15:25 ` [refpolicy] " Stephen Smalley
2009-03-24 1:13 ` KaiGai Kohei
2009-03-24 1:13 ` [refpolicy] " KaiGai Kohei
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=49CAC890.8000305@ak.jp.nec.com \
--to=kaigai@ak.jp.nec.com \
--cc=kaigai@kaigai.gr.jp \
--cc=selinux@tycho.nsa.gov \
--cc=warner@rubix.com \
/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.