* get request context
@ 2009-10-07 11:39 michel m
2009-10-07 12:02 ` Stephen Smalley
0 siblings, 1 reply; 4+ messages in thread
From: michel m @ 2009-10-07 11:39 UTC (permalink / raw)
To: selinux
[-- Attachment #1: Type: text/plain, Size: 375 bytes --]
Hi,
Is there any way that I can get context for incoming http requests from
selinux API. that is I want to classify requests based on some criteria like
origin`s IP address or any thing that can help me to know what context the
request is coming from.
is there such an API for this is libselinux? If not, how can I have this
knowledge by using existing API?
Best regards.
[-- Attachment #2: Type: text/html, Size: 400 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: get request context
2009-10-07 11:39 get request context michel m
@ 2009-10-07 12:02 ` Stephen Smalley
2009-10-07 17:38 ` Stephen Smalley
2009-10-07 20:43 ` Paul Moore
0 siblings, 2 replies; 4+ messages in thread
From: Stephen Smalley @ 2009-10-07 12:02 UTC (permalink / raw)
To: michel m; +Cc: selinux
On Wed, 2009-10-07 at 15:09 +0330, michel m wrote:
> Hi,
>
> Is there any way that I can get context for incoming http requests
> from selinux API. that is I want to classify requests based on some
> criteria like origin`s IP address or any thing that can help me to
> know what context the request is coming from.
>
> is there such an API for this is libselinux? If not, how can I have
> this knowledge by using existing API?
If using labeled IPSEC to label the connections, you can use
getpeercon(3) in libselinux.
http://securityblog.org/brindle/2007/05/28/secure-networking-with-selinux/
Likewise with NetLabel, although there you are limited to only passing
the MLS label at present. You might be able to do something via the
fallback labeling based on IP address.
http://paulmoore.livejournal.com/
--
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: get request context
2009-10-07 12:02 ` Stephen Smalley
@ 2009-10-07 17:38 ` Stephen Smalley
2009-10-07 20:43 ` Paul Moore
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Smalley @ 2009-10-07 17:38 UTC (permalink / raw)
To: michel m; +Cc: selinux
On Wed, 2009-10-07 at 08:02 -0400, Stephen Smalley wrote:
> On Wed, 2009-10-07 at 15:09 +0330, michel m wrote:
> > Hi,
> >
> > Is there any way that I can get context for incoming http requests
> > from selinux API. that is I want to classify requests based on some
> > criteria like origin`s IP address or any thing that can help me to
> > know what context the request is coming from.
> >
> > is there such an API for this is libselinux? If not, how can I have
> > this knowledge by using existing API?
>
> If using labeled IPSEC to label the connections, you can use
> getpeercon(3) in libselinux.
>
> http://securityblog.org/brindle/2007/05/28/secure-networking-with-selinux/
>
> Likewise with NetLabel, although there you are limited to only passing
> the MLS label at present. You might be able to do something via the
> fallback labeling based on IP address.
>
> http://paulmoore.livejournal.com/
Also, if you want to deal with it in terms of http authenticated user
identity rather than connection, you might want to have a look at
mod_selinux.
http://code.google.com/p/sepgsql/wiki/Apache_SELinux_plus
--
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: get request context
2009-10-07 12:02 ` Stephen Smalley
2009-10-07 17:38 ` Stephen Smalley
@ 2009-10-07 20:43 ` Paul Moore
1 sibling, 0 replies; 4+ messages in thread
From: Paul Moore @ 2009-10-07 20:43 UTC (permalink / raw)
To: michel m; +Cc: Stephen Smalley, selinux
On Wednesday 07 October 2009 12:02:12 pm Stephen Smalley wrote:
> On Wed, 2009-10-07 at 15:09 +0330, michel m wrote:
> > Hi,
> >
> > Is there any way that I can get context for incoming http requests
> > from selinux API. that is I want to classify requests based on some
> > criteria like origin`s IP address or any thing that can help me to
> > know what context the request is coming from.
> >
> > is there such an API for this is libselinux? If not, how can I have
> > this knowledge by using existing API?
>
> If using labeled IPSEC to label the connections, you can use
> getpeercon(3) in libselinux.
>
> http://securityblog.org/brindle/2007/05/28/secure-networking-with-selinux/
>
> Likewise with NetLabel, although there you are limited to only passing
> the MLS label at present. You might be able to do something via the
> fallback labeling based on IP address.
>
> http://paulmoore.livejournal.com/
To clarify things a bit, NetLabel only conveys MLS attributes when using CIPSO
(the netlabel_peer_t type is used for type enforcement) but NetLabel does
convey a full SELinux context when the fallback labels are configured.
--
paul moore
linux @ hp
--
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-07 20:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07 11:39 get request context michel m
2009-10-07 12:02 ` Stephen Smalley
2009-10-07 17:38 ` Stephen Smalley
2009-10-07 20:43 ` Paul Moore
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.