From 5bf57eafcd8c237ca2a2e747f17f18d66529557d Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 10 May 2023 14:03:50 +0300 Subject: issue: Update migration steps for user collections With the knowledge of the format of user accounts in redis, provide a new set of steps for migrating user collections. --- .../migrate-user-collections.gmi | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/issues/authentication_authorisation/migrate-user-collections.gmi b/issues/authentication_authorisation/migrate-user-collections.gmi index 62a68d3..f0b3609 100644 --- a/issues/authentication_authorisation/migrate-user-collections.gmi +++ b/issues/authentication_authorisation/migrate-user-collections.gmi @@ -22,12 +22,20 @@ The auth(entic|oris)ation system provides the following endpoint(s) for getting * `/oauth2/user/`: Note the trailing forward slash (/). This endpoint provides user data such as the user's ID, email and name, and their group membership information. -There is no quick way to bridge the two systems. The most plausible is: - -* get the user-details from the GN3 endpoint -* extract the email from the user-details -* use email to fetch the old user-id from redis -* use old user-id to fetch collections +Since we know the form that the user account are stored in redis[1], we can use that to search for user collections. + +The steps would be something like: + +* User registers afresh using their email and (possibly new) password +* User logs in +* System searches for user with the same email in redis +* If user with similar email is not found, do nothing +* If user with similar email is found, retrieve their old user-id +* Use old user-id to identify their collections +* If no collections are found using the old user-id, do nothing. +* If at least one collection is found using the old user-id present user with option to "migrate data" +* User click the "migrate data" button +* System changes user-id on the identified collections from the old user-id to the new user-id ## Links -- cgit v1.2.3