Cloud Native Catalog
Harness Well-Architected Kubernetes Patterns
Discover and use top-quality patterns and conventions as templates for your cloud native infrastructure with Meshery Catalog.
Publish your own best practices and share with team members and the world.
Meshery CLI
Import using mesheryctl, visit docs for steps.
1. Apply a design file.
mesheryctl design apply -f [file | URL]
2. Apply a WASM filter file.
mesheryctl filter import [file | URL] --wasm-config [filepath|string]
HTTP Auth
FILTER001
RELATED PATTERNS
HTTP AUTH
What this filter does
Simulates handling authentication of requests at proxy level. Requests with a header token with value hello are accepted as authorized while the rest unauthorized. The actual authentication is handled by the Upstream server. Whenever the proxy recieves a request it extracts the token header and makes a request to the Upstream server which validates the token and returns a response.
...read moreCaveats and Considerations
Test:
curl -H "token":"hello" 0.0.0.0:18000 -v # Authorized
curl -H "token":"world" 0.0.0.0:18000 -v # Unauthorized
Technologies
Related Patterns
TCP Metrics
FILTER002
RELATED PATTERNS
TCP METRICS
What this filter does
Collects simple metrics for every TCP packet and logs it.
...read moreCaveats and Considerations
Test:curl 0.0.0.0:18000 -v -d "request body"
Check the logs for the metrics.
Technologies
Related Patterns
TCP Packet Parse
FILTER003
RELATED PATTERNS
TCP PACKET PARSE
What this filter does
Parses the contents of every TCP packet the proxy receives and logs it.
...read moreCaveats and Considerations
Test:curl 0.0.0.0:18000 -v -d "request body"
Check the logs for the packet contents.
Technologies
Related Patterns
Singleton HTTP Call
FILTER004
RELATED PATTERNS
SINGLETON HTTP CALL
What this filter does
The filter is responsible for intercepting HTTP requests, authorizing them based on the stored cache, and performing rate limiting. In the context of the envoy, this component is an HTTP filter and gets executed in the worker threads. For each request, a context object gets created.
...read moreCaveats and Considerations
llam tristique tristique condimentum. Maecenas sollicitudin scelerisque egestas. Suspendisse aliquet elit quis dolor gravida, et auctor ligula ornare. Nullam et sodales ante, quis varius elit. Nullam cursus, orci eleifend tristique semper, neque nisl tincidunt purus, sed ultricies felis arcu vel metus.
Technologies
Related Patterns
Metrics Store
FILTER005
RELATED PATTERNS
METRICS STORE
What this filter does
This example showcases communication between a WASM filter and a service via shared queue. It combines the `Singleton-HTTP-Call` and `TCP-Metrics` examples. The filter collects metrics and enqueues it onto the queue while the service dequeues it and sends it to upstream server where it is stored.
...read moreCaveats and Considerations
Test:curl 0.0.0.0:18000 -v -d "request body" # make a few of these calls
curl 0.0.0.0:8080/retrieve -v # Retrieves the stored stats
# x | y | z === x : downstream bytes, y : upstream bytes, z: the latency for application server to respond
Technologies
Related Patterns
Singleton Queue
FILTER006
RELATED PATTERNS
SINGLETON QUEUE
What this filter does
An example which depicts an singleton HTTP WASM service which does an HTTP call once every 2 seconds.
...read moreCaveats and Considerations
Check the logs for the response of the request.
Technologies
Related Patterns
JWT Filter
FILTER007
RELATED PATTERNS
JWT FILTER
What this filter does
Sample configuration to be passed:{
"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"
]
}
Caveats and Considerations
DISCLAIMER: This filter doesn't regenerate the signature of the modified JWT, and provides no protections. Proceed with caution.