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

Using spicedb with istio mTLS #266

Open
mark64 opened this issue Oct 29, 2023 · 3 comments
Open

Using spicedb with istio mTLS #266

mark64 opened this issue Oct 29, 2023 · 3 comments
Labels
kind/question Clarifying a question without code changes

Comments

@mark64
Copy link

mark64 commented Oct 29, 2023

I'm working on running spicedb inside an istio-enabled namespace with mTLS in STRICT mode.

I noticed that when I enabled istio, 1 of the 2 spicedb pods would start up correctly and reach the READY state, while the other pod would fail to connect to the dispatch service with a TRANSIENT_FAILURE health check code.

When I changed the URL for the dispatch server from:

WithValue(fmt.Sprintf("kubernetes:///%s.%s:dispatch", c.Name, c.Namespace)))

to:
spicedb.spicedb:50053 (service name.namespace name:dispatch port)
using a patches override, both pods were able to startup successfully.

I'm a little new to the kubernetes and spicedb world so I'm wondering:

  1. Does this makes sense, perhaps I need to do something to fix service discovery when using istio?
  2. Is there a recommended way to manage istio with spicedb?
@ecordell
Copy link
Contributor

I think we'll need to try and reproduce to figure out exactly what the issue is.

When you change the url to this:

spicedb.spicedb:50053

you are switching to the default grpc resolver that uses dns to resolve the names, instead of kuberesolver which queries the endpoints in kube directly. This means you're likely to see dropped traffic during pod reschedules and cluster upgrades.

If you still have the cluster handy in the old configuration, we can try enabling debug logs?

@batazor
Copy link

batazor commented Dec 24, 2023

@mark64 You can set sidecar.istio.io/inject: "false" for spicedb application.

For example you can see this example - link

@mark64
Copy link
Author

mark64 commented Dec 29, 2023

@batazor I appreciate the suggestion. However, in my case I do want istio enabled. It not only provides mTLS to my workloads, it also lets me implement authorization and access policies.

@ecordell thanks for the explanation. This isn't too high priority for me but I'll let you know when I get a chance to try again with debug logs.

@jzelinskie jzelinskie added the kind/question Clarifying a question without code changes label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Clarifying a question without code changes
Projects
None yet
Development

No branches or pull requests

4 participants