danwalsh


Dan Walsh's Blog

Got SELinux?


Previous Entry Share Next Entry
Roles Based Access Control (RBAC)
danwalsh
Sorry about not writing for a while, got wrapped up in work.

Roles Based Access Control with SELinux.

One of the underused features of SELinux is Roles Based Access Control (RBAC). In targeted policy RBAC is not really used. Everything pretty much runs in the same role (system_r).

The idea of SELinux RBAC is to define a role say auditadm_r which defines all the applications/files that a user in the role can run/manage. A user would log in as one of the default user roles and then when they wanted to administrate the audit programs they would have to change their roles. There is a newrole command for doing this. So a user might login in with the staff_r. The user would have to execute newrole -r auditadm_r, the tool will verify the role change is being done by a human being by prompting for the users password. At this point he would be allowed to execute all programs that can be run by the auditadm_r and would loose the ability to execute programs allowed to be run by staff_r. newrole also changes the Type of the running process. By convention the type matches the role so he would now be running in a shell of auditadm_r:auditadm_t. newrole is also the tool used to change the "Sensitivity Level" or MLS Level of the shell. One confusing part of changing the role is that you are also confined by the type, so files that you create will be relative to your type and role. And you will not necessarily have access to files in your home directory if the new role/type is not allowed access.

Remember SELinux is a parallel universe to DAC Controls. So if you needed to run applications as root, you will still need to use su or sudo to get around DAC Permissions.

In strict Policy we have defined the following roles

user_r which is the least powerful user. They can do everything a user can but do not have access to the administrators role.

staff_r which is very similar to user_r, except that staff_r can become other roles.

sysadm_r which is basically the administrator of the system role.

system_r which is the role of applications started by the system as opposed to applications started by a particular user or sysadm.

In MLS Policy we subdivide the sysadm_r role by adding:

auditadm_r which is allowed to control the auditing subsystem. He is allowed to change the audit rules and monitor the audit logs. He is not allowed to execute most SELinux utilities.

secadm_r who is allowed to run all of the selinux utilities. Change booleans, setenforce mode, load_policy, etc. He is not allowed to install software or do other administrative stuff.

sysadm_r has these priviledges removed.

MLS use of RBAC goal is not necessarily to stop a malicious admin from getting around these controls, but more to make them understand the role and stop them from making mistakes. For example, since the secadm_r can turn off enforcing mode, he could turn it off and then be allowed to manage the machine.

One of the experiments I would like to look into, would be to define a type say of apacheadm_t, which then could be allowed to only manipulate the apache configuration files. It would be an interesting experiment to see if we could allow this admin to run all editors and coreutils as root but only able to edit /etc/httpd and /var/www/html.

One problem with doing this blog is that sometimes I run out of ideas of what to talk about. (Writers Block). So please email me <dwalsh@redhat.com> with ideas of what you would like me to talk about.

Solve a common problem every week with a thorough and complete work through_

* You have a shared box on which untrusted users host websites, run cron jobs, and run perl scripts, perhaps even run shell scrits (i.e. a typical web hosting scenario) - how do you prevent:
* users reading each other's files (or writing..)
* users viewing each others processes
* users determining a list of customers or available websites

easy

(Anonymous)

2006-05-04 07:03 pm (UTC)

apache mod_rsbac :P

Re: easy

(Anonymous)

2006-05-05 07:06 am (UTC)

Interesting, but it's pretty much unknown, which is why an article is needed.
Also - it doesn't look like it covers the other points - perl scripts, cron jobs, etc.

Re: easy

(Anonymous)

2006-11-07 11:28 am (UTC)

everything is covered by rsbac.
mod_rsbac simply provide a way for apache to label it's subprocesses (=give them a role id+name) so that you can define which types this/these roles have access to.
being perl, php, cron, anything, will work.

I'm currently trying to set up a bindadm user akin to your hypothetical apacheadm_t. I'm running FC6 with the strict policy; do I understand from your post that I can only set up such a user if I use the mls policy, or is there a way for me to shoehorn it into strict? Mainly the problem I'm currently running into is that I can't seem to get sshd to transition into the bindadm_u:bindadm_r:bindadm_t:s0 context when the bindadm user logs in.

Note that I've only recently started hacking on this, and the last two weeks I've spent googling and reading docs (a lot of which are frustratingly out-of-date as they reference FC2), so I accept that it's entirely possible that I'm missing something completely obvious here. Seems like it'd be a good one-off for this blog, though - how to set up a new user context from scratch.

You do not want to login directly to bindadm_t

danwalsh

2006-12-06 07:35 pm (UTC)

RBAC works with both MLS and Strict policy

I think it would be easier to setup a user with both staff_r and bindadm_r and then login as staff_t and newrole to bindadm_r.

Musica per qualcuno mente

(Anonymous)

2007-01-18 07:56 pm (UTC)

Musica per tutti
http://www.umaine.edu/Trauma/_trauma_disc/00000071.htm

Buy cheap cialis

(Anonymous)

2007-02-18 12:06 pm (UTC)

http://buy-cialis.awardspace.us/
http://buy-cialis.awardspace.us/buy-cialis.html
http://buy-cialis.awardspace.us/buy-cheap-cialis.html
http://buy-cialis.awardspace.us/buy-cialis-uk.html
http://buy-cialis.awardspace.us/buy-cialis-viagra.html

Re: Buy cheap cialis

(Anonymous)

2007-04-11 06:41 pm (UTC)

BUT YOU CAN ALSO READ ABOUT cialis and viagra at http://viagra-vs-cialis.blogspot.com/ beuriful expressions Go fuck Cialis (http://viagra-vs-cialis.blogspot.com/)

Greetings, add me please in friends. =)




I need help

(Anonymous)

2007-05-12 07:09 pm (UTC)

hello
a design is just in a theme I got to you from a search engine through a site
< a href= http://lesbian-cam.premium10adult.info/free-lesbian-web-cam.html >free lesbian web cam </a> polazil for you on the site of danwalsh.livejournal.com all klastno but it is necessary to go




Great Money Making Oppurtunity

(Anonymous)

2007-07-02 07:33 am (UTC)

Great Multi-level marketing opportunity
http://www.diamondcashclub.com/newlz/

The cost to start uip is $200 only, then you have to get 2 others to sign up and thats it!
Watch your returns pile u. Watch the video to see how the system works. If you cannot afford $200, I am sorry but you will miss out
hjty8u

Great work

(Anonymous)

2007-09-03 09:54 pm (UTC)

.

Great work

(Anonymous)

2007-09-06 10:37 pm (UTC)

.

Com/newlz/ The cost to start up is only, then you have to get 2 others to sign up and thats it. Watch your returns pile u.

Great work

(Anonymous)

2007-09-27 04:26 am (UTC)

.

hello everyone yo yo 123abcdd

(Anonymous)

2007-09-30 08:52 pm (UTC)

hey there awesome site!
hey hey hey
this is me and me only yo yo
123tytytyywywyw

naisioxerloro

(Anonymous)

2007-11-28 09:15 pm (UTC)

Hi.
Good design, who make it?

good stuff

(Anonymous)

2007-12-06 04:20 pm (UTC)

cheap cialis (http://www.spitis.com/cheap-cialis.html)

cheap cialis generic (http://www.spitis.com/cheap-cialis-generic.html)

cheap cialis tablet (http://www.spitis.com/cheap-cialis-tablet.html)

cheap cialis tablets (http://www.spitis.com/cheap-cialis-tablets.html)

cheap cialis viagra (http://www.spitis.com/cheap-cialis-viagra.html)

cheap generic cialis (http://www.spitis.com/cheap-generic-cialis.html)

cheap viagra cialis (http://www.spitis.com/cheap-viagra-cialis.html)

chore relationship sex (http://www.spitis.com/chore-relationship-sex.html)

ciaalis (http://www.spitis.com/ciaalis.html)

ciagra (http://www.spitis.com/ciagra.html)

ciails (http://www.spitis.com/ciails.html)

is that a thong?

(Anonymous)

2008-02-24 06:57 pm (UTC)

[url=http://public.fotki.com/megastorm/is-that-a-thong?.html]is that a thong?[/url]
[url=http://public.fotki.com/megastorm/ger.html]ger[/url]
[url=http://candids.public.fotki.com/megastorm]ndi[/url]
[url=http://public.fotki.com/megastorm/vbb.html]vbb[/url]
[url=http://public.fotki.com/megastorm/white-shorts.html]white shorts[/url]
[url=http://public.fotki.com/megastorm/1to1.html]1to1[/url]
[url=http://public.fotki.com/megastorm/easyweightlosstea.html]easyweightlosstea[/url]
[url=http://public.fotki.com/megastorm/timmendorferstrand.html]timmendorferstrand[/url]
[url=http://public.fotki.com/megastorm/supergasbras.html]supergasbras[/url]
[url=http://public.fotki.com/megastorm/meagan.html]meagan[/url]
[url=http://public.fotki.com/megastorm/nicobior.html]nicobior[/url]
[url=http://public.fotki.com/megastorm/coors-light.html]coors light[/url]
[url=http://customizedgirl.public.fotki.com/megastorm/]cstmzgrl[/url]
[url=http://public.fotki.com/megastorm/quarterturn1.html]quarterturn1[/url]
[url=http://public.fotki.com/megastorm/koqui-halter.html]koqui halter[/url]
[url=http://herbiceps.public.fotki.com/megastorm/]bp[/url]
[url=http://muscletease.public.fotii.com/megastorm/]scl[/url]
[url=http://lovemusclegirl.public.fotki.com/megastorm/]vm[/url]
[url=http://public.fotki.com/megastorm/:-).html]:-)[/url]
[url=http://wildbikinistv.public.fotki.com/megastorm]wldbknt[/url]
[url=http://proudersmuscle.public.fotki.com/megastorm]prdmsc[/url]
[url=http://public.fotki.com/megastorm/cheeta.html]cheeta[/url]
[url=http://public.fotki.com/megastorm/group-sI007.html]group sI007[/url]
[url=http://public.fotki.com/megastorm/group-sI002.html]group sI002[/url]
[url=http://public.fotki.com/megastorm/jane6.html]jane6[/url]
[url=http://public.fotki.com/megastorm/wendi14.html]wendi14[/url]
[url=http://public.fotki.com/megastorm/wendi0006.html]wendi0006[/url]
[url=http://public.fotki.com/megastorm/HoLLaBaK2007]HoLLaBaK2007[/url]
[url=http://public.fotki.com/megastorm/:D.html]:D[/url]
[url=http://public.fotki.com/megastorm/DolceandGabana.html]Dolce and Gabana[/url]
[url=http://public.fotki.com/megastorm/camera-occulta.html]camera occulta[/url]
[url=http://flickr.com/photos/66698716@N00/399018880]soupspoon2007[/url]
[url=http://www.youtube.com/watch?v=D8w2i14GaNI]cheer camp[/url]
[url=http://tennis-babe.blogspot.com]tennis babe[/url]
[url=http://www.barfland.com/forum/member.php?u=11649]profshoe[/url]
[url=http://www.youtube.com/watch?v=4Prz3fVosJI]cheer practice[/url]
[url=http://www.youtube.com/v/UONbKYHoyo0]handstand[/url]
[url=http://readymademag.com/deflab/deflab_key.pdf]deflab[/url]
[url=http://www.spinervals.com/spin/pdf/spinervals_catalog.pdf]spinervals[/url]
[url=http://404secrets.com/404-Secrets.pdf]404 secrets[/url]
[url=http://www.atletska-zveza.si/files/atleti/bikar_alenka_2005.pdf]alenka bikar 2005[/url]
[url=http://www.usatf.org/statistics/OlympicTrialsStats2004.pdf]Olympic Trials Stats 2004[/url]
[url=http://www.ballroomdancecamp.org/pdf/brochure2003.pdf]ballroom dance camp 2003[/url]

The best thing about The SpiderWeb Marketing System must be that it`s sooo EASY..I just follow the step by step video tutorials, and I was set up in now time.

The second best thing must be that it dosen`t cost me anything. I just bought a domain, and tried it for free 7 days....That is worth a try....

And last but not least: You really dont have to be any good on computers....This was the first time I did something like that, and I was a bit skeptic. But The SpiderWeb System guided my trough every little step.

This is a great way to earn some more money. I have a job as an auxiliary-nurse, and is working full time. I also am a single mother. My daughter is 15 years old, so it`s always great with some extra money. And I doesn`t have to go out of the hose to earn more money. The SpiderWeb System does almost all of the work for me. That is just fantastic.

You can find out more about this opportunity by visiting The SpiderWeb Marketing System, or by sending me an e-mail.

http://www.TheSpiderWebSystem.com/ainae

You are viewing danwalsh