Commit 7cd8cca0 authored by Walid Boudebouda's avatar Walid Boudebouda Committed by Nils Goroll

vmod_proxy: restrict all $Functions to client context

Since all functions of vmod_proxy use ctx->req, they should then be restricted to client context only
parent 0d2fe019
...@@ -45,6 +45,8 @@ Example:: ...@@ -45,6 +45,8 @@ Example::
set req.http.alpn = proxy.alpn(); set req.http.alpn = proxy.alpn();
$Restrict client
$Function STRING authority() $Function STRING authority()
Extract authority attribute. This corresponds to SNI from a TLS Extract authority attribute. This corresponds to SNI from a TLS
...@@ -54,6 +56,8 @@ Example:: ...@@ -54,6 +56,8 @@ Example::
set req.http.authority = proxy.authority(); set req.http.authority = proxy.authority();
$Restrict client
$Function BOOL is_ssl() $Function BOOL is_ssl()
Report if proxy-protocol-v2 has SSL TLV. Report if proxy-protocol-v2 has SSL TLV.
...@@ -64,16 +68,22 @@ Example:: ...@@ -64,16 +68,22 @@ Example::
set req.http.ssl-version = proxy.ssl_version(); set req.http.ssl-version = proxy.ssl_version();
} }
$Restrict client
$Function BOOL client_has_cert_sess() $Function BOOL client_has_cert_sess()
Report if the client provided a certificate at least once over the TLS Report if the client provided a certificate at least once over the TLS
session this connection belongs to. session this connection belongs to.
$Restrict client
$Function BOOL client_has_cert_conn() $Function BOOL client_has_cert_conn()
Report if the client provided a certificate over the current Report if the client provided a certificate over the current
connection. connection.
$Restrict client
$Function INT ssl_verify_result() $Function INT ssl_verify_result()
Report the SSL_get_verify_result from a TLS session. It only matters Report the SSL_get_verify_result from a TLS session. It only matters
...@@ -86,6 +96,8 @@ Example:: ...@@ -86,6 +96,8 @@ Example::
set req.http.ssl-verify = "ok"; set req.http.ssl-verify = "ok";
} }
$Restrict client
$Function STRING ssl_version() $Function STRING ssl_version()
Extract SSL version attribute. Extract SSL version attribute.
...@@ -94,6 +106,8 @@ Example:: ...@@ -94,6 +106,8 @@ Example::
set req.http.ssl-version = proxy.ssl_version(); set req.http.ssl-version = proxy.ssl_version();
$Restrict client
$Function STRING client_cert_cn() $Function STRING client_cert_cn()
Extract the common name attribute of the client certificate's. Extract the common name attribute of the client certificate's.
...@@ -101,6 +115,8 @@ Extract the common name attribute of the client certificate's. ...@@ -101,6 +115,8 @@ Extract the common name attribute of the client certificate's.
Example:: Example::
set req.http.cert-cn = proxy.client_cert_cn(); set req.http.cert-cn = proxy.client_cert_cn();
$Restrict client
$Function STRING ssl_cipher() $Function STRING ssl_cipher()
Extract the SSL cipher attribute. Extract the SSL cipher attribute.
...@@ -109,6 +125,8 @@ Example:: ...@@ -109,6 +125,8 @@ Example::
set req.http.ssl-cipher = proxy.ssl_cipher(); set req.http.ssl-cipher = proxy.ssl_cipher();
$Restrict client
$Function STRING cert_sign() $Function STRING cert_sign()
Extract the certificate signature algorithm attribute. Extract the certificate signature algorithm attribute.
...@@ -117,6 +135,8 @@ Example:: ...@@ -117,6 +135,8 @@ Example::
set req.http.cert-sign = proxy.cert_sign(); set req.http.cert-sign = proxy.cert_sign();
$Restrict client
$Function STRING cert_key() $Function STRING cert_key()
Extract the certificate key algorithm attribute. Extract the certificate key algorithm attribute.
...@@ -125,6 +145,8 @@ Example:: ...@@ -125,6 +145,8 @@ Example::
set req.http.cert-key = proxy.cert_key(); set req.http.cert-key = proxy.cert_key();
$Restrict client
SEE ALSO SEE ALSO
======== ========
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment