All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giorgio Zanin <selinux_list@yahoo.it>
To: selinux@tycho.nsa.gov
Subject: about security contexts for objects
Date: Thu, 22 May 2003 16:10:26 +0200	[thread overview]
Message-ID: <3ECCDA52.5010802@yahoo.it> (raw)

I received good answer every time I posted to this mailing list, so I 
try this time too.

I am trying to get a formal model of the SELinux configuration language, 
in order to infer some properties of the system from a given configuration.
The first property I am interested in is about the access of a given 
(security context for a) subject to a given (security context for an) 
object.
A security context has three components: a "user", a "role" and a 
"type". Not all of the combinations of values for these components are 
generally allowed in the system; it depends on configuration rules. I 
call "valid" asecurity context that is allowed to be attached to a 
process or to a generic object. My problem is  how to determine valid 
security contexts.

First of all I noticed (or at least I thought) it is possible to define 
the set of all valid security contexts for subjects (process) in the 
following way:

- U is the set of all the "user" components for a security context. I 
can building up U, just examining all of the rules  as
user u roles {r1 r2 ...};

- R(u) is the set of all of the authorized roles for a given "user" u. 
It is possible to build up the set with the same rules as above

T is the set of all types, defined by rules as
type t;

T(r) is the set of domains a given role r can enter. It is possible to 
build up the set examining all of the rules as
role r types {t1 t2 ...};

So, now, the set of all possible security contexts for a subject can be 
modeled by

S = { (u,r,t) belonging to UxR(u)xT(r) }.

I can know all the valid security contexts for a process (elements of S) 
just looking at three kinds of configuration rules.

What I need now is something similar for object security contexts. The 
"role" component of such a security context is trivially "object_r". 
What about "user" and "type" components?

I thought it would be useful to define a set of valid security contexts 
with respect to a given object class.
For example, O(file) could be the set of all the valid security contexts 
for files, O(socket) the set of all the valid security contexts for 
sockets and so on, for each of the 29 object classes defined. Obviously, 
O(process) would be S.

Is it possible to define O(c) (c=a given object class different from 
"process") just looking at some configuration rules?
If I look at the file context configuration, I can get some elements of 
O(file) and O(dir), but I think I can't catch all of them.

type_transition rules could be useful  to catch some (but just some) 
elements of O(c), for a given generic class c.

So the best choice seems to be looking at access vector rules; with a 
rule as

allow A B : C P

I can argue B is a good "type" component for an object of class C. Can I 
catch all the valid "type" components in this way?

About "user" components for an object, maybe anyone is ok.

Anyone can help me in doing this?


Thank you in advance, and sorry for my bad English. I hope I have been 
at least a little clear :P

Giorgio


--
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.

             reply	other threads:[~2003-05-22 14:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-22 14:10 Giorgio Zanin [this message]
2003-05-22 16:35 ` about security contexts for objects Russell Coker
2003-05-22 19:22   ` Stephen Smalley
2003-05-23  8:09     ` Giorgio Zanin
2003-05-23 11:26       ` Stephen Smalley

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=3ECCDA52.5010802@yahoo.it \
    --to=selinux_list@yahoo.it \
    --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.