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>, KaiGai Kohei <kaigai@kaigai.gr.jp>
Subject: Re: Some ideas in SE-PostgreSQL enhancement (Re: The status of SE-PostgreSQL)
Date: Fri, 27 Mar 2009 21:04:57 +0100	[thread overview]
Message-ID: <49CD3169.3080302@rubix.com> (raw)
In-Reply-To: <49CD2EB3.2000809@manicmethod.com>

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



Joshua Brindle wrote:
> Andy Warner wrote:
>   
>>   
>> KaiGai and I talked about this a bit already, and I'll preface my 
>> response by saying that my memory of it is poor. Also, this issue was 
>> one of my first practical introductions to selinux, so I'm sure I was 
>> shooting in the dark. But, the main issue revolved around the type 
>> transition rule for the database object. It seems to me, what makes it 
>> special is that it has no parent object. It seems equivalent to writing 
>> a type transition rule for creating the OS root directory, except in our 
>> DBMS case we can have more than one type (each dbms has their own).
>>
>> A rule for sepostgres is:
>>
>> type_transition sepgsql_client_type sepgsql_client_type : db_database 
>> sepgsql_db_t;
>>
>> Where I believe the standard user_t and such had the sepgsql_client_type 
>> attribute. So, with that rule in place I think it was impossible for 
>> rubix to have a similar rule, if our client_type's overlapped. Which 
>> seems likely, as the user_t is a likely candidate for a client. For 
>> instance, if I did this:
>>     
>
> strange, I thought he/we decided to use the domain of the dbms as the target for
> that type_transition. That would solve this particular problem, I'd have to go
> back in archives to understand why this path was chosen, or perhaps KaiGai
> remembers.
>
>   
>> type_transition rubix_client_type rubix_client_type : db_database 
>> rubix_db_t; (where rubix_client_type contained user_t)
>>
>> I think it would not compile because its ambiguous, right? So, what I 
>> did was write a rule like this:
>>
>> type_transition rubix_client_type rubix_t : db_database rubix_db_t;
>>
>> and hard-coded the rubix_t into the avc_compute_create call. The rubix_t 
>> is actually the type of our server process. Prior to doing that, I could 
>> not find a way to not have a database be created with a sepgsql_t type.
>>
>>     
>
> If you just used the dbms domain as the target you wouldn't need to hardcode
> anything.
>   
Actually, thats what I did. My choice of words (hardcoding) wasn't the best
>   
>> I see (now) that the reference policy also has the rule:
>>
>> type_transition postgresql_t postgresql_t : db_database sepgsql_db_t;
>>
>> Obviously, the above would never conflict with another dbms's rules. If 
>> that single type transition rule satisfied all of seposgresql's needs, 
>> then that would eliminate the need for the conflicting rule. Though, I 
>> assume thats dependent on  the internals of seposgresql.
>>     
>
> This is for internally created db objects? Why are both this and the client ->
> client transitions needed?
>
> <snip>
>   
>>> Yes, I don't mean they'd be using an identical policy but shared
>>> templates/interfaces that worked with both would certainly make it easier to
>>> target both systems without really needing to know the intricacies of each
>>> systems enforcement.
>>>   
>>>       
>> Sounds like a good goal.
>>
>>     
>
> It may be a pipe dream, like having a common policy for all MTA's. At least if
> there is some consensus on the internal object model, and since SQL is pretty
> much the same everywhere this may actually stand a chance.
>   
I like to be in that loop
>
>
>   

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

  reply	other threads:[~2009-03-27 20:06 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
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 [this message]
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=49CD3169.3080302@rubix.com \
    --to=warner@rubix.com \
    --cc=kaigai@kaigai.gr.jp \
    --cc=method@manicmethod.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.