login
Header Space

 
 

Re: Integrating securelevel and kauth(9)

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Cc: YAMAMOTO Takashi <yamt@...>, <tech-security@...>, <tech-kern@...>
Date: Tuesday, March 28, 2006 - 7:34 am

On Sun, 26 Mar 2006, Elad Efrat wrote:


I've followed the kauth design process at Apple, and the NetBSD discussions 
along these topics with interest, having gone through much the same process in 
the integrating of mandatory access control and ACLs into FreeBSD a few years 
ago.  I thought I'd share a few thoughts, which you're welcome to ignore. :-)

The problem of categorizing checks is actually quite difficult -- in the 
TrustedBSD MAC Framework in FreeBSD, we end up avoiding the issue by not 
categorizing access control checks at all, but loosely naming them based on 
the "object" of the operation.  LSM takes a very similar approach.  The Darwin 
kauth framework has been influenced by the MAC Framework design, but takes a 
more explicit approach to categorization.  I've always liked the notion that 
we categorize operations, and checks more specifically, by the object type. 
This is made tricky when you have checks that involve multiple objects without 
an explicit subject, however.  For example, the check to deliver an mbuf to a 
socket in FreeBSD is a subject-free operation.  In the end, all this comes 
down to is the ease of grasp of the framework for the developer, and the ease 
with which they can express the policy they want to implement.  The 
object-oriented view of the world is useful, though, and thinking about it as 
objects and methods is a useful way to think about things.

kauth(9) is an interesting framework, and clearly benefits from a lot of the 
prior work, be it FLASK, LSM, the MAC Framework, etc.  It's a carefully 
selected subset intended to support Apple's critical audiences -- workstation 
firewall vendors, anti-virus vendors, the need to introduce ACLs, etc.  It 
doesn't meet the full set of needs we have in FreeBSD -- for example, it does 
not provide clear object life cycles and labeling facilities required for 
mandatory access control.  One of the design choices in kauth(9) is to provide 
relatively few methods for the security module to implement -- this is helpful 
in some ways, and makes it easier to implement variant logic using switch(), 
etc, but makes other things trickier.  In FreeBSD, we originally went a bit 
more in this direction, but then moved away because we were concerned about 
proiding stronger type safety for policy implementors -- we ran into a lot of 
bugs where the void arguments for generic check functions were being miscast, 
especially as the APIs evolved.  When we switched from a smaller number of 
indexed checks to a larger number of function prototypes with explicit type 
checking, these went away.

Robert N M Watson
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Integrating securelevel and kauth(9), Elad Efrat, (Fri Mar 24, 1:56 pm)
Re: Integrating securelevel and kauth(9), YAMAMOTO Takashi, (Sat Mar 25, 12:42 pm)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Sat Mar 25, 2:29 pm)
Re: Integrating securelevel and kauth(9), YAMAMOTO Takashi, (Sat Mar 25, 3:04 pm)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Sat Mar 25, 3:10 pm)
Re: Integrating securelevel and kauth(9), YAMAMOTO Takashi, (Sat Mar 25, 3:40 pm)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Sat Mar 25, 3:50 pm)
Re: Integrating securelevel and kauth(9), YAMAMOTO Takashi, (Sat Mar 25, 4:54 pm)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Sat Mar 25, 5:08 pm)
Re: Integrating securelevel and kauth(9), YAMAMOTO Takashi, (Sun Mar 26, 6:45 am)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Sun Mar 26, 1:57 pm)
Re: Integrating securelevel and kauth(9), Robert Watson, (Tue Mar 28, 7:34 am)
Re: Integrating securelevel and kauth(9), David Laight, (Tue Mar 28, 1:29 pm)
Re: Integrating securelevel and kauth(9), Robert Watson, (Tue Mar 28, 1:36 pm)
Re: Integrating securelevel and kauth(9), Daniel Carosone, (Tue Mar 28, 4:36 pm)
Re: Integrating securelevel and kauth(9), YAMAMOTO Takashi, (Sun Mar 26, 4:56 pm)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Sun Mar 26, 5:58 pm)
Re: Integrating securelevel and kauth(9), YAMAMOTO Takashi, (Mon Mar 27, 6:57 am)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Mon Mar 27, 6:47 pm)
Re: Integrating securelevel and kauth(9), Matt Thomas, (Mon Mar 27, 9:37 pm)
Re: Integrating securelevel and kauth(9), Thomas E. Spanjaard, (Mon Mar 27, 9:18 pm)
Re: Integrating securelevel and kauth(9), Martin Husemann, (Mon Mar 27, 7:20 am)
Re: Integrating securelevel and kauth(9), Bill Studenmund, (Fri Mar 24, 6:44 pm)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Fri Mar 24, 6:56 pm)
Re: Integrating securelevel and kauth(9), Bill Studenmund, (Sat Mar 25, 2:05 pm)
Re: Integrating securelevel and kauth(9), David Laight, (Fri Mar 24, 3:01 pm)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Fri Mar 24, 5:51 pm)
Re: Integrating securelevel and kauth(9), Bill Studenmund, (Fri Mar 24, 6:29 pm)
Re: Integrating securelevel and kauth(9), Garrett D'Amore, (Fri Mar 24, 2:17 pm)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Fri Mar 24, 5:24 pm)
Re: Integrating securelevel and kauth(9), Matthew Mondor, (Sat Mar 25, 4:59 pm)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Sat Mar 25, 5:28 pm)
Re: Integrating securelevel and kauth(9), Matthew Mondor, (Sat Mar 25, 6:53 pm)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Sat Mar 25, 7:22 pm)
Re: Integrating securelevel and kauth(9), Garrett D'Amore, (Sat Mar 25, 9:07 pm)
Re: Integrating securelevel and kauth(9), Garrett D'Amore, (Fri Mar 24, 5:55 pm)
Re: Integrating securelevel and kauth(9), Elad Efrat, (Fri Mar 24, 8:29 pm)
speck-geostationary