- Client Certãšã¯äœããç解ããã¢ãã€ã«Safariã®WebSocketã圌ã«ãšã£ãŠãªããªã®ãç解ããŠããŸã
- éãããç¯å²ã®äººã ãŸãã¯èªåã ãã«WebãµãŒãã¹ãå ¬éãããã
- ãã¹ãŠã誰ãã«ãã£ãŠæ¢ã«è¡ãããŠãããšèããäžçãããå°ã䟿å©ã§å®å šã«ããããšèããŠããŸãã
Webãœã±ããã®æŽå²ã¯çŽ8幎åã«å§ãŸããŸããã以åã¯ãã¡ãœããã¯é·ãhttpèŠæ±ïŒå®éã«ã¯å¿çïŒã®åœ¢åŒã§äœ¿çšãããŠããŸããããŠãŒã¶ãŒã®ãã©ãŠã¶ãŒããµãŒããŒã«èŠæ±ãéä¿¡ãããµãŒããŒãèŠæ±ã«å¿çããã®ãåŸ ã£ãåŸãå¿çãåã³æ¥ç¶ãããŠåŸ æ©ããŸãããããããã®åŸãWebãœã±ãããç»å ŽããŸããã
æ°å¹Žåãç§ãã¡ã¯ç¬èªã®çŽç²ãªphpå®è£ ãéçºããŸãããããã¯ããŒã¿ãªã³ã¯ã¬ã€ã€ãŒã§ãããããhttpsãªã¯ãšã¹ãã®äœ¿çšæ¹æ³ãããããŸãããå°ãåãŸã§ãã»ãšãã©ãã¹ãŠã®WebãµãŒããŒãhttpsãä»ããŠãªã¯ãšã¹ãããããã·ããæ¥ç¶ããµããŒãããããšãåŠã³ãŸããïŒã¢ããã°ã¬ãŒãã
ãããçºçãããšããµãŒããŒã«ãã£ãŠéå§ãããã³ã³ãã³ãããŠãŒã¶ãŒã«æäŸããïŒä»ã®ãŠãŒã¶ãŒããã¡ãã»ãŒãžãéä¿¡ãããã誰ããçŸåšç·šéããŠããç»åãããã¥ã¡ã³ãããã¬ãŒã³ããŒã·ã§ã³ã®æ°ããããŒãžã§ã³ãã¢ããããŒãããïŒã®ã䟿å©ã§ãããããWebãœã±ããã¯å®è³ªçã«SPAã¢ããªã±ãŒã·ã§ã³ã®ããã©ã«ããµãŒãã¹ã«ãªããŸããã ...
Client Certã¯ããªãåããååšããŠããŸãããåé¿ããããšãããšå€ãã®åé¡ãçºçãããããäŸç¶ãšããŠãµããŒãã¯äžååã§ãããããŠïŒãã¶ãïŒslightly_smiling_face :)ãã®ãããIOSãã©ãŠã¶ïŒSafariãé€ããã¹ãŠïŒã¯ããã䜿çšããããªãã®ã§ãããŒã«ã«ã®èšŒææžã¹ãã¢ã«åãåãããŸãã蚌ææžã«ã¯ããã°ã€ã³/ãã¹ãŸãã¯SSHããŒããŸãã¯ãã¡ã€ã¢ãŠã©ãŒã«ãä»ããŠå¿ èŠãªããŒããéããããšãããå€ãã®å©ç¹ããããŸããããããããã¯éèŠã§ã¯ãããŸããã
IOSã§ã¯ã蚌ææžãã€ã³ã¹ããŒã«ããæé ã¯éåžžã«ç°¡åã§ãïŒè©³çŽ°ã¯å¿ èŠãããŸããïŒããäžè¬ã«ããããã¯ãŒã¯äžã§éåžžã«å€ããSafariãã©ãŠã¶ãŒã§ã®ã¿äœ¿çšã§ããæ瀺ã«åŸã£ãŠè¡ãããŸããæ®å¿µãªãããSafariã¯ã¯ã©ã€ã¢ã³ãertãWebãœã±ããã«äœ¿çšããæ¹æ³ãç¥ããŸãããããã®ãããªèšŒææžãäœæããæ¹æ³ã¯ã€ã³ã¿ãŒãããäžã«ãããããããŸãããå®éã«ã¯ããã¯éæã§ããŸããã
WebSocketãç解ããããã«ã次ã®ã¢ãŠãã©ã€ã³ã䜿çšããŸããïŒåé¡/仮説/ãœãªã¥ãŒã·ã§ã³ã
åé¡ïŒã¢ãã€ã«Safariãã©ãŠã¶ãŒã§ã¯ã©ã€ã¢ã³ã蚌ææžã«ãã£ãŠä¿è·ãããŠãããªãœãŒã¹ãžã®èŠæ±ããããã·ããå ŽåãIOSããã³èšŒææžãµããŒããå«ãä»ã®ã¢ããªã±ãŒã·ã§ã³ã®Webãœã±ããã¯ãµããŒããããŸããã
仮説ïŒ
- å éš/å€éšã®ãããã·ããããªãœãŒã¹ã®Webãœã±ããã«èšŒææžã䜿çšã§ããªãããšãèªèããŠããããããã®ãããªäŸå€ãæ§æããããšãå¯èœã§ãã
- Webãœã±ããã®å Žåãéåžžã®ïŒéWebãœã±ããïŒãã©ãŠã¶ãŒèŠæ±ã«ãã£ãŠçæãããäžæã»ãã·ã§ã³ã䜿çšããŠãäžæã®å®å šã§ã»ãã¥ã¢ãªæ¥ç¶ã確ç«ã§ããŸãã
- äžæã»ãã·ã§ã³ã¯ã1ã€ã®ãããã·WebãµãŒããŒã䜿çšããŠå®è£ ã§ããŸãïŒçµã¿èŸŒã¿ã¢ãžã¥ãŒã«ãšé¢æ°ã®ã¿ïŒã
- äžæã»ãã·ã§ã³ããŒã¯ã³ã¯ãæ¢è£œã®Apacheã¢ãžã¥ãŒã«ãšããŠãã§ã«å®è£ ãããŠããŸãã
- äžæçãªã»ãã·ã§ã³ããŒã¯ã³ã¯ã察話æ§é ãè«ççã«èšèšããããšã§å®è£ ã§ããŸãã
å®è£ åŸã®å¯èŠç¶æ ã
äœæ¥ã®ç®çïŒãµãŒãã¹ããã³ã€ã³ãã©ã¹ãã©ã¯ãã£ã®ç®¡çã¯ãçµ±åãããå®å šãªè¿œå ããã°ã©ã ïŒVPNãªã©ïŒãªãã§ãIOSã®æºåž¯é»è©±ããå©çšã§ããå¿ èŠããããŸãã
è¿œå ã®ç®æšïŒã¢ãã€ã«ã€ã³ã¿ãŒãããã§ã®ã³ã³ãã³ãé ä¿¡ãé«éåããªãããæéãšãªãœãŒã¹/é»è©±ãã©ãã£ãã¯ïŒWebãœã±ããã®ãªãäžéšã®ãµãŒãã¹ã¯äžèŠãªèŠæ±ãçæããïŒãç¯çŽããŸãã
確èªæ¹æ³ã¯ïŒ
1.ããŒãžãéãïŒ
â , https://teamcity.yourdomain.com Safari ( ) â -.
â , https://teamcity.yourdomain.com/admin/admin.html?item=diagnostics&tab=webSâŠâ ping/pong.
â , https://rancher.yourdomain.com/p/c-84bnv:p-vkszd/workload/deployment:danidb:phâŠ-> viewlogs â .
2.ãŸãã¯éçºè ã®ã³ââã³ãœãŒã«ã§ïŒ
ãã¹ãã®ä»®èª¬ïŒ
1.ãã®ãããªäŸå€ãæ§æããŠãå éš/å€éšã®ãããã·ããããªãœãŒã¹ã®Webãœã±ããã«èšŒææžã䜿çšã§ããªãããã«ããããšãã§ããŸãïŒèšŒææžãå©çšã§ããªãããšãç¥ã£ãŠããïŒã
2ã€ã®ãœãªã¥ãŒã·ã§ã³ãããã§èŠã€ãããŸããïŒ
aïŒã¬ãã«
<Location sock*> SSLVerifyClient optional </Location>
<Location /> SSLVerifyClient require </Location>
ã¢ã¯ã»ã¹ã¬ãã«ãå€æŽããŸãã
ãã®ã¡ãœããã«ã¯æ¬¡ã®ãã¥ã¢ã³ã¹ããããŸãã
- 蚌ææžã¯ããããã·ããããªãœãŒã¹ãžã®ãªã¯ãšã¹ããã€ãŸããã¹ããªã¯ãšã¹ããã³ãã·ã§ã€ã¯ã®åŸã«ãã§ãã¯ãããŸããããã¯ããããã·ãæåã«èªã¿èŸŒãŸããä¿è·ããããµãŒãã¹ãžã®èŠæ±ãé®æããããšãæå³ããŸããããã¯æªãããšã§ãããéèŠã§ã¯ãããŸããã
- http2ãããã³ã«ãããã¯ãŸã ãã©ãã段éã§ããããã©ãŠã¶ãã³ããŒã¯ãããå®è£ ããæ¹æ³ãç¥ããŸãããïŒinfo tls1.3 http2ãã¹ããã³ãã·ã§ã€ã¯ã«é¢ããæ å ±ïŒçŸåšã¯æ©èœããŠããŸããïŒRFC 8740ãå®è£ ãããHTTP 1.3ã§TLS 1.3ã䜿çšããã ;
- ãã®åŠçãã©ã®ããã«çµ±äžãããã¯æ確ã§ã¯ãããŸããã
bïŒåºæ¬ã¬ãã«ã§ã¯ã蚌ææžãªãã§sslãæå¹ã«ããŸãã
SSLVerifyClient require => SSLVerifyClientãªãã·ã§ã³ã§ããããã®ãããªæ¥ç¶ã¯èšŒææžãªãã§åŠçãããããããããã·ãµãŒããŒã®ä¿è·ã¬ãã«ãäœäžããŸãããã ãã次ã®ãã£ã¬ã¯ãã£ãã䜿çšããŠããããã·ãµãŒãã¹ãžã®ã¢ã¯ã»ã¹ãããã«å¶éã§ããŸãã
RewriteEngine on
RewriteCond %{SSL:SSL_CLIENT_VERIFY} !=SUCCESS
RewriteRule .? - [F]
ErrorDocument 403 "You need a client side certificate issued by CAcert to access this site"
詳现ã«ã€ããŠã¯ãsslã«é¢ããèšäºãåç §ããŠãã ãããApacheãµãŒããŒã¯ã©ã€ã¢ã³ã蚌ææžèªèšŒ
äž¡æ¹ã®ãªãã·ã§ã³ããã¹ããããhttp2ãããã³ã«ãšã®æ±çšæ§ãšäºææ§ã®ããã«ãªãã·ã§ã³ãbããéžæãããŸããã
ãã®ä»®èª¬ã®æ€èšŒãå®äºããããã«ãæ§æã«ã€ããŠå€ãã®å®éšãè¡ãããæ§æããã¹ããããŸããïŒ
if = require = rewrite
次ã®åºæ¬çãªæ§é ãåŸãŸããã
SSLVerifyClient optional
RewriteEngine on
RewriteCond %{SSL:SSL_CLIENT_VERIFY} !=SUCCESS
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule .? - [F]
#ErrorDocument 403 "You need a client side certificate issued by CAcert to access this site"
#websocket for safari without cert auth
<If "%{SSL:SSL_CLIENT_VERIFY} != 'SUCCESS'">
<If "%{HTTP:Upgrade} = 'websocket'">
...
#
SSLUserName SSl_PROTOCOL
</If>
</If>
蚌ææžã®ææè ã«ããæ¢åã®æ¿èªãèæ ®ã«å ¥ããŸããã蚌ææžãæ¬ èœããŠããããã蚌ææžã®ååšããªãææè ãå©çšå¯èœãªSSl_PROTOCOLå€æ°ã®1ã€ã®åœ¢åŒïŒSSL_CLIENT_S_DN_CNã§ã¯ãªãïŒã§è¿œå ããå¿ èŠããããŸããã詳现ã«ã€ããŠã¯ãããã¥ã¡ã³ããåç §ããŠãã ãããApacheModule
mod_ssl
2. Webãœã±ããã«ã€ããŠã¯ãéåžžã®ïŒWebãœã±ããã§ã¯ãªãïŒãã©ãŠã¶ãŒèŠæ±äžã«çæãããäžæã»ãã·ã§ã³ã䜿çšããã
以åã®çµéšã«åºã¥ããŠãæ§æã«è¿œå ã®ã»ã¯ã·ã§ã³ãè¿œå ããå¿ èŠããããŸããããã«ãããéåžžã®ïŒWebãœã±ããã§ã¯ãªãïŒèŠæ±äžã«ãWebãœã±ããæ¥ç¶çšã®äžæçãªããŒã¯ã³ãæºåãããŸãã
# ookie
<If "%{SSL:SSL_CLIENT_VERIFY} = 'SUCCESS'">
<If "%{HTTP:Upgrade} != 'websocket'">
Header set Set-Cookie "websocket-allowed=true; path=/; Max-Age=100"
</If>
</If>
# Cookie -
<source lang="javascript">
<If "%{SSL:SSL_CLIENT_VERIFY} != 'SUCCESS'">
<If "%{HTTP:Upgrade} = 'websocket'">
#check for exists cookie
#get and check
SetEnvIf Cookie "websocket-allowed=(.*)" env-var-name=$1
#or rewrite rule
RewriteCond %{HTTP_COOKIE} !^.*mycookie.*$
#or if
<If "%{HTTP_COOKIE} =~ /(^|; )cookie-name\s*=\s*some-val(;|$)/ >
</If
</If>
</If>
æ€èšŒã«ããããããæ©èœããããšã瀺ãããŸããããŠãŒã¶ãŒã®ãã©ãŠã¶ãä»ããŠã¯ãããŒã転éããããšãå¯èœã§ãã
3.äžæçãªã»ãã·ã§ã³ã¯ã1ã€ã®ãããã·WebãµãŒããŒã䜿çšããŠå®è£ ã§ããŸãïŒçµã¿èŸŒã¿ã¢ãžã¥ãŒã«ãšé¢æ°ã®ã¿ïŒã
以åã«çºèŠããããã«ãApacheã«ã¯æ¡ä»¶ãäœæããããã®ã³ã¢æ©èœãããªããããŸãããã ãããŠãŒã¶ãŒã®ãã©ãŠã¶ãŒã«ããéã¯æ å ±ãä¿è·ããæ段ãå¿ èŠãªã®ã§ãäœãäœã«ä¿åããããããã³äœ¿çšããçµã¿èŸŒã¿é¢æ°ãèšå®ããŸãã
- åçŽãªãã³ãŒããæåŠããããŒã¯ã³ãå¿ èŠã§ãã
- é³è åãšãµãŒããŒäžã®é³è åããã§ãã¯ããæ©èœãé¢é£ä»ããããŠããããŒã¯ã³ãå¿ èŠã§ãã
- 蚌ææžã®ææè ã«é¢é£ä»ããããããŒã¯ã³ãå¿ èŠã§ãã
ããã«ã¯ãããã·ã¥é¢æ°ããœã«ããããã³ããŒã¯ã³ãæéåãã«ããæ¥ä»ãå¿ èŠã§ããApache HTTP Serverã®ããã¥ã¡ã³ãã®åŒã«åºã¥ããŠããã¹ãŠããã®ãŸãŸã®ç¶æ ã§sha1ããã³ïŒ {TIME}ã«ããŠããŸãã
çµæã¯æ¬¡ã®ããã«ãªããŸãã
# , websocket
<If "%{SSL:SSL_CLIENT_VERIFY} != 'SUCCESS'">
<If "%{HTTP:Upgrade} = 'websocket'">
SetEnvIf Cookie "zt-cert-sha1=([^;]+)" zt-cert-sha1=$1
SetEnvIf Cookie "zt-cert-uid=([^;]+)" zt-cert-uid=$1
SetEnvIf Cookie "zt-cert-date=([^;]+)" zt-cert-date=$1
# , env- , ( , , )
<RequireAll>
Require expr %{sha1:salt1%{env:zt-cert-date}salt3%{env:zt-cert-uid}salt2} == %{env:zt-cert-sha1}
Require expr %{env:zt-cert-sha1} =~ /^.{40}$/
</RequireAll>
</If>
</If>
# , websocket
<If "%{SSL:SSL_CLIENT_VERIFY} = 'SUCCESS'">
<If "%{HTTP:Upgrade} != 'websocket'">
SetEnvIf Cookie "zt-cert-sha1=([^;]+)" HAVE_zt-cert-sha1=$1
SetEnv zt_cert "path=/; HttpOnly;Secure;SameSite=Strict"
# ,
Header add Set-Cookie "expr=zt-cert-sha1=%{sha1:salt1%{TIME}salt3%{SSL_CLIENT_S_DN_CN}salt2};%{env:zt_cert}" env=!HAVE_zt-cert-sha1
Header add Set-Cookie "expr=zt-cert-uid=%{SSL_CLIENT_S_DN_CN};%{env:zt_cert}" env=!HAVE_zt-cert-sha1
Header add Set-Cookie "expr=zt-cert-date=%{TIME};%{env:zt_cert}" env=!HAVE_zt-cert-sha1
</If>
</If>
ç®æšã¯éæãããŸãããããµãŒããŒã®é³è åïŒ1幎åã®Cookieã䜿çšã§ããŸãïŒã«åé¡ããããŸããã€ãŸããããŒã¯ã³ã¯ãå éšäœ¿çšã«ã¯å®å šã§ãããç£æ¥ïŒå€§éïŒäœ¿çšã«ã¯å®å šã§ã¯ãããŸããã
4.äžæã»ãã·ã§ã³ããŒã¯ã³ã¯ãæ¢è£œã®Apacheã¢ãžã¥ãŒã«ãšããŠãã§ã«å®è£ ãããŠããŸãã
åã®å埩ããã1ã€ã®é倧ãªåé¡ãæ®ããŸãã-ããŒã¯ã³ã®é³è åãå¶åŸ¡ã§ããªãããšã§ãã
ç§ãã¡ã¯ãããè¡ãæ¢è£œã®ã¢ãžã¥ãŒã«ãæ¢ããŠããŸããèšèã«ãããšïŒapache token json two factor auth
- JSON Web Tokenã«åºã¥ãããŒã¯ã³ã䜿çšããã¯ã©ã€ã¢ã³ãèªèšŒ
- Apache 2èŠçŽ ïŒ2FAïŒèªèšŒ
- Apacheã«2èŠçŽ èªèšŒãè¿œå ããæ¹æ³
- åçŽãªã¢ãžã¥ãŒã«ã®ã€ã³ã¹ããŒã«ã§2èŠçŽ èªèšŒãApacheã€ã³ã¹ã¿ã³ã¹ã«ãããã
ã¯ããæ¢è£œã®ã¢ãžã¥ãŒã«ããããŸããããã¹ãŠç¹å®ã®ã¢ã¯ã·ã§ã³ã«é¢é£ä»ããããŠãããã»ãã·ã§ã³ã®éå§ãšè¿œå ã®Cookieã®åœ¢ã§ã¢ãŒãã£ãã¡ã¯ãããããŸããã€ãŸãããã°ããã®éã§ã¯ãããŸããã
æ€çŽ¢ã«5æéããããŸããããå ·äœçãªçµæã¯åŸãããŸããã§ããã
5.äžæçãªã»ãã·ã§ã³ããŒã¯ã³ã¯ãçžäºäœçšã®æ§é ãè«ççã«èšèšããããšã§å®è£ ã§ããŸãã
ããã€ãã®æ©èœããå¿ èŠãªããããæ¢è£œã®ã¢ãžã¥ãŒã«ã¯è€éãããŸãã
åæã«ãæ¥ä»ã«é¢ããåé¡ã¯ãApacheçµã¿èŸŒã¿é¢æ°ãå°æ¥ã®æ¥ä»ãçæããããšãèš±å¯ããªãããšãšãçµã¿èŸŒã¿é¢æ°ã®é³è åããã§ãã¯ãããšãã«ãæ°åŠçãªå ç®/æžç®ãè¡ãããªãããšã§ãã
ã€ãŸãã次ã®ããã«æžãããšã¯ã§ããŸããã
(%{env:zt-cert-date} + 30) > %{DATE}
æ¯èŒã§ããã®ã¯2ã€ã®æ°å€ã®ã¿ã§ãã
Safariã®åé¿çãæ€çŽ¢ãããšãããèå³æ·±ãèšäºãèŠã€ãããŸããïŒã¯ã©ã€ã¢ã³ã蚌ææžã«ããHomeAssistantã®ä¿è·ïŒSafari / iOSã§åäœããŸãïŒ
Nginxã®Luaã³ãŒãã®äŸã«ã€ããŠèª¬æããŠããŸããããã·ã¥çšã®ãœã«ããé 眮ããããã«hmacã¡ãœããã䜿çšããããšãé€ããŠïŒããã¯Apacheã«ã¯ãããŸããã§ããïŒã
Luaã¯æ確ãªããžãã¯ãåããèšèªã§ããããšãæããã«ãªããŸãããApacheã«å¯ŸããŠç°¡åãªããšãè¡ãããšãå¯èœã§ãã
NginxãšApacheã®éããç 究ããåŸïŒ
ãããŠãLuaèšèªã®è£œé å ããå©çšå¯èœãªé¢æ°ïŒ
22.1-æ¥ä»ãšæå»
çŸåšã®æ¥ä»ã確èªããããã«æªæ¥ããæ¥ä»ãèšå®ããããã«ãå°ããªLuaãã¡ã€ã«ã«ç°å¢å€æ°ãèšå®ããæ¹æ³ãèŠã€ãããŸããã
ç°¡åãªLuaã¹ã¯ãªããã¯æ¬¡ã®ããã«ãªããŸãã
require 'apache2'
function handler(r)
local fmt = '%Y%m%d%H%M%S'
local timeout = 3600 -- 1 hour
r.notes['zt-cert-timeout'] = timeout
r.notes['zt-cert-date-next'] = os.date(fmt,os.time()+timeout)
r.notes['zt-cert-date-halfnext'] = os.date(fmt,os.time()+ (timeout/2))
r.notes['zt-cert-date-now'] = os.date(fmt,os.time())
return apache2.OK
end
ãããŠããããå
šäœãšããŠã©ã®ããã«æ©èœãããã§ãããCookieçªå·ã®æé©åãšãå€ãCookieïŒããŒã¯ã³ïŒã®æå¹æéãåããåã«ååã®æéãçµéãããšãã®ããŒã¯ã³ã®çœ®ãæãã§ãã
SSLVerifyClient optional
#LuaScope thread
#generate event variables zt-cert-date-next
LuaHookAccessChecker /usr/local/etc/apache24/sslincludes/websocket_token.lua handler early
# - , webscoket
RewriteEngine on
RewriteCond %{SSL:SSL_CLIENT_VERIFY} !=SUCCESS
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule .? - [F]
#ErrorDocument 403 "You need a client side certificate issued by CAcert to access this site"
#websocket for safari without certauth
<If "%{SSL:SSL_CLIENT_VERIFY} != 'SUCCESS'">
<If "%{HTTP:Upgrade} = 'websocket'">
SetEnvIf Cookie "zt-cert=([^,;]+),([^,;]+),[^,;]+,([^,;]+)" zt-cert-sha1=$1 zt-cert-date=$2 zt-cert-uid=$3
<RequireAll>
Require expr %{sha1:salt1%{env:zt-cert-date}salt3%{env:zt-cert-uid}salt2} == %{env:zt-cert-sha1}
Require expr %{env:zt-cert-sha1} =~ /^.{40}$/
Require expr %{env:zt-cert-date} -ge %{env:zt-cert-date-now}
</RequireAll>
#
SSLUserName SSl_PROTOCOL
SSLOptions -FakeBasicAuth
</If>
</If>
<If "%{SSL:SSL_CLIENT_VERIFY} = 'SUCCESS'">
<If "%{HTTP:Upgrade} != 'websocket'">
SetEnvIf Cookie "zt-cert=([^,;]+),[^,;]+,([^,;]+)" HAVE_zt-cert-sha1=$1 HAVE_zt-cert-date-halfnow=$2
SetEnvIfExpr "env('HAVE_zt-cert-date-halfnow') -ge %{TIME} && env('HAVE_zt-cert-sha1')=~/.{40}/" HAVE_zt-cert-sha1-found=1
Define zt-cert "path=/;Max-Age=%{env:zt-cert-timeout};HttpOnly;Secure;SameSite=Strict"
Define dates_user "%{env:zt-cert-date-next},%{env:zt-cert-date-halfnext},%{SSL_CLIENT_S_DN_CN}"
Header set Set-Cookie "expr=zt-cert=%{sha1:salt1%{env:zt-cert-date-next}sal3%{SSL_CLIENT_S_DN_CN}salt2},${dates_user};${zt-cert}" env=!HAVE_zt-cert-sha1-found
</If>
</If>
SetEnvIfExpr "env('HAVE_zt-cert-date-halfnow') -ge %{TIME} && env('HAVE_zt-cert-sha1')=~/.{40}/" HAVE_zt-cert-sha1-found=1
,
SetEnvIfExpr "env('HAVE_zt-cert-date-halfnow') -ge env('zt-cert-date-now') && env('HAVE_zt-cert-sha1')=~/.{40}/" HAVE_zt-cert-sha1-found=1
LuaHookAccessCheckerã¯ãNginxããã®ãã®æ å ±ã«åºã¥ããã¢ã¯ã»ã¹ãã§ãã¯åŸã«ã®ã¿ã¢ã¯ãã£ãã«ãªãããã§ããç»å
ã®ãœãŒã¹ãžã®ãªã³ã¯ã ããäžç¹ã äžè¬ã«ãApacheæ§æã§ãã£ã¬ã¯ãã£ããæžã蟌ãŸããé åºïŒããããNginxãåæ§ïŒã¯éèŠã§ã¯ãããŸãããçµå±ããã¹ãŠã¯ãŠãŒã¶ãŒããã®ãªã¯ãšã¹ããééããé åºã«åºã¥ããŠãœãŒãããããããLuaã¹ã¯ãªãããåŠçããããã®ã¹ããŒã ã«å¯Ÿå¿ããŸããå®äºïŒ å®è£ åŸã®å¯èŠç¶æ ïŒç®æšïŒïŒ ãµãŒãã¹ãšã€ã³ãã©ã¹ãã©ã¯ãã£ã®ç®¡çã¯ãè¿œå ã®ããã°ã©ã ïŒVPNïŒãªãã§çµ±åãããå®å šãªIOSäžã®æºåž¯é»è©±ããå©çšã§ããŸãã ç®æšã¯éæãããWebSocketã¯æ©èœãã蚌ææžãšåçã®ã»ãã¥ãªãã£ãåããŠããŸãã