-
Notifications
You must be signed in to change notification settings - Fork 164
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
Unable to create Authorization Model using WriteAuthorizatoinModel (grpc) method #1224
Comments
@sasanknvs please fill out the section that reports the OpenFGA version you are running with. Without that it's going to be hard to reliably reproduce. Also, could you share the gRPC request you are making? I see you reported a JSON model. I would expect to see a |
I understood the problem. I am using the authorization model in json format from Openfga documentation and using it as a grpc message body. That's why I am seeing the issue. Ideally I should use that json only with Rest endpoint. Can you let me to know if there is any sdk/client available if I want to communicate with openfga's grpc endpoint ? |
@sasanknvs our SDKs do not currently support the gRPC endpoint(s). We have gRPC client support in our SDKs in the roadmap. However, the gRPC server of OpenFGA supports the gRPC reflection protocol and various tools like Postman support gRPC and can use the reflection endpoint to generate sample requests. https://learning.postman.com/docs/sending-requests/grpc/grpc-request-interface/ for example |
@sasanknvs I'm going to close this. Feel free to open a new issue if you have more questions 👍 |
Summary
I am running openfga container on my local machine using postgres. Using postman I am trying to write authorization model using grpc endpoints.
Model an authorization model and try to create it using WriteAuthorizationModel method. Provided the model I am using in the below sections
Authorization model creation successful and Id in response
Authorization model failed to create with the an error in the json structure input to the endpoint. I also tried to create same authorization model through a Rest endpoint and I was able to create it. When I try to retrieve it with grpc endpoint I got the response in a different Json structure than the input.
OpenFGA version or commit
If you know it, enter here.
Store data
Below the authorization model I tried to populate to grpc endpoint. The same worked well and am able to create Authorization model successfully with Rest endpoint. I have checked the SDK model classes, they look different from that of the json I am inputting. But I am following the same syntax and configuration language that is specified in the documentation.
Other data
./openfga run --help
?The text was updated successfully, but these errors were encountered: