While upgrading to CAS 7, I am running into issues with the Action we are 
adding to the webflow saying it can no longer find the method:

Here are the errors I am getting:

casuseradmin-1  | 2024-09-20 15:03:15,051 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Finished 
executing 
org.apereo.cas.web.flow.login.InitialAuthenticationRequestValidationAction@7ac00160;
 
result = success>
casuseradmin-1  | 2024-09-20 15:03:15,051 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Finished 
executing [EvaluateAction@45fe3bfc expression = 
initialAuthenticationRequestValidationAction, resultExpression = [null]]; 
result = success>
casuseradmin-1  | 2024-09-20 15:03:15,052 DEBUG 
[org.springframework.webflow.engine.Transition] - <Executing 
[Transition@6080e1b6 on = success, to = ticketGrantingTicketCheck]>
casuseradmin-1  | 2024-09-20 15:03:15,052 DEBUG 
[org.springframework.webflow.engine.Transition] - <Exiting state 
'initialAuthenticationRequestValidationCheck'>
casuseradmin-1  | 2024-09-20 15:03:15,052 DEBUG 
[org.springframework.webflow.engine.ActionState] - <Entering state 
'ticketGrantingTicketCheck' of flow 'login'>
casuseradmin-1  | 2024-09-20 15:03:15,052 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Executing 
[EvaluateAction@3a2eaea6 expression = ticketGrantingTicketCheckAction, 
resultExpression = [null]]>
casuseradmin-1  | 2024-09-20 15:03:15,058 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Executing 
org.apereo.cas.web.flow.login.TicketGrantingTicketCheckAction@68d8359a>
casuseradmin-1  | 2024-09-20 15:03:15,058 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Finished 
executing 
org.apereo.cas.web.flow.login.TicketGrantingTicketCheckAction@68d8359a; 
result = notExists>
casuseradmin-1  | 2024-09-20 15:03:15,058 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Finished 
executing [EvaluateAction@3a2eaea6 expression = 
ticketGrantingTicketCheckAction, resultExpression = [null]]; result = 
notExists>
casuseradmin-1  | 2024-09-20 15:03:15,059 DEBUG 
[org.springframework.webflow.engine.Transition] - <Executing 
[Transition@2a181fdd on = notExists, to = gatewayRequestCheck]>
casuseradmin-1  | 2024-09-20 15:03:15,059 DEBUG 
[org.springframework.webflow.engine.Transition] - <Exiting state 
'ticketGrantingTicketCheck'>
casuseradmin-1  | 2024-09-20 15:03:15,059 DEBUG 
[org.springframework.webflow.engine.DecisionState] - <Entering state 
'gatewayRequestCheck' of flow 'login'>
casuseradmin-1  | 2024-09-20 15:03:15,061 DEBUG 
[org.springframework.webflow.engine.Transition] - <Executing 
[Transition@e1476bb on = *, to = serviceAuthorizationCheck]>
casuseradmin-1  | 2024-09-20 15:03:15,062 DEBUG 
[org.springframework.webflow.engine.Transition] - <Exiting state 
'gatewayRequestCheck'>
casuseradmin-1  | 2024-09-20 15:03:15,062 DEBUG 
[org.springframework.webflow.engine.ActionState] - <Entering state 
'serviceAuthorizationCheck' of flow 'login'>
casuseradmin-1  | 2024-09-20 15:03:15,062 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Executing 
[EvaluateAction@716ea9c3 expression = serviceAuthorizationCheck, 
resultExpression = [null]]>
casuseradmin-1  | 2024-09-20 15:03:15,072 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Executing 
org.apereo.cas.web.flow.ServiceAuthorizationCheckAction@3934d4c0>
casuseradmin-1  | 2024-09-20 15:03:15,073 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Finished 
executing org.apereo.cas.web.flow.ServiceAuthorizationCheckAction@3934d4c0; 
result = success>
casuseradmin-1  | 2024-09-20 15:03:15,073 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Finished 
executing [EvaluateAction@716ea9c3 expression = serviceAuthorizationCheck, 
resultExpression = [null]]; result = success>
casuseradmin-1  | 2024-09-20 15:03:15,073 DEBUG 
[org.springframework.webflow.engine.Transition] - <Executing 
[Transition@470e78d4 on = *, to = initializeLoginForm]>
casuseradmin-1  | 2024-09-20 15:03:15,073 DEBUG 
[org.springframework.webflow.engine.Transition] - <Exiting state 
'serviceAuthorizationCheck'>
casuseradmin-1  | 2024-09-20 15:03:15,073 DEBUG 
[org.springframework.webflow.engine.ActionState] - <Entering state 
'initializeLoginForm' of flow 'login'>
casuseradmin-1  | 2024-09-20 15:03:15,073 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Executing 
[EvaluateAction@514d40e1 expression = initializeLoginAction, 
resultExpression = [null]]>
casuseradmin-1  | 2024-09-20 15:03:15,078 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Executing 
org.apereo.cas.web.flow.login.InitializeLoginAction@7f63fa0a>
casuseradmin-1  | 2024-09-20 15:03:15,079 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Finished 
executing org.apereo.cas.web.flow.login.InitializeLoginAction@7f63fa0a; 
result = success>
casuseradmin-1  | 2024-09-20 15:03:15,079 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Finished 
executing [EvaluateAction@514d40e1 expression = initializeLoginAction, 
resultExpression = [null]]; result = success>
casuseradmin-1  | 2024-09-20 15:03:15,079 DEBUG 
[org.springframework.webflow.engine.Transition] - <Executing 
[Transition@2a2c0e3f on = success, to = afterInitializeLoginForm]>
casuseradmin-1  | 2024-09-20 15:03:15,079 DEBUG 
[org.springframework.webflow.engine.Transition] - <Exiting state 
'initializeLoginForm'>
casuseradmin-1  | 2024-09-20 15:03:15,079 DEBUG 
[org.springframework.webflow.engine.ActionState] - <Entering state 
'afterInitializeLoginForm' of flow 'login'>
casuseradmin-1  | 2024-09-20 15:03:15,079 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Executing 
[SetAction@27e2ca6f name = requestScope.initialized, value = true]>
casuseradmin-1  | 2024-09-20 15:03:15,080 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Finished 
executing [SetAction@27e2ca6f name = requestScope.initialized, value = 
true]; result = success>
casuseradmin-1  | 2024-09-20 15:03:15,080 DEBUG 
[org.springframework.webflow.engine.Transition] - <Executing 
[Transition@3fdf7956 on = success, to = startTempAuthenticate]>
casuseradmin-1  | 2024-09-20 15:03:15,080 DEBUG 
[org.springframework.webflow.engine.Transition] - <Exiting state 
'afterInitializeLoginForm'>
casuseradmin-1  | 2024-09-20 15:03:15,080 DEBUG 
[org.springframework.webflow.engine.ActionState] - <Entering state 
'startTempAuthenticate' of flow 'login'>
casuseradmin-1  | 2024-09-20 15:03:15,081 DEBUG 
[org.springframework.webflow.execution.ActionExecutor] - <Executing 
[EvaluateAction@78ddce4 expression = tempTicketCheck, resultExpression = 
[null]]>
casuseradmin-1  | 2024-09-20 15:03:15,086 DEBUG 
[org.springframework.webflow.engine.impl.FlowExecutionImpl] - <Attempting 
to handle [org.springframework.webflow.execution.ActionExecutionException: 
Exception thrown executing [EvaluateAction@78ddce4 expression = 
tempTicketCheck, resultExpression = [null]] in state 
'startTempAuthenticate' of flow 'login' -- action execution attributes were 
'map[[empty]]'] with root cause 
[org.springframework.expression.spel.SpelEvaluationException: EL1008E: 
Property or field 'tempTicketCheck' cannot be found on object of type 
'org.springframework.webflow.engine.impl.RequestControlContextImpl' - maybe 
not public or not valid?]>
casuseradmin-1  | 2024-09-20 15:03:15,087 DEBUG 
[org.springframework.webflow.engine.impl.FlowExecutionImpl] - <Rethrowing 
unhandled flow execution exception>
casuseradmin-1  | 2024-09-20 15:03:15,088 DEBUG 
[org.apereo.cas.web.FlowExecutionExceptionResolver] - <Ignoring the 
received exception 
[org.springframework.webflow.execution.ActionExecutionException: Exception 
thrown executing [EvaluateAction@78ddce4 expression = tempTicketCheck, 
resultExpression = [null]] in state 'startTempAuthenticate' of flow 'login' 
-- action execution attributes were 'map[[empty]]'] due to a type mismatch 
with handler [[FlowHandlerMapping.DefaultFlowHandler@3d5f2f9f]]>

2024-09-20 15:03:15,092 ERROR 
[org.apereo.cas.web.support.filters.AbstractSecurityFilter] - <Request 
processing failed: 
org.springframework.webflow.execution.ActionExecutionException: Exception 
thrown executing [EvaluateAction@78ddce4 expression = tempTicketCheck, 
resultExpression = [null]] in state 'startTempAuthenticate' of flow 'login' 
-- action execution attributes were 'map[[empty]]'>

2024-09-20 15:03:15,094 ERROR 
[org.springframework.boot.web.servlet.support.ErrorPageFilter] - 
<Forwarding to error page from request [/login] due to exception 
[jakarta.servlet.ServletException: Request processing failed: 
org.springframework.webflow.execution.ActionExecutionException: Exception 
thrown executing [EvaluateAction@78ddce4 expression = tempTicketCheck, 
resultExpression = [null]] in state 'startTempAuthenticate' of flow 'login' 
-- action execution attributes were 'map[[empty]]']>

Here is the method that sets up startTempAuthenticate:

@Bean(name = "tempTicketCheck")
public Action tempTicketCheck() {
return new 
TemporaryTicketNonInteractiveAction(initialAuthenticationAttemptWebflowEventResolver.getIfAvailable(),
serviceTicketRequestWebflowEventResolver.getIfAvailable(),
adaptiveAuthenticationPolicy.getIfAvailable());
}


Here is the doInitialize setting up the webflow:

@Override
protected void doInitialize() {
val flow = getLoginFlow();
if (flow != null) {
val actionState = createActionState(flow, 
CasWebflowConstants.STATE_ID_X509_START,
CasWebflowConstants.ACTION_ID_X509_CHECK);
val transitionSet = actionState.getTransitionSet();

//Adding x509 webflow transition
transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS,
CasWebflowConstants.STATE_ID_CREATE_TICKET_GRANTING_TICKET));
transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_WARN,
CasWebflowConstants.TRANSITION_ID_WARN));
transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_ERROR, 
getStateIdOnX509Failure(flow)));
transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_AUTHENTICATION_FAILURE,
CasWebflowConstants.STATE_ID_HANDLE_AUTHN_FAILURE));
transitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS,
CasWebflowConstants.STATE_ID_SHOW_AUTHN_WARNING_MSGS));

actionState.getExitActionList().add(createEvaluateAction(CasWebflowConstants.ACTION_ID_CLEAR_WEBFLOW_CREDENTIALS));

//Adding Temp ticket webflow transition

val tempTicketActionState = createActionState(flow, 
EVENT_ID_START_TEMP_TICKET, createEvaluateAction("tempTicketCheck"));
val tempTicketTransitionSet = tempTicketActionState.getTransitionSet();

tempTicketTransitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS,
 
CasWebflowConstants.STATE_ID_CREATE_TICKET_GRANTING_TICKET));
tempTicketTransitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_WARN,
 
CasWebflowConstants.TRANSITION_ID_WARN));
tempTicketTransitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_AUTHENTICATION_FAILURE,
CasWebflowConstants.STATE_ID_HANDLE_AUTHN_FAILURE));
tempTicketTransitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_ERROR,
 
getStateIdOnX509Failure(flow)));
tempTicketTransitionSet.add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS,
CasWebflowConstants.STATE_ID_SHOW_AUTHN_WARNING_MSGS));

tempTicketActionState.getExitActionList().add(createEvaluateAction(CasWebflowConstants.ACTION_ID_CLEAR_WEBFLOW_CREDENTIALS));

//Injecting the temp ticket webflow before the x509 webflow and to 
transition to x509 when a temp ticket doesn't exist
val state = getState(flow, 
CasWebflowConstants.STATE_ID_AFTER_INIT_LOGIN_FORM, ActionState.class);
createTransitionForState(state, CasWebflowConstants.TRANSITION_ID_SUCCESS, 
EVENT_ID_START_TEMP_TICKET, true);

val initState = getState(flow, EVENT_ID_START_TEMP_TICKET, ActionState.class
);
createTransitionForState(initState, CasWebflowConstants.TRANSITION_ID_ERROR,
CasWebflowConstants.STATE_ID_X509_START, true);
}
}

-- 
- Website: https://apereo.github.io/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/7ad6dcc8-84a3-42df-baca-555cafb4055bn%40apereo.org.

Reply via email to