Make /health and /info insecure by default

Closes gh-13722
This commit is contained in:
Madhura Bhave
2018-07-12 16:54:43 -07:00
parent 42bba4e1c5
commit d1b8558430
8 changed files with 547 additions and 9 deletions

View File

@@ -47,8 +47,20 @@ public class SampleSecureWebFluxApplicationTests {
}
@Test
public void actuatorsSecureByDefault() {
public void healthInsecureByDefault() {
this.webClient.get().uri("/actuator/health").accept(MediaType.APPLICATION_JSON)
.exchange().expectStatus().isOk();
}
@Test
public void infoInsecureByDefault() {
this.webClient.get().uri("/actuator/info").accept(MediaType.APPLICATION_JSON)
.exchange().expectStatus().isOk();
}
@Test
public void otherActuatorsSecureByDefault() {
this.webClient.get().uri("/actuator/env").accept(MediaType.APPLICATION_JSON)
.exchange().expectStatus().isUnauthorized();
}