The 'jwt_verify' converter was built with the idea of being easy to use
for all JWT tokens and its second parameter needied to be interpreted
totally differently depending on the first parameter (HMAC vs pubkey
path). This comes with a potential security risk if a user did not check
the algorithm type before calling the converter. If an HMAC-signed token
was tested in a jwt_verify call that provided a certificate as second
parameter, an attacker could try to guess the certificate path and forge
HMAC tokens that validate against the certificate path.
In order to get rid of this potential risk, a new jwt_verify_secret
converter was introduced, and paired with the already existing
jwt_verify_cert one, we can fully get rid of this risk since no
parameter gets treated differently based off client-provided
information.
Please note that this converter is only available when HAProxy has been
compiled with USE_OPENSSL.
-jwt_verify(<alg>,<key>)
+jwt_verify(<alg>,<key>) (deprecated)
+
+ This converter is deprecated, use 'jwt_verify_secret' or 'jwt_verify_cert'
+ instead.
Performs a signature verification for the JSON Web Token (JWT) given in input
by using the <alg> algorithm and the <key> parameter.
tune.ssl.capture-buffer-size 1
stats socket "${tmpdir}/h1/stats" level admin
jwt.allow_none_alg
+ expose-deprecated-directives
defaults
mode http
expect_cert = 1;
else if (strcmp(conv->kw, "jwt_verify_secret") == 0)
expect_secret = 1;
+ else if (!deprecated_directives_allowed){
+ ha_warning("parsing [%s:%d]: 'jwt_verify' converter is deprecated, "
+ "use 'jwt_verify_secret' or 'jwt_verify_cert' instead.\n", file, line);
+ }
if (args[0].type == ARGT_STR) {
alg = jwt_parse_alg(args[0].data.str.area, args[0].data.str.data);