diff --git a/README.md b/README.md index 5a20ffc22..cbc0767d5 100755 --- a/README.md +++ b/README.md @@ -114,7 +114,6 @@ The metrics endpoint of the opensrp server is `/opensrp/metrics`. It returns inf The endpoint is only accessible through the following ips when unauthenticated but requires authentication for the any other ips: * `127.0.0.1`, -* `InetAddress.getLocalHost().getHostAddress()`, * One additional configurable ip, kindly check below `metrics.additional_ip_allowed` Sample responses from the metrics endpoint are as follows: diff --git a/pom.xml b/pom.xml index ff78d0b30..45a2fff0f 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ opensrp-server-web war - 3.0.13-SNAPSHOT + 3.0.14-SNAPSHOT opensrp-server-web OpenSRP Server Web Application https://github.com/OpenSRP/opensrp-server-web @@ -25,8 +25,8 @@ 5.2.2.RELEASE always 1.5.1 - 3.0.9-SNAPSHOT - 2.3.2-SNAPSHOT + 3.0.10-SNAPSHOT + 2.3.3-SNAPSHOT 2.0.1-SNAPSHOT 2.0.3-SNAPSHOT 2.0.5 @@ -385,7 +385,7 @@ io.sentry sentry-log4j2 - 4.3.0 + 5.5.0 @@ -412,17 +412,17 @@ org.apache.logging.log4j log4j-slf4j-impl - 2.15.0 + 2.16.0 org.apache.logging.log4j log4j-jcl - 2.15.0 + 2.16.0 io.micrometer micrometer-registry-prometheus - 1.7.5 + 1.8.1 diff --git a/src/main/java/org/opensrp/web/config/security/SecurityConfig.java b/src/main/java/org/opensrp/web/config/security/SecurityConfig.java index 56d54736a..e4bb1aa4a 100644 --- a/src/main/java/org/opensrp/web/config/security/SecurityConfig.java +++ b/src/main/java/org/opensrp/web/config/security/SecurityConfig.java @@ -103,7 +103,6 @@ protected void configure(HttpSecurity http) throws Exception { .access(metricsPermitAll ? "permitAll()" : " ( isAuthenticated()" + " or hasIpAddress('127.0.0.1') " - + " or hasIpAddress('"+ InetAddress.getLocalHost().getHostAddress() +"') " + (StringUtils.isBlank(metricsAdditionalIpAllowed) ? "" : String.format(" or hasIpAddress('%s')",metricsAdditionalIpAllowed)) + ")") .mvcMatchers("/").permitAll() .mvcMatchers("/logout.do").permitAll()