We are working with Apache NiFi version 1.28 and need to validate JWT tokens that arrive as HTTP headers in FlowFiles created by the HandleHttpRequest processor. Once validated, the flow should continue to process the request; if invalid or expired, the request should be rejected.
I am aware that scripting options exist (e.g., ExecuteScript with Python/Groovy and JWT libraries), but I would like to know if there is a recommended or supported best practice within NiFi for handling JWT validation in this scenario.
Our use case is:
Validate the JWT signature and claims against the JWKS endpoint provided by the identity provider.
Extract claims for routing/authorization decisions.
Reject invalid or expired tokens before further processing.
Any guidance on the best way to implement this securely and efficiently would be greatly appreciated.
@MattWho