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 My Workspace.
Figure 1. The My Workspace button
This opens the right navigation that contains information about the running containers that make
up your workspace.
Click New terminal in the zosconnect
drop down menu.
Figure 2. The New terminal button
This reveals 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 that you replace
<mypassword> with your own password:
Figure 3. Entering the command to encrypt the password
An example of the encrypted password looks something like this:
{aes}APu1HaGpBzYbH+g8xVbuqUgJPz1ydNS9VbpAq1hsFdGt
Copy the encrypted password output from the terminal.
Figure 4. Encrypted password output
Click Stop Workspace.
Updates to the devfile.yaml will take effect only 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 the workspace name to start it.
This restarts with the updated password.
Verify that the environment variables have successfully been passed to the
workspace.
Click My Workspace to reveal the env directory
shown under the zosconnect drop down. Within are the environment variables
that are 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.