Upgrade the Oracle Identity Cloud Service App Gateway Version
If your Oracle WebLogic Server
for OCI domain uses Oracle Identity Cloud
Service for authentication, you must upgrade the App Gateway on each compute instance in the
domain as an opc user. The latest App Gateway version is
25.1.03.
The upgrade steps are required only if both of these are true:
-
You selected the Enable Authentication Using Identity Cloud Service option when creating the domain.
-
The Oracle Identity Cloud Service App Gateway version is later than 19.2.1.
To upgrade the Oracle Identity Cloud Service App Gateway version, perform the following steps on each compute instance in the domain:
Note:
You must delete the existing container and recreate the container with a new version of the image.- Download the App Gateway Docker Image for Oracle Identity Cloud
Service .
- Sign in to the Oracle Cloud Infrastructure Console.
- Expand the Navigation Drawer, click Identity and Security. From the Identity group, click Domains.
- Select any domain. If you do not see any domains in your compartment you can navigate to the root compartment.
- On the menu to the left click Settings and then click Downloads.
- In the Downloads page, click Download to the
right of App Gateway Docker Image for Identity Cloud
Service, and download the file,
idcs-appgateway-docker<version>.zipto a location on your system. - Navigate to the directory where you downloaded the file, and extract
the contents of the zip file.Example:
unzip idcs-appgateway-docker-<version>.zipAfter unzip, the file,appgateway-<version>.tar.gzis created.
- Download the App Gateway wallet tool (optional).
- Repeat steps a and b from step 1.
- From the App Gateway wallet tool tile, click
Download to download the wallet file. For
example,
idcs-appgateway-wallet-tool-<version>.zip.
- Copy the App Gateway Docker Image for Identity Cloud Service and App Gateway
wallet tool to one of the virtual machines in the Oracle WebLogic Server
for OCI instance.
For example, copy the files,
appgateway-<version>.tar.gzandidcs-appgateway-wallet-tool-<version>.zip. - Deploy the App Gateway Docker Image for Identity Cloud Service.
- In the Oracle WebLogic Server
for OCI virtual machine (VM) instance, load the
.tar.gzfile to the local Podman registry.sudo podman load -i <.tar.gz file>Example:
sudo podman load --input /tmp/appgateway-<version>.tar.gz - Verify that you see the image in the local Docker registry.
sudo podman imagesFor example:
REPOSITORY TAG IMAGE ID CREATED SIZE local.local/idcs-appgateway-docker 25.1.03-2501230623 06cb679d8b32 1 months ago 505 MB localhost/idcs/idcs-appgateway 21.2.2-2105050509 58ed62ca635c 3 years ago 624 MB - Record the value from the
REPOSITORYcolumn after the first slash for the newly added image. Using the example from above this would be "idcs-appgateway-docker". This will be required in step 8 when setting the "idcs_cloudgate_docker_image_name" metadata value. - Record the value from the
TAGcolumn for the newly added image. Using the example from above this would be "25.1.03-2501230623". This will be required in step 8 when setting the "idcs_cloudgate_docker_image_version" metadata value - Record the value from the
REPOSITORYcolumn for the older image. Using the example from above this would be "localhost/idcs/idcs-appgateway". This will be required in step 10 when removing the older docker image. - Record the value from the
TAGcolumn for the older image. Using the example from above this would be "25.1.03-2501230623". This will be required in step 10 when removing the older docker image.
- In the Oracle WebLogic Server
for OCI virtual machine (VM) instance, load the
- Deploy the Oracle Identity Cloud
Service App Gateway wallet file (optional).
- Create a new
wallet_tooldirectory,/usr/lib/wallet_tool.sudo mkdir -p /usr/lib/wallet_tool/
- Extract the
idcs-appgateway-wallet-tool zipto/usr/lib/wallet_tool.sudo unzip /tmp/idcs-appgateway-wallet-tool-<version>.zip -d /usr/lib/wallet_tool/
- Create a new
- Create the
cwallet.ssofile (optional).If the wallet file is not deleted, you can use the existing wallet file (
cwallet.sso) to upgrade to the latest App Gateway version, or upgrade the App Gateway wallet tool and generate a newcwallet.ssofile.Use one of the following methods to create the
cwallet.ssofile.- Manual:
-
Retrieve the client ID and client secret of the
app_gatewayusing information in theidcs_artfacts.txtin the/u01/datadirectory.cat /u01/data/.idcs_artifacts.txt -
Take a note of the
displayNameof theapp_gatewayin/u01/data/.idcs_artifacts.txt.Example:
{ "confidential_app": { "meta": { "location": "https://idcs-<GUID>.identity.oraclecloud.com:443/admin/v1/Apps/<confidential_app_ID>" } }, "app_gateway": { "meta": { "location": "https://idcs-<GUID>.identity.oraclecloud.com:443/admin/v1/CloudGates/<app_gateway_ID>" }, "displayName": "idcs0706_app_gateway_2021-06-07T14:57:22.297066", "id": "< app_gateway_ID>" }, "enterprise_app": { "meta": { "location": "https://idcs-<GUID>.identity.oraclecloud.com:443/admin/v1/Apps/<enterprise_app_ID>" } } }Note:
Note: You must belong to the Administrator group in Oracle Identity Cloud Service to access this information.
- In the Oracle Identity Cloud
Service console, expand the Navigation
Drawer, click
Security, and then click
App Gateways. In the App
Gateways page, search for the App Gateway with the noted
displayNameand take a note of the client ID and client secret. -
Navigate to
/u01/data/cloudgate_config/directory and create thecwallet.ssofile.cd /u01/data/cloudgate_config/export LD_LIBRARY_PATH=/usr/lib/wallet_tool/lib/:/usr/libecho <client_secret> | /usr/lib/wallet_tool/cgwallettool --create -i <client_id>
-
- Using Scripts:
Note:
You can use scripts to create the
cwallet.ssofile for Oracle WebLogic Server for OCI version 21.2.3 or later; version 24.3.1 has the latest scripts to support App Gateway Docker Image for Identity Cloud Service 25.1.03.-
Add the Oracle Identity Cloud Service client ID and client secret to
/u01/data/cloudgate_config/appgateway-env. -
Run the
create_idcs_cloudgate_cwallet.shscript as a root user.Note:
Make sure you are using the latest version of thecreate_idcs_cloudgate_cwallet.shscript.Example:sudo echo "" >> /u01/data/cloudgate_config/appgateway-env sudo echo "CG_APP_NAME=<client_id>" >> /u01/data/cloudgate_config/appgateway-env sudo echo "CG_APP_SECRET=<client_secret>" >> /u01/data/cloudgate_config/appgateway-env sudo sh /opt/scripts/idcs/create_idcs_cloudgate_cwallet.sh
-
- Manual:
- Stop and remove the existing App Gateway container.
sudo podman container stop appgatewaysudo podman container rm appgateway - Create and start the new App Gateway container.
Use one of the following methods to create and start the new App Gateway container:
- Manual:
-
Run the
update_metadatascript to update the metadata fordocker_image_versionto the value recorded from step 4d anddocker_image_nameto point to the values recorded from step 4c.Example:
sudo python3 /opt/scripts/utils/update_metadata.py -k idcs_cloudgate_docker_image_version -v <version> sudo python3 /opt/scripts/utils/update_metadata.py -k idcs_cloudgate_docker_image_name -v idcs-appgateway-dockerNote:
This step to update the metadata script is required if you upgrade the Oracle Identity Cloud Service App Gateway version during scale out. -
Navigate to the
/u01/data/cloudgate_config/directory and change the permissions to777and the owner to8000:8000for this directory.Example:cd /u01/data/cloudgate_config/ sudo chmod -R 777 /u01/data/cloudgate_config/ sudo chown -R 8000:8000 /u01/data/cloudgate_config/* -
Start the App Gateway container using the
podman runcommand.Note:
You must mount the local folder,
/u01/data/cloudgate_configvolume to the directory,/usr/local/nginx/conf/inside the container<my-container>.The
cwallet.ssofile that contains the client ID and client secret must be copied to the folder,/usr/local/nginx/conf/in the container so that the container can reference the wallet file.Example:sudo podman run -it -d --name appgateway --log-driver=journald --security-opt label=disable --env-file /u01/data/cloudgate_config/appgateway-env / --env HOST_MACHINE=`hostname -f` --env CLOUDGATE_VERSION=<version> / --volume /u01/data/cloudgate_config/:/usr/local/nginx/conf/:z / --net=host idcs/idcs-appgateway:<version>
-
- Using Scripts:
Note:
You can use scripts to create the
cwallet.ssofile for Oracle WebLogic Server for OCI version 21.2.3 or later; version 24.3.1 has the latest scripts to support Oracle Identity Cloud Service App Gateway version 25.1.03.-
Run the
update_metadatascript to update the metadata fordocker_image_versionanddocker_image_nameto point to latest version.Example:
sudo python3 /opt/scripts/utils/update_metadata.py -k idcs_cloudgate_docker_image_version -v <version> sudo python3 /opt/scripts/utils/update_metadata.py -k idcs_cloudgate_docker_image_name -v idcs/idcs-appgateway -
Start the App Gateway container using
run_cloudgate.sh.sudo sh /opt/scripts/idcs/run_cloudgate.sh
-
- Manual:
- Verify the upgrade.
- Check the App Gateway container logs.
sudo podman logs appgateway - Log in and connect to the container using
bash.Example:sudo podman exec -it appgateway bash - Navigate to the
binfolder in the container, and check thecloudgate-envfile.Example:cd /usr/local/nginx/logs/ cd /scratch/oracle/idcs-cloudgate/latest/bin/ ./cg-env
- Check the App Gateway container logs.
- Remove the existing App Gateway Docker Image by executing the following command
using the value recorded in step 4e for "existing_repository_name" and the value
recorded in step 4f for "existing_version".
sudo podman image rm opc-delivery.docker.oraclecorp.com/idcs/<container_name:existing_version> - Repeat from step 3 for all remaining compute instances in this domain.