"JWT verification failed" error when connecting Jenkins to Jira Cloud
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
During Jenkins integration with Jira Cloud, you receive the error message:
"Error message from Jira: JWT verification failed. Please make sure you configured the same secret in Jenkins and Jira"
Solution
There are various causes for the "JWT verification failed" error. To narrow them down, follow all of the below troubleshooting steps:
Ensure no extra characters are pasted with the Secret Key and Webhook URL
When you copy the secret key and webhook URL from Jira to Jenkins, you may accidentally copy extra spaces or new-line characters.
To rule this out, paste the values into a plain text editor (like Notepad or Sublime Text) first, then copy them into Jenkins to ensure there are no hidden characters.
Synchronize Jenkins server time with an NTP server
If the system time on your Jenkins server is out of sync with Jira Cloud, JWT verification will fail. JWT uses a time-based claim "iat — issued at" which can be used to reject tokens if the time sync is ahead on the resource server.
Ensure that the Jenkins server’s clock is synchronized with a reliable time source (e.g., using NTP) and matches the current time.
Note that installing Jenkins inside Docker will always use the host time
We suggest verifying that the host time exactly matches a known time server like https://time.is/
If you are not able to change the NTP source or manually adjust the time, we suggest to restart the system and synchronize the time to match https://time.is/
Verify app is updated and compatible
Make sure you are using compatible versions of the Jenkins for Jira app and the Jira Cloud integration. Sometimes, mismatched versions can cause authentication issues.
Reinstall the Integration
Some users have reported that uninstalling and reinstalling the Jenkins for Jira plugin on both Jenkins and Jira Cloud, then reconfiguring the integration, can resolve persistent JWT errors.
Was this helpful?