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