This documentation is for WSO2 Identity Server 5.4.0 . View documentation for the latest release.
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The following instructions guide you through upgrading from WSO2 Identity Server 5.2.0 to WSO2 Identity Server 5.3.0. In this topic, <OLD_IS_HOME> is the directory that Identity Server 5.2.0 resides in and <NEW_IS_HOME> is the directory that Identity Server 5.3.0 resides in.

Prerequisite for migration
 Click to view vital information about custom claims

If you have added any custom claims, follow the steps in this prerequisite before migrating to IS 5.3.0:

This is required because, in the IS 5.3.0 version, all claims external to the WSO2 dialect are mapped to the relevant claim in the WSO2 dialect and not to the underlying attribute in the user store. When there are custom claims, there is no claim in the WSO2 dialect that is mapped to that attribute. Therefore, follow the steps below to create a new claim in the WSO2 dialect and map your custom claim to the local claim (i.e., the new claim created in the WSO2 dialect).

  1. Start the WSO2 IS server of IS 5.2.0 and login to the management console.
  2. Click on Add under Claims on the Main tab of the management console.
  3. Click Add New Claim and select the dialect.

  4. Enter the required information of the custom claim. For more information, see Adding Claim Mapping in IS 5.2.0.

  5. Click Add. The claim you created will be listed.
  6. Click on List under Claims on the Main tab of the management console again.
  7. Click on the claim dialect where you have your custom claim, and click on the Edit button of your custom claim.
  8. Map the local claim you just created to the custom claim by editing the Mapped Attribute(s) field.
  9. Click Update.

Note: Repeat the steps above for every custom claim you have created.

Migrating the embedded LDAP user store

It is not generally recommended to use the embedded LDAP user store that is shipped with WSO2 Identity Server in production setups. However, if migration of the embedded LDAP is required, follow the instructions below to migrate the existing IS 5.2.0 LDAP user store to IS 5.3.0.

  1. Copy the <OLD_IS_HOME>/repository/data folder to <NEW_IS_HOME>/repository/data folder.
  2. Restart the server to save the changes. 

To upgrade the version of WSO2 Identity Server, the user store database should be upgraded. Note that there are no registry schema changes between versions. 

Follow the steps below as needed to complete the migration process.

  1. Download Identity Server 5.3.0 and unzip it in the <NEW_IS_HOME> directory.
  2. Take a backup of the existing database used by Identity Server 5.2.0. This backup is necessary in case the migration causes issues in the existing database.
  3. Make the database script updates as indicated below.
      1. Download the migration resources and unzip it to a local directory. This folder is referred to as <IS5.3.0_MIGRATION_TOOL_HOME>.

      2. Copy the db script files in the <IS5.3.0_MIGRATION_TOOL_HOME>/dbscripts/identity/ directory to the <NEW_IS_HOME>/dbscripts/identity/migration-5.2.0_to_5.3.0/ directory.

      3. Copy the file in the  <IS5.3.0_MIGRATION_TOOL_HOME>/dropins directory to the <NEW_IS_HOME>/repository/components/dropins directory. 
      4. Alternatively, if you are using Oracle database, you can either provide the database owner credentials in the datasource configurations (identity and user management databases) or pass the identity database owner name with -DidentityOracleUser and user management database owner name with ­-DumOracleUser.
  4. Make a copy of the <OLD_IS_HOME>/repository/conf folder. (Do not change the original configs. You may use it as a backup in case there are any issues)

  5. Copy the following files from the <NEW_IS_HOME>/repository/conf/identity folder and paste it in the copy of the <OLD_IS_HOME>/repository/conf/identity folder:
  6. Copy any custom OSGI bundles that were added manually from the <OLD_IS_HOME>/repository/components/dropins folder and paste it in the <NEW_IS_HOME>/repository/components/dropins folder. 
  7. Copy any added JAR files from the <OLD_IS_HOME>/repository/components/lib folder and paste it in the <NEW_IS_HOME>/repository/components/lib folder. 
  8. Open the output-event-adapters.xml file found in the <NEW_IS_HOME>/repository/conf folder and configure the relevant email configurations. 

    <adapterConfig type="email">
        <!-- Comment mail.smtp.user and mail.smtp.password properties to support connecting SMTP servers which use trust
            based authentication rather username/password authentication -->
        <property key="mail.smtp.from">[email protected]</property>
        <property key="mail.smtp.user">abcd</property>
        <property key="mail.smtp.password">xxxx</property>
        <property key=""></property>
        <property key="mail.smtp.port">587</property>
        <property key="mail.smtp.starttls.enable">true</property>
        <property key="mail.smtp.auth">true</property>
        <!-- Thread Pool Related Properties -->
        <property key="minThread">8</property>
        <property key="maxThread">100</property>
        <property key="keepAliveTimeInMillis">20000</property>
        <property key="jobQueueSize">10000</property>

    Tip: This email configuration is similiar to the email configuration shown in the code block below, which is found in the <IS_HOME>/repository/conf/axis2/axis2.xml file. This configuration is used for email-enabled features. You can configure the same values in the output-event-adapters.xml file for email-enabled features using REST APIs in IS 5.3.0.

    Email configuration in axis2.xml file
    <transportSender name="mailto"class="org.apache.axis2.transport.mail.MailTransportSender">
        <parameter name="mail.smtp.from">[email protected]</parameter>
        <parameter name="mail.smtp.user">sampleemail</parameter>
        <parameter name="mail.smtp.password">password</parameter>
        <parameter name=""></parameter>
        <parameter name="mail.smtp.port">587</parameter>
        <parameter name="mail.smtp.starttls.enable">true</parameter>
        <parameter name="mail.smtp.auth">true</parameter>
  9. Copy the .jks files from the <OLD_IS_HOME>/repository/resources/security folder and paste them in <NEW_IS_HOME>/repository/resources/security folder. 

  10. If you have created tenants in the previous WSO2 Identity Server version and if there are any resources in the <OLD_IS_HOME>/repository/tenants directory, copy the content to the <NEW_IS_HOME>/repository/tenants directory.
  11. If you have created secondary user stores in the previous WSO2 IS version, copy the content in the <OLD_IS_HOME>/repository/deployment/server/userstores directory to the <NEW_IS_HOME>/repository/deployment/server/userstores directory.

  12. If you have done custom changes to the config files in your previous version of WSO2 IS, see the table below. 

    The table below lists out all the configuration changes from IS 5.2.0 to IS 5.3.0. You can scroll through the table and change the relevant configurations according to the features you are using. Any step which is not explicitly mentioned as “optional” is mandatory for the migration. 

    Tip: Scroll left/right to view the entire table below.

    Mandatory configuration changes: Click here to view the table..

     Click here to expand...
    Configuration FileChanges

    [MANDATORY] file stored in the <IS_HOME>/repository/conf/identity folder.

    Add the following property shown at line number 2.
    identity.xml file stored in the <IS_HOME>/repository/conf/identity folder.

    Add the following property found under the <SessionDataCleanUp> tag.


    Remove the following property found under the <OperationDataCleanUp> tag.


    Change the default value of the following property from 300 to 0.

    You can skip this step if you have already configured the <TimestampSkew> property with your own value.


    Add the following JWT bearer grant type.


    Update the <EmailVerification> code block with the following code.
    The properties shown below at line numbers 3,8,9 & 10 were added in 5.4.0.


    Update the following property found under the <SelfRegistration> tag to true.


    Add the following properties under the <SelfRegistration> tag.

    authenticators.xml file stored in the <IS_HOME>/repository/conf/identity folder.

    Update the parameter name of the <JITUserProvisioning> parameter to the following.

    <Parameter name="JITUserProvisioningEnabled">true</Parameter>
    web.xml file stored in the <IS_HOME>/repository/conf/tomcat folder.

    Add the following property under the <session-config> tag.

    user-mgt.xml file stored in the <IS_HOME>/repository/conf folder.

    Update the default value of the following properties as follows.

    You can skip this step if you have already configured these properties with your own RegEx.

    <Property name="UsernameJavaRegEx">[a-zA-Z0-9._\-|//]{3,30}$</Property>
    <Property name="RolenameJavaRegEx">[a-zA-Z0-9._\-|//]{3,30}$</Property>
    claim-config.xml file stored in the <IS_HOME>/repository/conf folder.

    Add the following claim.

    	<DisplayName>Phone Verified</DisplayName>
    	<!-- Proper attribute Id in your user store must be configured for this -->
    	<Description>Phone Verified</Description>

    Change the following claim mappings.

    1. Remove the property at line number 7 and add in the property at line number 8.

      	<DisplayName>Home Phone</DisplayName>
      	<Description>Home Phone</Description>
      	<SupportedByDefault />
    2. Remove the property at line number 7 and add in the property at line number 8.

      	<Required />
      	<SupportedByDefault />
    3. Remove the property at line number 8 and add in the property at line number 9.

      	<DisplayName>Time Zone</DisplayName>
      	<Description>Time Zone</Description>
      	<SupportedByDefault />
  13. Replace the <NEW_IS_HOME>/repository/conf folder with the modified copy of the <OLD_IS_HOME>/repository/conf folder.

  14. Start the Identity Server 5.3.0 with the following command to perform the data migration for all components. 

    See the notes below to perform migration for individual components or for active tenants only. 

    1. Linux/Unix:

      sh -Dmigrate -Dcomponent=identity 
    2. Windows:

      wso2server.bat -Dmigrate -Dcomponent=identity 

      Migrate individual components

      Optional: To migrate certain components only, use the relevant commands in the table below.

      Warning! Unless specifically required, it is recommended to perform the full data migration by executing the command given above. Component migration is intended for certain special cases only, and may cause errors due to incomplete migration, if done incorrectly.

       Click here to view the commands
      Identity Database Schema
      sh -Dmigrate -Dcomponent
      =identity -DmigrateIdentityDB
      wso2server.bat -Dmigrate -Dcomponent
      =identity -DmigrateIdentityDB
      Claim Data
      sh -Dmigrate -Dcomponent
      =identity -DmigrateClaimData
      wso2server.bat -Dmigrate -Dcomponent=
      identity -DmigrateClaimData
      Email Template Data
      sh -Dmigrate -Dcomponent
      =identity -DmigrateEmailTemplateData
      wso2server.bat -Dmigrate -Dcomponent
      =identity -DmigrateEmailTemplateData
      Permission Data
      sh -Dmigrate -Dcomponent
      =identity -DmigratePermissionData
      wso2server.bat -Dmigrate -Dcomponent
      =identity -DmigratePermissionData
      Challenge Question Data
      sh -Dmigrate -Dcomponent
      =identity -DmigrateChallengeQuestionData
      wso2server.bat -Dmigrate -Dcomponent
      =identity -DmigrateChallengeQuestionData
      Resident IdP MetaData
      sh -Dmigrate -Dcomponent
      =identity -DmigrateResidentIdpMetaData
      wso2server.bat -Dmigrate -Dcomponent
      =identity -DmigrateResidentIdpMetaData
      OIDC Scope Data
      sh -Dmigrate -Dcomponent
      =identity -DmigrateOIDCScopeData
      wso2server.bat -Dmigrate -Dcomponent
      =identity -DmigrateOIDCScopeData

      Migrate active tenants only

      Optional:If you have any disabled/inactive tenants in your previous version of WSO2 IS that you do not want to bring forward to the next version, do a complete migration for all components with active tenants only.

       Click here to view the command

      Start the server against the migration client jar located in the <IS_HOME>/repository/components/dropins directory using the -DmigrateActiveTenantsOnly flag, as shown below.

      sh -Dmigrate -Dcomponent=identity -DmigrateActiveTenantsOnly
  15. Once the migration is successful, stop the server and start using the appropriate command.
    1. Linux/Unix:

    2. Windows:

  • No labels