Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Signed-off-by: Vaibhav M N <[email protected]>
  • Loading branch information
Vaibhav2154 authored Dec 7, 2024
1 parent 808d189 commit 6bde792
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions JWTManipulator9000/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,40 @@ Configuration Parameters
- payload_to_header: A list of payload keys whose values will be moved to headers.
- header_to_payload: A list of header keys whose values will be moved to payloads.

Example Use Case

Imagine you're managing user authentication in a microservices environment, and you need to:

Add a custom claim to the payload to track user sessions.
Remove sensitive or irrelevant header information.
Transfer a specific claim from the payload to a header for an upstream service.

Configuration for this case:
```json
{
"add_payload": [
["session_id", "abc123"]
],
"del_header": [
"debug_info"
],
"payload_to_header": [
"user_role"
]
}
```
When applied:

- The filter will add a session_id claim to the payload with a value of abc123.
- It will remove the debug_info key from the headers.
- The user_role claim from the payload will be moved to the headers.

Integration with Meshery

To integrate JWTManipulator9000 into your Meshery configuration:

- Add the filter as part of your WASM filter chain.
- Provide the desired configuration JSON through Meshery's UI or API.
- Deploy the filter and observe how it modifies JWT tokens based on your specifications.

For more details about configuring WASM filters with Meshery, visit the official ![Meshery documentation](https://github.com/meshery/.github/blob/master/profile/README.md)

0 comments on commit 6bde792

Please sign in to comment.