-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gRPC client auth added #1084
gRPC client auth added #1084
Conversation
@josefkarasek I've unassigned you from the review as I'll test both server + client changes E2E 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
pkg/bot/cloudslack.go
Outdated
@@ -92,7 +98,7 @@ func NewCloudSlack(log logrus.FieldLogger, | |||
|
|||
func (b *CloudSlack) Start(ctx context.Context) error { | |||
creds := grpc.WithTransportCredentials(insecure.NewCredentials()) | |||
opts := []grpc.DialOption{creds} | |||
opts := []grpc.DialOption{creds, grpc.WithStreamInterceptor(b.addCredentials())} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As suggested in the other PR, can you also include credentials in unary operations? Thanks!
opts := []grpc.DialOption{creds, grpc.WithStreamInterceptor(b.addCredentials())} | |
opts := []grpc.DialOption{creds, | |
grpc.UnaryInterceptor(grpc_auth.UnaryServerInterceptor(b.addCredentials())), | |
grpc.WithStreamInterceptor(b.addCredentials()), | |
} |
pkg/bot/cloudslack.go
Outdated
return func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) { | ||
remoteCfg, ok := remote.GetConfig() | ||
if !ok { | ||
return nil, errors.New("while getting remote configuration") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, errors.New("while getting remote configuration") | |
return nil, errors.New("empty remote configuration") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
slack e2e failed due to rate limit error, just re-ran the failed test |
Description
Changes proposed in this pull request:
Testing
Better to test this together with https://github.com/kubeshop/botkube-cloud/pull/431
Related issue(s)