ory / ory/sdk

Ruby client is not compatible with current version of Keto

Open
#243 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
178
Forks
96
Avg merge
6d 23h
Merged PRs (30d)
3

Description

Preflight checklist
Describe the bug

The permission_api.rb file has the wrong paths.

image

In this example local_var_path should have the value 'check' not '/relation-tuples/check/openapi'

The expand_permissions_with_http_info method should have local_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.

    def server_settings
      [
        {
          # url: "https://{project}.projects.oryapis.com", <- This should be an env var or configurable thru the configure() method
          url: "http://localhost:4466",
          description: "No description provided",
          variables: {
            project: {
                description: "Project slug as provided by the Ory Console.",
                default_value: "playground",
              }
            }
        }
      ]
    end
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 🙏

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting permission_api.rb, especially the local_var_path values used by the affected methods, and configuration.rb's server_settings method. Compare those paths and the server URL configuration with the reproduction details; done means the Ruby client can target the local Keto container and uses the requested endpoint paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, ruby
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.