From 6544c6d90268c48b3fcc6610711ccc052b5ca192 Mon Sep 17 00:00:00 2001 From: Lars Meijers Date: Tue, 23 Apr 2024 17:29:02 +0200 Subject: [PATCH] removed unused settings and made note to show that --- docs/content/en/integrations/social-authentication.md | 2 +- dojo/context_processors.py | 6 +++--- ...vider.py => 0210_alter_dojo_group_social_provider.py} | 2 +- dojo/settings/settings.dist.py | 9 --------- 4 files changed, 5 insertions(+), 14 deletions(-) rename dojo/db_migrations/{0205_alter_dojo_group_social_provider.py => 0210_alter_dojo_group_social_provider.py} (90%) diff --git a/docs/content/en/integrations/social-authentication.md b/docs/content/en/integrations/social-authentication.md index a7cafe38067..c6a3b21a944 100644 --- a/docs/content/en/integrations/social-authentication.md +++ b/docs/content/en/integrations/social-authentication.md @@ -266,7 +266,7 @@ Follow along below. 5. Restart DefectDojo, and you should now see a **Login with Gitlab** button on the login page. -## Keycloak +## Keycloak !!Needs to be updated!! There is also an option to use Keycloak as OAuth2 provider in order to authenticate users to Defect Dojo, also by using the social-auth plugin. diff --git a/dojo/context_processors.py b/dojo/context_processors.py index 9da80ff0b8e..cc3f8ad3cb2 100644 --- a/dojo/context_processors.py +++ b/dojo/context_processors.py @@ -17,9 +17,9 @@ def globalize_vars(request): "AZUREAD_TENANT_OAUTH2_GET_GROUPS": settings.AZUREAD_TENANT_OAUTH2_GET_GROUPS, "AZUREAD_TENANT_OAUTH2_GROUPS_FILTER": settings.AZUREAD_TENANT_OAUTH2_GROUPS_FILTER, "AZUREAD_TENANT_OAUTH2_CLEANUP_GROUPS": settings.AZUREAD_TENANT_OAUTH2_CLEANUP_GROUPS, - "KEYCLOAK_TENANT_OAUTH2_GET_GROUPS": settings.AZUREAD_TENANT_OAUTH2_GET_GROUPS, - "KEYCLOAK_TENANT_OAUTH2_GROUPS_FILTER": settings.AZUREAD_TENANT_OAUTH2_GROUPS_FILTER, - "KEYCLOAK_TENANT_OAUTH2_CLEANUP_GROUPS": settings.AZUREAD_TENANT_OAUTH2_CLEANUP_GROUPS, + "KEYCLOAK_TENANT_OAUTH2_GET_GROUPS": settings.KEYCLOAK_TENANT_OAUTH2_GET_GROUPS, + "KEYCLOAK_TENANT_OAUTH2_GROUPS_FILTER": settings.KEYCLOAK_TENANT_OAUTH2_GROUPS_FILTER, + "KEYCLOAK_TENANT_OAUTH2_CLEANUP_GROUPS": settings.KEYCLOAK_TENANT_OAUTH2_CLEANUP_GROUPS, "KEYCLOAK_ENABLED": settings.KEYCLOAK_OAUTH2_ENABLED, "SOCIAL_AUTH_KEYCLOAK_LOGIN_BUTTON_TEXT": settings.SOCIAL_AUTH_KEYCLOAK_LOGIN_BUTTON_TEXT, "GITHUB_ENTERPRISE_ENABLED": settings.GITHUB_ENTERPRISE_OAUTH2_ENABLED, diff --git a/dojo/db_migrations/0205_alter_dojo_group_social_provider.py b/dojo/db_migrations/0210_alter_dojo_group_social_provider.py similarity index 90% rename from dojo/db_migrations/0205_alter_dojo_group_social_provider.py rename to dojo/db_migrations/0210_alter_dojo_group_social_provider.py index 320a1677bb1..a919da4e7b0 100644 --- a/dojo/db_migrations/0205_alter_dojo_group_social_provider.py +++ b/dojo/db_migrations/0210_alter_dojo_group_social_provider.py @@ -6,7 +6,7 @@ class Migration(migrations.Migration): dependencies = [ - ('dojo', '0204_jira_project_epic_issue_type_name'), + ('dojo', '0209_alter_finding_severity'), ] operations = [ diff --git a/dojo/settings/settings.dist.py b/dojo/settings/settings.dist.py index a1b3ea1e4ae..cedaa6be505 100644 --- a/dojo/settings/settings.dist.py +++ b/dojo/settings/settings.dist.py @@ -147,9 +147,6 @@ DD_SOCIAL_AUTH_OIDC_OIDC_ENDPOINT=(str, ''), DD_SOCIAL_AUTH_KEYCLOAK_KEY=(str, ''), DD_SOCIAL_AUTH_KEYCLOAK_SECRET=(str, ''), - DD_SOCIAL_AUTH_KEYCLOAK_PUBLIC_KEY=(str, ''), - DD_SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL=(str, ''), - DD_SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL=(str, ''), DD_SOCIAL_AUTH_KEYCLOAK_LOGIN_BUTTON_TEXT=(str, 'Login with Keycloak'), DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_OAUTH2_ENABLED=(bool, False), DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_URL=(str, ''), @@ -493,7 +490,6 @@ def generate_url(scheme, double_slashes, user, password, host, port, path, param 'dojo.okta.OktaOAuth2', 'social_core.backends.azuread_tenant.AzureADTenantOAuth2', 'social_core.backends.gitlab.GitLabOAuth2', - # 'social_core.backends.keycloak.KeycloakOAuth2', 'social_core.backends.open_id_connect.OpenIdConnectAuth', 'social_core.backends.github_enterprise.GithubEnterpriseOAuth2', 'dojo.remote_user.RemoteUserBackend', @@ -598,11 +594,6 @@ def generate_url(scheme, double_slashes, user, password, host, port, path, param KEYCLOAK_TENANT_OAUTH2_CLEANUP_GROUPS = env('DD_SOCIAL_AUTH_KEYCLOAK_OAUTH2_CLEANUP_GROUPS') KEYCLOAK_TENANT_OAUTH2_GROUPS_FILTER = env('DD_SOCIAL_AUTH_KEYCLOAK_OAUTH2_GROUPS_FILTER') -# SOCIAL_AUTH_KEYCLOAK_PUBLIC_KEY = env('DD_SOCIAL_AUTH_KEYCLOAK_PUBLIC_KEY') -# SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL = env('DD_SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL') -# SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL = env('DD_SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL') - - GITHUB_ENTERPRISE_OAUTH2_ENABLED = env('DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_OAUTH2_ENABLED') SOCIAL_AUTH_GITHUB_ENTERPRISE_URL = env('DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_URL') SOCIAL_AUTH_GITHUB_ENTERPRISE_API_URL = env('DD_SOCIAL_AUTH_GITHUB_ENTERPRISE_API_URL')