|
249 | 249 | # When interacting with jira tickets that attached finding groups, we should no be opening any findings |
250 | 250 | # on the DefectDojo side because jira has no way of knowing if a finding really should be reopened or not |
251 | 251 | DD_JIRA_WEBHOOK_ALLOW_FINDING_GROUP_REOPEN=(bool, False), |
| 252 | + # JIRA connection retry and timeout settings: https://developer.atlassian.com/cloud/jira/platform/rate-limiting/ |
| 253 | + # Maximum number of retry attempts for recoverable errors (429, 503, ConnectionError) |
| 254 | + # See https://jira.readthedocs.io/ for more in the jira library used by DefectDojo |
| 255 | + # Note: The jira library has a built-in maximum wait time of 60s for rate limiting retries. |
| 256 | + # If JIRA's Retry-After header indicates a wait time longer than 60s, the request will fail and not be retried. |
| 257 | + DD_JIRA_MAX_RETRIES=(int, 3), |
| 258 | + # Connection timeout (seconds) for establishing a connection to the JIRA server |
| 259 | + DD_JIRA_CONNECT_TIMEOUT=(int, 10), |
| 260 | + # Read timeout (seconds) for waiting for a response from the JIRA server |
| 261 | + DD_JIRA_READ_TIMEOUT=(int, 30), |
252 | 262 | # You can set extra Jira issue types via a simple env var that supports a csv format, like "Work Item,Vulnerability" |
253 | 263 | DD_JIRA_EXTRA_ISSUE_TYPES=(str, ""), |
254 | 264 | # if you want to keep logging to the console but in json format, change this here to 'json_console' |
@@ -1714,6 +1724,12 @@ def saml2_attrib_map_format(din): |
1714 | 1724 | JIRA_SSL_VERIFY = env("DD_JIRA_SSL_VERIFY") |
1715 | 1725 | JIRA_DESCRIPTION_MAX_LENGTH = env("DD_JIRA_DESCRIPTION_MAX_LENGTH") |
1716 | 1726 | JIRA_WEBHOOK_ALLOW_FINDING_GROUP_REOPEN = env("DD_JIRA_WEBHOOK_ALLOW_FINDING_GROUP_REOPEN") |
| 1727 | +# JIRA connection retry and timeout settings |
| 1728 | +JIRA_MAX_RETRIES = env("DD_JIRA_MAX_RETRIES") |
| 1729 | +JIRA_CONNECT_TIMEOUT = env("DD_JIRA_CONNECT_TIMEOUT") |
| 1730 | +JIRA_READ_TIMEOUT = env("DD_JIRA_READ_TIMEOUT") |
| 1731 | +# Combine timeouts into a tuple for the JIRA library: (connect_timeout, read_timeout) |
| 1732 | +JIRA_TIMEOUT = (JIRA_CONNECT_TIMEOUT, JIRA_READ_TIMEOUT) |
1717 | 1733 |
|
1718 | 1734 | # ------------------------------------------------------------------------------ |
1719 | 1735 | # LOGGING |
|
0 commit comments