简体   繁体   中英

mod_ssl SSLRequire allow variable starting with underscore

I am trying to enforce a rule so that only variables staring with underscore can authenticate a site.

1.Trying with SSLRequire %{SSL_CLIENT_S_DN_CN} option(will take the client cert CN)

allow from all SSLOptions +StdEnvVars SSLRequireSSL

            SSLRequire  %{SSL_CLIENT_S_DN_CN} =~ ^_

            SSLVerifyClient require
            SSLVerifyDepth  5
            SSLUserName SSL_CLIENT_S_DN_CN
            RequestHeader set userid %{REMOTE_USER}s

Tried above but getting syntax error for SSLRequire %{SSL_CLIENT_S_DN_CN} =~ ^_

Achieved this by below.

SSLRequire %{SSL_CLIENT_S_DN_CN} =~ m#(^_)#

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM