Set Up Multiple Virtual Hosts

If you need to support multiple access points to the same Essbase instance integrated with Oracle Identity Cloud Service, follow these instructions to register multiple Redirect URIs for Essbase in your confidential IDCS application.

You must register multiple Redirect URLs with Identity Cloud Service. However, you use IDCS REST API for this task, instead of the Identity Cloud Service Console.

Caution: After you perform the following steps, do not edit the confidential application using the IDCS console. This would overwrite the application and cause the multiple Redirect URLs to be lost.

  1. Use the IDCS REST API to generate an OAuth token using clientid and client secret. The following example uses the jq command line tool to process the cURL command, creating an access token as an environment variable:
    export ACCESS_TOKEN=`curl -u "<clientid>:<clientsecret>" -H 'Conset=UTF-8' --request POST https://<idcsguid>.identity.oraclecloud.com/oauth2/v1/token -d 'grant_type=client_credentials&scope=urn:opc:idm:_myscopes_' | jq -raw-output '.access_token'
  2. Get the APP ID for the application that you want to modify. The following example queries the list of applications, adding a filter for the target application name (assuming the filter returns exactly one application):
    export APP_ID=`curl -X GET -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type:application/scim+json" https://<idcsguid>.identity.oraclecloud.com/admin/v1/Apps?filter=displayName+co+"Essbase+21c" | jq -raw-output '.Resources[0].id'
  3. Create a patch.json file defining the replacements for redirectUris, postLogoutRedirectUris, and logoutUris. Note that the port numbers are added to the URIs.
    "schemas":
            [          
            "urn:ietf:params:scim:api:messages:2.0:PatchOp"
          ],  
         "Operations": [
          {
            "op": "replace",
            "path": "redirectUris",
            "value":
          [   
                        ["https://192.0.2.1:443/essbase/redirect_uri" |
            "https://192.0.2.1:443/essbase/redirect_uri"],  
                        ["https://192.0.2.18:443/essbase/redirect_uri" |
            "https://192.0.2.18/essbase/redirect_uri"]  
              ]
          },          
            {
            "op": "replace",
            "path": "postLogoutRedirectUris", 
            "value":
          [   
                        ["https://192.0.2.1:443/essbase/jet/logout.html" |
            "https:/192.0.2.1:443/essbase/jet/logout.html"],  
                        ["https://192.0.2.18:443/essbase/jet/logout.html" |
            "https://192.0.2.18/essbase/jet/logout.html"]
                ]
          },      
            {         
            "op": "replace",
            "path": "logoutUri",
            "value": "/essbase/jet/logout.html"   }   ]
        }
  4. Issue the patch command with patch.json.
    curl -X PATCH -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type:application/scim+json" [https://<idcsguid>.identity.oraclecloud.com|https://%3Cidcsguid%3E.identity.oraclecloud.com/]/admin/v1/Apps/$APP_ID --data
          @patch.json