Skip to content

Commit 5a61e4a

Browse files
authored
Replace webhook state transition diagram with PNG instead of rendering with kroki (#13456)
* Replace webhook state transition diagram with PNG instead of rendering with kroki * Apply suggestion from @Maffooch
1 parent 6d2dbca commit 5a61e4a

3 files changed

Lines changed: 28 additions & 24 deletions

File tree

250 KB
Loading

docs/content/en/open_source/notification_webhooks/how_to.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,10 @@ Webhooks are HTTP requests coming from the DefectDojo instance towards a user-de
1010

1111
It is not unusual that in some cases a webhook can not be delivered. It is usually connected to network issues, server misconfiguration, or running upgrades on the server. DefectDojo needs to react to these outages. It might temporarily or permanently disable related endpoints. The following graph shows how it might change the status of the webhook definition based on HTTP responses (or manual user interaction).
1212

13-
```kroki {type=mermaid}
14-
flowchart TD
15-
16-
START{{Endpoint created}}
17-
ALL{All states}
18-
STATUS_ACTIVE([STATUS_ACTIVE])
19-
STATUS_INACTIVE_TMP
20-
STATUS_INACTIVE_PERMANENT
21-
STATUS_ACTIVE_TMP([STATUS_ACTIVE_TMP])
22-
END{{Endpoint removed}}
23-
24-
START ==> STATUS_ACTIVE
25-
STATUS_ACTIVE --HTTP 200 or 201 --> STATUS_ACTIVE
26-
STATUS_ACTIVE --HTTP 5xx <br>or HTTP 429 <br>or Timeout--> STATUS_INACTIVE_TMP
27-
STATUS_ACTIVE --Any HTTP 4xx response<br>or any other HTTP response<br>or non-HTTP error--> STATUS_INACTIVE_PERMANENT
28-
STATUS_INACTIVE_TMP -.After 60s.-> STATUS_ACTIVE_TMP
29-
STATUS_ACTIVE_TMP --HTTP 5xx <br>or HTTP 429 <br>or Timeout <br>within 24h<br>from the first error-->STATUS_INACTIVE_TMP
30-
STATUS_ACTIVE_TMP -.After 24h.-> STATUS_ACTIVE
31-
STATUS_ACTIVE_TMP --HTTP 200 or 201 --> STATUS_ACTIVE_TMP
32-
STATUS_ACTIVE_TMP --HTTP 5xx <br>or HTTP 429 <br>or Timeout <br>within 24h from the first error<br>or any other HTTP response or error--> STATUS_INACTIVE_PERMANENT
33-
ALL ==Activation by user==> STATUS_ACTIVE
34-
ALL ==Deactivation by user==> STATUS_INACTIVE_PERMANENT
35-
ALL ==Removal of endpoint by user==> END
36-
```
13+
<!-- Replaced the kroki rendering with a screenshot to avoid failures in GHA -->
14+
<!-- The transition state diagram is located here: docs/content/en/open_source/notification_webhooks/transition-state -->
15+
<!-- Github Issue here: https://github.com/DefectDojo/django-DefectDojo/issues/13457 -->
16+
![image](images/webhook-state-transition-flow.png)
3717

3818
Notes:
3919

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
```kroki {type=mermaid}
2+
flowchart TD
3+
4+
START{{Endpoint created}}
5+
ALL{All states}
6+
STATUS_ACTIVE([STATUS_ACTIVE])
7+
STATUS_INACTIVE_TMP
8+
STATUS_INACTIVE_PERMANENT
9+
STATUS_ACTIVE_TMP([STATUS_ACTIVE_TMP])
10+
END{{Endpoint removed}}
11+
12+
START ==> STATUS_ACTIVE
13+
STATUS_ACTIVE --HTTP 200 or 201 --> STATUS_ACTIVE
14+
STATUS_ACTIVE --HTTP 5xx <br>or HTTP 429 <br>or Timeout--> STATUS_INACTIVE_TMP
15+
STATUS_ACTIVE --Any HTTP 4xx response<br>or any other HTTP response<br>or non-HTTP error--> STATUS_INACTIVE_PERMANENT
16+
STATUS_INACTIVE_TMP -.After 60s.-> STATUS_ACTIVE_TMP
17+
STATUS_ACTIVE_TMP --HTTP 5xx <br>or HTTP 429 <br>or Timeout <br>within 24h<br>from the first error-->STATUS_INACTIVE_TMP
18+
STATUS_ACTIVE_TMP -.After 24h.-> STATUS_ACTIVE
19+
STATUS_ACTIVE_TMP --HTTP 200 or 201 --> STATUS_ACTIVE_TMP
20+
STATUS_ACTIVE_TMP --HTTP 5xx <br>or HTTP 429 <br>or Timeout <br>within 24h from the first error<br>or any other HTTP response or error--> STATUS_INACTIVE_PERMANENT
21+
ALL ==Activation by user==> STATUS_ACTIVE
22+
ALL ==Deactivation by user==> STATUS_INACTIVE_PERMANENT
23+
ALL ==Removal of endpoint by user==> END
24+
```

0 commit comments

Comments
 (0)