DefectDojo / django-DefectDojo

DevSecOps, ASPM, Vulnerability Management. All on one platform.
https://defectdojo.com
BSD 3-Clause "New" or "Revised" License
3.66k stars 1.53k forks source link

Integration with AAD through env variables doesn't work (missing needed parameter state) #10027

Open Raphaaaaaugh opened 5 months ago

Raphaaaaaugh commented 5 months ago

Be informative DD v. 2.33.5 (release mode)

I built a DefectDojo instance on ECS AWS with one container per component. As I understand things, the UWSGI component is the one responsible for Azure AD integration.

Bug description

The button for connecting through Azure AD doesn't appear, instead the highlighted message appears at the address https://my-defectdojo/complete/azuread-tenant-oauth2/ (I can't give you the actual address as it contains sensitive data, sorry in advance).

I followed the documentation : https://defectdojo.github.io/django-DefectDojo/integrations/social-authentication/#azure-active-directory and have set 4 environment variables for the UWSGI container which he is properly reading (if that is of any help, I am also using this environment system for the database connection and linking to the celery broker, etc..).

Steps to reproduce Steps to reproduce the behavior:

  1. Set DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_KEY DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_SECRET DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_TENANT_ID DD_SOCIAL_AUTH_AZUREAD_TENANT_OAUTH2_ENABLED as environment variables for UWSGI to their values on your end of Azure (True for ENABLED)
  2. Launch the DefectDojo instance
  3. Go to 'https://my-defectdojo/complete/azuread-tenant-oauth2/'
  4. See error

Deployment method (select with an X)

Logs from uwsgi GET /complete/azuread-tenant-oauth2/ => generated 0 bytes in 84 msecs (HTTP/1.1 302) 9 headers in 473 bytes (1 switches on core 1)

Screenshots image

Please let me know if you have any idea of how to fix this issue

izcoN commented 3 months ago

Hello, we are expieriencing the same problem but on version 2.35.4 after adding local_settings.py like we should.

image