Open EvanDaley opened 1 year ago
Actually, after digging into it a bit more, it looks like the issue was because I was using the quickstart tutorial keto image and not the latest (oryd/keto:v0.7.0-alpha.1-sqlite vs v0.10.0-alpha.0).
Hey Evan, thank you for giving Ory a try and sorry to see that you're having trouble. You've created numerous issues in several repositories in a short time - would it be possible to summarize your findings in this issue please? I will close the other issues, because it's hard to keep track of everything
Hey @aeneasr , thanks for the quick response. Sorry for the noise!
Yeah, I was using the version of the keto docker image from the quickstart tutorial (0.7.0), and that wasn't playing nice with the ruby gem. I thought that the gem was the problem, but it turned out to just be the mismatch between docker and gem vresions. The container older container calls the route check
but the gem looks for /relation-tuples/check
. Turns out /relation-tuples/check
IS correct, and I just needed to use the newer docker container (0.10.0).
To avoid confusion, we may want to update the quickstart tutorial for keto.
The other big point of confusion is that there is no way to configure the host / base URL for the ruby gem. It pulls the server info from this method that has a hardcoded reference to the ory hosted infra.
Ideally, we would do something like this to allow it to point to local docker containers or other domains.
Wdyt?
How is the ruby client built? Are we able to change one line like that? Is the gem auto-generated by some OpenAPI library?
How is the ruby client built?
To answer this question, all language SDKs are generated from our Open API schemas (which are generated from the source code) and committed/published as is. We don't have a process in place for changing parts of the SDK (yet) individually.
OryClient.configure do |config|
config.server_index = nil
end
should fix this issue.
Preflight checklist
Describe the bug
The permission_api.rb file has the wrong paths.
In this example
local_var_path
should have the value 'check' not '/relation-tuples/check/openapi'The
expand_permissions_with_http_info
method should havelocal_var_path = '/expand'
.Reproducing the bug
In order to point the ruby client at your local docker container, you also have to override the server_settings method in configuration.rb. Ideally this should be driven with an env variable.
Relevant log output
No response
Relevant configuration
No response
Version
Latest for both the client and keto docker image
On which operating system are you observing this issue?
Mac
In which environment are you deploying?
None
Additional Context
I'm happy to PR a fix for this. I would just need some guidance on your preferred process. Thanks 🙏