mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 14:19:59 +00:00
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:
8
vendor/google.golang.org/grpc/metadata/metadata.go
generated
vendored
8
vendor/google.golang.org/grpc/metadata/metadata.go
generated
vendored
@@ -188,7 +188,9 @@ func FromIncomingContext(ctx context.Context) (MD, bool) {
|
||||
// map, and there's no guarantee that the MD attached to the context is
|
||||
// created using our helper functions.
|
||||
key := strings.ToLower(k)
|
||||
out[key] = v
|
||||
s := make([]string, len(v))
|
||||
copy(s, v)
|
||||
out[key] = s
|
||||
}
|
||||
return out, true
|
||||
}
|
||||
@@ -226,7 +228,9 @@ func FromOutgoingContext(ctx context.Context) (MD, bool) {
|
||||
// map, and there's no guarantee that the MD attached to the context is
|
||||
// created using our helper functions.
|
||||
key := strings.ToLower(k)
|
||||
out[key] = v
|
||||
s := make([]string, len(v))
|
||||
copy(s, v)
|
||||
out[key] = s
|
||||
}
|
||||
for _, added := range raw.added {
|
||||
if len(added)%2 == 1 {
|
||||
|
Reference in New Issue
Block a user