Important: Ensure your Red Hat CodeReady Workspaces is running before following
these steps.
Procedure
Open a terminal in the running z/OS Connect Designer container.
Click the My Workspace button in the right hand
navigation.
Figure 1. The My Workspace button.
This opens the right hand navigation containing information about the running containers that
make up your workspace.
Click the New terminal button under the
zosconnect drop down.
Figure 2. The New terminal button.
This will reveal a terminal from the zosconnect container.
Within the running z/OS Connect Designer container we
have access to the securityUtility feature. Using this we can encrypt the password
within the workspace.
Enter the following command within the terminal ensuring you replace
<myPassword> with your own password:
Figure 3. Entering the command to encrypt password.
The output looks something like this:
{aes}APu1HaGpBzYbH+g8xVbuqUgJPz1ydNS9VbpAq1hstGdF
Copy the encrypted password output from the terminal.
Figure 4. Encrypted password output.
Click on the Stop Workspace button.
Updates to the devfile.yaml will only take effect when the workspace is
restarted. To do this we need to stop the running workspace.
Figure 5. Stopping the workspace.
Update the DB2_PASSWORD variable in the
Devfile.yaml.
Navigate to your workspace tab and update the DB2_PASSWORD environment variables
with the output from Step 3.
Figure 6. Updating the DB2_PASSWORD variable.
Figure 7. Updated DB2_PASSWORD variable with
output.
Click on the workspace name to start it.
This will restart with the updated password.
Verify the environment variables have successfully been passed to the workspace.
Click on the My Workspace button on the right hand side navigation to
reveal the env directory shown under the zosconnect
drop down. Within are the environment variables defined in your devfile.yaml.
Figure 8. Viewing environmental variables.
Results
You have successfully encrypted a password using the running z/OS Connect Designer container in Red Hat CodeReady Workspaces.