From 4ee839d5f6977df1d9a227fe134b356859ac2866 Mon Sep 17 00:00:00 2001 From: Radoslaw Orlowski Date: Mon, 17 Aug 2020 14:51:49 +0100 Subject: [PATCH 1/5] SIDM-4641 Disable SSO login button when the feature flag is off. --- src/main/java/uk/gov/hmcts/reform/idam/web/AppController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/uk/gov/hmcts/reform/idam/web/AppController.java b/src/main/java/uk/gov/hmcts/reform/idam/web/AppController.java index 3eb67cac0..acb53413d 100644 --- a/src/main/java/uk/gov/hmcts/reform/idam/web/AppController.java +++ b/src/main/java/uk/gov/hmcts/reform/idam/web/AppController.java @@ -338,6 +338,7 @@ public ModelAndView login(@ModelAttribute("authorizeCommand") @Validated Authori if (request.isAzureLoginEnabled()) { model.addAttribute(AZURE_LOGIN_ENABLED, true); } + model.addAttribute(SSO_ENABLED, configurationProperties.getFeatures().isFederatedSSO()); final boolean validationErrors = bindingResult.hasErrors(); if (validationErrors) { From 094cca5d4d54798bd762ef8ee0579bb73dcf48ac Mon Sep 17 00:00:00 2001 From: Radoslaw Orlowski Date: Mon, 17 Aug 2020 15:26:21 +0100 Subject: [PATCH 2/5] SIDM-4641 Unit test fix. --- src/main/java/uk/gov/hmcts/reform/idam/web/AppController.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/uk/gov/hmcts/reform/idam/web/AppController.java b/src/main/java/uk/gov/hmcts/reform/idam/web/AppController.java index acb53413d..3eb67cac0 100644 --- a/src/main/java/uk/gov/hmcts/reform/idam/web/AppController.java +++ b/src/main/java/uk/gov/hmcts/reform/idam/web/AppController.java @@ -338,7 +338,6 @@ public ModelAndView login(@ModelAttribute("authorizeCommand") @Validated Authori if (request.isAzureLoginEnabled()) { model.addAttribute(AZURE_LOGIN_ENABLED, true); } - model.addAttribute(SSO_ENABLED, configurationProperties.getFeatures().isFederatedSSO()); final boolean validationErrors = bindingResult.hasErrors(); if (validationErrors) { From f1a15e4cbc447e957de0fa25e6a7285becb16144 Mon Sep 17 00:00:00 2001 From: Radoslaw Orlowski Date: Tue, 18 Aug 2020 14:47:47 +0100 Subject: [PATCH 3/5] SIDM-4641 Make the SSO feature flag controlled by an env variable. --- src/main/resources/application.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 891088844..9991ad1ba 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -123,4 +123,4 @@ azure: instrumentation-key: ${APPINSIGHTS_INSTRUMENTATIONKEY:dummy} features: - federated-s-s-o: true \ No newline at end of file + federated-s-s-o: ${sso.feature.flag:false} \ No newline at end of file From c02c9412abd6845de21aaf67e9ffec4435114bbb Mon Sep 17 00:00:00 2001 From: Radoslaw Orlowski Date: Tue, 18 Aug 2020 15:45:35 +0100 Subject: [PATCH 4/5] SIDM-4641 Rename the injected env variable. --- src/main/resources/application.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 9991ad1ba..138e929fc 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -123,4 +123,4 @@ azure: instrumentation-key: ${APPINSIGHTS_INSTRUMENTATIONKEY:dummy} features: - federated-s-s-o: ${sso.feature.flag:false} \ No newline at end of file + federated-s-s-o: ${federated.sso:false} \ No newline at end of file From d57f155fdace4d35fefebdbf427315fa798a63f4 Mon Sep 17 00:00:00 2001 From: Radoslaw Orlowski <59831983+radoslaw-orlowski-amido@users.noreply.github.com> Date: Wed, 19 Aug 2020 08:57:57 +0100 Subject: [PATCH 5/5] Update src/main/resources/application.yaml Co-authored-by: tbamido <50667636+tbamido@users.noreply.github.com> --- src/main/resources/application.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 138e929fc..85be4ef7c 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -123,4 +123,4 @@ azure: instrumentation-key: ${APPINSIGHTS_INSTRUMENTATIONKEY:dummy} features: - federated-s-s-o: ${federated.sso:false} \ No newline at end of file + federated-s-s-o: ${federated.sso:true}