httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Leurent <lf...@leurent.eu>
Subject [users@httpd] [Tips] How to Dynamically Limit Access to a folder based on its name and Apache SSL Session Variable
Date Tue, 23 Mar 2010 16:53:53 GMT
Hello everybody, is it possible to dynamically restrict access to a folder based on its name?

For example, all my folders are MAC address names and I would like to dynamically restrict
each directory access based on %{SSL_CLIENT_S_DN_CN} which 
contains the mac address of the client
Thanks

ex: 
Restrict /home/web/provisioning/000e08133a50  folder to be accessible only by host with SSL_CLIENT_S_DN_CN="000e08133a50"
Restrict /home/web/provisioning/000e08133a54  folder to be accessible only by host with SSL_CLIENT_S_DN_CN="000e08133a54"
...

But doing it dynamically without changing apache configuration or creating a .htpasswd each
time I add a new folder

I would like to have something like
<Location /home/web/provisioning/*/>
	SSLVerifyClient require
	SSLRequire  %{SSL_CLIENT_S_DN_CN} =~ m/^NAME_OF_THE_WILDCARD_FOLDER_WITCH_IS_ALSO_A_MAC_ADDRESS$/
</Location>


Thanks for your help!
Best Regards,

-- 
-- --
Marc LEURENT
lftsy@leurent.eu

---------------------------------------------------------------------
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


Mime
View raw message