Of course :slightly_smiling_face: `ory patch ident...
# ory-network
h
Of course 🙂
ory patch identity --help
r
ory patch identity --help
Patch resources
Usage:
ory patch [command]
Available Commands:
identity-config   Patch the Ory Identities configuration of the defined Ory Network project.
oauth2-config     Patch the Ory OAuth2 & OpenID Connect configuration of the specified Ory Network project.
opl               Update the Ory Permission Language file in Ory Network
permission-config Patch the Ory Permissions configuration of the specified Ory Network project.
project           Patch the Ory Network project configuration.
Flags:
-c, --config string   Path to the Ory Network configuration file.
-h, --help            help for patch
Use "ory patch [command] --help" for more information about a command.
ory version
Version:    v0.2.2
Git Hash:   3ef9cd5f54d31fdc8da9ea3d9bfa1cfefb6f098d
Build Time: 2023-01-26T09:52:48Z
It's not appearing on the version of the cli I have installed (which I built yesterday) and neither on the docs: https://www.ory.sh/docs/cli/ory-patch
@high-optician-2097 am I missing something?
h
ups, my bad, i thought we have this already 😞
r
no worries, maybe it's me missing something but I can't really find any reference to
patch identity
either in the cli, in the docs or in the code (https://github.com/ory/cli/tree/d8e6a199dcda6c88efaae86ba20dfcb34984fdfc/cmd/cloudx/identity & https://github.com/ory/cli/blob/d8e6a199dcda6c88efaae86ba20dfcb34984fdfc/cmd/cloudx/patch.go). I can just find the
patch identity-config
which I understand is to patch the identity schema but not an specific identity
@high-optician-2097 not an experienced golang developer, but if you confirm it's something that it's not implemented and are interested with it, I could try to implement it myself and submit a PR
h
I took a quick glance at the kratos CLI and there we too don’t have patch identities yet. SO it first would need to be implemented there. Maybe it’s easier using the SDKs?
r
yes, also noticed the patch was missing on kratos. As you prefer, I can implement it just for my current use case using the SDK or try to implement it on both kratos & the cli and submit PRs
h
the second option would of course be epic 🙂
but it’s definitely a bit of work 🙂
r
I'll check what I can do and update :)
Still need some improvements, but looks like I have an initial working version of the patch command on the kratos cli: .
/kratos patch identity 6b2c0e20-c367-457d-8002-a11c279e4051 --op replace --value '{"group": {"type": "string", "title": "admin"}}' --path /metadata_public
2023/01/28 00:06:35 [DEBUG] PATCH <http://localhost:4434/admin/identities/6b2c0e20-c367-457d-8002-a11c279e4051>
ID      6b2c0e20-c367-457d-8002-a11c279e4051
🔥 1
@high-optician-2097 Kratos PR submitted: https://github.com/ory/kratos/pull/3055
Hey @high-optician-2097, I was just checking to implement the suggestion you commented to allow perform more than one patch operation per CLI call. Just having one doubt, isn't the current implementation of the
patch identity-config
command only allowing to perform
add, remove and replace
operations? According to the API docs
move, copy and test
are also supported operations