@@ -29,3 +29,34 @@ Follow these steps to set up API importing:
29294 . After this is done, you can import the findings on the ` Product ` page through
3030 ` Findings -> Import Scan Results ` . As the ` Scan type ` , select the related type
3131 (the ` API Scan Configuration ` created above) and click ` Import ` .
32+
33+ ## Custom Trust
34+
35+ In some cases, you may want to connect to a tool that uses a certificate from a certification authority (CA) that is not
36+ in the default trust store (e.g. a company-internal CA), which requires that you add custom trust to an existing trust
37+ store or replace the existing trust store with your own.
38+
39+ ### Using a Custom-Built DefectDojo Image
40+
41+ When you are building your own container image for ` django-DefectDojo ` , you can simply add the certificates you would
42+ like to include as custom trust to the ` docker/certs ` path (see
43+ [ Dockerfile.django] ( https://github.com/DefectDojo/django-DefectDojo/blob/861b617bfcb17cb5e858f46e31509134d0e98171/Dockerfile.django#L70 ) )
44+
45+ ### Using the Prebuilt DefectDojo Image
46+
47+ 1 . Create a new mounted volume where the new trust store will be added (ensures persistence).
48+ 2 . Create a new trust store
49+ 1 . Prepare a new PEM-encoded trust store file (` custom-cacerts.pem ` ).
50+ 2 . Optional, if you want to keep existing trust: Add the custom trust to the existing trust store
51+ 1 . Find the location of the existing trust store by running ` python -m certifi ` in the container
52+ 2 . Append your custom trust to the existing trust store by running
53+ ` cat cacert.pem custom-cacerts.pem > extended-cacerts.pem ` .
54+ *** Important: The consequence of copying the existing trust store is that you will not receive any updates
55+ (added or removed CA certificates).***
56+ 3 . Copy the new trust store (` custom-cacerts.pem ` or ` extended-cacerts.pem ` ) to the mounted volume.
57+ 4 . Point the environment variable ` REQUESTS_CA_BUNDLE ` to the new trust store file.
58+
59+ > ` REQUESTS_CA_BUNDLE ` is an environment variable from the Python ` requests ` package. By default, it uses the trust
60+ > store provided by the ` certifi ` package. For more details, check the respective documentation
61+ > ([ requests] ( https://requests.readthedocs.io/en/latest/user/advanced/#ssl-cert-verification ) or
62+ > [ certifi] ( https://certifiio.readthedocs.io/en/latest/ ) )
0 commit comments