Skip to content

Commit

Permalink
Rename SecuritySecureConfig to AppSecurityConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
miguno committed Sep 15, 2024
1 parent 1ea0d31 commit 84d82f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class WelcomeController {
*/
@GetMapping("/welcome")
public Welcome welcome(@RequestParam(value = "name", defaultValue = "World") String name) {
// Note: If you make changes to the URL path, remember to update AppSecurityConfiguration.
return new Welcome(String.format(template, name));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/** Secures the endpoints of this application. */
@Configuration(proxyBeanMethods = false)
@EnableWebSecurity
public class SecuritySecureConfig {
public class AppSecurityConfiguration {

private final AdminServerProperties adminServer;

Expand All @@ -47,7 +47,7 @@ public class SecuritySecureConfig {
private String roleAdminPassword;

@SuppressFBWarnings("EI_EXPOSE_REP2")
public SecuritySecureConfig(AdminServerProperties adminServer, SecurityProperties security) {
public AppSecurityConfiguration(AdminServerProperties adminServer, SecurityProperties security) {
this.adminServer = adminServer;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ server.port=8123
# Spring Actuator configuration
# https://docs.spring.io/spring-boot/reference/actuator/endpoints.html
#
# Expose all endpoints by default via `*`. However, `SecuritySecureConfig` only
# permits public access to a subset of endpoints, whereas the rest requires
# Expose all endpoints by default via `*`. However, `AppSecurityConfiguration`
# only permits public access to a subset of endpoints, whereas the rest requires
# HTTP Basic Authentication.
#
# IMPORTANT: In production, you should choose carefully what endpoints to expose!
Expand Down

0 comments on commit 84d82f7

Please sign in to comment.