Point your local keto gem at that image by overriding the url in configuration.rb server_settings (we also need to expose a way to configure that, but thats a separate issue):
Then try to hit that endpoint. Example rake task:
# frozen_string_literal: true
namespace :ory do
namespace :keto do
task expand_permissions: :environment do
ory_permission_client = OryClient::PermissionApi.new
result = ory_permission_client.expand_permissions(
'videos',
'/cats/1.mp4',
'view',
{
max_depth: 10
}
)
puts JSON.pretty_generate result.to_body
end
end
end
Without the fix, you'll see the relationship structure, without any useful tuple or subject set data. It'll look like:
Relevant log output
No response
Relevant configuration
No response
Version
Latest
On which operating system are you observing this issue?
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).
The concern about setting configuration server_settings still applies.
We should consider updating the quickstart tutorial since the image it uses is no longer compatible with this ruby gem.
Preflight checklist
Describe the bug
I've got the ruby gem running locally in a rails project and I'm hitting the latest version of the keto docker container.
When I call check_permission_with_http_info I get back a response in this format:
That gets deserialized by this class: ory-client-1.1.4/lib/ory-client/models/expanded_permission_tree.rb
However, that class tries to read
tuples
and notsubject_set
.Replacing the word tuple with subject set across that file allows me to actually access the data.
I can PR a fix for this, but I'm not sure what that process looks like. Let me know 🙏
Reproducing the bug
Spin up the keto docker image from the quickstart: https://www.ory.sh/docs/keto/quickstart
Point your local keto gem at that image by overriding the url in configuration.rb server_settings (we also need to expose a way to configure that, but thats a separate issue):
Then try to hit that endpoint. Example rake task:
Without the fix, you'll see the relationship structure, without any useful tuple or subject set data. It'll look like:
Relevant log output
No response
Relevant configuration
No response
Version
Latest
On which operating system are you observing this issue?
macOS
In which environment are you deploying?
Docker
Additional Context
No response