network icon indicating copy to clipboard operation
network copied to clipboard

Setting the identity schema using the CLI is not possible

Open aeneasr opened this issue 3 years ago • 3 comments

Preflight checklist

Describe the bug

I was not able to set the identity schema using the Ory CLI. It just doesn't work for some reason.

Reproducing the bug

  1. Create a project
  2. Create two identity schemas in the console
  3. Try to set one of the schemas using the Ory CLI

Relevant log output

No response

Relevant configuration

No response

Version

master

On which operating system are you observing this issue?

No response

In which environment are you deploying?

No response

Additional Context

No response

aeneasr avatar Jul 20 '22 14:07 aeneasr

Thats weird, this worked for me

  1. Create project
  2. Create new identity schema with simple modification
  3. Export config with the CLI and note down the id of the new schema
  4. ory patch project 34c4asdasd-c7f6-424e-ac69-eaec05b1a260 --replace '/services/identity/config/identity/default_schema_id="1590889099b35292ed1dc97f6adfe146f3b99e1510a99992632a8876ba112ce862c12fd3asdds3b8cf44c4853381128e02209ea4f4502ebe8f6ecb97179f854496"'
  5. Identity schema set successfully

vinckr avatar Jul 20 '22 15:07 vinckr

Hm, thank you!

Maybe the problem is trying to set a schema from a different project? This works in the UI but maybe not the API

aeneasr avatar Jul 20 '22 18:07 aeneasr

Maybe the problem is trying to set a schema from a different project? This works in the UI but maybe not the API

I have no idea about the underlying code but what I speculate happens is:

  • User creates modified identity schema
  • for some reason it doesn't get saved in the "normal" identity config but somewhere else
  • its settable in the UI but doesn't show up in identity config
  • in some edge cases its even not possible to set in the UI as well (Sean Katz case)

I think this seems to be the case if you have a lot of identity schemas 5+.

vinckr avatar Jul 21 '22 08:07 vinckr