chaos-stream-proxy
chaos-stream-proxy copied to clipboard
Optional support for protecting endpoint with JWT token and logging
JWT token endpoint protection
If the service is started with the environment variable JWT_SECRET it should require a JWT token as query-parameter to the endpoint requests (health endpoint excluded).
The JWT-token should include the following payload:
{
"company": <COMPANY>,
"email": <EMAIL-TO-PERSON-AT-COMPANY>
}
The JWT-token is signed by the secret specified in the env variable JWT_SECRET and validated on requests. If not valid a "Not Authorized" status code should be returned.
Additional logging
All requests should be logged as a JSON-structure including the information provided in the JWT and endpoint accessed