Hello, I am experiencing issues redirecting back properly from a CAS interrupt after adding cas.interrupt.cookie.crypto signing and encryption keys. I've enabled CAS duo and interrupt logs, without any real success in getting more info out of them.
Invalid/Unknown Webflow ConfigurationYou are seeing this error because the authentication flow cannot locate or validate the sequence of requested events and transitions and does not know how to route the flow to the next step. Current flow identifier is login and the current state identifier is duoUniversalPromptPrepareValidate.
The error message is:
No transition was matched on the event(s) signaled by the [1] action(s) that executed in this action state 'duoUniversalPromptPrepareValidate' of flow 'login'; transitions must be defined to handle action result outcomes -- possible flow configuration error? Note: the eventIds signaled were: 'array<String>['restore']', while the supported set of transitional criteria for this action state is 'array<TransitionCriteria>[skip, error, mfa-duo, success]'Please examine the CAS server logs to find the root cause and additional details.
I am currently working with a config java file to try to apply changes that fix this, with no success. I have applied this file via including an import statement in it for src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports.
package org.apereo.cas.config;
import lombok.val;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.web.flow.CasWebflowConfigurer;
import org.apereo.cas.web.flow.CasWebflowExecutionPlanConfigurer;
import org.apereo.cas.web.flow.configurer.AbstractCasWebflowConfigurer;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.webflow.definition.registry.FlowDefinitionRegistry;
import org.springframework.webflow.engine.ActionState;
import org.springframework.webflow.engine.builder.support.FlowBuilderServices;
@AutoConfiguration
@EnableConfigurationProperties(CasConfigurationProperties.class)
/* * Force this to run AFTER the Duo module so we don't get
* overwritten by the default Duo configuration.
*/
@AutoConfigureAfter(name = "org.apereo.cas.adaptors.duo.web.flow.config.DuoSecurityComponentSerializationConfiguration")
public class CasOverlayOverrideConfiguration {
static {
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
System.out.println("!!! JVM HAS LOADED CasOverlayOverrideConfiguration !!!");
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}
@Bean
public CasWebflowConfigurer customDuoWebflowConfigurer(
ConfigurableApplicationContext applicationContext,
CasConfigurationProperties casProperties,
FlowDefinitionRegistry loginFlowDefinitionRegistry,
FlowBuilderServices flowBuilderServices) {
return new InnerDuoWebflowConfigurer(flowBuilderServices, loginFlowDefinitionRegistry,
applicationContext, casProperties);
}
@Bean
public CasWebflowExecutionPlanConfigurer customDuoWebflowExecutionPlanConfigurer(
CasWebflowConfigurer customDuoWebflowConfigurer) {
return plan -> plan.registerWebflowConfigurer(customDuoWebflowConfigurer);
}
@Order(Ordered.LOWEST_PRECEDENCE)
private static class InnerDuoWebflowConfigurer extends AbstractCasWebflowConfigurer {
public InnerDuoWebflowConfigurer(FlowBuilderServices flowBuilderServices,
FlowDefinitionRegistry loginFlowDefinitionRegistry,
ConfigurableApplicationContext applicationContext,
CasConfigurationProperties casProperties) {
super(flowBuilderServices, loginFlowDefinitionRegistry, applicationContext, casProperties);
}
@Override
protected void doInitialize() {
val stateId = "duoUniversalPromptPrepareValidate";
// 1. Check the Main Login Flow
val loginFlow = getLoginFlow();
if (loginFlow != null) {
if (containsFlowState(loginFlow, stateId)) {
System.out.println("!!! CAS 7.3: Found " + stateId + " in LOGIN flow. Injecting 'restore' transition.");
val state = (ActionState) loginFlow.getState(stateId);
createTransitionForState(state, "restore", "viewDuoUniversalPrompt");
} else {
System.out.println("--- CAS 7.3: State " + stateId + " NOT found in LOGIN flow.");
}
}
// 2. Check the MFA-DUO Flow (Usually where the state lives in 7.3)
val duoFlow = getFlow("mfa-duo");
if (duoFlow != null) {
if (containsFlowState(duoFlow, stateId)) {
System.out.println("!!! CAS 7.3: Found " + stateId + " in MFA-DUO flow. Injecting 'restore' transition.");
val state = (ActionState) duoFlow.getState(stateId);
createTransitionForState(state, "restore", "viewDuoUniversalPrompt");
} else {
System.out.println("--- CAS 7.3: State " + stateId + " NOT found in MFA-DUO flow.");
}
}
}
}
}