All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Warner <warner@rubix.com>
To: Joshua Brindle <method@manicmethod.com>
Cc: selinux <selinux@tycho.nsa.gov>, Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: Some ideas in SE-PostgreSQL enhancement (Re: The status of SE-PostgreSQL)
Date: Fri, 27 Mar 2009 18:54:21 +0100	[thread overview]
Message-ID: <49CD12CD.1000205@rubix.com> (raw)
In-Reply-To: <49CD0995.9050205@manicmethod.com>

[-- Attachment #1: Type: text/plain, Size: 9192 bytes --]



Joshua Brindle wrote:
> Andy Warner wrote:
>   
>>> I see now. When the db object classes were proposed we hoped they would be
>>> general enough to cover other dbms's, it looks like we weren't far off. 
>>>       
>> Other than omitting the catalog and schema object classes, which are SQL 
>> standard objects (though sparsely used and poorly defined), I would agree.
>>     
>>> I have
>>> some comments for permission sets found in the document mentioned above, for
>>> example:
>>>
>>> CREATE TABLE: db_database {access}; dir {search} on catalog; dir {search
>>> add_name} on schema; db_table {create} on table
>>>
>>> you require dir search, add_name. What is the source context in this case? Is
>>> Trusted RUBIX doing avc_has_perm calls with dir as the object class on behalf of
>>> the connected client or is the server masquerading as the client and those
>>> checks are done by SELinux? I don't think it is a good idea to muddle the object
>>> class ownership concept by doing checks for classes which are owned by another
>>> object manager (except in the case that you are proxying access for that object
>>> manager, such as the case for samba).
>>>   
>>>       
>> Trusted RUBIX does all security decision checks using avc_has_perm on 
>> behalf of the connected client. We use the SELinux mechanism for access 
>> control decisions and never for enforcement (I am speaking of only DBMS 
>> objects). All DBMS object contexts are maintained internally in the 
>> database. RUBIX enforces all decisions. Note that the schema is not an 
>> OS directory, it is purely an internal DBMS object. I only used the dir 
>> object class because there was no support for the DBMS schema or catalog 
>> objects. I believe there will be support for this in the future, at 
>> which time we would replace the use of the dir class with the db_schema 
>> or db_catalog.
>>     
>
> I'd have hoped our community was seen as open enough to approach about the added
> object classes and perms.
>   

Please don't take my lack of asking for new object classes as anything
other than ignorance as to how things "work" in the open source
community. All of our previous work has been on proprietary MLS systems.
The idea of asking an OS vendor or community to add features for my
needs was foreign to me. Plus, my time constraints on the project may
not have allowed it. I have found this community to be very open and
helpful and always planned to give some input as to the need for these
object classes after my project was finished (which is now).
>   
>> So, internally, the access checks on the database and catalog are 
>> performed when those objects are opened. During the actual create table 
>> operation we have two calls to avc_has_perm, the first checks the 
>> client's context, schema's context for dir {search add_name} and the 
>> second checks the client's context, table's context for db_table {create}
>>
>> Could you elaborate on what you mean by "I don't think it is a good idea 
>> to muddle the object
>> class ownership concept by doing checks for classes which are owned by 
>> another
>> object manager" ? In what way is an object class *owned* by an object 
>> manager? I'm a newbie in this area and would appreciate some 
>> constructive criticism.
>>
>>     
>
> So, overloading object classes leads to confusion and other issues. For example,
> if an actual directory got labeled what the internal catalog was labeled then
> the client would have access to that, even if that wasn't the intention. There
> also may be conflicting type_transition rules because you end up wanting one
> object label transition to be different from another when used on the different
> kinds of objects.
>   
Yep, I can see that as an issue. Practically speaking, I would think the
new object classes will be added before any such real issue arose. But,
isn't there a similar issue, say, between a system with a sepostres
policy and a Trusted RUBIX installation on the same platform? I have
already bumped up against some of the type_transition rules for sepostgres.
> The flask architecture was originally implemented in a microkernel where object
> managers were services that enforced access per the security servers decision.
> In that architecture an object manager would be responsible for the object class
> it was enforcing access on. Stephen can correct me here if I'm wrong but I
> object to object class overloading based on these issues.
>   

In your terminology, because rubix is enforcing the policy, would it be
considered an object manager? And, if so, wouldn't seposgres also be
considered one? where they both enforce access to the same set of object
classes?
>   
>>> Were the db object classes incomplete for you so you needed to use filesystem
>>> object classes? I'm trying to get a feeling for what the motivation was behind
>>> these checks.
>>>   
>>>       
>> Yes, if the db object classes supported schema and catalog I would not 
>> use the dir. I'm not sure what to say for motivation, other than I felt 
>> it important and useful to have security checks on our catalog and 
>> schemata. And, since these objects function very closely to an OS 
>> directory, and there was no support for the catalog and schema objects 
>> in the selinux policy, and I decided not to modify the targeted/mls 
>> policies as part of our release, I chose to use the dir object class. 
>> Actually, I think I got the idea from an old post on this newsgroup. The 
>> options presented in that post were to either modify the policy's object 
>> class and permissions or overload a pre-existing object class. I chose 
>> the latter. It was the lesser of two evils. I didn't  want to have to 
>> keep up with updates to the targeted/mls policies.
>>     
>
> See above, you brought up another issue here where permissions being overloaded
> may not have the same read/write mappings and therefore may be difficult to work
> around with respect to the MLS policy. Approaching the community to work on a
> common set of object classes/perms and getting them merged in to upstream
> refpolicy is definitely the right answer.
>   
I agree completely.
>   
>>> Is Trusted RUBIX with these SELinux checks actually released, are the access
>>> checks set in stone? I'd like to see as much consistency between dbms object
>>> models as possible so that policy won't be dramatically different between them.
>>>   
>>>       
>> Yes, Trusted RUBIX with these security checks is released. But no, they 
>> are not set in stone. The minute a new policy is released supporting the 
>> db_schema and db_catalog object classes will be the time I change our 
>> product to use them, and stop using the dir object class.
>>
>>     
>
> Good. Hopefully we can get this worked out between you guys and have a
> consistent (and documented) set of permissions that make it easy to write policy
> that works on both systems (as much as possible)
>   
I think that is well on its way. One question out of curiosity. Would
you anticipate that I should or would use the seposgres TE rules that
already exist in the targeted/mls policy? I ask that from your comment
about writing policy that that works on both systems. With current state
of things this seems very difficult, though, I think a higher level
interface set, like the one we created for the object set, could be made
that, for the most part, worked for both systems.
>   
>> To my knowledge there are only two DBMS's that integrate SELinux into 
>> its product, SEPostgresql and Trusted RUBIX. I'm not so sure I would say 
>> our DBMS object models are dramatically different.  SEPostgresql does 
>> not have a catalog object and chose not to have selinux control over 
>> their schema object. From looking at KaiGai's work and posts I think in 
>> the future they will support the schema object, in much the same way I 
>> tried to in our current release.
>>     
>
> They chose not to for now, the initial set of permissions used by SEPostgres
> looks like it is going to be minimal, unfortunately, but should evolve into
> something more comprehensive.
>
> I may be missing it but do you support 'domain-like' type_transitions for stored
> procedures? This was one of the more interesting features in the initial
> sepostgres patches IMHO because it allowed for trusted stored procedures that
> can read tables the client couldn't necessarily read, and could do operations on
> them before handing over the data (eg., fuzzing of coordinates)
>   
We do not implement stored procedures at all, though this is a near
future possibility. As I said before, our background is MLS and often in
the EAL-5+ type (old B3). The group-think was always that stored
procedures were too insecure for such assurance levels. But, I have been
pushing the possibility in a EAL-4 type mode, for exactly the reasons
you mentioned above. With the selinux domain transition concept a stored
procedure becomes very interesting.
> --
> 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.
>
>   

[-- Attachment #2: Type: text/html, Size: 10670 bytes --]

  reply	other threads:[~2009-03-27 17:54 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
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 [this message]
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=49CD12CD.1000205@rubix.com \
    --to=warner@rubix.com \
    --cc=method@manicmethod.com \
    --cc=sds@tycho.nsa.gov \
    --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.