ManagementServerConfiguration security

Management endpoints are still secure by default if
Spring Security is present, but now the default
user details have an ADMIN role, and a random password
(which is logged at INFO level if not overridden).

To override you add management.user.password (name, role)
to external properties.

[Fixes #53029715] [bs-203]
This commit is contained in:
Dave Syer
2013-08-22 10:34:40 +01:00
committed by Phillip Webb
parent c582fa2067
commit 621116c9b8
9 changed files with 119 additions and 30 deletions

View File

@@ -29,7 +29,6 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration;
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
import org.springframework.boot.sample.tomcat.SampleTomcatApplication;
import org.springframework.boot.sample.tomcat.service.HelloWorldService;
import org.springframework.boot.sample.tomcat.web.SampleController;
import org.springframework.context.ConfigurableApplicationContext;
@@ -76,7 +75,7 @@ public class NonAutoConfigurationSampleTomcatApplicationTests {
.run(NonAutoConfigurationSampleTomcatApplication.class);
}
});
context = future.get(10, TimeUnit.SECONDS);
context = future.get(60, TimeUnit.SECONDS);
}
@AfterClass

View File

@@ -26,7 +26,6 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.sample.tomcat.SampleTomcatApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -56,7 +55,7 @@ public class SampleTomcatApplicationTests {
.run(SampleTomcatApplication.class);
}
});
context = future.get(10, TimeUnit.SECONDS);
context = future.get(60, TimeUnit.SECONDS);
}
@AfterClass