From 4044b39ab779322e44c3f4f0406decb593dcf575 Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Wed, 4 Jan 2017 11:17:39 -0200 Subject: [PATCH 1/2] [KEYCLOAK-3517] - Filtering SAML ECP flow --- .../resources/admin/AuthenticationManagementResource.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java b/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java index c2f39f1dd1..69179537f6 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java @@ -37,6 +37,7 @@ import org.keycloak.models.AuthenticatorConfigModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.RequiredActionProviderModel; +import org.keycloak.models.utils.DefaultAuthenticationFlows; import org.keycloak.models.utils.ModelToRepresentation; import org.keycloak.models.utils.RepresentationToModel; import org.keycloak.provider.ProviderConfigProperty; @@ -186,7 +187,8 @@ public class AuthenticationManagementResource { List flows = new LinkedList<>(); for (AuthenticationFlowModel flow : realm.getAuthenticationFlows()) { - if (flow.isTopLevel()) { + // KEYCLOAK-3517, we need a better way to filter non-configurable internal flows + if (flow.isTopLevel() && !flow.getAlias().equals(DefaultAuthenticationFlows.SAML_ECP_FLOW)) { flows.add(ModelToRepresentation.toRepresentation(realm, flow)); } } From ed75ef900a68efcc117bf2ecba11cc06768b2183 Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Wed, 4 Jan 2017 13:06:08 -0200 Subject: [PATCH 2/2] [KEYCLOAK-3517] - Removing SAML ECP from expected flows. ECP already tested in other places. --- .../testsuite/admin/authentication/InitialFlowsTest.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/authentication/InitialFlowsTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/authentication/InitialFlowsTest.java index 0ec5c8c0aa..0481518518 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/authentication/InitialFlowsTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/authentication/InitialFlowsTest.java @@ -196,13 +196,6 @@ public class InitialFlowsTest extends AbstractAuthenticationTest { addExecInfo(execs, "Reset OTP", "reset-otp", false, 0, 3, OPTIONAL, null, new String[]{REQUIRED, OPTIONAL, DISABLED}); expected.add(new FlowExecutions(flow, execs)); - flow = newFlow("saml ecp", "SAML ECP Profile Authentication Flow", "basic-flow", true, true); - addExecExport(flow, null, false, "http-basic-authenticator", false, null, REQUIRED, 10); - - execs = new LinkedList<>(); - addExecInfo(execs, "HTTP Basic Authentication", "http-basic-authenticator", false, 0, 0, REQUIRED, null, new String[]{}); - expected.add(new FlowExecutions(flow, execs)); - return expected; }