Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 32042E105 for ; Sun, 3 Mar 2013 07:46:33 +0000 (UTC) Received: (qmail 63644 invoked by uid 500); 3 Mar 2013 07:46:30 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 63519 invoked by uid 500); 3 Mar 2013 07:46:29 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 63501 invoked by uid 99); 3 Mar 2013 07:46:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Mar 2013 07:46:29 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of icicimov@gmail.com designates 74.125.83.45 as permitted sender) Received: from [74.125.83.45] (HELO mail-ee0-f45.google.com) (74.125.83.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Mar 2013 07:46:21 +0000 Received: by mail-ee0-f45.google.com with SMTP id b57so3174279eek.18 for ; Sat, 02 Mar 2013 23:46:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=rFVje6cEw+fJqP8Vc9IJ/GvPP740TYce9p+qFJRREfI=; b=soG4UqKW/+U9QfwlwqFKIqp71cYdvHItTt4QphpgaGN7XKpMGO+7Sf3WJV9XUFzci0 sTYbkrPK7/eugxBOTmxN+ty2EvtkQgwgi5xwVqxPeApTQAVeHGE1gF1O1axJ+nT2pNOg +JUMBemkwGH1R5pM8cZGfBfhCPpFV6jgPoJKFg7M64M+O9VPitw17PQS14ZcZ3RGTACI qd/AyC+14hqpBl16I7V5rrvefTpqeFFd43mpH+d/GtaC2ac8O6MTEB83U7MoDpAbttrp tO9X83BAL4s7xu9PIZi5NRnsQQcJKDVSUL8/Wa5Hh2fMdzkPt7CpE8WTXYAmUdazAwuj d/iA== MIME-Version: 1.0 X-Received: by 10.14.183.67 with SMTP id p43mr45346146eem.10.1362296760731; Sat, 02 Mar 2013 23:46:00 -0800 (PST) Received: by 10.223.87.194 with HTTP; Sat, 2 Mar 2013 23:46:00 -0800 (PST) In-Reply-To: References: Date: Sun, 3 Mar 2013 18:46:00 +1100 Message-ID: From: Igor Cicimov To: users Content-Type: multipart/alternative; boundary=047d7b3a805e80a9ee04d7006ee2 X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] using multiple LimitExcept directives --047d7b3a805e80a9ee04d7006ee2 Content-Type: text/plain; charset=ISO-8859-1 On 03/03/2013 3:34 PM, "James Martin" wrote: > > Folks, > > I'm attempting to using multiple LimitExcept directives in one > Location. Basically I want to give a the "*Actor*" ldap group GET & > PUTT access, the "WeatherMan" ldap group only GET access, and the > "*Actor*" ldap group PUT access. I'm open to using either apache 2.2 or > 2.4, as I see that apache 2.4 supports nesting of the Limit and > LimitExcept directives. This is what I've tried so far: > Can you please first check the above bold out groups for us? Is that correct or one of them should be Artist instead? > > > AuthType Basic > AuthName "Secure Area" > AuthBasicProvider ldap > AuthLDAPURL "ldap://localhost:10389/ou=users,o=company?uid" > AuthLDAPBindDN uid=binder,ou=users,o=bashoproserv > AuthLDAPBindPassword password > > Require ldap-group cn=Actor, ou=groups, o=company > >From the docs: and are used to enclose a group of access control directives which will then apply to any HTTP access method *not*listed in the arguments In this context, isn't your above statement actually achieving the opposite from what you want? > > Require ldap-group cn=WeatherMan, ou=groups, o=company > > > Require ldap-group cn=Actor, ou=groups, o=company > > > > In this case Apache only processes the last LimitExcept, so only > operation that is successful is the PUT by a user in the Actor ldap > group. > > > I've also attempted to nest these statements (new feature in 2.4) and > apache complains: > > " directive specifies methods already excluded" > > Here is that example: > > > Require ldap-group cn=*Artist*, ou=groups, o=bashoproserv > > Require ldap-group cn=*Actor*, ou=groups, o=bashoproserv > > > So is it Actor or Artist or both??? Can't see Artist in the first example... The docs further say: The and directives may be nested. In this case, *each successive level of or directives must further restrict the set of methods to which access controls apply.* When using or directives with the Requiredirective, note that the *first Requireto succeed authorizes the request, regardless of the presence of other Requiredirectives. * So, assuming GET+PUT for Artist, GET for WeatherMan and PUT for Actor, and having the above said in mind, I would try something like this: Require ldap-group cn=Artist, ou=groups, o=company Require ldap-group cn=WeatherMan, ou=groups, o=company Require ldap-group cn=Actor, ou=groups, o=company > I feel like I'm very close to getting this working, but I'm not quite > grasping how to stack the LimitExcepts properly. > > Thanks for your help, > > > James > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org > --047d7b3a805e80a9ee04d7006ee2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable


On 03/03/2013 3:34 PM, "James Martin" <james.s.martin@gmail.com> wro= te:
>
> Folks,
>
> I'm attempting to using multiple LimitExcept directives in one
> Location. =A0Basically I want to give a the "Actor" l= dap group =A0GET &
> PUTT access, the "WeatherMan" ldap group only GET access, an= d the
> "Actor" ldap group PUT access. =A0I'm open to usi= ng either apache 2.2 or
> 2.4, as I see that apache 2.4 supports nesting of the Limit and
> LimitExcept directives. =A0This is what I've tried so far:
>

Can you please first check the above bold out groups for us? Is = that correct or one of them should be Artist instead?

>
> <Location "/boballcharlieputs">
> =A0 AuthType Basic
> =A0 AuthName "Secure Area"
> =A0 AuthBasicProvider ldap
> =A0 =A0AuthLDAPURL =A0 =A0 =A0 =A0 =A0 =A0 =A0"ldap://localhost:1= 0389/ou=3Dusers,o=3Dcompany?uid"
> =A0 AuthLDAPBindDN uid=3Dbinder,ou=3Dusers,o=3Dbashoproserv
> =A0 AuthLDAPBindPassword password


> <LimitExcept GET PUT>
> =A0 =A0 Require ldap-group cn=3DActor, ou=3Dgroups, o=3Dcompany
> </LimitExcept>

From the docs:

= <LimitExcept> and </LimitExcept> are used to enclose a group of access control directives which will then apply to any HTTP access method not listed in the arguments<= /p>In this context, isn't your above statement actually achieving the o= pposite from what you want?

> =A0<LimitExcept GET>
> =A0 =A0 =A0 =A0 Require ldap-group cn=3DWeatherMan, ou=3Dgroups, o=3Dc= ompany
> =A0</LimitExcept>
> =A0<LimitExcept PUT>
> =A0 =A0 =A0 =A0 Require ldap-group cn=3DActor, ou=3Dgroups, o=3Dcompan= y
> =A0</LimitExcept>
> </Location>
>
> In this case Apache only processes the last LimitExcept, so only
> operation that is successful is the PUT by a user in the Actor ldap > group.
>
>
> I've also attempted to nest these statements (new feature in 2.4) = and
> apache complains:
>
> "<LimitExcept> directive specifies methods already excluded= "
>
> Here is that example:
>
> <LimitExcept GET PUT>
> =A0 =A0 Require ldap-group cn=3DArtist, ou=3Dgroups, o=3Dbashop= roserv
> =A0 =A0 <LimitExcept PUT>
> =A0 =A0 =A0 =A0 Require ldap-group cn=3DActor, ou=3Dgroups, o= =3Dbashoproserv
> =A0 =A0 </LimitExcept>
> </LimitExcept>
>

So is it Actor or Artist or both??? Can't see Ar= tist in the first example...

The docs further say:

The <Limit> and <LimitExcept> directives may be nested. In this case, each successive level of <Limit> or <LimitExce= pt> directives must further restrict the set of methods to which access controls apply.=

When using <Limit> or <LimitExcept> directives with the Require directive, note that the first Require to succeed authorizes the request, regardless of the presence of other Require directives.

=

So, assuming GET+PUT for Artist, GET for WeatherMan and PUT for Actor, a= nd having the above said in mind, I would try something like this:


<Limit GET PUT>
=A0=A0 Require ldap-group cn=3DArtist, ou=3Dgr= oups, o=3Dcompany
</Limit>
<Limit GET>
=A0=A0 Require = ldap-group cn=3DWeatherMan, ou=3Dgroups, o=3Dcompany
</Limit>
&= lt;Limit PUT>
=A0=A0 Require ldap-group cn=3DActor, ou=3Dgroups, o=3Dcompany
</Limi= t>

> I feel like I'm very close to getting this working, but I'm no= t quite
> grasping how to stack the LimitExcepts properly.
>
> Thanks for your help,
>
>
> James
>
> ---------------------------------------------------------------------<= br> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

--047d7b3a805e80a9ee04d7006ee2--