Package version:

Class AttestationClient

Attestation Client class.

The AttestationClient class enables access to the Attestation related APIs:

  • getOpenIdMetadata
  • getAttestationSigners
  • attestSgxEnclave
  • attestOpenEnclave
  • attestTpm
Index
  • Attests an OpenEnclave report generated from an SGX Enclave using the OpenEnclave SDK.

    Parameters

    • report: Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike> | Blob

      An OpenEnclave report generated by an SGX enclave.

    • options: AttestOpenEnclaveOptions = {}

      Operation options for the attestOpenEnclave API call.

    Returns Promise<AttestationResponse<AttestationResult>>

    Returns an AttestationResponse whose body is an AttestationResult describing the claims returned by the attestation service.

    Error if the initTimeData option and initTimeJson option is provided.

    Error if the runTimeData option and runTimeJson option is provided.

    Error if the initTimeJson option is provided and the value of initTimeJson is not JSON.

    Error if the runTimeJson option is provided and the value of runTimeJson is not JSON.

  • Attest a TPM based enclave.

    See the TPM Attestation Protocol Reference for more information.

    Parameters

    • request: string

      Incoming request to send to the TPM attestation service, Utf8 encoded.

    • options: AttestTpmOptions = {}

      Pipeline options for TPM attestation request.

    Returns Promise<string>

    A structure containing the response from the TPM attestation, Utf8 encoded.

    The incoming requests to the TPM attestation API are stringified JSON objects.

    For example, the initial call for a TPM attestation operation is:

    const encodedPayload = JSON.stringify({ payload: { type: "aikcert" } });
    const result = await client.attestTpm(encodedPayload);
    

    where stringToBytes converts the string to UTF8.

    Note that the attestTpm requires an attestation client which is configured with authentication credentials.