Search code examples
javathymeleafopenid-connectmitreid-connect

How to overcome thymeleaf template approve error?


Following on from this question, I am using the Spring Boot MitreID OIDC application from here. This runs OK

I am trying to access it using simple-web-app. Simple-web-app now can see the OIDC app. It still asks for user/pwd even though I am logged in in the OIDC app. When I enter these I now get the following error. I can't find any help. Anyone have any idea?

2018-12-19 14:15:44.641  INFO 7632 --- [nio-8080-exec-1] 
o.m.o.c.web.AuthenticationTimeStamper    : 
Successful Authentication of admin at Wed Dec 19 14:15:44 GMT 2018


2018-12-19 14:15:45.110 ERROR 7632 --- [nio-8080-exec-2] org.thymeleaf.TemplateEngine  
   : [THYMELEAF][http-nio-8080-exec-2] Exception processing template "approve": Exception 
evaluating SpringEL expression: " scope.structured " (approve:146)


2018-12-19 14:15:45.117 ERROR 7632 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[/].
[dispatcherServlet]    : Servlet.service() for servlet dispatcherServlet threw exception    
org.springframework.expression.spel.SpelEvaluationException: EL1008E:
 Property or field 'structured' cannot be found on object of type 
'org.mitre.oauth2.model.SystemScope' - maybe not public?

Solution

  • I think you have an incompatibility between the latest mitreid sample app (which is bleeding edge as far as mitreid goes) and the spring boot fork of mitreid server from 2 years ago. E.g. the model for SystemScope changed here on the main mitreid project https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server/commit/b17a7f43ae9a94592132a0336248631fe5914508

    You'll probably hit a number of these as the spring-boot fork is not being kept up-to-date