Merge pull request #90 from RafayLabs/prod-init

excluding bootstrap registration from authn
This commit is contained in:
Nirav Parikh
2022-04-07 17:54:51 +05:30
committed by GitHub

View File

@@ -555,7 +555,12 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) {
if !dev {
_log.Infow("adding auth interceptor")
ac := authv3.NewAuthContext(kc, ks, as)
o := authv3.Option{}
o := authv3.Option{
ExcludeRPCMethods: []string{
"/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentTemplate",
"/rafay.dev.sentry.rpc.Bootstrap/RegisterBootstrapAgent",
},
}
opts = append(opts, _grpc.UnaryInterceptor(
ac.NewAuthUnaryInterceptor(o),
))