Hi Cerbos team, just a small question I do implem...
# help
a
Hi Cerbos team, just a small question I do implement a agent service that calling cerbos to check resource in JS like this
Copy code
const cerbos = new Cerbos("my_domain", { tls: true });
It's working well and I do want to do it in Rust
Copy code
let options =
        CerbosClientOptions::new(CerbosEndpoint::HostPort("my_domain", 3592));
 let mut client = CerbosAsyncClient::new(options).await?;
it said CheckResources call failed, i'm not sure that it because I add 3592 or not, butI add it due to CerbosEndpoint require it. May you direct me to the right way?
a
Hi, usually Cerbos serves HTTP on 3592 and GRPC on port 3593 - the Rust client uses GRPC, so maybe try connecting to 3593 instead?
a
still get message "CheckResources call failed"
when I do start Cerbos on my machine I use localhost, 3592 it work fine
a
Which JavaScript client are you using -
@cerbos/grpc
or
@cerbos/http
?
a
@cerbos/grpc
a
When it's deployed to
my_domain
- is that behind a load balancer or something? Perhaps port 443 on
my_domain
is being forwarded to the Cerbos server?
a
no load balance just kube,
do you mean the lib in js, do sth to help me forward/connect to instance but in rust lib I have to do it myself?
a
Nope, I mean that if you can just pass
"my_domain"
with no port in the JS client, then that would be defaulting to port 443. So maybe try changing
3592
to
443
in the Rust client options.
a
oh, working now, thank you for you time and helping