You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christian Unger <ch...@mac.com> on 2010/07/01 15:56:29 UTC
[users@httpd] setenvif and mod_authnz_ldap
Hi there,
I'd like to know whether it is possible to check a request for a string via regex, store this into an envvar and match an ldap attribute against this variable?
below is my directory block. from the logs I can tell that the match in the require ldap-attribute shows that the variable doesn't get expanded.
on a side note I'd like to know how to log the variable to check whether it has been set or if my regex is completly in the woods.
any help very much appreciated
<Directory "/public_html/directory/*/private/">
SetEnvIf REQUEST_URI ".*/directory/(\d{8})/.*" date=$1
Options Indexes FollowSymLinks MultiViews
AllowOverride None
AuthType basic
AuthName "private"
AuthBasicProvider ldap
AuthLDAPURL "ldap://ldap.example.com:389/ou=people,dc=ldap,dc=example,dc=com?uid"
Require ldap-attribute sn=date
Order allow,deny
Allow from all
</Directory>
__
cu
christian unger
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] setenvif and mod_authnz_ldap
Posted by Christian Unger <ch...@mac.com>.
On 02.07.2010, at 13:46, Eric Covener wrote:
> On Fri, Jul 2, 2010 at 2:50 AM, Christian Unger <ch...@mac.com> wrote:
>>
>> On 01.07.2010, at 16:12, Eric Covener wrote:
>>
>>> On Thu, Jul 1, 2010 at 9:56 AM, Christian Unger <ch...@mac.com> wrote:
>>>>
>>>> Hi there,
>>>>
>>>> I'd like to know whether it is possible to check a request for a string via regex, store this into an envvar and match an ldap attribute against this variable?
>
> If you add extra values to the AuthLDAPURL, they are saved in
> AUTHENTICATE_$attribute. See the authnz_ldap doc.
>
> --
> Eric Covener
> covener@gmail.com
thanks Eric,
__
cu
christian unger
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] setenvif and mod_authnz_ldap
Posted by Eric Covener <co...@gmail.com>.
On Fri, Jul 2, 2010 at 2:50 AM, Christian Unger <ch...@mac.com> wrote:
>
> On 01.07.2010, at 16:12, Eric Covener wrote:
>
>> On Thu, Jul 1, 2010 at 9:56 AM, Christian Unger <ch...@mac.com> wrote:
>>>
>>> Hi there,
>>>
>>> I'd like to know whether it is possible to check a request for a string via regex, store this into an envvar and match an ldap attribute against this variable?
If you add extra values to the AuthLDAPURL, they are saved in
AUTHENTICATE_$attribute. See the authnz_ldap doc.
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] setenvif and mod_authnz_ldap
Posted by Christian Unger <ch...@mac.com>.
On 01.07.2010, at 16:12, Eric Covener wrote:
> On Thu, Jul 1, 2010 at 9:56 AM, Christian Unger <ch...@mac.com> wrote:
>>
>> Hi there,
>>
>> I'd like to know whether it is possible to check a request for a string via regex, store this into an envvar and match an ldap attribute against this variable?
>
> nope
>
>>
>> below is my directory block. from the logs I can tell that the match in the require ldap-attribute shows that the variable doesn't get expanded.
>> on a side note I'd like to know how to log the variable to check whether it has been set or if my regex is completly in the woods.
>
> you can change your LogFormat to include %{date}e
>
>> SetEnvIf REQUEST_URI ".*/directory/(\d{8})/.*" date=$1
>> Require ldap-attribute sn=date
>
>
> --
> Eric Covener
> covener@gmail.com
>
Thanks Eric,
do you happen to know if it is possible to capture the value of an ldap-attribute into an envvar?
then I could try to rewrite/redirect based on the variable....
__
cu
christian unger
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] setenvif and mod_authnz_ldap
Posted by Eric Covener <co...@gmail.com>.
On Thu, Jul 1, 2010 at 9:56 AM, Christian Unger <ch...@mac.com> wrote:
>
> Hi there,
>
> I'd like to know whether it is possible to check a request for a string via regex, store this into an envvar and match an ldap attribute against this variable?
nope
>
> below is my directory block. from the logs I can tell that the match in the require ldap-attribute shows that the variable doesn't get expanded.
> on a side note I'd like to know how to log the variable to check whether it has been set or if my regex is completly in the woods.
you can change your LogFormat to include %{date}e
> SetEnvIf REQUEST_URI ".*/directory/(\d{8})/.*" date=$1
> Require ldap-attribute sn=date
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org