What this pattern 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.

Build and deploy:

cd http-auth make run-filtered


curl -H "token":"hello" -v # Authorized curl -H "token":"world" -v # Unauthorized

Caveats and Consideration:


Recent Discussions with "meshery" Tag