TUN-6772: Add a JWT Validator as an ingress verifier

This adds a new verifier interface that can be attached to ingress.Rule.
This would act as a middleware layer that gets executed at the start of
proxy.ProxyHTTP.

A jwt validator implementation for this verifier is also provided. The
validator downloads the public key from the access teams endpoint and
uses it to verify the JWT sent to cloudflared with the audtag (clientID)
information provided in the config.
This commit is contained in:
Sudarsan Reddy 2022-09-21 11:16:37 +01:00
parent eb36716ba4
commit 9bb7628fbc
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
package middleware
import (
"context"
"net/http"
)
type Handler interface {
Handle(ctx context.Context, r *http.Request) error
}