Changing the data encryption key for Watson OpenScale
You can change the encryption key that is used to encrypt data in Watson OpenScale.
Procedure
You must complete the following steps change the Watson
OpenScale
etcd encryption key: - Log in to Red Hat OpenShift Container platform with the following command:
oc login <OpenShift_URL>:<port> - Backup the current Watson
OpenScale encryption key with
the following command:
instanceProjectName='cpd-instance' instanceCRName='aiopenscale' oc get Secret ${instanceCRName}-encryption-secret -n ${instanceProjectName} -o yaml > ${instanceCRName}-encryption-secret.yamlIf you did not install Cloud Pak for Data in the
cpd-instanceproject or useaiopenscaleas the name of the Watson OpenScale custom resource, specify accurate values in theinstanceProjectNameandinstanceCRNamefields. - Change the Watson
OpenScale
etcdencryption key with the following command:base64EncryptionpKey=`echo -n <newEncryptionKey> | base64 | tr -d '\n'` oc patch Secret ${instanceCRName}-encryption-secret -n ${instanceProjectName} --type merge --patch '{"data": {"encryptionKey": "'${base64EncryptionpKey}'"}}'Replace the
<newEncryptionKey>variable with the value of the encryption key that you want to add. - Restart the Watson
OpenScale pods that rely on the
encryption key with following command:
oc delete pod -n ${instanceProjectName} -l "component in (aios-configuration,aios-notification,aios-scheduling)"