wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
746 stars 724 forks source link

Issues with user store migration stored procedures #13234

Open rksk opened 2 years ago

rksk commented 2 years ago

Describe the issue: The stored procedures in the document about userstore migration need to be reviewed. For example, the Postgres stored procedure in steps 3-4 are not having the query to add the new column.

Also, the content is not much clear in some places. For example, it asks to disable the UserID migrator but talks about secondary user stores only in the latter part. Also, steps 2 and 3 can be removed it seems.

Additionally, it is simple if this can be added to the migration client itself.

[1] https://is.docs.wso2.com/en/latest/setup/migrating-userstore-managers/

rksk commented 2 years ago

Well, it was observed that even the UserID migratory is disabled, the column is added with the schema migration step [1].

An additional concern is that this procedure can not be run before the migration for all the versions. For example, IS 5.2.0 does not have IDN_CLAIM tables. This needs to be clarified whether this can be run after the migration.

[1] https://github.com/wso2-extensions/identity-migration-resources/blob/master/components/org.wso2.is.migration/migration-resources/5.10.0/dbscripts/step2/um/postgresql.sql

rksk commented 2 years ago

There is another set of stored procedures [1] to achieve the same. It is great to consider both of the sets and use the simpler one which executes faster and addresses all the scenarios.

[1] https://github.com/wso2-extensions/identity-migration-resources/tree/master/components/org.wso2.is.migration/migration-resources/5.10.0/stored-procedures/user_id_migration

rksk commented 1 year ago

Another issue; First step is only if you had SCIM disabled. But step 2 onwards says if you had it enabled. Then what about populating SCIM ids into attributes table if you had it disabled in the previous version.