Hello :wave: I'm running into this issue while wor...
# help
c
Hello 👋 I'm running into this issue while working with cerbos using Rust. My policies are correct and I can make valid http calls using curl which work as expected. However when working with the Rust SDK, I keep getting this
CheckResources call failed error
which looks like it comes from being unable to compose a correct grpc request with the
InvalidContentType error
. Is this a library issue or is there something I'm missing?
d
Hi Calvin, We are about to release the v0.4.6 version of the SDK. Meanwhile, you can try specifying the dependency on the GH repo:
<https://github.com/cerbos/cerbos-sdk-rust>
.
c
Hey @Dennis (Cerbos) 👋 just tried the
0.4.6
install from git but unfortunately I get the same result.
Are there any additional details I can share to help resolve?
@Dennis (Cerbos) just noticed that the source code tests ignore the
check_resources_tls
test. I confirmed that this error is in the SDK as well by running the ignored test. If I use the
.with_plaintext()
connection, everything works fine. Maybe we can update the SDK docs to indicate the same? Happy to open a PR if you agree.
d
We disabled these tests so we could test the SDK with
cerbos run --set=storage.disk.directory=resources/store -- cargo test
command. Your code should be able to work with TLS as well. Can you please show me how you configure the Cerbos client?
c
Cerbos running locally via docker and on the second screenshot, all that I changed was the
.with_plaintext()
on the connection options.
d
Sorry, I assumed you are getting this error with TLS.
Usually Cerbos serves HTTP on 3592 and gRPC on port 3593 - the Rust client uses gRPC. Which port do you configure the Rust client with?
c
I've configured the port to
3593
👍 1
d
.with_plaintext()
is not recommended for production. Feel free to create an issue that README should not be confusing for no TLS scenario.
1
c
Makes sense, thanks 🙏 Will open an issue shortly.
🙌 1