Skip to content

Commit 3fd1fac

Browse files
authored
Merge pull request #11788 from DefectDojo/master-into-dev/2.43.1-2.44.0-dev
Release: Merge back 2.43.1 into dev from: master-into-dev/2.43.1-2.44.0-dev
2 parents 88e0409 + 4aa9830 commit 3fd1fac

File tree

13 files changed

+350
-16372
lines changed

13 files changed

+350
-16372
lines changed

docs/content/en/customize_dojo/user_management/configure_sso.md

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Users can connect to DefectDojo with a Username and Password, but if you prefer,
1717
All of these methods can only be configured by a Superuser in DefectDojo. DefectDojo Pro users can quickly set up SSO through their system settings, while Open Source users will need to configure these settings on the back-end via the local_settings.py file. This article covers both methods of configuration.
1818

1919
## Disable username / password use
20-
You may wish to disable traditional username/password login on your instance.
20+
You may wish to disable traditional username/password login on your instance.
2121

2222
<span style="background-color:rgba(242, 86, 29, 0.3)">DefectDojo Pro</span> users can uncheck the "Allow Login via Username and Password" box on the Login Settings form: **Enterprise Settings > Login Settings**.
2323

@@ -68,7 +68,7 @@ Both <span style="background-color:rgba(242, 86, 29, 0.3)">DefectDojo Pro</span>
6868

6969
### Open-Source
7070

71-
Open-Source users will need to map these variables in the local_settings.py file. (see [Configuration](../../os_getting_started/configuration)).
71+
Open-Source users will need to map these variables in the local_settings.py file. (see [Configuration](../../open_source/installation/configuration/)).
7272

7373
1. Fill out the variables as follows:
7474
{{< highlight python >}}
@@ -141,7 +141,7 @@ When a user is removed from a given group in Azure AD, they will also be removed
141141

142142
### Open-Source
143143

144-
Open-Source users will need to map these variables in the local_settings.py file. (see [Configuration](../../os_getting_started/configuration)).
144+
Open-Source users will need to map these variables in the local_settings.py file. (see [Configuration](../../open_source/installation/configuration)).
145145

146146
1. Add the following information to the settings file:
147147

@@ -155,7 +155,7 @@ Open-Source users will need to map these variables in the local_settings.py file
155155
2. Restart DefectDojo, and you should now see a **Login with Azure AD** button on the login page.
156156

157157
#### Open-Source Azure Group Mapping
158-
To import groups from Azure AD users, the following environment variable needs to be set:
158+
To import groups from Azure AD users, the following environment variable needs to be set:
159159

160160
{{< highlight python >}}
161161
DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_GET_GROUPS=True
@@ -170,7 +170,7 @@ If unsure of what type that is, select `All Groups`. Do not activate `Emit group
170170
Application API permissions need to be updated with the `Group.Read.All` permission so that groups can be read on behalf of the user that has successfully signed in.
171171

172172
To limit the amount of groups imported from Azure AD, a regular expression can be used as the following:
173-
173+
174174
{{< highlight python >}}
175175
DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_GROUPS_FILTER='^team-.*' # or 'teamA|teamB|groupC'
176176
{{< /highlight >}}
@@ -208,24 +208,24 @@ Both <span style="background-color:rgba(242, 86, 29, 0.3)">DefectDojo Pro</span>
208208
- **GitHub Enterprise OAuth Secret**: enter your GitHub Enterprise Client Secret
209209
- **GitHub Enterprise URL**: enter the GitHub URL for your organization, likely `https://github.<your_company>.com/`
210210
- **GitHub Enterprise API URL**: enter the URL for your organization's GitHub API (e.g. `https://github.<your_company>.com/api/v3/`)
211-
211+
212212
2. Check off the box for 'Enable GitHub Enterprise OAuth'. Submit the form, and 'Login With GitHub' should now be visible on the login page.
213213

214214
### Open-Source
215215

216-
Open-Source users will need to map these variables in the local_settings.py file. (see [Configuration](../../os_getting_started/configuration)).
216+
Open-Source users will need to map these variables in the local_settings.py file. (see [Configuration](../../open_source/installation/configuration)).
217217

218218
1. Add the following variables to your `local_settings.py` file:
219-
{{< highlight python >}}
220-
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_KEY=(str, 'GitHub Enterprise OAuth App Client ID'),
221-
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_SECRET=(str, 'GitHub Enterprise OAuth App Client Secret'),
222-
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_URL=(str, 'https://github.<your_company>.com/'),
223-
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_API_URL=(str, 'https://github.<your_company>.com/api/v3/'),
224-
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_OAUTH2_ENABLED = True,
219+
{{< highlight python >}}
220+
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_KEY=(str, 'GitHub Enterprise OAuth App Client ID'),
221+
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_SECRET=(str, 'GitHub Enterprise OAuth App Client Secret'),
222+
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_URL=(str, 'https://github.<your_company>.com/'),
223+
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_API_URL=(str, 'https://github.<your_company>.com/api/v3/'),
224+
DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_OAUTH2_ENABLED = True,
225225
{{< /highlight >}}
226226

227227
2. Restart DefectDojo, and you should now see a **Login with GitHub Enterprise**
228-
button on the login page.
228+
button on the login page.
229229

230230
## GitLab
231231

@@ -259,7 +259,7 @@ Follow along below.
259259

260260
### Open-Source
261261

262-
Open-Source users will need to map these variables in the local_settings.py file. (see [Configuration](../../os_getting_started/configuration)).
262+
Open-Source users will need to map these variables in the local_settings.py file. (see [Configuration](../../open_source/installation/configuration)).
263263

264264
1. Add the following variables to your `local_settings.py` file:
265265
{{< highlight python >}}
@@ -277,7 +277,7 @@ Open-Source users will need to map these variables in the local_settings.py file
277277
{{< /highlight >}}
278278

279279
**Important:** if you enable this setting on already working instance with a GitLab integrations, it will require new grant "read_repository" by user
280-
280+
281281
2. Restart DefectDojo, and you should now see a **Login with Gitlab** button on the login page.
282282

283283
## Google Auth
@@ -320,7 +320,7 @@ In order to use Google Authentication, a Google Authentication Server will need
320320

321321
### Open-Source
322322

323-
Open-Source users will need to map these variables in the local_settings.py file. (see [Configuration](../../os_getting_started/configuration)).
323+
Open-Source users will need to map these variables in the local_settings.py file. (see [Configuration](../../open_source/installation/configuration)).
324324

325325
1. Add the following variables to your `local_settings.py` file:
326326

@@ -336,7 +336,7 @@ Open-Source users will need to map these variables in the local_settings.py file
336336
DD_SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS = ['example.com', 'example.org']
337337
{{< /highlight >}}
338338

339-
As an environment variable:
339+
As an environment variable:
340340

341341
{{< highlight python >}}
342342
DD_SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS = example.com,example.org
@@ -348,7 +348,7 @@ Open-Source users will need to map these variables in the local_settings.py file
348348
DD_SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_EMAILS = ['<email@example.com>']
349349
{{< /highlight >}}
350350

351-
As an environment variable:
351+
As an environment variable:
352352

353353
{{< highlight python >}}
354354
DD_SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_EMAILS = email@example.com,email2@example.com
@@ -374,7 +374,7 @@ This guide assumes you already have a KeyCloak Realm set up. If not, you will n
374374

375375
3. Under `Scope` -> `Full Scope Allowed` set to `off`.
376376

377-
4. Under `mappers` -> add a custom mapper here:
377+
4. Under `mappers` -> add a custom mapper here:
378378
* Name: `aud`
379379
* Mapper type: `audience`
380380
* Included audience: select your client/client-id here
@@ -403,21 +403,21 @@ This guide assumes you already have a KeyCloak Realm set up. If not, you will n
403403

404404
### Open-Source
405405

406-
Edit the local_settings.py file (see [Configuration](../../os_getting_started/configuration)) with the following information:
406+
Edit the local_settings.py file (see [Configuration](../../open_source/installation/configuration)) with the following information:
407407

408408
1. {{< highlight python >}}
409409
DD_SESSION_COOKIE_SECURE=True,
410410
DD_CSRF_COOKIE_SECURE=True,
411411
DD_SECURE_SSL_REDIRECT=True,
412412
DD_SOCIAL_AUTH_KEYCLOAK_OAUTH2_ENABLED=True,
413413
DD_SOCIAL_AUTH_KEYCLOAK_PUBLIC_KEY=(str, '<your realm public key>'),
414-
DD_SOCIAL_AUTH_KEYCLOAK_KEY=(str, '<your client id>'),
415-
DD_SOCIAL_AUTH_KEYCLOAK_SECRET=(str, '<your keycloak client credentials secret>'),
414+
DD_SOCIAL_AUTH_KEYCLOAK_KEY=(str, '<your client id>'),
415+
DD_SOCIAL_AUTH_KEYCLOAK_SECRET=(str, '<your keycloak client credentials secret>'),
416416
DD_SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL=(str, '<your authorization endpoint>'),
417-
DD_SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL=(str, '<your token endpoint>')
417+
DD_SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL=(str, '<your token endpoint>')
418418
{{< /highlight >}}
419-
420-
or, alternatively, for helm configuration, add this to the `extraConfig` section:
419+
420+
or, alternatively, for helm configuration, add this to the `extraConfig` section:
421421

422422
```yaml
423423
DD_SESSION_COOKIE_SECURE: 'True'
@@ -431,7 +431,7 @@ DD_SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL: '<your authorization endpoint>'
431431
DD_SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL: '<your token endpoint>'
432432
```
433433

434-
Optionally, you *can* set `DD_SOCIAL_AUTH_KEYCLOAK_LOGIN_BUTTON_TEXT` in order to customize the login button's text caption.
434+
Optionally, you *can* set `DD_SOCIAL_AUTH_KEYCLOAK_LOGIN_BUTTON_TEXT` in order to customize the login button's text caption.
435435

436436
2. Restart DefectDojo, and `Login With ____` (your login button text) will be added as an option to the Login menu.
437437

@@ -445,7 +445,7 @@ Both <span style="background-color:rgba(242, 86, 29, 0.3)">DefectDojo Pro</span>
445445
1. Navigate to the following address and either create a new account,
446446
or login with an existing one: [Okta Account
447447
Creation](https://www.okta.com/developer/signup/)
448-
448+
449449
2. Once logged in, enter the **Applications** and click **Add
450450
Application**:
451451

@@ -489,7 +489,7 @@ Both <span style="background-color:rgba(242, 86, 29, 0.3)">DefectDojo Pro</span>
489489

490490
### Open-Source
491491

492-
1. Edit the local_settings.py file (see [Configuration](../../os_getting_started/configuration)) with the following:
492+
1. Edit the local_settings.py file (see [Configuration](../../open_source/installation/configuration)) with the following:
493493

494494
{{< highlight python >}}
495495
DD_SOCIAL_AUTH_OKTA_OAUTH2_ENABLED=True,
@@ -515,27 +515,27 @@ GET parameter starts with `http://` instead of
515515

516516
![image](images/sso_betaui_1.png)
517517

518-
2. Complete the SAML form. Start by setting an **Entity ID** \- this is either a label or a URL which your SAML Identity Provider can point to, and use to identify DefectDojo. This is a required field.
518+
2. Complete the SAML form. Start by setting an **Entity ID** \- this is either a label or a URL which your SAML Identity Provider can point to, and use to identify DefectDojo. This is a required field.
519519
520-
3. If you wish, set **Login Button Text** in DefectDojo. This text will appear on the button or link users click to initiate the login process.
520+
3. If you wish, set **Login Button Text** in DefectDojo. This text will appear on the button or link users click to initiate the login process.
521521
522-
4. You can also set a **Logout URL** to redirect your users to once they have logged out of DefectDojo.
522+
4. You can also set a **Logout URL** to redirect your users to once they have logged out of DefectDojo.
523523
524-
5. The **Name ID Format** has four options: Persistent, Transient, Entity and Encrypted.
525-
526-
- If you would prefer that users have a different SAML ID each time they access
527-
DefectDojo, choose **Transient**.
528-
- If you want your users to be consistently identified by SAML, use **Persistent.**
529-
- If you’re ok with all of your users sharing a SAML NameID, you can select **Entity.**
524+
5. The **Name ID Format** has four options: Persistent, Transient, Entity and Encrypted.
525+
526+
- If you would prefer that users have a different SAML ID each time they access
527+
DefectDojo, choose **Transient**.
528+
- If you want your users to be consistently identified by SAML, use **Persistent.**
529+
- If you’re ok with all of your users sharing a SAML NameID, you can select **Entity.**
530530
- If you would like to encrypt each user’s NameID, you can use **Encrypted** as your NameID format.
531531
532-
6. **Required Attributes** are the attributes that DefectDojo requires from the SAML response.
532+
6. **Required Attributes** are the attributes that DefectDojo requires from the SAML response.
533+
534+
7. **Attribute Mapping** contains a formula for how you want these attributes to be matched to a user. For example, if your SAML response returns an email, you can associate it with a DefectDojo user with the formula **email=email**.
533535
534-
7. **Attribute Mapping** contains a formula for how you want these attributes to be matched to a user. For example, if your SAML response returns an email, you can associate it with a DefectDojo user with the formula **email=email**.
535-
536536
The left side of the ‘=’ sign represents the attribute you want to map from the SAML response. The right side is a user’s field in DefectDojo, which you want this attribute to map to.
537537
538-
8. **Remote SAML Metadata** is the URL where your SAML Identity Provider is located.
538+
8. **Remote SAML Metadata** is the URL where your SAML Identity Provider is located.
539539
540540
9. Finally, check the **Enable SAML** checkbox at the bottom of this form to confirm that you want to use SAML to log in. Once this is enabled, you will see the **Login With SAML** button on the DefectDojo Login Page.
541541

@@ -558,7 +558,7 @@ The left side of the ‘=’ sign represents the attribute you want to map from
558558
### Open-Source SAML
559559

560560
1. Navigate to your SAML IdP and find your metadata.
561-
2. Edit the local_settings.py file (see [Configuration](../../os_getting_started/configuration)) with the following information:
561+
2. Edit the local_settings.py file (see [Configuration](../../open_source/installation/configuration)) with the following information:
562562

563563
{{< highlight python >}}
564564
DD_SAML2_ENABLED=(bool, **True**),

0 commit comments

Comments
 (0)