Skip to content

Commit

Permalink
Testing Glob patterns in incoming permissions configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
druminski committed Jul 26, 2024
1 parent 4864cfd commit 927c373
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class IncomingPermissionsPathMatchingTest {
- /api/**/description
- /*/login
- /**/health
- /file/*.js
- /file/*.html
clients: ["echo2"]
- path: "/path"
clients: ["echo2"]
Expand Down Expand Up @@ -172,6 +174,12 @@ class IncomingPermissionsPathMatchingTest {
echo2Envoy.egressOperations.callService(service = "echo", pathAndQuery = "/api/login").also {
assertThat(it).isOk()
}
echo2Envoy.egressOperations.callService(service = "echo", pathAndQuery = "/file/spa.js").also {
assertThat(it).isOk()
}
echo2Envoy.egressOperations.callService(service = "echo", pathAndQuery = "/file/index.html").also {
assertThat(it).isOk()
}
echo2Envoy.egressOperations.callService(service = "echo", pathAndQuery = "/api/products/too/many/reviews").also {
assertThat(it).isForbidden()
}
Expand All @@ -181,5 +189,8 @@ class IncomingPermissionsPathMatchingTest {
echo2Envoy.egressOperations.callService(service = "echo", pathAndQuery = "/status/health/login").also {
assertThat(it).isForbidden()
}
echo2Envoy.egressOperations.callService(service = "echo", pathAndQuery = "/file/index.php").also {
assertThat(it).isForbidden()
}
}
}

0 comments on commit 927c373

Please sign in to comment.