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
727 stars 711 forks source link

[Migration Client] TOTP Enabled Claims Migration Query in IS Migration-Client Causing Syntax Error During Migration in ORACLE DB #20577

Open ShamodyaHashantha opened 1 week ago

ShamodyaHashantha commented 1 week ago

Describe the issue: The query "SET_TOTP_ENABLED_CLAIM_SQL" which is used to set the TOTP enabled claims in the TOTPClaimDataMigrator class in the IS migration-client (v1.0.274) is declared with a trailing semicolon. During the migration, it fails when executing order 18 under version 6.0.0 due to a syntax error caused by this semicolon. The following error was observed during a migration in Oracle DB

ERROR {org.wso2.carbon.is.migration.MigrationClientImpl} - Migration process was stopped.
org.wso2.carbon.identity.core.migrate.MigrationClientException: An error occurred while updating user data for the claim http://wso2.org/claims/identity/totpEnabled
Caused by: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended.

How to reproduce: Run a migration from lower IS version to IS-6.1.0 for ORACLE DB (using ORACLE DB dump)

Expected behavior: Executing the order 18 without an error Environment information (Please complete the following information; remove any unnecessary fields) :