How to move Identity Service to a new machine using the same DB - OpenLM Software License Management
Israel +972 4 6308447      USA +1 619 831 0029         UK +44 203 807 9405         JAPAN +81 505 893 6263 担当:萩原

How to move Identity Service to a new machine using the same DB

You are here:
< All Topics

How to move Identity Service to a new machine using the same DB

Pre-requisites:

Identity Service installed on Machine_1 with configured connections to the components (e.g. Server, DSS, Service Now, Report Scheduler)

Instructions:

  1. Go to Identity Service→Settings→Security Configuration and turn off all components as depicted in the screenshot below:
    Identity Service security Configuration Screen
  2. Uninstall the Identity Service then delete its correspondent folder.
  3. Install the Identity Service on the new machine (e.g. Machine_2).
  4. Indicate the Database used for old the Identity Service during the installation.
  5. Complete installation.
  6. Run the scripts below for Identity DataBase where NewIdentityLink should be replaced with a new Identity link from the new machine with a port (e.g. http://test.openlm.com:5000)

MySQL/MariaDB

INSERT INTO ClientRedirectUris (RedirectUri,ClientId) 
SELECT 'NewIdentityLink'  AS RedirectUri
      ,(SELECT Id FROM Clients WHERE ClientID='identity.admin.ui' ) AS ClientId
WHERE NOT EXISTS (SELECT 1 
                  FROM ClientRedirectUris AS u JOIN Clients AS c
                                                 ON u.ClientId = c.ID
                  WHERE RedirectUri = 'NewIdentityLink');
                  
INSERT INTO ClientPostLogoutRedirectUris (PostLogoutRedirectUri,ClientId) 
SELECT 'NewIdentityLink'  AS PostLogoutRedirectUri
      ,(SELECT Id FROM Clients WHERE ClientID='identity.admin.ui' ) AS ClientId
WHERE NOT EXISTS (SELECT 1 
                  FROM ClientPostLogoutRedirectUris AS u JOIN Clients AS c
                                                 ON u.ClientId = c.ID
                  WHERE PostLogoutRedirectUri = 'NewIdentityLink');
                  
INSERT INTO ClientCorsOrigins (Origin,ClientId) 
SELECT 'NewIdentityLink'  AS Origin
      ,(SELECT Id FROM Clients WHERE ClientID='identity.admin.ui' ) AS ClientId
WHERE NOT EXISTS (SELECT 1 
                  FROM ClientCorsOrigins AS u JOIN Clients AS c
                                                 ON u.ClientId = c.ID
                  WHERE Origin = 'NewIdentityLink');



MSSQL

INSERT INTO ClientRedirectUris (RedirectUri,ClientId) 
SELECT 'NewIdentityLink'  AS RedirectUri
      ,(SELECT Id FROM Clients WHERE ClientId='identity.admin.ui' ) AS ClientId
WHERE NOT EXISTS (SELECT 1 
                  FROM ClientRedirectUris AS u JOIN Clients AS c
                                                 ON u.ClientId = c.Id
                  WHERE RedirectUri = 'NewIdentityLink');
                  
INSERT INTO ClientPostLogoutRedirectUris (PostLogoutRedirectUri,ClientId) 
SELECT 'NewIdentityLink'  AS PostLogoutRedirectUri
      ,(SELECT Id FROM Clients WHERE ClientId='identity.admin.ui' ) AS ClientId
WHERE NOT EXISTS (SELECT 1 
                  FROM ClientPostLogoutRedirectUris AS u JOIN Clients AS c
                                                 ON u.ClientId = c.Id
                  WHERE PostLogoutRedirectUri = 'NewIdentityLink');
                  
INSERT INTO ClientCorsOrigins (Origin,ClientId) 
SELECT 'NewIdentityLink'  AS Origin
      ,(SELECT Id FROM Clients WHERE ClientId='identity.admin.ui' ) AS ClientId
WHERE NOT EXISTS (SELECT 1 
                  FROM ClientCorsOrigins AS u JOIN Clients AS c
                                                 ON u.ClientId = c.Id
                  WHERE Origin = 'NewIdentityLink');

  1. Restart Identity Service from Windows Services
  2. The Identity is ready to use. Connect back all components to grant security

 

Previous How to configure the Identity Service
Next How to set up the Personal Dashboard authentication
Table of Contents