Troubleshooting webhook security issues

Configuring webhook security

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

This page describes common problems with DVCS webhook security and provides troubleshooting instructions to help you restore the functionality of your Jira instance.

On this page:

Setting the webhook secret token failed for one or more repositories

Jira may be unable to update the configuration settings of all repositories in one or more of your DVCS accounts with a newly generated webhook secret token. This problem may occur when configuring the webhook secret token for a linked DVCS account for the first time or after requesting its regeneration.

Symptoms

If the problem occurs, the affected DVCS accounts and repositories will be marked with the FAILED webhook security status indicator. Jira will also notify you about the problem on the DVCS accounts page with the following warning message:

The DVCS account page displaying a warning notice that the settings of one or more repositories in one of the linked DVCS accounts couldn't be updated with a new webhook secret token

Similarly, the DVCS account details page for the affected DVCS account will display the following warning message:

The DVCS account details page displaying a warning notice that the settings of one or more repositories in the selected DVCS accounts couldn't be updated with a new webhook secret token

Resolution

To resolve this issue you can:

  • Manually set the webhook secret token in the settings of the affected repositories
  • Force Jira to retry setting the webhook secret token in the affected source code repositories

Manually setting the webhook secret token in the affected repositories

Set the webhook secret token in the configuration settings of the affected repositories manually. After a webhook request is received, the webhook security status will change to SECURE.

Learn how to configure a webhook for a project or group in GitLab

Learn how to edit webhooks in GitHub & GitHub Enterprise

Retrying the attempt to set the webhook secret token

You can force Jira to retry setting the webhook secret token in the configuration settings of the affected source code repositories. To do that, manually update the Jira database to reset the webhook security status of the failed repositories back to CONFIGURING as described in one of the following sections:

The database queries included in the following sections were written for PostgreSQL. If you’re using Jira with another database engine, adjust the queries to match the requirements of your database.

Reset the webhook security status of all failed repositories...

To reset the status of all failed repositories, run the following query against your database:

UPDATE "AO_E8B6CC_REPOSITORY_MAPPING" SET "WEBHOOK_STATUS" = 'ADDING_TOKEN'
  WHERE "WEBHOOK_STATUS" = 'FAILED';
Reset the webhook security status of the repositories in a particular DVCS account...

To reset the webhook security status of the repositories that belong to a particular DVCS account:

  1. Retrieve the DVCS account ID based on the account name by running the following query against your database:

    SELECT "ID" FROM "AO_E8B6CC_ORGANIZATION_MAPPING" 
      WHERE "NAME" = '<DVCS_ACCOUNT_NAME>';

    Where <DVCS_ACCOUNT_NAME> is the name of the DVCS account listed on the DVCS accounts page in Jira.

  2. Reset the webhook status for all the repositories in that account by running the following query against your database:

    UPDATE "AO_E8B6CC_REPOSITORY_MAPPING" SET "WEBHOOK_STATUS" = 'ADDING_TOKEN'
      WHERE "ORGANIZATION_ID" = <DVCS_ACCOUNT_ID>;

    Where <DVCS_ACCOUNT_ID> is the ID of the DVCS account retrieved in the previous step.


Reset the webhook security status of a single repository...

To reset the webhook security status of a single repository, run the following query against your database:

UPDATE "AO_E8B6CC_REPOSITORY_MAPPING" SET "WEBHOOK_STATUS" = 'ADDING_TOKEN'
  WHERE "SLUG"= <REPOSITORY_SLUG>;

Where <REPOSITORY_SLUG> is the URL-friendly name of the affected repository.

Last modified on Oct 5, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.