Re-order security auto configuration so the fallback can be applied
The management security autoconfiguration wanted to come last in the chain but that won't suit the fallback that was already in place for gh-568. This change re-orders the autoconfig so that @EnableWebSecurity is still added if the user sets security.basic.enabled=false and includes the actuator endpoints. Fixes gh-568
This commit is contained in:
@@ -19,6 +19,7 @@ package org.springframework.boot.actuate.autoconfigure;
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.security.FallbackWebSecurityAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration;
|
||||
import org.springframework.boot.test.EnvironmentTestUtils;
|
||||
@@ -133,6 +134,7 @@ public class ManagementSecurityAutoConfigurationTests {
|
||||
ManagementServerPropertiesAutoConfiguration.class,
|
||||
SecurityAutoConfiguration.class,
|
||||
ManagementSecurityAutoConfiguration.class,
|
||||
FallbackWebSecurityAutoConfiguration.class,
|
||||
PropertyPlaceholderAutoConfiguration.class);
|
||||
EnvironmentTestUtils.addEnvironment(this.context, "security.basic.enabled:false");
|
||||
this.context.refresh();
|
||||
|
||||
Reference in New Issue
Block a user