Skip to content

Commit 73b2b7c

Browse files
jira: mention PATs are not supported in OS (#12884)
* jira: mention PATs are not supported in OS * undo the ruff thing that it it forced me to change 1 minute ago * rebase * remove pat from classic ui docs
1 parent 2cd0186 commit 73b2b7c

3 files changed

Lines changed: 110 additions & 92 deletions

File tree

docs/content/en/share_your_findings/jira_guide.md

Lines changed: 91 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ for **Jira Cloud**, you will need:
3333
for **Jira Data Center (or Server)**, you will need:
3434
* a Jira URL, i.e. https://jira.yourcompany.com
3535
* an account with permissions to create and update issues in your Jira instance. This can be:
36-
* A **emailaddress / Personal Access Token** combination
36+
* A standard **username / password** combination
37+
* A **emailaddress / Personal Access Token** combination (not supported in Defect Dojo Open-Source)
3738

3839
Optionally, you can map:
3940
* Jira Transitions to trigger Re-Opening and Closing Findings
@@ -102,7 +103,6 @@ The Express method allows for a quicker method of linking a Project. Use the Exp
102103
3. Enter an appropriate authetication method in the Username / Password fields for Jira:
103104
* For standard **username / password Jira authentication**, enter a Jira Username and corresponding Password in these fields.
104105
* For authentication with a **user's API token (Jira Cloud)** enter the Username with the corresponding **API token** in the password field.
105-
* For authentication with a Jira **Personal Access Token (aka PAT, used in Jira Data Center and Jira Server only)**, enter the PAT in the password field. Username is not used for authentication with a Jira PAT, but the field is still required in this form, so you can use a placeholder value here to identify your PAT.
106106
107107
4. Select the Default issue type which you want to create Issues as in Jira. The options for this are **Bug, Task, Story** and **Epic** (which are standard Jira issue types) as well as **Spike** and **Security**, which are custom issue types. If you have a different Issue Type which you want to use, please contact [support@defectdojo.com](mailto:support@defectdojo.com) for assistance.
108108
@@ -178,13 +178,13 @@ This is the key of the Project that you want to use with DefectDojo. The Projec
178178

179179
Here you can determine how much DefectDojo metadata you want to send to Jira. Select one of two options:
180180

181-
* **jira\_full**: Issues will track all of the parameters from DefectDojo \- a full Description, CVE, Severity, etc. Useful if you need complete Finding context in Jira (for example, if someone is working on this Issue who doesn't have access to DefectDojo).
181+
* **jira\_full**: Issues will track all of the parameters from DefectDojo \- a full Description, CVE, Severity, etc. Useful if you need complete Finding context in Jira (for example, if someone is working on this Issue who doesn't have access to DefectDojo).
182182

183-
Here is an example of a **jira\_full** Issue:
183+
Here is an example of a **jira\_full** Issue:
184184
185185
![image](images/Add_a_Connected_Jira_Project_to_a_Product_4.png)
186186

187-
* **Jira\_limited:** Issues will only track the DefectDojo link, the Product/Engagement/Test links, the Reporter and Environment fields. All other fields are tracked in DefectDojo only. Useful if you don't require full Finding context in Jira (for example, if someone is working on this Issue who mainly works in DefectDojo, and doesn't need the full picture in JIRA as well.)
187+
* **Jira\_limited:** Issues will only track the DefectDojo link, the Product/Engagement/Test links, the Reporter and Environment fields. All other fields are tracked in DefectDojo only. Useful if you don't require full Finding context in Jira (for example, if someone is working on this Issue who mainly works in DefectDojo, and doesn't need the full picture in JIRA as well.)
188188

189189
​Here is an example of a **jira\_limited** Issue:
190190

@@ -196,7 +196,7 @@ If you manage your Jira project using Components, you can assign the appropriate
196196

197197
**Custom fields**
198198

199-
If you don’t need to use Custom Fields with DefectDojo issues, you can leave this field as ‘null’.
199+
If you don’t need to use Custom Fields with DefectDojo issues, you can leave this field as ‘null’.
200200

201201
However, if your Jira Project Settings **require you** to use Custom Fields on new Issues, you will need to hard-code these mappings.
202202

@@ -242,13 +242,13 @@ This is the key of the Project that you want to use with DefectDojo. The Projec
242242

243243
Here you can determine how much DefectDojo metadata you want to send to Jira. Select one of two options:
244244

245-
* **jira\_full**: Issues will track all of the parameters from DefectDojo \- a full Description, CVE, Severity, etc. Useful if you need complete Finding context in Jira (for example, if someone is working on this Issue who doesn't have access to DefectDojo).
245+
* **jira\_full**: Issues will track all of the parameters from DefectDojo \- a full Description, CVE, Severity, etc. Useful if you need complete Finding context in Jira (for example, if someone is working on this Issue who doesn't have access to DefectDojo).
246246

247-
Here is an example of a **jira\_full** Issue:
247+
Here is an example of a **jira\_full** Issue:
248248
249249
![image](images/Add_a_Connected_Jira_Project_to_a_Product_4.png)
250250

251-
* **Jira\_limited:** Issues will only track the DefectDojo link, the Product/Engagement/Test links, the Reporter and Environment fields. All other fields are tracked in DefectDojo only. Useful if you don't require full Finding context in Jira (for example, if someone is working on this Issue who mainly works in DefectDojo, and doesn't need the full picture in JIRA as well.)
251+
* **Jira\_limited:** Issues will only track the DefectDojo link, the Product/Engagement/Test links, the Reporter and Environment fields. All other fields are tracked in DefectDojo only. Useful if you don't require full Finding context in Jira (for example, if someone is working on this Issue who mainly works in DefectDojo, and doesn't need the full picture in JIRA as well.)
252252

253253
​Here is an example of a **jira\_limited** Issue:​
254254

@@ -260,7 +260,7 @@ If you manage your Jira project using Components, you can assign the appropriate
260260

261261
**Custom fields**
262262

263-
If you don’t need to use Custom Fields with DefectDojo issues, you can leave this field as ‘null’.
263+
If you don’t need to use Custom Fields with DefectDojo issues, you can leave this field as ‘null’.
264264

265265
However, if your Jira Project Settings **require you** to use Custom Fields on new Issues, you will need to hard\-code these mappings.
266266

@@ -290,13 +290,13 @@ However, you can disable your Jira integration by disabling it at the Product le
290290

291291
#### Add Vulnerability Id as a Jira label
292292

293-
This allows you to add the Vulnerability ID data as a Jira Label automatically. Vulnerability IDs are added to Findings from individual security tools \- these may be Common Vulnerabilities and Exposures (CVE) IDs or a different format, specific to the tool reporting the Finding.
293+
This allows you to add the Vulnerability ID data as a Jira Label automatically. Vulnerability IDs are added to Findings from individual security tools \- these may be Common Vulnerabilities and Exposures (CVE) IDs or a different format, specific to the tool reporting the Finding.
294294

295295
#### Enable Engagement Epic Mapping (For Products)
296296

297297
In DefectDojo, Engagements represent a collection of work. Each Engagement contains one or more tests, which contain one or more Findings which need to be mitigated. Epics in Jira work in a similar way, and this checkbox allows you to push Engagements to Jira as Epics.
298298

299-
* An Engagement in DefectDojo \- note the three findings listed at the bottom.
299+
* An Engagement in DefectDojo \- note the three findings listed at the bottom.
300300
301301
![image](images/Add_a_Connected_Jira_Project_to_a_Product_8.png)
302302
* How the same Engagement becomes an Epic when pushed to JIRA \- the Engagement's Findings are also pushed, and live inside the Engagement as Child Issues.
@@ -309,7 +309,7 @@ If checked, DefectDojo will automatically push any Active and Verified Findings
309309

310310
#### Push Notes
311311

312-
If enabled, Jira comments will populate on the associated Finding in DefectDojo, under Notes on the issue(screenshot), and vice versa; Notes on Findings will be added to the associated Jira Issue as Comments.
312+
If enabled, Jira comments will populate on the associated Finding in DefectDojo, under Notes on the issue(screenshot), and vice versa; Notes on Findings will be added to the associated Jira Issue as Comments.
313313

314314
#### Send SLA Notifications As Comments
315315

@@ -379,9 +379,9 @@ If Jira Issues are not being created correctly, check your Notifications for err
379379

380380
In order to test the Jira webhooks, add a Note to a Finding which also exists in JIRA as an Issue (for example, the test issue in the section above).
381381

382-
If the webhooks are configured correctly, you should see the Note in Jira as a Comment on the issue.
382+
If the webhooks are configured correctly, you should see the Note in Jira as a Comment on the issue.
383383

384-
If this doesn’t work correctly, it could be due to a Firewall issue on your Jira instance blocking the Webhook.
384+
If this doesn’t work correctly, it could be due to a Firewall issue on your Jira instance blocking the Webhook.
385385

386386
* DefectDojo's Firewall Rules include a checkbox for **Jira Cloud,** which needs to be enabled before DefectDojo can receive Webhook messages from Jira.
387387

@@ -403,13 +403,13 @@ Additionally, you have the option to push Finding Groups to Jira instead of indi
403403

404404
### Pushing a Finding Manually
405405

406-
1. From a Finding page in DefectDojo, navigate to the **JIRA** heading. If the Finding does not already exist in JIRA as an Issue, the JIRA header will have a value of '**None**'.
406+
1. From a Finding page in DefectDojo, navigate to the **JIRA** heading. If the Finding does not already exist in JIRA as an Issue, the JIRA header will have a value of '**None**'.
407407
408-
2. Clicking on the arrow next to the **None** value will create a new Jira issue. The State the issue is created in will depend on your team's workflow and Jira configuration with DefectDojo. If the Finding does not appear, refresh the page.
408+
2. Clicking on the arrow next to the **None** value will create a new Jira issue. The State the issue is created in will depend on your team's workflow and Jira configuration with DefectDojo. If the Finding does not appear, refresh the page.
409409
410410
![image](images/Creating_Issues_in_Jira.png)
411411

412-
3. Once the Issue is created, DefectDojo will create a link to the issue made up of the Jira key and the Issue ID. This link will also have a red trash can next to it, to allow you to delete the Issue from Jira.
412+
3. Once the Issue is created, DefectDojo will create a link to the issue made up of the Jira key and the Issue ID. This link will also have a red trash can next to it, to allow you to delete the Issue from Jira.
413413
414414
![image](images/Creating_Issues_in_Jira_2.png)
415415

@@ -424,7 +424,7 @@ Additionally, you have the option to push Finding Groups to Jira instead of indi
424424

425425
The Jira Configuration on DefectDojo has entries for two Jira Transitions which will trigger a status change on a Finding.
426426

427-
* When the **'Close' Transition** is performed on Jira, the associated Finding will also Close, and become marked as **Inactive** and **Mitigated** on DefectDojo. DefectDojo will record this change on the Finding page under the **Mitigated By** heading.
427+
* When the **'Close' Transition** is performed on Jira, the associated Finding will also Close, and become marked as **Inactive** and **Mitigated** on DefectDojo. DefectDojo will record this change on the Finding page under the **Mitigated By** heading.
428428
429429
![image](images/Creating_Issues_in_Jira_3.png)
430430

@@ -510,7 +510,7 @@ As before, API output will contain lots of `customfield_##` object parameters wi
510510

511511
![image](images/Using_Custom_Fields_2.png)
512512

513-
**Example:**
513+
**Example:**
514514
We know that `customfield_10050` represents the DefectDojo Custom URL Field because we recorded it in Step 2\. We can now see that `customfield_10050` contains a value of `“https://google.com”` in the `EXAMPLE-123` issue.
515515

516516
#### Step 4 \- Creating a JSON Field Reference from each Jira Custom Field Key
@@ -523,14 +523,14 @@ This JSON object will contain all of the default values for new Jira Issues. We
523523

524524
From step 3, we now know that Jira expects a URL string for "`customfield_10050`”. We can use this to build our example JSON object.
525525

526-
Say we had also located a DefectDojo\-related short text field, which we identified as "`customfield_67890`”. We would look at this field in our second API output, look at the associated value, and reference the stored value in our example JSON object as well.
527-
526+
Say we had also located a DefectDojo\-related short text field, which we identified as "`customfield_67890`”. We would look at this field in our second API output, look at the associated value, and reference the stored value in our example JSON object as well.
527+
528528
Your JSON object will start to look like this as you add more Custom Fields to it.
529529

530530
```
531-
{
532-
"customfield_10050": "https://change-me.com",
533-
"customfield_67890": "This is the short text custom field."
531+
{
532+
"customfield_10050": "https://change-me.com",
533+
"customfield_67890": "This is the short text custom field."
534534
}
535535
```
536536

@@ -541,18 +541,18 @@ Repeat this process until all of the DefectDojo\-relevant custom fields from Jir
541541
Some fields, such as Date fields, may relate to multiple custom fields in Jira. If that is the case, you’ll need to add both fields to your JSON Field Reference.
542542

543543
```
544-
"customfield_10040": "1970-01-01",
544+
"customfield_10040": "1970-01-01",
545545
"customfield_10041": "1970-01-01T03:30:00.000+0200",
546546
```
547547

548548
Other fields, such as the Label field, may be tracked as a list of strings \- please make sure your JSON Field Reference uses a format that matches API output from Jira.
549549

550550
```
551-
// a list of custom labels on a Jira object
552-
"customfield_10042": [
553-
"custom-label-one",
554-
"this-is-default",
555-
"change-me-please"
551+
// a list of custom labels on a Jira object
552+
"customfield_10042": [
553+
"custom-label-one",
554+
"this-is-default",
555+
"change-me-please"
556556
],
557557
```
558558

@@ -561,77 +561,77 @@ Other custom fields may contain additional, contextual information that should b
561561
* you should remove the extra object from this field:
562562

563563
```
564-
"customfield_10047": [
565-
{
566-
"value": "A"
567-
},
568-
{
569-
"self": "example.url...",
570-
"value": "C",
571-
"id": "example ID"
572-
}
564+
"customfield_10047": [
565+
{
566+
"value": "A"
567+
},
568+
{
569+
"self": "example.url...",
570+
"value": "C",
571+
"id": "example ID"
572+
}
573573
]
574574
```
575-
* instead, you can shorten this to the following and disregard the second part:
575+
* instead, you can shorten this to the following and disregard the second part:
576576

577577
```
578-
"customfield_10047": [
579-
{
580-
"value": "A"
581-
}
582-
]
578+
"customfield_10047": [
579+
{
580+
"value": "A"
581+
}
582+
]
583583
```
584584

585585
#### Example Completed Field Reference
586586

587587
Here is a complete JSON Field Reference, with in\-line comments explaining what each custom field pertains to. This is meant as an all\-encompassing example. Your JSON will contain different key values and data points depending on the Custom Values you want to use during issue creation.
588588

589589
```
590-
{
591-
"customfield_10050": "https://change-me.com",
592-
593-
"customfield_10049": "This is a short text custom field",
594-
595-
// two different fields, but both correspond to the same custom date attribute
596-
"customfield_10040": "1970-01-01",
597-
"customfield_10041": "1970-01-01T03:30:00.000+0200",
598-
599-
// a list of custom labels on a Jira object
600-
"customfield_10042": [
601-
"custom-label-one",
602-
"this-is-default",
603-
"change-me-please"
604-
],
605-
606-
// custom number field
607-
"customfield_10043": 0,
608-
609-
// custom paragraph field
610-
"customfield_10044": "This is a very long winded way to say CHANGE ME PLEASE",
611-
612-
// custom radio button field
613-
"customfield_10045": {
614-
"value": "radio button option"
615-
},
616-
617-
// custom multichoice field
618-
"customfield_10047": [
619-
{
620-
"value": "A"
621-
}
622-
],
623-
624-
// custom checkbox field
625-
"customfield_10039": [
626-
{
627-
"value": "A"
628-
}
629-
],
630-
631-
// custom select list (singlechoice) field
632-
"customfield_10048": {
633-
"value": "1"
634-
}
590+
{
591+
"customfield_10050": "https://change-me.com",
592+
593+
"customfield_10049": "This is a short text custom field",
594+
595+
// two different fields, but both correspond to the same custom date attribute
596+
"customfield_10040": "1970-01-01",
597+
"customfield_10041": "1970-01-01T03:30:00.000+0200",
598+
599+
// a list of custom labels on a Jira object
600+
"customfield_10042": [
601+
"custom-label-one",
602+
"this-is-default",
603+
"change-me-please"
604+
],
605+
606+
// custom number field
607+
"customfield_10043": 0,
608+
609+
// custom paragraph field
610+
"customfield_10044": "This is a very long winded way to say CHANGE ME PLEASE",
611+
612+
// custom radio button field
613+
"customfield_10045": {
614+
"value": "radio button option"
615+
},
616+
617+
// custom multichoice field
618+
"customfield_10047": [
619+
{
620+
"value": "A"
621+
}
622+
],
623+
624+
// custom checkbox field
625+
"customfield_10039": [
626+
{
627+
"value": "A"
628+
}
629+
],
630+
631+
// custom select list (singlechoice) field
632+
"customfield_10048": {
633+
"value": "1"
634+
}
635635
}
636636
```
637637

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 5.1.8 on 2025-07-31 15:19
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('dojo', '0239_sla_configuration_restart_sla_on_reactivation'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='jira_instance',
15+
name='password',
16+
field=models.CharField(help_text='Password or API Token, see DefectDojo documentation for more information.', max_length=2000, verbose_name='Password/Token'),
17+
),
18+
]

dojo/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3922,7 +3922,7 @@ class JIRA_Instance(models.Model):
39223922
configuration_name = models.CharField(max_length=2000, help_text=_("Enter a name to give to this configuration"), default="")
39233923
url = models.URLField(max_length=2000, verbose_name=_("JIRA URL"), help_text=_("For more information how to configure Jira, read the DefectDojo documentation."))
39243924
username = models.CharField(max_length=2000, verbose_name=_("Username/Email"), help_text=_("Username or Email Address, see DefectDojo documentation for more information."))
3925-
password = models.CharField(max_length=2000, verbose_name=_("Password/Token"), help_text=_("Password, API Token, or Personal Access Token, see DefectDojo documentation for more information."))
3925+
password = models.CharField(max_length=2000, verbose_name=_("Password/Token"), help_text=_("Password or API Token, see DefectDojo documentation for more information."))
39263926

39273927
if hasattr(settings, "JIRA_ISSUE_TYPE_CHOICES_CONFIG"):
39283928
default_issue_type_choices = settings.JIRA_ISSUE_TYPE_CHOICES_CONFIG

0 commit comments

Comments
 (0)