DISCLAIMER: These are advanced scenarios which falls out of scope of Standard application support and it requires prior knowledge of working with WebSphere Liberty command line utilities. These scenarios needs to be first tested on a Non production environment and backups are to be taken before running through the instructions.
Focus of this article is to provide methods to migrate a CLM Environment configured to one JAS to a different JAS. In this article you can find various scenarios in which such a migration is required and for each such scenario, we provide a relevant approach to take.
Following are some of the Scenarios
In this scenario we consider multi-tenant production servers
Requirement is to have a single JAS setup for all production CLM servers. This would mean, discard Prod_02_JAS and move Prod_02 authorization to Prod_01_JAS. Following is a graphical representation of the requirement.
The first step is to export the JAS registrations data from Prod_02_JAS. Following are instructions
[JazzAuthServerHome]\cli
and run the following commands ./lsclient -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u [UserName]:[Password] >& prod02jas.json
lsclient.bat -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u [UserName]:[Password] > prod02jas.json
Here is a sample exported file, we would see one such entry per application.
[ { "functional_user_groupIds" : [ "JazzAdmins" ], "trusted_uri_prefixes" : [ "https://localhost:9443/jts/", "https://prod02.example.com:9443/jts/", "https://127.0.0.1:9443/jts/" ], "post_logout_redirect_uris" : [ "https://127.0.0.1:9443/jts/service/com.ibm.team.repository.service.internal.ILogoutRestService", "https://prod02.example.com:9443/jts/service/com.ibm.team.repository.service.internal.ILogoutRestService", "https://localhost:9443/jts/service/com.ibm.team.repository.service.internal.ILogoutRestService" ], "grant_types" : [ "authorization_code", "client_credentials", "implicit", "refresh_token", "urn:ietf:params:oauth:grant-type:jwt-bearer" ], "subject_type" : "public", "application_type" : "web", "allow_regexp_redirects" : false, "registration_client_uri" : "https://prod02jas.example.com:9643/oidc/endpoint/jazzop/registration/5ba62ee8a310409485e3a60988815875", "redirect_uris" : [ "https://localhost:9443/jts/jsa", "https://localhost:9443/jts/jsa?confirm=true", "https://prod02.example.com:9443/jts/jsa", "https://prod02.example.com:9443/jts/jsa?confirm=true", "https://127.0.0.1:9443/jts/jsa", "https://127.0.0.1:9443/jts/jsa?confirm=true" ], "token_endpoint_auth_method" : "client_secret_basic", "client_id" : "5ba62ee8a310409485e3a60988815875", "introspect_tokens" : true, "client_secret_expires_at" : 0, "scope" : "openid profile email general", "etag" : "ax5TWj+MkZm0Uybao5cBBA==", "client_id_issued_at" : 1558514044, "client_secret" : "*", "resource_ids" : [ ], "functional_user_id" : "jts_user", "client_name" : "/jts", "response_types" : [ "code", "token", "id_token token" ], "preauthorized_scope" : "openid profile email general" } ]
The next step is to create/import the configuration to Prod_01_JAS. Prior to importing the configuration, we need to change the Client secret and the JAS URL value in the exported data.
Following are instructions
[JazzAuthServerHome]\cli
registration_client_uri
to the Prod_01_JAS URL (There would be one parameter per application) "registration_client_uri" : "https://prod02jas.example.com:9643/oidc/endpoint/jazzop/registration/5ba62ee8a310409485e3a60988815875"
"registration_client_uri" : "https://[Prod_01_JAS_URL]:[PORT]/oidc/endpoint/jazzop/registration/5ba62ee8a310409485e3a60988815875"
"client_secret" : "*"
"client_secret" : "NewClientSecret"
[JazzAuthServerHome]\cli
and run the following command
./ldclient -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u [UserName]:[Password] -c prod02jas.json
ldclient.bat -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u [UserName]:[Password] -c prod02jas.json
Now that the JAS servers are merged, we have to update the JAS URLs and new Client Secret in the Prod_02 application server teamserver.properties files.
[JAZZ_HOME]\server\conf\[app]\teamserver.properties
com.ibm.team.repository.servlet.sso_as=https\://prod_02_jas.example.com\:9643/oidc/endpoint/jazzop com.ibm.team.repository.servlet.sso_clientSecret=[qyLk8RKdyNJh0eGxIKjGhbGy8X377VcBQKOGE81CkgKdVX50UT91Xb/rh0uA77d467nb1tDNqctXJ9ppZVzPQw\=\=]
com.ibm.team.repository.servlet.sso_as=https\://[Prod_01_JAS_URL]\:[PORT]/oidc/endpoint/jazzop com.ibm.team.repository.servlet.sso_clientSecret=NewClientSecret
[JAZZ_HOME]\server\conf\rs\app.properties
jsa.auth.server.url=https\://prod_02_jas.example.com\:9643/oidc/endpoint/jazzop jsa.client.secret=[qyLk8RKdyNJh0eGxIKjGhbGy8X377VcBQKOGE81CkgKdVX50UT91Xb/rh0uA77d467nb1tDNqctXJ9ppZVzPQw\=\=]
jsa.auth.server.url=https\://[Prod_01_JAS_URL]\:[PORT]/oidc/endpoint/jazzop jsa.client.secret=NewClientSecret
The lqe.properties file does not include the ClientID and Secret value. For these 2 applications follow the server rename procedure in our Infocenter 6.0.6.1
Highlevel procedure
configMode=true
Once the JAS servers are merged and the working and testing of Prod_01 and Prod_02 CLM instances are complete, you can discard Prod_02_JAS server.
In this scenario we consider multi-tenant production servers
Requirement is to clone Prod_02 to the existing Staging environment as Prod_02_Clone and connect to StagingJAS for Authorization. Following is a graphical representation of the requirement.
The first step is to clone the production CLM environment Prod_02 to staging without the JAS data and perform a Server Rename to change Public URI to Prod_02_Clone. The instructions to be followed are listed in the following links, however, follow JAS related steps only to disable it from all applications before the Server Rename. To re-enable JAS on the clone, use the steps in this article to connect to existing JAS StagingJAS.
The next step is to export the JAS registrations data for prod4 from ProdJAS. In this scenario we consider the Prod_02 server consists of jts, ccm, dcc and jrs applications. We will export individual application registration data from ProdJAS.
Following are instructions
[JAZZ_HOME]\server\conf\[app]\teamserver.properties
com.ibm.team.repository.servlet.sso_clientId=4ce915c5d6a1467b9fcd397d62c29c6e
https://prodjas.example.com:9643/oidc/endpoint/jazzop/registration
https://prod02.example.com/rs
"client_id" : "9b4d6f2d534749fcb11502be2aac86b8" client_name "/jrs"
[JazzAuthServerHome]\cli
and run the following command
./lsclient -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u <UserName>:<Password> <ClientID> >& prod02jts.json
lsclient.bat -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u <UserName>:<Password> <ClientID> > prod02jts.json
./lsclient -a https://prodjas.example.com:9643/oidc/endpoint/jazzop -u clmadmin:mypassword 4ce915c5d6a1467b9fcd397d62c29c6e >& prod02jts.json
[ { "functional_user_groupIds" : [ "JazzAdmins" ], "trusted_uri_prefixes" : [ "https://localhost:9443/jts/", "https://prod02.example.com:9443/jts/", "https://127.0.0.1:9443/jts/" ], "post_logout_redirect_uris" : [ "https://127.0.0.1:9443/jts/service/com.ibm.team.repository.service.internal.ILogoutRestService", "https://prod02.example.com:9443/jts/service/com.ibm.team.repository.service.internal.ILogoutRestService", "https://localhost:9443/jts/service/com.ibm.team.repository.service.internal.ILogoutRestService" ], "grant_types" : [ "authorization_code", "client_credentials", "implicit", "refresh_token", "urn:ietf:params:oauth:grant-type:jwt-bearer" ], "subject_type" : "public", "application_type" : "web", "allow_regexp_redirects" : false, "registration_client_uri" : "https://prodjas.example.com:9643/oidc/endpoint/jazzop/registration/5ba62ee8a310409485e3a60988815875", "redirect_uris" : [ "https://localhost:9443/jts/jsa", "https://localhost:9443/jts/jsa?confirm=true", "https://prod02.example.com:9443/jts/jsa", "https://prod02.example.com:9443/jts/jsa?confirm=true", "https://127.0.0.1:9443/jts/jsa", "https://127.0.0.1:9443/jts/jsa?confirm=true" ], "token_endpoint_auth_method" : "client_secret_basic", "client_id" : "5ba62ee8a310409485e3a60988815875", "introspect_tokens" : true, "client_secret_expires_at" : 0, "scope" : "openid profile email general", "etag" : "ax5TWj+MkZm0Uybao5cBBA==", "client_id_issued_at" : 1558514044, "client_secret" : "*", "resource_ids" : [ ], "functional_user_id" : "jts_user", "client_name" : "/jts", "response_types" : [ "code", "token", "id_token token" ], "preauthorized_scope" : "openid profile email general" } ]
The next step is to create/import these configuration to the staging JAS environment StagingJAS. Prior to importing the configuration, we need to change the URLs to match the server rename performed and the Client secret.
Following are instructions
[JazzAuthServerHome]\cli
trusted_uri_prefixes
, post_logout_redirect_uris
and redirect_uris
https://prod02.example.com
to https://prod02clone.example.com
registration_client_uri
to the Staging JAS URL "registration_client_uri" : "https://prodjas.example.com:9643/oidc/endpoint/jazzop/registration/5ba62ee8a310409485e3a60988815875"
"registration_client_uri" : "https://[STAGING_JAS_URL]:[PORT]/oidc/endpoint/jazzop/registration/5ba62ee8a310409485e3a60988815875"
"client_secret" : "*"
"client_secret" : "NewClientSecret"
[JazzAuthServerHome]\cli
and run the following command
./ldclient -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u <UserName>:<Password> -c prod02jts.json
ldclient.bat -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u <UserName>:<Password> -c prod02jts.json
./ldclient -a https://stagingjas.example.com:9643/oidc/endpoint/jazzop -u clmadmin:mypassword -c prod02jts.json
In Step 1 we had performed a Server rename of the cloned Prod_02 CLM instance in staging server to _Prod_02_Clone. We can now complete the Server Rename process with the following steps.
[JAZZ_HOME]\server\conf\[app]\teamserver.properties
com.ibm.team.repository.servlet.sso_as=https\://pordjas.example.com\:9643/oidc/endpoint/jazzop com.ibm.team.repository.servlet.sso_clientSecret=[qyLk8RKdyNJh0eGxIKjGhbGy8X377VcBQKOGE81CkgKdVX50UT91Xb/rh0uA77d467nb1tDNqctXJ9ppZVzPQw\=\=]
com.ibm.team.repository.servlet.sso_as=https\://[STAGING_JAS_URL]\:[PORT]/oidc/endpoint/jazzop com.ibm.team.repository.servlet.sso_clientSecret=NewClientSecret
[JAZZ_HOME]\server\conf\rs\app.properties
jsa.auth.server.url=https\://prodjas.example.com\:9643/oidc/endpoint/jazzop jsa.client.secret=[qyLk8RKdyNJh0eGxIKjGhbGy8X377VcBQKOGE81CkgKdVX50UT91Xb/rh0uA77d467nb1tDNqctXJ9ppZVzPQw\=\=]
jsa.auth.server.url=https\://[STAGING_JAS_URL]\:[PORT]/oidc/endpoint/jazzop jsa.client.secret=NewClientSecret
In this scenario we consider multi-tenant production servers
Requirement is to clone another copy of Prod_01 to the existing Staging environment as Prod_01_Clone02 and connect to StagingJAS for Authorization. Following is a graphical representation of the requirement.
The first step is to clone another copy the production CLM environment Prod_01 to staging without the JAS data and perform a Server Rename to change Public URI to Prod_01_Clone02. The instructions to be followed are listed in the following links, however, follow JAS related steps only to disable it from all applications before the Server Rename. To re-enable JAS on the clone, use the steps in this article to connect to existing JAS StagingJAS.
The next step is to export the JAS registrations data for Prod_01 from ProdJAS. In this scenario we consider the Prod_01 server consists of jts, ccm applications. We will export individual application registration data from ProdJAS.
Following are instructions
[JAZZ_HOME]\server\conf\[app]\teamserver.properties
com.ibm.team.repository.servlet.sso_clientId=4ce915c5d6a1467b9fcd397d62c29c6e
[JazzAuthServerHome]\cli
and run the following command
./lsclient -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u <UserName>:<Password> <ClientID> >& prod01jts.json
lsclient.bat -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u <UserName>:<Password> <ClientID> > prod01jts.json
./lsclient -a https://prodjas.example.com:9643/oidc/endpoint/jazzop -u clmadmin:mypassword 4ce915c5d6a1467b9fcd397d62c29c6e >& prod01jts.json
[ { "functional_user_groupIds" : [ "JazzAdmins" ], "trusted_uri_prefixes" : [ "https://localhost:9443/jts/", "https://prod02.example.com:9443/jts/", "https://127.0.0.1:9443/jts/" ], "post_logout_redirect_uris" : [ "https://127.0.0.1:9443/jts/service/com.ibm.team.repository.service.internal.ILogoutRestService", "https://prod02.example.com:9443/jts/service/com.ibm.team.repository.service.internal.ILogoutRestService", "https://localhost:9443/jts/service/com.ibm.team.repository.service.internal.ILogoutRestService" ], "grant_types" : [ "authorization_code", "client_credentials", "implicit", "refresh_token", "urn:ietf:params:oauth:grant-type:jwt-bearer" ], "subject_type" : "public", "application_type" : "web", "allow_regexp_redirects" : false, "registration_client_uri" : "https://prod02jas.example.com:9643/oidc/endpoint/jazzop/registration/5ba62ee8a310409485e3a60988815875", "redirect_uris" : [ "https://localhost:9443/jts/jsa", "https://localhost:9443/jts/jsa?confirm=true", "https://prod02.example.com:9443/jts/jsa", "https://prod02.example.com:9443/jts/jsa?confirm=true", "https://127.0.0.1:9443/jts/jsa", "https://127.0.0.1:9443/jts/jsa?confirm=true" ], "token_endpoint_auth_method" : "client_secret_basic", "client_id" : "4ce915c5d6a1467b9fcd397d62c29c6e", "introspect_tokens" : true, "client_secret_expires_at" : 0, "scope" : "openid profile email general", "etag" : "ax5TWj+MkZm0Uybao5cBBA==", "client_id_issued_at" : 1558514044, "client_secret" : "*", "resource_ids" : [ ], "functional_user_id" : "jts_user", "client_name" : "/jts", "response_types" : [ "code", "token", "id_token token" ], "preauthorized_scope" : "openid profile email general" } ]
The next step is to create/import these configuration to the staging JAS environment StagingJAS. Prior to importing the configuration, we need to change the URLs to match the server rename performed and the Client ID and Secret needs to be changed as well to make the new configuration unique as the CLient ID exists from the previous import for Prod_01_Clone .
Following are instructions
[JazzAuthServerHome]\cli
trusted_uri_prefixes
, post_logout_redirect_uris
and redirect_uris
https://prod01.example.com
to https://prod01clone02.example.com
registration_client_uri
to the Staging JAS URL "registration_client_uri" : "https://prodjas.example.com:9643/oidc/endpoint/jazzop/registration/5ba62ee8a310409485e3a60988815875"
"registration_client_uri" : "https://[STAGING_JAS_URL]:[PORT]/oidc/endpoint/jazzop/registration/5ba62ee8a310409485e3a60988815875"
"client_id" : "4ce915c5d6a1467b9fcd397d62c29c6e"
"client_id" : "prod_01_clone02"
"client_secret" : "*"
"client_secret" : "NewClientSecret"
[JazzAuthServerHome]\cli
and run the following command
./ldclient -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u <UserName>:<Password> -c prod01jts.json
ldclient.bat -a https://<JazzAuthServerURL>:9643/oidc/endpoint/jazzop -u <UserName>:<Password> -c prod01jts.json
./ldclient -a https://stagingjas.example.com:9643/oidc/endpoint/jazzop -u clmadmin:mypassword -c prod01jts.json
In Step1 we had performed a Server rename of another clone Prod_01 CLM instance in staging server to _Prod_01_Clone02. We can now complete the Server Rename process with the following steps.
[JAZZ_HOME]\server\conf\[app]\teamserver.properties
com.ibm.team.repository.servlet.sso_as=https\://prodjas.example.com\:9643/oidc/endpoint/jazzop com.ibm.team.repository.servlet.sso_clientId=4ce915c5d6a1467b9fcd397d62c29c6e com.ibm.team.repository.servlet.sso_clientSecret=[qyLk8RKdyNJh0eGxIKjX377VcBQK81CkgKdVX1Xb/rh0uA77d467nb1tDNqctXJ9ppZVzPQw\=\=]
com.ibm.team.repository.servlet.sso_as=https\://stagingjas.example.com\:9643/oidc/endpoint/jazzop com.ibm.team.repository.servlet.sso_clientId=Prod_01_Clone02 com.ibm.team.repository.servlet.sso_clientSecret=NewClientSecret
Status icon key: