'Basic auth HTTPbasic not working (unsecure) with ssl (HTTPS) spring boot ; if i remove httpBasic from configure it validates certificate (secure)
#Security config method
@Override
protected void configure(HttpSecurity http) throws Exception {
http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
http.httpBasic()
.and()
.authorizeRequests()
.antMatchers("/whitelist/**").permitAll()
.anyRequest().authenticated();
http.csrf().disable();
}
#application properties config server.ssl.enabled=true server.ssl.key-store=keystore.p12 server.ssl.key-store-password=password server.ssl.keyStoreType=PKCS12
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
