Skip to main content

JWT Authentication

Full JWT token validation with issuer, audience, and expiration checks.

Configuration

{
"jwt_auth_webhook": {
"data_type": "json",
"module": "log",
"jwt": {
"secret": "my_jwt_secret_key",
"algorithm": "HS256",
"issuer": "my-app",
"audience": "webhook-api",
"verify_exp": true
}
}
}

Configuration Options

OptionTypeRequiredDefaultDescription
secretstringYes-JWT secret key or RSA/EC public key
algorithmstringNo"HS256"JWT signing algorithm (see supported list below)
issuerstringNo-Required token issuer claim (iss)
audiencestringNo-Required token audience claim (aud)
verify_expbooleanNotrueWhether to verify token expiration

Supported Algorithms

The following 12 algorithms are supported:

FamilyAlgorithmsKey Type
HMACHS256, HS384, HS512Symmetric secret
RSARS256, RS384, RS512RSA public key
ECDSAES256, ES384, ES512EC public key
RSA-PSSPS256, PS384, PS512RSA public key

Usage

Send requests with JWT token in Authorization header:

curl -X POST http://localhost:8000/webhook/jwt_auth_webhook \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" \
-d '{"event": "test"}'

Features

  • Full JWT validation (signature, expiration, issuer, audience)
  • 12 algorithm support (HS256/384/512, RS256/384/512, ES256/384/512, PS256/384/512)
  • Configurable validation options
  • Secure token verification
  • SSRF protection (blocks external key fetching)