Hi I m trying to send requests via a
# spicedb
g
Hi, I'm trying to send requests via a grpc CLI (like grpcurl) to a spiceDB instance running in a local docker container. how should i send the credentials? it keeps saying
invalid preshared key: rpc error: code = Unauthenticated desc = Request unauthenticated with bearer
. Also, how would be the equivalent if I have it running in a kubernetes cluster? How should I send the credentials in both cases? Thanks!
v
👋 Here is a
grpcurl
example:
Copy code
grpcurl -vv -H "Authorization: bearer my_token" -d '{"relationship_filter":{"resource_type": "resource"}, "optional_limit": "250", "optional_allow_partial_deletions": "true"}' --plaintext localhost:50051 authzed.api.v1.PermissionsService.DeleteRelationships
the credentials would be the same if sent to a SpiceDB running in a kube environment, you just need to make sure to use
--plaintext
if you haven't enabled TLS
g
and where can I get the token? is that the preshared key I chose when setting the context with zed?
ok, never mind. I found it. it was the zed context one. Thanks! ✅
v
if you are using SpiceDB OSS, it's a flag/environment variable. If oyu are using SpiceDB Serverless / Dedicated, you can create tokens via the Authzed Console
4 Views