-
Notifications
You must be signed in to change notification settings - Fork 1.8k
docs: add new page on custom trust #13841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
sNiXx
wants to merge
1
commit into
DefectDojo:dev
Choose a base branch
from
sNiXx:custom-trust-docs
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+42
−10
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| title: "Custom Trust" | ||
| toc_hide: true | ||
| weight: 2 | ||
| --- | ||
|
|
||
| In some cases, you may want to connect to a tool that uses a certificate from a certification authority (CA) that is not | ||
| in the default trust store (e.g. a company-internal CA), which requires that you add custom trust to an existing trust | ||
| store or replace the existing trust store with your own. | ||
|
|
||
| ## Using a Custom-Built DefectDojo Image | ||
|
|
||
| When you are building your own container image for `django-DefectDojo`, you can simply add the certificates you would | ||
| like to include as custom trust to the `docker/certs` path (see | ||
| [Dockerfile.django](https://github.com/DefectDojo/django-DefectDojo/blob/861b617bfcb17cb5e858f46e31509134d0e98171/Dockerfile.django#L70)) | ||
|
|
||
| ## Using the Prebuilt DefectDojo Image | ||
|
|
||
| 1. Create a new mounted volume where the new trust store will be added (ensures persistence). | ||
| 2. Create a new trust store | ||
| 1. Prepare a new PEM-encoded trust store file (`custom-cacerts.pem`). | ||
| 2. Optional, if you want to keep existing trust: Add the custom trust to the existing trust store | ||
| 1. Find the location of the existing trust store by running `python -m certifi` in the container | ||
| 2. Append your custom trust to the existing trust store by running | ||
| `cat cacert.pem custom-cacerts.pem > extended-cacerts.pem`. | ||
| ***Important: The consequence of copying the existing trust store is that you will not receive any updates | ||
| (added or removed CA certificates).*** | ||
| 3. Copy the new trust store (`custom-cacerts.pem` or `extended-cacerts.pem`) to the mounted volume. | ||
| 4. Point the environment variable `REQUESTS_CA_BUNDLE` to the new trust store file. | ||
|
|
||
| > `REQUESTS_CA_BUNDLE` is an environment variable from the Python `requests` package. By default, it uses the trust | ||
| > store provided by the `certifi` package. For more details, check the respective documentation | ||
| > ([requests](https://requests.readthedocs.io/en/latest/user/advanced/#ssl-cert-verification) or | ||
| > [certifi](https://certifiio.readthedocs.io/en/latest/)) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than create a new article, can this be added as a section to the _index.md page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is definitely possible. However, I was raising this question before:
I am specifically talking about the
REQUESTS_CA_BUNDLEenv variable being mentioned here.So, it would make sense to put it somewhere more "generic", so that it can be also referenced from the SSO page and any other page that may benefit from a link to the custom trust section.