Key migration
This procedure describes how to migrate keys from Key Trustee Server to Ranger KMS.
- Locate the keys in Key Trustee Server.
- Login to Ranger UI with Key Admin credentials.
- Go to , to view the HDFS encryption zone keys with service
Ranger KMS KTS.
- If Navigator Encrypt is setup, locate its keys.
- SSH in to the active KTS node.
- Login to Postgres 14 database for Cloudera Runtime version 7.1.9.
- The 'keytrustee' user is created with 'nologin' by default. Update
the keytrustee user in /etc/passwd before
accessing the database by running the following command:
sed -i "/keytrustee:x:$( id -u keytrustee ):$( id -g keytrustee ):Keytrustee User:\/var\/lib\/keytrustee:\/sbin\/nologin/c\keytrustee:x:$( id -u keytrustee ):$( id -g keytrustee ):Keytrustee User:\/var\/lib\/keytrustee:\/bin\/bash" /etc/passwd - Run the following commands:
select handle from deposit;For Cloudera Runtime version 7.1.9:
# sudo -u keytrustee LD_LIBRARY_PATH=/opt/cloudera/parcels/KEYTRUSTEE_SERVER/PG_DB/opt/postgres/14.2/lib /opt/cloudera/parcels/KEYTRUSTEE_SERVER/PG_DB/opt/postgres/14.2/bin/psql -p 11381 keytrustee keytrustee=# select handle from deposit; handle --------- mykey1 mykey2 control control (6 rows)
# mysql -u root -p
MariaDB [(none)]> use rangerkms;
MariaDB [rangerkms]> show tables;
+---------------------+
| Tables_in_rangerkms |
+---------------------+
| navencrypt_deposit |
| ranger_keystore |
| ranger_masterkey |
+---------------------+
3 rows in set (0.00 sec)
