]> git.kaiwu.me - haproxy.git/commit
MINOR: jwt: New jwt_verify_secret converter
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Fri, 20 Nov 2026 10:08:45 +0000 (11:08 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 20 Nov 2026 13:50:30 +0000 (14:50 +0100)
commit32bb9ecae26e452b91e92f3ed7a7c6310baf9953
tree7bccb72e23b872954565833ec3174e3a7250b605
parentb2a5bc68e77e100a6f7b32fc518cb4782d546c97
MINOR: jwt: New jwt_verify_secret converter

The 'jwt_verify' converter interprets its second parameter differently
depending on its first one: for HMAC algorithms it is used as a shared
secret, while for asymmetric ones it holds the path to a certificate or
a public key. Letting client-provided data decide how a configuration
parameter is interpreted is risky.

Splitting this logic into two converters removes the ambiguity. The new
'jwt_verify_secret' converter only accepts HMAC algorithms and always
interprets its second parameter as a secret, while the existing
'jwt_verify_cert' converter only accepts asymmetric algorithms and
always interprets it as a certificate or public key path.

The historical 'jwt_verify' converter, which keeps both behaviors for
backward compatibility, is left untouched for now, but it is the
converter that should eventually disappear once users migrated to the
two new ones.
doc/configuration.txt
include/haproxy/jwt-t.h
include/haproxy/jwt.h
reg-tests/jwt/jws_verify.vtc
src/jwt.c
src/sample.c