Skip to content

Commit

Permalink
grpc-1.40.0: added missing assertions for fuzz id
Browse files Browse the repository at this point in the history
  • Loading branch information
monu-k2io committed Jun 12, 2023
1 parent 8d9bc34 commit 01c2ba5
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ else if (op instanceof RXSSOperation) {
Assert.assertTrue(String.format("Missing K2 header: %s", ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER), operation.getRequest().getHeaders().containsKey(ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER.toLowerCase()));
Assert.assertEquals(String.format("Invalid K2 header value for: %s", ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER), headerValue+";DUMMY_UUID/dummy-api-id/dummy-exec-id", operation.getRequest().getHeaders().get(
ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER.toLowerCase()));
Assert.assertTrue(String.format("Missing K2 header: %s", ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID), operation.getRequest().getHeaders().containsKey(ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID.toLowerCase()));
Assert.assertEquals(String.format("Invalid K2 header value for: %s", ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID), headerValue, operation.getRequest().getHeaders().get(
ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID.toLowerCase()));
}
}
String request = new ObjectMapper().writeValueAsString(introspector.getGRPCRequest());
Expand Down Expand Up @@ -133,6 +136,9 @@ else if (op instanceof RXSSOperation) {
Assert.assertTrue(String.format("Missing K2 header: %s", ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER), operation.getRequest().getHeaders().containsKey(ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER.toLowerCase()));
Assert.assertEquals(String.format("Invalid K2 header value for: %s", ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER), headerValue+";DUMMY_UUID/dummy-api-id/dummy-exec-id", operation.getRequest().getHeaders().get(
ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER.toLowerCase()));
Assert.assertTrue(String.format("Missing K2 header: %s", ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID), operation.getRequest().getHeaders().containsKey(ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID.toLowerCase()));
Assert.assertEquals(String.format("Invalid K2 header value for: %s", ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID), headerValue, operation.getRequest().getHeaders().get(
ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID.toLowerCase()));
}
}
String request = new ObjectMapper().writeValueAsString(introspector.getGRPCRequest());
Expand Down Expand Up @@ -179,6 +185,9 @@ else if (op instanceof RXSSOperation) {
Assert.assertTrue(String.format("Missing K2 header: %s", ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER), operation.getRequest().getHeaders().containsKey(ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER.toLowerCase()));
Assert.assertEquals(String.format("Invalid K2 header value for: %s", ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER), headerValue+";DUMMY_UUID/dummy-api-id/dummy-exec-id", operation.getRequest().getHeaders().get(
ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER.toLowerCase()));
Assert.assertTrue(String.format("Missing K2 header: %s", ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID), operation.getRequest().getHeaders().containsKey(ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID.toLowerCase()));
Assert.assertEquals(String.format("Invalid K2 header value for: %s", ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID), headerValue, operation.getRequest().getHeaders().get(
ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID.toLowerCase()));
}
}
String request = new ObjectMapper().writeValueAsString(introspector.getGRPCRequest());
Expand Down Expand Up @@ -225,6 +234,9 @@ else if (op instanceof RXSSOperation) {
Assert.assertTrue(String.format("Missing K2 header: %s", ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER), operation.getRequest().getHeaders().containsKey(ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER.toLowerCase()));
Assert.assertEquals(String.format("Invalid K2 header value for: %s", ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER), headerValue+";DUMMY_UUID/dummy-api-id/dummy-exec-id", operation.getRequest().getHeaders().get(
ServletHelper.CSEC_DISTRIBUTED_TRACING_HEADER.toLowerCase()));
Assert.assertTrue(String.format("Missing K2 header: %s", ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID), operation.getRequest().getHeaders().containsKey(ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID.toLowerCase()));
Assert.assertEquals(String.format("Invalid K2 header value for: %s", ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID), headerValue, operation.getRequest().getHeaders().get(
ServletHelper.CSEC_IAST_FUZZ_REQUEST_ID.toLowerCase()));
}
}
String request = new ObjectMapper().writeValueAsString(introspector.getGRPCRequest());
Expand Down

0 comments on commit 01c2ba5

Please sign in to comment.