diff --git a/changelog.html b/changelog.html
index 643009f62..b11c19465 100644
--- a/changelog.html
+++ b/changelog.html
@@ -44,6 +44,11 @@
REST API Plugin Changelog
+1.8.1 ???
+
+ - [#96] - Don't require auth for readiness/liveness endpoints
+
+
1.8.0 April 6, 2022
- [#76] - Add a clustering status endpoint
diff --git a/src/java/org/jivesoftware/openfire/plugin/rest/AuthFilter.java b/src/java/org/jivesoftware/openfire/plugin/rest/AuthFilter.java
index 60b66ea8e..ce447d5c4 100644
--- a/src/java/org/jivesoftware/openfire/plugin/rest/AuthFilter.java
+++ b/src/java/org/jivesoftware/openfire/plugin/rest/AuthFilter.java
@@ -62,6 +62,11 @@ public void filter(ContainerRequestContext containerRequest) throws IOException
return;
}
+ if (isStatusEndpoint(containerRequest.getUriInfo().getRequestUri().getPath())) {
+ LOG.debug("Authentication was bypassed for a status endpoint");
+ return;
+ }
+
if (!plugin.isEnabled()) {
LOG.debug("REST API Plugin is not enabled");
throw new WebApplicationException(Status.FORBIDDEN);
@@ -140,4 +145,11 @@ public void filter(ContainerRequestContext containerRequest) throws IOException
}
}
}
+
+ private boolean isStatusEndpoint(String path){
+ return path.equals("/plugins/restapi/v1/system/liveness") ||
+ path.startsWith("/plugins/restapi/v1/system/liveness/") ||
+ path.equals("/plugins/restapi/v1/system/readiness") ||
+ path.startsWith("/plugins/restapi/v1/system/readiness/");
+ }
}