Hi,
I'm trying to create a lua authorization script but I can't seem to access the request environment:
require 'apache2'
function authz_check_remote_ip_in_client_san(r)
r:err("remote_ip_in_client_san running...");
r:alert("uri: " .. r.uri);
r:alert("useragent_ip: " .. r.useragent_ip);
local ip = r.subprocess_env["REMOTE_ADDRESS"];
r:crit("REMOTE_ADDRESS: " .. (ip or "N/A"));
r:emerg("SSL_CLIENT_SAN_IPaddr: " .. (r.subprocess_env["SSL_CLIENT_SAN_IPaddr"] or "N/A"));
return apache2.AUTHZ_GRANTED
end
LuaAuthzProvider remote_ip_in_client_san /etc/httpd/authz/authz_check_remote_ip_in_client_san.lua authz_check_remote_ip_in_client_san