I'm not really a Java developer, but a project for a client has required me to be, so maybe I'm missing something glaringly obvious.
I'm using SpringBoot and everything works fine when the application runs in Tomcat on my local machine and on our testing server. However, as soon as the application is deployed to Weblogic it's as if there is no security at all with all routes accessible. Login and logout routes are non-existent as well.
That being said. Everything else appears to work fine, just without any security at all.
I don't have access to Weblogic as the client is the one deploying the code but they have told us that it's running on 12c. What can I do to fix or troubleshoot this?
Here's the relevant config from my Application.java:
/**
* The type Authentication security.
*/
@Order(Ordered.HIGHEST_PRECEDENCE)
@Configuration
protected static class AuthenticationSecurity extends GlobalAuthenticationConfigurerAdapter {
/**
* The Users.
*/
@Autowired
private Users users;
/**
* Init void.
*
* @param auth the auth
* @throws Exception the exception
*/
@Override
public void init(AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(users).passwordEncoder(new BCryptPasswordEncoder());
}
}
/**
* The type Application security.
*/
@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)
protected static class ApplicationSecurity extends WebSecurityConfigurerAdapter {
/**
* Configure void.
*
* @param http the http
* @throws Exception the exception
*/
@Override
protected void configure(HttpSecurity http) throws Exception {
// @formatter:off
http.authorizeRequests()
.antMatchers("/vendor/*","/public/**/*","/partners/*","/events/*", "/login").permitAll()
.anyRequest().fullyAuthenticated().and().formLogin().loginPage("/login")
.and().logout()
.logoutRequestMatcher(new AntPathRequestMatcher("/logout")).and()
.exceptionHandling().accessDeniedPage("/access?error");
// @formatter:on
}
}
Thanks in advance.