From: Stuart James <stuart@secpay.com>
To: Venkat Yekkirala <vyekkirala@TrustedCS.com>,
SE Linux <selinux@tycho.nsa.gov>
Subject: Re: ipsec, netlabels, secmark- How about a little usability?
Date: Fri, 15 Sep 2006 10:00:24 +0100 [thread overview]
Message-ID: <20060915100024.226f69ca@localhost.localdomain> (raw)
In-Reply-To: <36282A1733C57546BE392885C061859201513AA0@chaos.tcs.tcs-sec.com>
On Thu, 14 Sep 2006 18:52:13 -0400
Venkat Yekkirala <vyekkirala@TrustedCS.com> wrote:
> > > > > 1. By default httpd has to be able to talk to itself
> > in order to do
> > > > > gracefull shutdown,
> > > > > service httpd graceful.
> > > > >
> > > > > So I end up adding a rule allowing httpd to name_connect to
> > > > > the httpd_port_t. But I really only want to allow this
> > for localhost.
> > > > > IE I don't want to allow my httpd to name_connect to
> > other machines
> > > > > httpd ports? I can't do this now.
> > > > >
> > > > you can with secmark can't you?
> > > > iptables -I -p tcp -d localhost -s localhost -i lo
> > --dport 80 -j SECMARK
> > > > --selctx system_u:object_r:httpd_client_packet_t
> > >
> > > This one rule, both allows httpd_t to connect to localhost:80 and
> > > disallows it from connecting to anything-else:80 ?
> > >
> > > From the documentation --selctx just sets the "SELinux security
> > > context" ... so you presumably _also_ need some bit of
> > policy code that
> > > says "httpd_t can only name_bind(?) with httpd_client_packet_t"?
> >
> > The iptables rule only deals with labeling the packet with a
> > type. The
> > policy deals with what domains can send/recv a given packet via
> > allow rules like:
> > allow httpd_t http_client_packet_t:packet { send recv };
> > encapsulated in interfaces like:
> > corenet_sendrecv_http_client_packet(httpd_t)
> >
> > But the problem I see with the above example is that refpolicy
> > already generates a netfilter contexts entry that maps _everything_
> > going to port 80 with http_client_packet_t, so we would need to
> > delete that entry
> > to make the above work, or use a different type
> > (http_client_packet_lo_t) and only allow httpd_t to send it, not the
> > generic http_client_packet_t. All of which gets back to proper
> > integration.
>
> In the secid patch sent to netdev last week, all packets leaving httpd
> would be labeled with the label of the source socket (httpd_t). This
> label is currently overridable by the above "secmark" rule, but we
> could alternatively allow a packet to retain the label if it already
> has one, in which case, the allow rule would be like:
>
> allow httpd_t httpd_t:packet { send recv};
>
Would these rules also work on a packet forwarding device rather then
on the host that the packet is actually destined for?
--
Stuart James
Systems Administrator
DDI - (44) 0 1723 300205
--
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.
next prev parent reply other threads:[~2006-09-15 9:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-14 22:52 ipsec, netlabels, secmark- How about a little usability? Venkat Yekkirala
2006-09-15 9:00 ` Stuart James [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-09-20 13:02 Venkat Yekkirala
2006-09-19 21:19 Venkat Yekkirala
2006-09-20 1:35 ` Joshua Brindle
2006-09-14 14:52 Stuart James
2006-09-14 12:52 Daniel J Walsh
2006-09-14 13:50 ` Joshua Brindle
2006-09-14 13:55 ` Joshua Brindle
2006-09-14 14:43 ` Stephen Smalley
2006-09-15 15:36 ` Daniel J Walsh
2006-09-14 16:02 ` James Antill
2006-09-14 16:49 ` Stephen Smalley
2006-09-14 17:24 ` James Antill
2006-09-14 19:45 ` Stephen Smalley
2006-09-19 20:13 ` Karl MacMillan
2006-09-19 20:35 ` Christopher J. PeBenito
2006-09-19 21:12 ` Karl MacMillan
2006-09-19 20:47 ` Karl MacMillan
2006-09-20 13:30 ` Christopher J. PeBenito
2006-09-20 13:45 ` James Morris
2006-09-20 14:27 ` Christopher J. PeBenito
2006-09-20 14:45 ` James Morris
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=20060915100024.226f69ca@localhost.localdomain \
--to=stuart@secpay.com \
--cc=selinux@tycho.nsa.gov \
--cc=vyekkirala@TrustedCS.com \
/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.