https://www.ory.sh/ logo
#talk-kratos
Title
# talk-kratos
i

incalculable-intern-24130

02/15/2022, 9:00 AM
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

magnificent-energy-493

02/15/2022, 9:21 AM
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

adorable-byte-96872

02/15/2022, 9:48 AM
happened to notice this thread. I had no idea the ids arent preserved across migrations 😮
did this mean ids from your old system?
m

magnificent-energy-493

02/15/2022, 9:50 AM
Yes migrating from another authentication service to Ory. Not within Ory Kratos versions!
i

incalculable-intern-24130

02/15/2022, 9:53 AM
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

adorable-byte-96872

02/15/2022, 9:56 AM
wipes brow and sighs with relief
i

incalculable-intern-24130

02/15/2022, 9:57 AM
Apologies for the scare 😅
I added a little edit for future readers to try avoid that
m

magnificent-energy-493

02/15/2022, 9:59 AM
Haha my bad also Mike, I hope I didnt cause a mild panic 😅
e

elegant-airline-89652

06/22/2022, 2:30 PM
Can we migrate identities from locally hosted kratos to ory cloud kratos while preserving the identity id ?
@magnificent-energy-493 Could you answer please ?
3 Views