Hello there, I'm currently evaluating Kratos/Cloud...
# talk-kratos
i
Hello there, I'm currently evaluating Kratos/Cloud and have a question regarding account migrations (EDIT: from another provider to Ory). I understand at the moment work such as kratos#605 is in developement for username/password but my questions is around preserving existing user ids. We currently use uuids for our internal auth implementation and it would be very useful to be able to migrate and preseve these uuids. I was digging into the code a little and saw
Copy code
// ID is the identity's unique identifier.
	//
	// The Identity ID can not be changed and can not be chosen. This ensures future
	// compatibility and optimization for distributed stores such as CockroachDB.
	//
	// required: true
	ID uuid.UUID `json:"id" faker:"-" db:"id"`
It seems then this is not an intended behaviour. Would i need to accept that user ids would change if migrating?
m
Hey Scott 🙂 In essence that is correct. We can store the "old" UUIDs as reference to the new ones - which needs some work on our end. But ultimately the "old" UUIDs won't be the primary ID anymore, just a pointer/reference to the "new" primary UUID.
a
happened to notice this thread. I had no idea the ids arent preserved across migrations 😮
did this mean ids from your old system?
m
Yes migrating from another authentication service to Ory. Not within Ory Kratos versions!
i
Yeah sorry i could have specified a bit more. In our case these legacy user ids are spread across our backend within various database tables etc. Ideally we'd like to preserve the Id with transitioning to Ory but if that's not possible we'd need to figure out what a solution would look it.
a
wipes brow and sighs with relief
i
Apologies for the scare 😅
I added a little edit for future readers to try avoid that
m
Haha my bad also Mike, I hope I didnt cause a mild panic 😅
e
Can we migrate identities from locally hosted kratos to ory cloud kratos while preserving the identity id ?
@magnificent-energy-493 Could you answer please ?