Use attestation as evidence that the KVM guest runs in secure-execution mode. If the KVM guest was built for one particular IBM Z server, the attestation also
verifies that the KVM guest runs on that specific server.
If the KVM guest was built for several servers, the attestation only verifies that
the KVM guest runs on one of those servers.
As of IBM® z17®, you can add
secret store measurements to the attestation.
After
successful attestation completes, you can check the measurements.
Before you begin
You require the following access rights:
Access to the secure execution header of the KVM guest to be attested.
Access to the KVM guest to be attested.
On the KVM guest to be attested: You need to be able to send and receive requests and responses
to the KVM guest.
You require the following input files:
A host key
document of the IBM Z system where the guest to be
attested runs.
The IBM Z signing-key certificate (also called a host-key-signing-key certificate) used by IBM
to sign the host key
document.
An intermediate CA certificate used to sign the IBM Z signing-key certificate.
The KVM guest to be attested. In the examples in this section, this KVM guest is called
secguest.
A trusted Linux instance. In the examples in this section, this Linux instance is called
trusted. This instance can be:
A Linux instance running on IBM Z hardware. If you want to use IBM Z, the Linux instance should
be a previously attested secure execution guest or be on your premises and managed
by trusted personnel.
A Linux instance running on x86 hardware. No special setup is required. If you want to use a
local workstation, it must adhere to the security policies of your organization.
The trusted Linux instance requires the pvattest.
The first attestation is typically done on a system you fully control, such as your laptop.
From the trusted Linux instance you send an attestation request to the KVM guest to be
attested. The ultravisor processes the request and creates a response. The response is an answer
document that you retrieve, and that you must validate. This process is illustrated in Figure 1.
Figure 1. The process of attestation
Procedure
On your trusted Linux instance, prepare the attestation request:
Use the pvattest create command to create an attestation
request.
-k <host_key_document>specifies the host key
document.
-C <CA_certificate>specifies the certificate that is used to establish a chain of
trust for the verification of the host key
documents. Specify this
option twice to specify the IBM Z signing-key certificate and the intermediate CA certificate
(signed by the root CA).
--arpk <request_protection_key>generates a random AES-256-GCM key that protects the
attestation request. Take care not to inadvertently publish this key, as the attestation could then
be tampered with.
-o <request_file>specifies the file that contains the generated add-secret
request.
For example, to use
a host-key document hkd.crt.
a CA certificate CA.crt.
an IBM signing key ibmsk.crt.
an output file attreq.bin for the request.
an output file arp.key for the request protection key.
In this example, the attestation request is written to
attreq.bin. The command generates a key that protects the request and writes it
to a file, here arp.key.
Send the attestation request to the KVM guest to be attested.
Use, for
example, the secure-copy (scp) command to transfer the request file. For
example:
[trusted]# scp attreq.bin seguest:
On the KVM guest to be attested, perform the attestation.
Ensure that the /dev/uv device is available.
For example, assuming that the KVM guest to be attested is called
secguest:
[seguest]# ls /dev/uv
/dev/uv
If the uv device is not available, use
modprobe to load the uvdevice module.
-i <att_resp>.bin specifies the attestation response from
the pvattest perform command.
--arpk <req_prot_key>specifies the request-protection key that is used to decrypt the
request.
--hdr <SEL_header>specifies the header of the KVM guest.
The command uses the request protection key that was generated during the creation and the
IBM SEL header to calculate a
corresponding measurement. It then verifies that the two are the same.
If the result of the pvattest perform command and the calculated results
match, the command ends with exit code 0. You can check this by displaying the $? variable with the
echo
command: