Skip to content

Commit 9bb7628

Browse files
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.
1 parent eb36716 commit 9bb7628

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ingress/middleware/verifier.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package middleware
2+
3+
import (
4+
"context"
5+
"net/http"
6+
)
7+
8+
type Handler interface {
9+
Handle(ctx context.Context, r *http.Request) error
10+
}

0 commit comments

Comments
 (0)