<div dir="ltr"><div><div><div><div><div><div><div><div>Hi,<br></div>I'm trying to access the SSL_CLIENT_SAN_IPAddr variables that mod_nss should expose, from a Lua authorization script.<br></div>The problem is that it doesn't seem to work :-(<br><br></div>Following a suggestion from the users group, I used some RewriteRule to expose variables and some are visible, but the client SAN IP addresses are not:<br><br>LuaScope thread<br>LuaAuthzProvider remote_ip_in_client_san /etc/httpd/authz/authz_check_remote_ip_in_client_san.lua authz_check_remote_ip_in_client_san<br>RewriteEngine On<br>RewriteRule .* - [E=sanip:%{SSL:SSL_CLIENT_SAN_IPAddr_0}]<br>RewriteRule .* - [E=c_verify:%{SSL:SSL_CLIENT_VERIFY}]<br>RewriteRule .* - [E=c_s_dn:%{SSL:SSL_CLIENT_S_DN}]<br>RewriteRule .* - [E=ssl_ver_if:%{SSL:SSL_VERSION_INTERFACE}]<br>RewriteRule .* - [E=ssl_ver_lib:%{SSL:SSL_VERSION_LIBRARY}]<br><Location /><br>    Require remote_ip_in_client_san<br>    #NSSRequire %{REMOTE_ADDR} in %{SSL_CLIENT_SAN_IPaddr} <br>    #Require expr "%{REMOTE_ADDR} in %{SSL_CLIENT_SAN_IPaddr}" <br></Location><br><br></div>The generated log:<br>[Wed Feb 15 13:14:07.653866 2017] ssl ver if: mod_nss/1.0.14<br>[Wed Feb 15 13:14:07.653871 2017] ssl ver lib: NSS/3.21 Basic ECC<br>[Wed Feb 15 13:14:07.653876 2017] client verify: SUCCESS<br>[Wed Feb 15 13:14:07.653881 2017] client DN: CN=client-with-subjectAltName-with-IPs<br>[Wed Feb 15 13:14:07.653886 2017] sanip: <br><br></div>Initially I hoped that mod_nss would expose all the SAN IP addresses as an array (SSL_CLIENT_SAN_IPAddr), but now I've read that it actually should create a variable for each, with a suffix (SSL_CLIENT_SAN_IPAddr_0), but that doesn't seem to be available either.<br><br></div>What am I doing wrong? <br></div>Please help.<br><br></div>Thank you.<br></div>