Skip to content

Commit ed2e380

Browse files
Always allow requests to /v1/keeper/system/health and /v1/keeper/system/ready in MachineAuthFilter.
1 parent 27cdc18 commit ed2e380

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/kotlin/org/exploit/keeper/filter/MachineAuthFilter.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ class MachineAuthFilter(
1818
private val config: KeeperConfig,
1919
private val authenticator: RequestAuthenticator
2020
): ContainerRequestFilter {
21+
private val publicPaths = listOf(
22+
"/v1/keeper/system/health",
23+
"/v1/keeper/system/ready"
24+
)
25+
2126
private val matchers = listOf(
2227
AntPathMatcher.of("/v1/keeper/sign/**"),
2328
AntPathMatcher.of("/v1/keeper/publicKey/**"),
@@ -28,6 +33,9 @@ class MachineAuthFilter(
2833
override fun filter(ctx: ContainerRequestContext) {
2934
val path = ctx.uriInfo.requestUri.getPath()
3035

36+
if (path in publicPaths)
37+
return
38+
3139
if (matchers.none { it.matches(path) })
3240
return
3341

0 commit comments

Comments
 (0)