Enabling OIDC in cas 6.6.2

105 views
Skip to first unread message

Vikash Chandra Ansh

unread,
Jan 18, 2023, 3:24:06 AM1/18/23
to CAS Community
Hi All,.

I am enabling OIDC in cas 6.6.2 and getting below error


at org.springframework.boot.web.servlet.support. SpringBootServletInitializer.run(SpringBootServletInitializer.java:175) at org.springframework.boot.web.servlet.support. SpringlootServletInitializer.createRootApplicationContext (SpringflootServletInitializer.java:155) at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup (SpringBootServletInitializer.java:97)


at org.apereo.cas.util.spring.boot.AbstractCasSpringBootServletInitializer.onStartup (AbstractCasSpringBootServletInitializer.java:33).



at org.springframework.web. SpringServletContainerInitializer.onStartup (SpringServletContainerInitializer.java:174

at org.apache.catalina.core.StandardContext.startInternal (StandardContext.java:5220)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

38 more 

Caused by: java.lang.IllegalStateException: Invalid mapping on handler class

[org.apereo.can.oidc.web.controllers.discovery.OidcWellknownEndpointController]: public org.springframework.http.ResponseEntity org.apereo.cas.oidc.web.controllers.discovery.OidcWell KnownEndpointController.getWellknownOpenIdDiscoveryConfiguration (javax.servlet.http.HttpServletReq

uest, javax.servlet.http.HttpServletResponse),

at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.lambda@detectHandlerMethods$1 (AbstractHandlerMethodMapping.java:265)

at org.springframework.core.MethodIntrospector.lambda$selectMethods50 (MethodIntrospector.java:74)



at org.springframework.util.ReflectionUtils.doWithMethods (ReflectionUtils.java:367) at org.springframework.core.MethodIntrospector.selectMethods (MethodIntrospector.java:72)

at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.detectHandlerMethods (AbstractHandlerMethodMapping.java:281) at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.processCandidateBean(AbstractHandlerMethodMapping.java:266)


at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.in com.Imax.disruptor.BatchEventProcessor.processEvents (BatchEventProcessor.java:168) at com.imax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:125) at


297 itHandlerMethods (AbstractHandlerMethodMapping.java:225)


at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping-afterPropertiesSet (AbstractHandlerMethodMapping.java:213) at org.springframework.web.servlet.mvc.method.annotation.RequestHappingHandlerMapping.afterPropertiesSet (RequestMappingHandlerMapping.java:205) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInit.Methods (AbstractAutowireCapableBeanFactory.java:1863) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializebean (AbstractAutowireCapableBeanFactory.java:1800)

58 more Caused by: org.springframework.web.util.pattern. PatternParseException: No more pattern data allowed after  (*...) or ** pattern element


at org.springframework.web.util.pattern.InternalPathPatternParser.peekDoubleWildcard (InternalPathPatternParser.java:250)

at org.springframework.web.util.pattern.InternalPathPatternParser.parse (InternalPathPatternParser.java:113) at org.springframework.web.util.pattern.PathPatternParser.parse (PathPatternParser.java:110)

at org.springframework.web.servlet.mvc.condition.PathPatternsRequestCondition.parse(PathPatternaRequest Condition.java:82) at org.springframework.web.servlet.mvc.condition.PathPatternsRequestCondition.<init>(PathPatternsRequestCondition.java:70) at org.springframework.web.servlet.mvc.method.RequestMappingInfo DefaultBuilder.build(RequestHappingInfo.java:712)

at org.springframework.web.servlet.mvc.method.annotation.RequestHappingHandlerMapping.createRequestMappingInfo (RequestHappingHandlerMapping.java:37

I have added a property as 

Cas.authn.oidc.core.issuer=https://localhost:6443/cas/oidc

I am making cas as OIDC server

Thanks and regards 








Ray Bon

unread,
Jan 18, 2023, 12:39:56 PM1/18/23
to cas-...@apereo.org
Vikash,

Is your property Cas.authn.oidc.core.issuer, or is the 'C' a typo?
It should be cas.authn.oidc.core.issuer.

If the property key is correct, it may be that cas is testing the issuer url and failing because of the self signed certificate on localhost.
Have you added the certificate to the jvm?

Ray

On Wed, 2023-01-18 at 13:53 +0530, Vikash Chandra Ansh wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.

Vikash Chandra Ansh

unread,
Jan 18, 2023, 1:21:16 PM1/18/23
to CAS Community
Hey Ray,

Yes property is correct and i have added the certificate in JVM..It is a self signed certificate for localhost

Thanks and Regards
Vikash Chandra 

--
- 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/4804b6bbc42585506917886955a965d9e69055d1.camel%40uvic.ca.

Vikash Chandra Ansh

unread,
Jan 20, 2023, 6:15:00 AM1/20/23
to CAS Community
Hi Misagh/every one

Could.you please help here?

I tried to use a spring property as
spring.mvc.pathmatch.matching-strategy=ant-path-matcher

Which caused issue in other packages but not in oidc module

Is there any extra property or configuration needs to be added?

Vikash Chandra Ansh

unread,
Feb 24, 2023, 2:19:29 AM2/24/23
to CAS Community
Hi All, 

Please help here...this is working as expected in 6.5.2 but not in 6.6.2

Thanks & Regards
Vikash Chandra 

Christian Sommer

unread,
Mar 3, 2023, 9:40:59 AM3/3/23
to CAS Community, Vikash Chandra Ansh
Hi Vikash,

have you tried to add theproperty "cas.authn.oidc.core.accepted-issuers-pattern=.+" in addition?
Reply all
Reply to author
Forward
0 new messages