JWTManipulator9000 WASM filter released!

Community feedback is what drives open-source projects like Meshery. Thanks to the feedback from our community, we are proud to release the JWTManipulator9000!

This WASM filter is meant to intercept JWTs in HTTP packets. Depending on the JSON configuration passed to the filter, you will be able to perform actions like adding and deleting, and moving header and payload values.

Here is a sample JSON configuration:

{
  "add_header": [
    ["header1","value1"],
    ["header2","value2"]
  ],
  "del_header":[
    "header1"
  ],
  "add_payload": [
    ["payload1","value1"],
    ["payload2","value2"],
  ],
  "del_payload":[
    "payload1"
  ],
  "payload_to_header": [
    "payload2"
  ],
  "header_to_payload": [
    "header2"
  ]
}

This filter performs no safety checks, and doesn’t resign JWTs. So if you know what you are doing(or don’t xD), this filter is for you!

The source code is present in the layer5 wasm-filter repo.

If you have any suggestions on how to further improve this filter, feel free to create an issue.

Have a nice day! :smile:

2 Likes