I'm securing my HTTP controller endpoint methods using @RolesAllowed
annotations, authenticated by Keycloak. Security is activated by @EnableWebSecurity
and @EnableGlobalMethodSecurity(jsr250Enabled = true)
config annotations on a KeycloakWebSecurityConfigurerAdapter
.
Is there a way to disable method security by profile? All the guides only show how to do it for WebSecurity
or HttpSecurity
ANT matchers.