Hey people! The update identity admin endpoint is...
# ory-network
c
Hey people! The update identity admin endpoint is failing for us now, giving us 400's because we are sending it "invalid json". Why it's invalid?
unknown field: verifiable_addresses
- now, as far as I know, this is a very valid field in an Ory identity, right? This issue is actually blocking us from onboarding some new customers, so I'd highly appreachiate some feedback or a quickfix ❤️
s
did it work some time already?
c
Yeah, it broke kinda recently
s
can you show the payload you are sending?
c
Sure, let me dump you one
s
I assume it is this endpoint right?
https://{project}.<http://projects.oryapis.com/admin/identities/{id}|projects.oryapis.com/admin/identities/{id}>
h
probably patch
regression
s
ah yeah...
c
Yeah, so what we're doing is we're getting an identity, then calling updateIdentity on the sdk, with the same identity we fetched, right? And since the fetched identity has verifiable_addresses set, the updateIdentity call fails
s
ok workaround would be to remove that field
c
We could probably fix it on our end by deleting the fields that the updateIdentity endpoint doesen't like, but I think that feels too hacky
s
cause it gets ignored anyway
c
Like, if we fetch an entity, change something without adding anything, and post that entity back, we shouldn't get the feedback that "the entity you posted is invalid"
I mean, we got it from your endpoint to begin with, right?
Or do you not agree?
s
in an ideal rest world yes, but AFAIK the
verifiable_addresses
cannot be set through the admin api
c
So we have to clean the data manually before sending it back to you? By design?
I mean sure, if that's the design, that's what we'll do
s
no it should just be ignored, but there was a small bug https://github.com/ory/x/commit/39f02ce7ec7ce7502058a7b52c337a064706423e
c
Oh, so it's already fixed
When will it be merged and deployed?
s
c
Aaaah
Well in that case it's on us
Obviously, this never happened in Go because of type safety - in python, however, it's an entirely diffferent story
h
thanks patrik
c
Yeah, thanks dude, sorry about the bother!
s
np, we'll probably release tomorrow to restore the old behavior
1
l
Somewhat related. I’m reading through the Kratos code to try and find the source of this bug, https://github.com/ory/kratos/issues/3187, but I haven’t been able to narrow it down due to lack of context. I think it may be in this function, though since the request is just sending the identity id and a json patch, it is unclear how the email address in the traits even has an effect on the behaviour. Maybe through the associations?
s
I don't think that is related, but interesting bug 😅
c
Yeah, this one hit us too once, we had to recreate like 300 identities 😛
With normalized (lower-cased) email addresses
l
Related in the sense that it involved updating identities and verifiable_addresses. But yeah, the source of the two issues is definitely not the same.