<div dir="ltr">On Mon, Feb 13, 2017 at 10:00 PM, Rob Crittenden <span dir="ltr"><<a href="mailto:rcritten@redhat.com" target="_blank">rcritten@redhat.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="gmail-">Andrei Ivanov wrote:<br>
> Hi,<br>
> I'm trying to configure a virtual host to perform some kind of mutual<br>
> authentication using client certificates, performing an extra type of<br>
> validation:<br>
><br>
> <Location /><br>
>     NSSRequire %{REMOTE_ADDR} in %{SSL_CLIENT_SAN_IPaddr}<br>
> </Location><br>
><br>
> The problem at the moment seems to be that this expression is considered<br>
> invalid :-(<br>
><br>
> I've also tried with<br>
> Require expr "%{REMOTE_ADDR} in %{SSL_CLIENT_SAN_IPaddr}"<br>
><br>
> Still error :-(<br>
><br>
> AH00526: Syntax error on line 174 of /etc/httpd/conf.d/nss.conf:<br>
> Cannot parse expression in require line: syntax error, unexpected $end<br>
><br>
> Is this kind of expression really not supported?<br>
> What are my options for such an expression?<br>
<br>
</span>This isn't supported and I imagine the parsing engine would need to be<br>
extended quite a bit to do so.<br>
<br>
I don't know of a dynamic way to do this, you'd have to hardcode the SAN<br>
list into the config.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
rob<br>
<br></font></span></blockquote><div><br></div><div>Uf, the idea was to have each client certificate hold the list of IPs for which it is valid, similar to the DNS entries.</div><div><br></div><div>And I was so happy seeing that mod_nss exports the SSL_CLIENT_SAN_IPaddr (and as an array) vs mod_ssl.</div><div><br></div><div>I guess I'll create a ticket to get this kind of expression supported, but I won't count on getting it implemented.</div><div><br></div><div>Thank you.</div></div><br></div></div>