Skip to contentSkip to conversation

hierarchical roles

DISCUSSION Janak Desai 2 participants 3 messages Aug 7, 2006 1 message not in the archive SELinux security module

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

I sent the following to the redhat-lspp mailing list. I should have sent it to this mailing list since it involves a question about core selinux and not necessarily lspp. Dan/Klaus, sorry for the duplication.

Thanks.

-Janak

Quoted 26 lines · Janak Desai

As part of testing rbac evaluation requirements, I have been trying to create a loadable policy module that creates a new role that dominates a few of the existing roles. I am able to create a role using the dominance statement and "semanage user" correctly assigns other roles (which the new role dominates) to a user when that user is assigned the new role. From what I can see, I still have to setup needed access rights for the new domain associated with this new role. That makes sense, since roles only allow you access to a domain and are not involved in the access decision. So hierarchical roles only give you the ability to change into roles that you dominate but do not give you aggregate access rights of roles that you dominate, is that correct or am I missing something?

Let me explain what I am asking with an example. strict-mls policy has roles sysadm_r and secadm_r. I created a new role cnorris_r that dominates these two roles and runs in the default domain cnorris_t. A user xyz is assigned the cnorris_r. Now the user xyz can use newrole to switch into sysadm_r or secadm_r, to perform actions that those roles are allowed. However, as cnorris_r in cnorris_t domain, xyz cannot perform actions that they could as sysadm_r or secadm_r. Is that correct or am I missing some policy magic that will allow cnorris_r to perform sysadm_r/secadm_r duties directly (without newrole'ing to them)?

Quoted 8 lines

Thanks.

-Janak

--
redhat-lspp mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/redhat-lspp

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw
Quoted 14 lines · Janak Desai
Quoted 5 lines · Janak Desai

As part of testing rbac evaluation requirements, I have been trying to create a loadable policy module that creates a new role that dominates a few of the existing roles. I am able to create a role using the dominance statement and "semanage user" correctly assigns other roles (which the new role dominates) to a

Quoted 8 lines

user when that user is assigned the new role. From what I can see, I still have to setup needed access rights for the new domain associated with this new role. That makes sense, since roles only allow you access to a domain and are not involved in the access decision. So hierarchical roles only give you the ability to change into roles that you dominate but do not give you aggregate access rights of roles that you dominate, is that correct or am I missing something?

Role dominance affects two relations:
1) The role-type (domain) relation. If role A dominates role B, then role A automatically inherits all types (domains) authorized for role B (i.e. role A can be associated with all of those domains).
2) The user-role relation. If role A dominates role B and a user is authorized for role A, then the user is also authorized for role B.

There are some lingering ordering issues in the role dominance support, but I don't know if that will present a problem for you.

(1) does imply an aggregation of access rights for the dominating role, but not for any single domain in that role. And you still need appropriate allow rules to permit the desired role and/or domain transitions.

Quoted 11 lines
Quoted 11 lines

Let me explain what I am asking with an example. strict-mls policy has roles sysadm_r and secadm_r. I created a new role cnorris_r that dominates these two roles and runs in the default domain cnorris_t. A user xyz is assigned the cnorris_r. Now the user xyz can use newrole to switch into sysadm_r or secadm_r, to perform actions that those roles are allowed. However, as cnorris_r in cnorris_t domain, xyz cannot perform actions that they could as sysadm_r or secadm_r. Is that correct or am I missing some policy magic that will allow cnorris_r to perform sysadm_r/secadm_r duties directly (without newrole'ing to them)?

In that situation, cnorris_r would be authorized for the domains associated with secadm_r and sysadm_r, but that doesn't imply anything about cnorris_t. So for example, cnorris_r could even directly assume secadm_t as its domain (e.g. via newrole -t secadm_t) without changing the role.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#3 lore raw
Quoted 23 lines · Stephen Smalley
Quoted 14 lines · Janak Desai
Quoted 5 lines · Janak Desai

As part of testing rbac evaluation requirements, I have been trying to create a loadable policy module that creates a new role that dominates a few of the existing roles. I am able to create a role using the dominance statement and "semanage user" correctly assigns other roles (which the new role dominates) to a

Quoted 8 lines

user when that user is assigned the new role. From what I can see, I still have to setup needed access rights for the new domain associated with this new role. That makes sense, since roles only allow you access to a domain and are not involved in the access decision. So hierarchical roles only give you the ability to change into roles that you dominate but do not give you aggregate access rights of roles that you dominate, is that correct or am I missing something?

Role dominance affects two relations:
1) The role-type (domain) relation. If role A dominates role B, then role A automatically inherits all types (domains) authorized for role B (i.e. role A can be associated with all of those domains).
2) The user-role relation. If role A dominates role B and a user is authorized for role A, then the user is also authorized for role B.

Quoted 8 lines

There are some lingering ordering issues in the role dominance support, but I don't know if that will present a problem for you.

(1) does imply an aggregation of access rights for the dominating role, but not for any single domain in that role. And you still need appropriate allow rules to permit the desired role and/or domain transitions.

Thanks. The above two lines cleared my confusion. I was missing domain transition rules and that was throwing me off.

Quoted 12 lines
Quoted 11 lines
Quoted 11 lines

Let me explain what I am asking with an example. strict-mls policy has roles sysadm_r and secadm_r. I created a new role cnorris_r that dominates these two roles and runs in the default domain cnorris_t. A user xyz is assigned the cnorris_r. Now the user xyz can use newrole to switch into sysadm_r or secadm_r, to perform actions that those roles are allowed. However, as cnorris_r in cnorris_t domain, xyz cannot perform actions that they could as sysadm_r or secadm_r. Is that correct or am I missing some policy magic that will allow cnorris_r to perform sysadm_r/secadm_r duties directly (without newrole'ing to them)?

Quoted 6 lines

In that situation, cnorris_r would be authorized for the domains associated with secadm_r and sysadm_r, but that doesn't imply anything about cnorris_t. So for example, cnorris_r could even directly assume secadm_t as its domain (e.g. via newrole -t secadm_t) without changing the role.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.