Hey hey Why can I get error like "unknown service...
# talk-keto
l
Hey hey Why can I get error like "unknown service ory.keto.acl.v1alpha1.CheckService" If I use http api client everythin works well But grpc client return such error Do I need to hack something in config file?
s
do the client and server versions match? we recently bumped the api version to
v1alpha2
l
hm I just copied it from here https://www.ory.sh/docs/keto/sdk/go
server version is latest
l
Yes My client library version use
Copy code
err := c.cc.Invoke(ctx, "/ory.keto.acl.v1alpha1.CheckService/Check", in, out, opts...)
How can I install latest version?
s
however you installed the previous, but using the latest version tag
l
exactly
figured out solution
Copy code
acl "<http://github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2|github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2>"
fix https://www.ory.sh/docs/keto/sdk/go page
why these fields are deprected?
How should I make check request?
s
using the
Tuple
field
l
Ok Tell me please How keto client make request? I'm making
Copy code
keto check User:Bob allowed Permission view-products --insecure-disable-transp
ort-security
and get allowed response But when I use grpc call:
Copy code
resp, err := m.checkClient.Check(ctx, &acl.CheckRequest{
		Tuple: &acl.RelationTuple{
			Namespace: "Permission ",
			Object:    "view-products",
			Relation:  "allowed ",
			Subject:   &acl.Subject{Ref: &acl.Subject_Id{Id: fmt.Sprintf("%s:%s", "User", "Bob")}},
		},
	})
I'm getting denied
should I use subject set instead of subject_id?
s
because that is a subject set
there are some helpers btw, like
acl.NewSubjectSet
l
Yes It works Thanks a lot!
s
sure, glad you got it working