Configuring the certificates and keys
You must configure the IBM Secure Execution (SE) certificates and keys for your worker nodes.
- Change to the
rootdirectory:$ cd /root Create your key by running the following commands:- Create a directory
kbs-storageto store your key by running the following command:mkdir -p kbs/data/kbs-storage cd kbs/data/kbs-storage -
Create your key by running the following command:echo "mykey" > key Return to root directory cd /root
- Create a directory
- Generate the user auth key pair by running the following commands:
- Create a
kbs.keykey by running the following command:$ openssl genpkey -algorithm ed25519 > kbs/kbs.key - Create a
kbs.pemkey by running the following command:$ openssl pkey -in kbs/kbs.key -pubout -out kbs/kbs.pemNote: These user auth key pair is used to perform admin operations on a Trustee using KBS Client.
- Create a
- Generate the RSA keys:
- Create a directory for the RSA keys by running the following
command:
$ mkdir -p kbs/data/rsa - Go to the
rsadirectory:$ pushd kbs/data/rsaNote: The Verifier uses this RSA key pair to decrypt additional request blobs sent by the Attestation Agent. - Generate an RSA key pair by running the following command:
$ openssl genrsa -aes256 -passout pass:<password> -out encrypt_key-psw.pem 4096 (1)- Specify the RSA key password.
- Create an
encrypt_key.pubkey by running the following command:$ openssl rsa -in encrypt_key-psw.pem -passin pass:<password> -pubout -out encrypt_key.pub - Create an
encrypt_key.pemkey by running the following command:$ openssl rsa -in encrypt_key-psw.pem -out encrypt_key.pem - Exit the
rsadirectory:$ popd
- Create a directory for the RSA keys by running the following
command:
- Download the Host Key Document (HKD) certificate.
- Download the Host Key Document (HKD) from the machine where the SE PeerPod VM is deployed.
- Create a
machine.shmanifest file according to the following example:MACHINE_TYPE="$(awk '/^Type:/ { print $NF }' /proc/sysinfo)" echo "machine type is $MACHINE_TYPE" MACHINE_PLANT="$(awk '/^Plant:/ { print $NF }' /proc/sysinfo)" echo "machine plant is $MACHINE_PLANT" MACHINE_SERIAL="$(awk '/^Sequence Code:/ { sub(/^0+/, "", $NF) ; print $NF }' /proc/sysinfo)" echo "machine serial is $MACHINE_SERIAL" echo "Formatted hkd is HKD-$MACHINE_TYPE-$MACHINE_PLANT$MACHINE_SERIAL.crt" - Make the
machine.shscript executable by running the following command:$ chmod +x machine.sh - Run the script:
Example output$ ./machine.shHKD-3931-0275D38.crt - Download the IBM Secure Execution Host Key Document (HKD) from : https://www.ibm.com/docs/en/linux-on-systems?topic=execution-obtain-host-key-document
.Note: Currently, downloading directly from the portal is unavailable. Perform the following alternative steps to download HKD.
- Login to the portal.
- In a new tab enter the following link
https://www.ibm.com/support/resourcelink/api/content/raw/hkd-public/<HKD>.crtwith the HKD cert value you obtained by running./machine.shscript.
- Create a directory 'hkds' for the Host Key Document (HKD) certificate by running the following
command:
$ mkdir -p kbs/data/hkds - Copy your HKD certificate to the
hkdsdirectory by running the following command::$ cp ${DOWLOAD_FOLDER}/HKD.crt kbs/data/hkds/HKD.crt