Skip to content

Commit

Permalink
Merge pull request #76 from xens/add_auth0_documentation
Browse files Browse the repository at this point in the history
doc: authentication: add Auth0 OAuth2 setup instructions
  • Loading branch information
Maffooch committed Mar 19, 2020
2 parents b5caebe + 5b26b11 commit 352003c
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions docs/social-authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@ Setting up Social Authentication via OAuth2 Providers
=====================================================


Auth0 OAuth2 Configuration
--------------------------

In the same way as with other Identiy-Providers, it's now possible to leverage Auth0 to authenticate users on DefectDojo.

1. Inside your Auth0 dashboard create a new application (Applications / Create Application / Single Page Web Application).

2. On the new application set the following fields:

* Name: "Defectdojo"
* Allowed Callback URLs: "https://the_hostname_you_have_dojo_deployed:your_server_port/complete/auth0/"

3. Copy the following info from the application:

* Domain
* Client ID
* Client Secret

3. Now, edit the dojo/settings.py file and edit/replace the following information:

* DD_SOCIAL_AUTH_AUTH0_OAUTH2_ENABLED=True
* DD_SOCIAL_AUTH_AUTH0_KEY=(str, '**YOUR_CLIENT_ID_FROM_STEP_ABOVE**'),
* DD_SOCIAL_AUTH_AUTH0_SECRET=(str, '**YOUR_CLIENT_SECRET_FROM_STEP_ABOVE**'),
* DD_SOCIAL_AUTH_AUTH0_DOMAIN=(str, '**YOUR_AUTH0_DOMAIN_FROM_STEP_ABOVE**'),

5. Restart DefectDojo, and you should now see a **Login with Auth0** button on the login page.


Google
------

Expand Down Expand Up @@ -92,7 +120,7 @@ Once the user signs in, it will try to match the UPN of the user to an existing

* http://localhost:8080/complete/azuread-tenant-oauth2/
* **OR**
* http://the_hostname_you_have_dojo_deployed:your_server_port/complete/azuread-tenant-oauth2/
* https://the_hostname_you_have_dojo_deployed:your_server_port/complete/azuread-tenant-oauth2/

4. Now, edit the dojo/settings.py file and edit/replace the following information:

Expand All @@ -118,7 +146,7 @@ In a similar fashion to that of Google and OKTA, using Gitlab as a OAuth2 provid

3. For the Redirect URI, enter the DefectDojo URL with the following format

* http://the_hostname_you_have_dojo_deployed:your_server_port/complete/gitlab/
* https://the_hostname_you_have_dojo_deployed:your_server_port/complete/gitlab/

4. Now, edit the dojo/settings.py file and edit/replace the following information:

Expand All @@ -127,7 +155,7 @@ In a similar fashion to that of Google and OKTA, using Gitlab as a OAuth2 provid
* DD_SOCIAL_AUTH_GITLAB_API_URL=(str, '**https://gitlab.com**'),
* DD_SOCIAL_AUTH_GITLAB_OAUTH2_ENABLED = **True**

5. Restart your Dojo, and you should now see a **Login with Gitlab** button on the login page which should *magically* work
5. Restart DefectDojo, and you should now see a **Login with Gitlab** button on the login page.


User Permissions
Expand Down

0 comments on commit 352003c

Please sign in to comment.