Merge pull request #3711 from pedroigor/KEYCLOAK-3517
[KEYCLOAK-3517] - Filtering SAML ECP flow
This commit is contained in:
commit
a2a531a747
2 changed files with 3 additions and 8 deletions
|
@ -37,6 +37,7 @@ import org.keycloak.models.AuthenticatorConfigModel;
|
||||||
import org.keycloak.models.KeycloakSession;
|
import org.keycloak.models.KeycloakSession;
|
||||||
import org.keycloak.models.RealmModel;
|
import org.keycloak.models.RealmModel;
|
||||||
import org.keycloak.models.RequiredActionProviderModel;
|
import org.keycloak.models.RequiredActionProviderModel;
|
||||||
|
import org.keycloak.models.utils.DefaultAuthenticationFlows;
|
||||||
import org.keycloak.models.utils.ModelToRepresentation;
|
import org.keycloak.models.utils.ModelToRepresentation;
|
||||||
import org.keycloak.models.utils.RepresentationToModel;
|
import org.keycloak.models.utils.RepresentationToModel;
|
||||||
import org.keycloak.provider.ProviderConfigProperty;
|
import org.keycloak.provider.ProviderConfigProperty;
|
||||||
|
@ -186,7 +187,8 @@ public class AuthenticationManagementResource {
|
||||||
|
|
||||||
List<AuthenticationFlowRepresentation> flows = new LinkedList<>();
|
List<AuthenticationFlowRepresentation> flows = new LinkedList<>();
|
||||||
for (AuthenticationFlowModel flow : realm.getAuthenticationFlows()) {
|
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));
|
flows.add(ModelToRepresentation.toRepresentation(realm, flow));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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});
|
addExecInfo(execs, "Reset OTP", "reset-otp", false, 0, 3, OPTIONAL, null, new String[]{REQUIRED, OPTIONAL, DISABLED});
|
||||||
expected.add(new FlowExecutions(flow, execs));
|
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;
|
return expected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue