You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The help text claims that a value starting with @ can be provided to the -S/--secret parameter in order to read the secret from a binary file. However, this is not implemented for the HMAC algorithms (like HS256) - instead, the string starting with @ provided on the command line is used verbatim as the secret, leading to confusing signature validation issues.
This unfortunately leads this tool to encourage the exclusive use of human-readable strings as JWT secrets when using the HMAC modes, which considerably reduces the size of the keyspace.
Summary
The help text claims that a value starting with
@
can be provided to the-S
/--secret
parameter in order to read the secret from a binary file. However, this is not implemented for the HMAC algorithms (like HS256) - instead, the string starting with@
provided on the command line is used verbatim as the secret, leading to confusing signature validation issues.This unfortunately leads this tool to encourage the exclusive use of human-readable strings as JWT secrets when using the HMAC modes, which considerably reduces the size of the keyspace.
Steps to reproduce
Expected behavior
The bytes contained in the file
secret.key
are used as the JWT secret.Actual behavior
The bytes of the string
@secret.key
are used as the JWT secret.The text was updated successfully, but these errors were encountered: