Skip to content
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

use tls for nats connections #3334

Merged
merged 1 commit into from
Oct 12, 2022
Merged

use tls for nats connections #3334

merged 1 commit into from
Oct 12, 2022

Conversation

C0rby
Copy link
Contributor

@C0rby C0rby commented Oct 11, 2022

Add config option to skip server certificate verification. This is needed when running a nats server with self signed certificates.

@C0rby C0rby self-assigned this Oct 11, 2022
@update-docs
Copy link

update-docs bot commented Oct 11, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@C0rby C0rby mentioned this pull request Oct 11, 2022
4 tasks
Copy link
Member

@micbar micbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corresponding ocis PR has a green CI

@micbar
Copy link
Member

micbar commented Oct 11, 2022

There is only a changelog missing and a CI run.

@C0rby C0rby requested review from glpatcern and a team as code owners October 12, 2022 10:09
@C0rby C0rby merged commit ae7c58b into cs3org:edge Oct 12, 2022
@C0rby C0rby deleted the nats-tls branch October 12, 2022 10:41
@@ -209,6 +214,32 @@ func publisherFromConfig(m map[string]interface{}) (events.Publisher, error) {
case "nats":
address := m["address"].(string)
cid := m["clusterID"].(string)
return server.NewNatsStream(natsjs.Address(address), natsjs.ClusterID(cid))

skipVerify := m["tls-insecure"].(bool)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this leads to a panic if unset:

panic: interface conversion: interface {} is nil, not bool

goroutine 280 [running]:
github.com/cs3org/reva/v2/internal/grpc/interceptors/eventsmiddleware.publisherFromConfig(0xc0016ee180)
	/home/vscode/repositories/reva/internal/grpc/interceptors/eventsmiddleware/events.go:218 +0x8a5
github.com/cs3org/reva/v2/internal/grpc/interceptors/eventsmiddleware.NewUnary(0xc0016ee180)
	/home/vscode/repositories/reva/internal/grpc/interceptors/eventsmiddleware/events.go:60 +0x5f
github.com/cs3org/reva/v2/pkg/rgrpc.(*Server).getInterceptors(0xc0009f6c80, {0x5ddfb08, 0x0, 0x0})
	/home/vscode/repositories/reva/pkg/rgrpc/rgrpc.go:257 +0x1ae
github.com/cs3org/reva/v2/pkg/rgrpc.(*Server).registerServices(0xc0009f6c80)
	/home/vscode/repositories/reva/pkg/rgrpc/rgrpc.go:198 +0x7cd
github.com/cs3org/reva/v2/pkg/rgrpc.(*Server).Start(0xc0009f6c80, {0x49bbe78, 0xc00077c378})
	/home/vscode/repositories/reva/pkg/rgrpc/rgrpc.go:143 +0x51
github.com/cs3org/reva/v2/cmd/revad/runtime.start.func2()
	/home/vscode/repositories/reva/cmd/revad/runtime/runtime.go:200 +0xae
created by github.com/cs3org/reva/v2/cmd/revad/runtime.start
	/home/vscode/repositories/reva/cmd/revad/runtime/runtime.go:199 +0x211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants