0/4 - Hierarchal apache policy for reference policy
This is an RFC for policy allowing management delegation through hierarchical types.
Policy management often is handled by different administrators, based on the application or applications that are being governed. As a result, providing a means to delegate access to manage only certain aspects of policy is desirable, and can be accomplished using hierarchical types.
The proof of concept apache policy module illustrates policy management delegation through hierarchical types. This example apache policy works together with an adds metapolicy to the apache module and adds a policy server labeling file (apache.pc) that must be appended to the policy context file (the default for policy server is /etc/selinux/policy_contexts) to split apache’s policy management between different users.
In this policy, for example, management access to apache content is broken down hierarchically based on the content owner. Then apache_t.user_content is labeled user_apache_policy_t to only allow user_t to add new rules for apache_t.user_content type. Similar rules prevent user_t from using types like apache_t.staff_content. See the end of apache_per_role_template() in apache.if for the rules that govern how users change policy.
The enforcement of the metapolicy requires the policy management server, which will be released for preview soon.
--
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.
Quoted 5 lines · Joshua Brindle
This is an RFC for policy allowing management delegation through hierarchical types.
Policy management often is handled by different administrators, based on the application or applications that are being governed. As a result, providing a means to delegate access to manage only certain aspects of policy is desirable, and can be accomplished using hierarchical types.
The proof of concept apache policy module illustrates policy management delegation through hierarchical types. This example apache policy works together with an adds metapolicy to the apache module
It's good to see progress on this and a real fleshed-out example. I look forward to seeing the prototype policy server.
I think the biggest hurdle to this gaining widespread use is the length of the meta-policy, especially since it essentially repeats the policy for the sub-types. Any ideas about how to shorten this policy?
The other large issue, of course, is that this demonstrates how invasive the policy changes are in order to support delegation. This makes it very difficult for a policy admin to create a separate policy module that a) places hierarchical restrictions on a set of types and b) delegates administrative privileges to an admin type to make changes to those types.
My guess is that for real administrative roles to become viable in SELinux they are going to be largely site-defined in loadable modules (and the work at RH along those lines is using that as a starting assumption). So some way to support that seems necessary. At the very least I think that decoupling the hierarchical restrictions from the identifier names is needed. This also makes hierarchy work better with reference policy scoping.
Karl
--
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.
Quoted 11 lines · Karl MacMillan
Quoted 5 lines · Joshua Brindle
This is an RFC for policy allowing management delegation through hierarchical types.
Policy management often is handled by different administrators, based on the application or applications that are being governed. As a result, providing a means to delegate access to manage only certain aspects of policy is desirable, and can be accomplished using hierarchical types.
The proof of concept apache policy module illustrates policy management delegation through hierarchical types. This example apache policy works together with an adds metapolicy to the apache module
It's good to see progress on this and a real fleshed-out example. I look forward to seeing the prototype policy server.
I think the biggest hurdle to this gaining widespread use is the length of the meta-policy, especially since it essentially repeats the policy for the sub-types. Any ideas about how to shorten this policy?
nit: the meta-policy is short (5 lines). The policy itself is longer due to the propagation of rules to children types.
Quoted 2 lines
The other large issue, of course, is that this demonstrates how invasive the policy changes are in order to support delegation. This makes it very difficult for a policy admin to create a separate policy module that a) places hierarchical restrictions on a set of types and b) delegates administrative privileges to an admin type to make changes to those types.
I'm not sure how desirable ad-hoc delegation is. Just like normal policy meta policy needs to be well thought out in order to meet specific security goals (and do so without allowing bypass, etc).
Quoted 2 lines
My guess is that for real administrative roles to become viable in SELinux they are going to be largely site-defined in loadable modules (and the work at RH along those lines is using that as a starting assumption). So some way to support that seems necessary. At the very least I think that decoupling the hierarchical restrictions from the identifier names is needed. This also makes hierarchy work better with reference policy scoping.
I don't know if I believe this, all of our experience with making administrative roles is that it is difficult, we know, for example, that the secadm and sysadm roles are hardly separate and there are trivial bypasses that the sysadm role can use to gain secadm type access.
Decoupling the hierarchy from the identifier seems like it would make understanding the hierarchy and the resulting metapolicy very difficult.
I'm open to debate though, that is the purpose of sending this up at this time.
--
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.
Quoted 6 lines · Joshua Brindle
Quoted 5 lines · Karl MacMillan
Quoted 4 lines · Joshua Brindle
This is an RFC for policy allowing management delegation through hierarchical types.
Policy management often is handled by different administrators, based on the application or applications that are being governed. As a result, providing a means to delegate access to manage only certain aspects of policy is desirable, and can be accomplished using hierarchical types.
Quoted 9 lines
Quoted 6 lines
Quoted 1 line
The proof of concept apache policy module illustrates policy management delegation through hierarchical types. This example apache policy works together with an adds metapolicy to the apache module
It's good to see progress on this and a real fleshed-out example. I look forward to seeing the prototype policy server.
I think the biggest hurdle to this gaining widespread use is the length of the meta-policy, especially since it essentially repeats the policy for the sub-types. Any ideas about how to shorten this policy?
nit: the meta-policy is short (5 lines). The policy itself is longer due to the propagation of rules to children types.
Fine - but that answer the question. Having to define container types with a superset of the rules results in a much longer policy. I think that it is going to be hard to convince people to add that policy.
Quoted 4 lines
Quoted 2 lines
The other large issue, of course, is that this demonstrates how invasive the policy changes are in order to support delegation. This makes it very difficult for a policy admin to create a separate policy module that a) places hierarchical restrictions on a set of types and b) delegates administrative privileges to an admin type to make changes to those types.
I'm not sure how desirable ad-hoc delegation is.
It is not ad-hoc, it is just not done by the distribution or upstream.
Just like normal policy
Quoted 2 lines
meta policy needs to be well thought out in order to meet specific security goals (and do so without allowing bypass, etc).
Sure, but that doesn't mean that an administrator can't do this. The upstream refpolicy and / or distributions cannot meet all of the users needs - I'm just suggesting that we make it possible for people to do customization. It is their responsibility to do a good job at that point.
The alternative (take what is given or leave it) is not very attractive if it doesn't meet your needs.
Quoted 5 lines
Quoted 2 lines
My guess is that for real administrative roles to become viable in SELinux they are going to be largely site-defined in loadable modules (and the work at RH along those lines is using that as a starting assumption). So some way to support that seems necessary. At the very least I think that decoupling the hierarchical restrictions from the identifier names is needed. This also makes hierarchy work better with reference policy scoping.
I don't know if I believe this, all of our experience with making administrative roles is that it is difficult, we know, for example, that the secadm and sysadm roles are hardly separate and there are trivial bypasses that the sysadm role can use to gain secadm type access.
I don't think that secadm and sysadm are representative because they both end up touching files / processes that could potentially allow bypass. Allowing an admin to only run adduser or write to web pages is much simpler.
Just because it is hard doesn't mean that it shouldn't be possible to be done by admins.
Also, this customization might be done with tools that help them get it right. In that case, the customization still to land in a module.
Quoted 2 lines
Decoupling the hierarchy from the identifier seems like it would make understanding the hierarchy and the resulting metapolicy very difficult.
I'm not certain that determining the hierarchy tree is the limiting factor in terms of understandability.
Much more important to me is that it means that customization will almost always require changes to the original policy. I just don't think that is supportable.
Karl
--
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.
Quoted 24 lines · Karl MacMillan
Quoted 23 lines · Joshua Brindle
Quoted 21 lines · Karl MacMillan
Quoted 9 lines · Joshua Brindle
This is an RFC for policy allowing management delegation through hierarchical types.
Policy management often is handled by different administrators, based on the application or applications that are being governed. As a result, providing a means to delegate access to manage only certain aspects of policy is desirable, and can be accomplished using hierarchical types.
Quoted 3 lines
The proof of concept apache policy module illustrates policy management delegation through hierarchical types. This example apache policy works together with an adds metapolicy to the apache module
It's good to see progress on this and a real fleshed-out example. I look forward to seeing the prototype policy server.
I think the biggest hurdle to this gaining widespread use is the length of the meta-policy, especially since it essentially repeats the policy for the sub-types. Any ideas about how to shorten this policy?
Quoted 7 lines
Quoted 3 lines
nit: the meta-policy is short (5 lines). The policy itself is longer due to the propagation of rules to children types.
Fine - but that answer the question. Having to define container types with a superset of the rules results in a much longer policy. I think that it is going to be hard to convince people to add that policy.
Policy build could automatically generate the rules for the container types from the child type rules, as long as they come from the same source (e.g. all part of the base policy build, or all within the same module). Then you only need to explicitly state rules for the container types for accesses that you wish to permit to externally defined children.
Quoted 17 lines
Quoted 9 lines
Quoted 7 lines
The other large issue, of course, is that this demonstrates how invasive the policy changes are in order to support delegation. This makes it very difficult for a policy admin to create a separate policy module that a) places hierarchical restrictions on a set of types and
b) delegates administrative privileges to an admin type to make changes to those types.I'm not sure how desirable ad-hoc delegation is.
It is not ad-hoc, it is just not done by the distribution or upstream.
Just like normal policy
Quoted 3 lines
meta policy needs to be well thought out in order to meet specific security goals (and do so without allowing bypass, etc).
Quoted 7 lines
Sure, but that doesn't mean that an administrator can't do this. The upstream refpolicy and / or distributions cannot meet all of the users needs - I'm just suggesting that we make it possible for people to do customization. It is their responsibility to do a good job at that point.
The alternative (take what is given or leave it) is not very attractive if it doesn't meet your needs.
Agreed; we need to leave the choice in the user's hands, and just provide them with good tooling for making informed choices. We can't predict all the different ways in which real admins will want to delegate.
Quoted 15 lines
Quoted 9 lines
Quoted 8 lines
My guess is that for real administrative roles to become viable in SELinux they are going to be largely site-defined in loadable modules (and the work at RH along those lines is using that as a starting assumption). So some way to support that seems necessary. At the very least I think that decoupling the hierarchical restrictions from the identifier names is needed. This also makes hierarchy work better with reference policy scoping.
Quoted 5 lines
I don't know if I believe this, all of our experience with making administrative roles is that it is difficult, we know, for example, that the secadm and sysadm roles are hardly separate and there are trivial bypasses that the sysadm role can use to gain secadm type access.
Quoted 7 lines
I don't think that secadm and sysadm are representative because they both end up touching files / processes that could potentially allow bypass. Allowing an admin to only run adduser or write to web pages is much simpler.
Just because it is hard doesn't mean that it shouldn't be possible to be done by admins.
Agreed.
Quoted 6 lines
Quoted 3 lines
Decoupling the hierarchy from the identifier seems like it would make understanding the hierarchy and the resulting metapolicy very difficult.
I'm not certain that determining the hierarchy tree is the limiting factor in terms of understandability.
Particularly with appropriate tooling to make the tree visible.
Quoted 3 lines
Much more important to me is that it means that customization will almost always require changes to the original policy. I just don't think that is supportable.
Yes, that is presently a real obstacle to e.g. implementing roles at a site.
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.
Quoted 4 lines · Stephen Smalley
Quoted 3 lines · Karl MacMillan
Quoted 2 lines · Joshua Brindle
Quoted 1 line · Karl MacMillan
Joshua Brindle wrote:
<snip>
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
I think the biggest hurdle to this gaining widespread use is the length of the meta-policy, especially since it essentially repeats the policy for the sub-types. Any ideas about how to shorten this policy?
nit: the meta-policy is short (5 lines). The policy itself is longer due to the propagation of rules to children types.
Quoted 9 lines
Quoted 1 line
Fine - but that answer the question. Having to define container types with a superset of the rules results in a much longer policy. I think that it is going to be hard to convince people to add that policy.
Policy build could automatically generate the rules for the container types from the child type rules, as long as they come from the same source (e.g. all part of the base policy build, or all within the same module). Then you only need to explicitly state rules for the container types for accesses that you wish to permit to externally defined children.
That's probably a good solution. Wouldn't be too hard to make a tool to do this from selgen / sepolgen / madison.
Karl
--
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.
Quoted 30 lines
From: Karl MacMillan [mailto:[email protected]]
Quoted 4 lines · Stephen Smalley
Quoted 3 lines · Karl MacMillan
Quoted 2 lines · Joshua Brindle
Quoted 1 line · Karl MacMillan
Joshua Brindle wrote:
<snip>
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I think the biggest hurdle to this gaining widespread use is the length of the meta-policy, especially since it
essentially repeats
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the policy for the sub-types. Any ideas about how to
shorten this policy?
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
nit: the meta-policy is short (5 lines). The policy
itself is longer
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
due to the propagation of rules to children types.
Fine - but that answer the question. Having to define
container types
Quoted 1 line
Quoted 1 line
with a superset of the rules results in a much longer
policy. I think
Quoted 3 lines
Quoted 1 line
that it is going to be hard to convince people to add that policy.
Policy build could automatically generate the rules for the
container
Quoted 2 lines
types from the child type rules, as long as they come from the same source (e.g. all part of the base policy build, or all
Quoted 8 lines
within the same
Quoted 4 lines
module). Then you only need to explicitly state rules for the container types for accesses that you wish to permit to externally defined children.
That's probably a good solution. Wouldn't be too hard to make a tool to do this from selgen / sepolgen / madison.
This defeats the purpose of the hierarchy. The container types define the maximum permissions that can be granted to a child. The intention is for the security admin to create types with the permissions acceptable to meet his goals, and allow other admins to securely make finer grained children types.
The proposed solution gives the opposite effect, it builds container types from children so the children must meet the requirements of the parent types without knowing them.
--
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.
Quoted 46 lines · Joshua Brindle
Quoted 30 lines
From: Karl MacMillan [mailto:[email protected]]
Quoted 4 lines · Stephen Smalley
Quoted 3 lines · Karl MacMillan
Quoted 2 lines · Joshua Brindle
Quoted 1 line · Karl MacMillan
Joshua Brindle wrote:
<snip>
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I think the biggest hurdle to this gaining widespread use is the length of the meta-policy, especially since it
essentially repeats
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the policy for the sub-types. Any ideas about how to
shorten this policy?
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
nit: the meta-policy is short (5 lines). The policy
itself is longer
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
due to the propagation of rules to children types.
Fine - but that answer the question. Having to define
container types
Quoted 1 line
Quoted 1 line
with a superset of the rules results in a much longer
policy. I think
Quoted 3 lines
Quoted 1 line
that it is going to be hard to convince people to add that policy.
Policy build could automatically generate the rules for the
container
Quoted 2 lines
types from the child type rules, as long as they come from the same source (e.g. all part of the base policy build, or all
Quoted 8 lines
within the same
Quoted 4 lines
module). Then you only need to explicitly state rules for the container types for accesses that you wish to permit to externally defined children.
That's probably a good solution. Wouldn't be too hard to make a tool to do this from selgen / sepolgen / madison.
This defeats the purpose of the hierarchy. The container types define the maximum permissions that can be granted to a child. The intention is for the security admin to create types with the permissions acceptable to meet his goals, and allow other admins to securely make finer grained children types.
Quoted 3 lines
The proposed solution gives the opposite effect, it builds container types from children so the children must meet the requirements of the parent types without knowing them.
No, notice that I only said that one would automatically propagate accesses from the children to the parent if they come from the same source (base policy build or within the same module). You wouldn't automatically propagate beyond that scope, so if a type in a module is a child of a parent type in the base (or any other previously added module), it would still be constrained to whatever was explicitly specified by the base (or other module) on the parent type. It merely avoids the need to duplicate specification within the base policy or within a single module when both the parent and the child types are defined within that base or module.
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.
Quoted 51 lines · Stephen Smalley
Quoted 46 lines · Joshua Brindle
Quoted 30 lines
From: Karl MacMillan [mailto:[email protected]]
Quoted 4 lines · Stephen Smalley
Quoted 3 lines · Karl MacMillan
Quoted 2 lines · Joshua Brindle
Quoted 1 line · Karl MacMillan
Joshua Brindle wrote:
<snip>
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I think the biggest hurdle to this gaining widespread use is the length of the meta-policy, especially since it
essentially repeats
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the policy for the sub-types. Any ideas about how to
shorten this policy?
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
nit: the meta-policy is short (5 lines). The policy
itself is longer
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
due to the propagation of rules to children types.
Fine - but that answer the question. Having to define
container types
Quoted 1 line
Quoted 1 line
with a superset of the rules results in a much longer
policy. I think
Quoted 3 lines
Quoted 1 line
that it is going to be hard to convince people to add that policy.
Policy build could automatically generate the rules for the
container
Quoted 2 lines
types from the child type rules, as long as they come from the same source (e.g. all part of the base policy build, or all
Quoted 8 lines
within the same
Quoted 4 lines
module). Then you only need to explicitly state rules for the container types for accesses that you wish to permit to externally defined children.
That's probably a good solution. Wouldn't be too hard to make a tool to do this from selgen / sepolgen / madison.
This defeats the purpose of the hierarchy. The container types define the maximum permissions that can be granted to a child. The intention is for the security admin to create types with the permissions acceptable to meet his goals, and allow other admins to securely make finer grained children types.
Quoted 3 lines
The proposed solution gives the opposite effect, it builds container types from children so the children must meet the requirements of the parent types without knowing them.
Quoted 10 lines
No, notice that I only said that one would automatically propagate accesses from the children to the parent if they come from the same source (base policy build or within the same module). You wouldn't automatically propagate beyond that scope, so if a type in a module is a child of a parent type in the base (or any other previously added module), it would still be constrained to whatever was explicitly specified by the base (or other module) on the parent type. It merely avoids the need to duplicate specification within the base policy or within a single module when both the parent and the child types are defined within that base or module.
Note btw that the value of such automatic propagation may be minimal for a highly modularized, highly parameterized policy (ala apache).
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.
Quoted 61 lines
From: Stephen Smalley [mailto:[email protected]]
Quoted 17 lines · Joshua Brindle
Quoted 17 lines
From: Karl MacMillan [mailto:[email protected]]
Quoted 4 lines · Stephen Smalley
Quoted 3 lines · Karl MacMillan
Quoted 2 lines · Joshua Brindle
Quoted 1 line · Karl MacMillan
Joshua Brindle wrote:
<snip>
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I think the biggest hurdle to this gaining widespread use is the length of the meta-policy, especially since it
essentially repeats
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
the policy for the sub-types. Any ideas about how to
shorten this policy?
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
nit: the meta-policy is short (5 lines). The policy
Quoted 8 lines
Quoted 8 lines
itself is longer
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
due to the propagation of rules to children types.
Fine - but that answer the question. Having to define
container types
Quoted 1 line
Quoted 1 line
with a superset of the rules results in a much longer
policy. I think
Quoted 1 line
Quoted 1 line
that it is going to be hard to convince people to add
that policy.
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
Policy build could automatically generate the rules for the
container
Quoted 2 lines
types from the child type rules, as long as they come from the same source (e.g. all part of the base policy build, or all
within the same
Quoted 2 lines
module). Then you only need to explicitly state rules for the container types for accesses that you wish to permit to
externally
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
defined children.
That's probably a good solution. Wouldn't be too hard to
make a tool
Quoted 4 lines
Quoted 1 line
to do this from selgen / sepolgen / madison.
This defeats the purpose of the hierarchy. The container
types define
Quoted 1 line
the maximum permissions that can be granted to a child. The
intention
Quoted 2 lines
is for the security admin to create types with the permissions acceptable to meet his goals, and allow other admins to
securely make
Quoted 3 lines
finer grained children types.
The proposed solution gives the opposite effect, it builds
container
Quoted 1 line
types from children so the children must meet the
requirements of the
Quoted 1 line
parent types without knowing them.
Quoted 12 lines
No, notice that I only said that one would automatically propagate accesses from the children to the parent if they come from the same source (base policy build or within the same module). You wouldn't automatically propagate beyond that scope, so if a type in a module is a child of a parent type in the base (or any other previously added module), it would still be constrained to whatever was explicitly specified by the base (or other module) on the parent type. It merely avoids the need to duplicate specification within the base policy or within a single module when both the parent and the child types are defined within that base or module.
This implies that policy won't be added by updating pre-existing modules to add access and would only be added via extra modules.
So the result would be that someone adding permissions to a child type in a pre-existing module would be an insertion failure because they weren't allowed to add permissions to the parent rather than a hierarchy violation error.
If one added the same rule to another module they'd get a hierarchy violation error, however. So the user would experience different errors depending on how they added the rule to the policy.
--
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.
Quoted 3 lines · Joshua Brindle
Quoted 3 lines
From: Stephen Smalley [mailto:[email protected]]
On Thu, 2007-01-18 at 15:00 -0500, Joshua Brindle wrote:
<snip>
Quoted 11 lines
Quoted 7 lines
Quoted 1 line
The proposed solution gives the opposite effect, it builds
container
Quoted 1 line
types from children so the children must meet the
requirements of the
Quoted 1 line
parent types without knowing them.
No, notice that I only said that one would automatically propagate accesses from the children to the parent if they come from the same source (base policy build or within the same module). You wouldn't automatically propagate beyond that scope, so if a type in a module is a child of a parent type in the base (or any other previously added module), it would still be constrained to whatever was explicitly specified by the base (or other module) on the parent type. It merely avoids the need to duplicate specification within the base policy or within a single module when both the parent and the child types are defined within that base or module.
This implies that policy won't be added by updating pre-existing modules to add access and would only be added via extra modules.
Quoted 8 lines
So the result would be that someone adding permissions to a child type in a pre-existing module would be an insertion failure because they weren't allowed to add permissions to the parent rather than a hierarchy violation error.
If one added the same rule to another module they'd get a hierarchy violation error, however. So the user would experience different errors depending on how they added the rule to the policy.
I don't follow - I thought that the typing meant that it didn't matter where the rule came from, only what the source and destination types were. If you added additional rules via the module, the target types should have the same type as they do in the original module.
Karl
--
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.
Quoted 45 lines
From: Karl MacMillan [mailto:[email protected]]
Quoted 3 lines · Joshua Brindle
Quoted 3 lines
From: Stephen Smalley [mailto:[email protected]]
On Thu, 2007-01-18 at 15:00 -0500, Joshua Brindle wrote:
<snip>
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
The proposed solution gives the opposite effect, it builds
container
Quoted 1 line
types from children so the children must meet the
requirements of the
Quoted 1 line
parent types without knowing them.
No, notice that I only said that one would automatically propagate accesses from the children to the parent if they come from
the same
Quoted 1 line
Quoted 1 line
source (base policy build or within the same module). You
wouldn't
Quoted 1 line
Quoted 1 line
automatically propagate beyond that scope, so if a type in
a module
Quoted 5 lines
Quoted 5 lines
is a child of a parent type in the base (or any other previously added module), it would still be constrained to whatever was explicitly specified by the base (or other module) on the parent type.
It merely avoids the need to duplicate specificationwithin the base
Quoted 1 line
Quoted 1 line
policy or within a single module when both the parent and
the child
Quoted 7 lines
Quoted 2 lines
types are defined within that base or module.
This implies that policy won't be added by updating pre-existing modules to add access and would only be added via extra modules.
So the result would be that someone adding permissions to a
child type
Quoted 7 lines
in a pre-existing module would be an insertion failure because they weren't allowed to add permissions to the parent rather than a hierarchy violation error.
If one added the same rule to another module they'd get a hierarchy violation error, however. So the user would experience different errors depending on how they added the rule to the policy.
Quoted 6 lines
I don't follow - I thought that the typing meant that it didn't matter where the rule came from, only what the source and destination types were. If you added additional rules via the module, the target types should have the same type as they do in the original module.
What I was saying was how it would behave differently if you generated rules for all the parents of a child at build time within a single module. If you automatically did that then adding a rule to a child would get propagated to the parent which would result in an access violation at insert time. If you added the rule from another module it would show up as a hierarchy violation instead.
--
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.
Quoted 7 lines · Joshua Brindle
Quoted 6 lines
From: Karl MacMillan [mailto:[email protected]]
Quoted 1 line · Joshua Brindle
If one added the same rule to another module they'd get a hierarchy violation error, however. So the user would experience different errors depending on how they added the rule to the policy.
I don't follow - I thought that the typing meant that it didn't matter where the rule came from, only what the source and destination types were. If you added additional rules via the module, the target types should have the same type as they do in the original module.
Quoted 6 lines
What I was saying was how it would behave differently if you generated rules for all the parents of a child at build time within a single module. If you automatically did that then adding a rule to a child would get propagated to the parent which would result in an access violation at insert time. If you added the rule from another module it would show up as a hierarchy violation instead.
Ah - I see what you are saying. I was assuming that this would be a development tool manually invoked to aid policy developers. Not something that would always happen as part of the build.
Also, I assume that for the most part the container types will be given very broad privileges rather than the fine-grained approach taken with the apache policy. Otherwise chances are that most updates will fail from hierarchy violations because you forgot one small access. In other words, the closer the container type policy to the subtypes the less useful it actually is (because you would just not delegate access to someone else to update it).
Karl
--
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.
So how does this work. I just added the following policy to create a httpd_squid_script_exec_t.
policy_module(squid_cgi,1.0.0)
apache_content_template(squid) corenet_tcp_connect_http_cache_port(httpd_squid_script_t) squid_read_config(httpd_squid_script_t)
allow httpd_squid_script_t self:tcp_socket create_socket_perms; sysnet_read_config(httpd_squid_script_t) corenet_non_ipsec_sendrecv(httpd_squid_script_t)
I take it the base apache policy did not have the right to read squid config data.
--
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.