diff --git a/pkg/jwt/configuration.go b/pkg/jwt/configuration.go index f8f7383f..ef482c99 100644 --- a/pkg/jwt/configuration.go +++ b/pkg/jwt/configuration.go @@ -134,18 +134,18 @@ func NewSignatureValidatorFromJSONWebKeySetFile(path string, group program.Group group.Go(func(ctx context.Context, siblingsGroup, dependenciesGroup program.Group) error { t := time.NewTicker(300 * time.Second) for { - select { - case <-t.C: + select { + case <-t.C: internalValidator, err := getJwksFromFile(path) if err != nil { return err } forwardingValidator.Replace(internalValidator) - case <-ctx.Done(): + case <-ctx.Done(): return util.StatusFromContext(ctx) - } - } + } + } }) return forwardingValidator, nil diff --git a/pkg/proto/configuration/jwt/jwt.pb.go b/pkg/proto/configuration/jwt/jwt.pb.go old mode 100755 new mode 100644