cas 6.1 with u2f

46 views
Skip to first unread message

John Bond

unread,
Nov 15, 2019, 4:50:07 AM11/15/19
to CAS Community
Hi All,

I have recently tested the 6.1 branch by using the cas-overlay-template from apereo.  however when i try to add u2f support i get the following error

2019-11-15 10:47:32,512 WARN [org.apereo.cas.web.CasWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name 'authenticationTransactionManager' defined in class path resource [org/apereo/cas/config/CasCoreAuthenticationConfiguration.class]:
  Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
  Failed to instantiate [org.apereo.cas.authentication.AuthenticationTransactionManager]:
  Factory method 'authenticationTransactionManager' threw exception;
  nested exception is org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name 'casAuthenticationManager' defined in class path resource [org/apereo/cas/config/CasCoreAuthenticationConfiguration.class]:
  Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
  Failed to instantiate [org.apereo.cas.authentication.AuthenticationManager]:
  Factory method 'casAuthenticationManager' threw exception;
  nested exception is org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name 'authenticationEventExecutionPlan' defined in class path resource [org/apereo/cas/config/CasCoreAuthenticationConfiguration.class]:
  Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
  Failed to instantiate [org.apereo.cas.authentication.AuthenticationEventExecutionPlan]:
  Factory method 'authenticationEventExecutionPlan' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name 'scopedTarget.u2fAuthenticationHandler' defined in class path resource [org/apereo/cas/config/support/authentication/U2FAuthenticationEventExecutionPlanConfiguration.class]:
  Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
  Failed to instantiate [org.apereo.cas.authentication.AuthenticationHandler]:
  Factory method 'u2fAuthenticationHandler' threw exception;
  nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
  Error creating bean with name 'u2fConfiguration': Unsatisfied dependency expressed through method 'u2fDeviceRepositoryCleanerScheduler' parameter 0;
  nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException:
  Error creating bean with name 'u2fDeviceRepository':
  Requested bean is currently in creation: Is there an unresolvable circular reference?>  


Thanks

Andy Ng

unread,
Nov 15, 2019, 8:57:32 AM11/15/19
to CAS Community
Hi John,

Not familiar with uf2 at all, but I am trying this out in my simulation and I also encountered your bug as well.

Something like this:
Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'u2fDeviceRepository': Requested bean is currently in creation: Is there an unresolvable circular reference?

I found that the bug will be gone if you add cas-server-support-u2f-jpa as well:

compile "org.apereo.cas:cas-server-support-u2f:${project.'cas.version'}"
compile "org.apereo.cas:cas-server-support-u2f-jpa:${project.'cas.version'}"

The error seems gone after I apply the above.

Again I am not familiar with u2f, so other might be able to help pick up from here if the above info is not helping you fix this bug....

Cheers!
- Andy



John Bond

unread,
Nov 15, 2019, 9:27:58 AM11/15/19
to cas-...@apereo.org
Hi Andy,

Thanks for the response and additional testing.  It looks like the error is specific to 'u2fDeviceRepositoryCleanerScheduler' which I think only applies when using "FIDO U2F JSON".  by adding the `cas-server-support-u2f-jp` dependency im guessing that u2fDeviceRepositoryCleanerScheduler gets disabled.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to a topic in the Google Groups "CAS Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/apereo.org/d/topic/cas-user/cNimp-h4r2w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/0b45cc66-1160-48aa-9320-b4fabc54ae75%40apereo.org.

Andy Ng

unread,
Nov 15, 2019, 9:36:18 AM11/15/19
to CAS Community
I see, so does that fix your problem? or you must need to use JSON? /Andy

John Bond

unread,
Nov 15, 2019, 9:53:09 AM11/15/19
to cas-...@apereo.org
Hi Andy,

For the time being i need to use json, i can investigate using a different storage backend and probably will when i need to start scaling the application.  however for now im happy to hold of the upgrade as this is currently working for cas 6.0.  i assumed its either a bug or something stupid i have missed

On Fri, Nov 15, 2019 at 3:36 PM Andy Ng <lon...@gmail.com> wrote:
I see, so does that fix your problem? or you must need to use JSON? /Andy

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to a topic in the Google Groups "CAS Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/apereo.org/d/topic/cas-user/cNimp-h4r2w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cas-user+u...@apereo.org.

Philippe MARASSE

unread,
Apr 9, 2020, 12:15:06 PM4/9/20
to cas-...@apereo.org
Hello,

this u2f-jpa hack solved an issue I've encoutered with CAS v6.1.5 (also with 6.1.6-SNAP) + U2F (with JSON backend for testing). The raised exception was different :

2020-04-09 17:39:49,592 DEBUG [org.apereo.cas.web.FlowExecutionExceptionResolver] - <Ignoring the received exception [org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchFieldError: ACCEPT_CASE_INSENSITIVE_VALUES] due to a type mismatch with handler [[FlowHandlerMapping.DefaultFlowHandler@662a66b]]>
2020-04-09 17:39:49,595 DEBUG [org.apereo.cas.web.FlowExecutionExceptionResolver] - <Ignoring the received exception [org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchFieldError: ACCEPT_CASE_INSENSITIVE_VALUES] due to a type mismatch with handler [[FlowHandlerMapping.DefaultFlowHandler@662a66b]]>
2020-04-09 17:39:49,600 ERROR [org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/cas].[dispatcherServlet]] - <Servlet.service() for servlet [dispatcherServlet] in context with path [/cas] threw exception [Handler dispatch failed; nested exception is java.lang.NoSuchFieldError: ACCEPT_CASE_INSENSITIVE_VALUES] with root cause>
java.lang.NoSuchFieldError: ACCEPT_CASE_INSENSITIVE_VALUES
        at com.fasterxml.jackson.datatype.jsr310.deser.JSR310DateTimeDeserializerBase.acceptCaseInsensitiveValues(JSR310DateTimeDeserializerBase.java:126) ~[jackson-datatype-jsr310-2.10.0.jar!/:2.10.0]
...

But has gone since I've added the JPA backend.

Thank you.
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/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+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/0b45cc66-1160-48aa-9320-b4fabc54ae75%40apereo.org.


-- 
Philippe MARASSE

Responsable pôle Infrastructures - DSIO
Centre Hospitalier Henri Laborit
CS 10587 - 370 avenue Jacques Cœur 
86021 Poitiers Cedex
Tel : 05.49.44.57.19
Reply all
Reply to author
Forward
0 new messages