Hi all,
Just posted this in StackOverflow but then saw there was a discord server also - so I’m posting here also if that’s OK? (Please remove if not)
I’m trying to get Azure SSO working with a Vaadin app. I have been reading the docs but I’m still doing something wrong as I’m getting the Access Denied page with the message.
Could not navigate to ''
Reason: Access is denied by annotations on the view.
Available routes:
... All my pages are the same.
I have configured my application.properties with the relevant data:
with this configuration you are telling Spring Security that all resources are public, so it will not redirect to the identiy provider
But then you have @PermitAll on your views, that in Vaadin means access is granted only to authenticated users
The reason I went down the SecurityConfig route is that without that class I’m getting Server returned 403 for xhr due to using SpringBoot and Vaadin so I though the security config was the piece I was missing.
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'VaadinSecurityFilterChainBean' defined in class path resource [com/merative/logicnua/security/SecurityConfig.class]: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'filterChain' threw exception with message: Can't configure requestMatchers after anyRequest
If I remove .oauth2Login(Customizer.withDefaults()); from the above code I get the same also
I also tried moving the super.configure(http) as the first line and that gives
Factory method 'filterChain' threw exception with message: Can't configure anyRequest after itself
And the google code linked does not really help with as I the method used http.oauth2Login() is deprecate and If I use it with a defaultCustonizer I get to any page with no login request