Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AttestationClient

Package version

Attestation Client class.

The AttestationClient class enables access to the Attestation related APIs:

  • getOpenIdMetadata
  • getAttestationSigners
  • attestSgxEnclave
  • attestOpenEnclave
  • attestTpm

Hierarchy

  • AttestationClient

Index

Constructors

constructor

Methods

attestOpenEnclave

  • Attests an OpenEnclave report generated from an SGX Enclave using the OpenEnclave SDK.

    throws

    {@link Error} if the initTimeData option and initTimeJson option is provided.

    throws

    {@link Error} if the runTimeData option and runTimeJson option is provided.

    throws

    {@link Error} if the initTimeJson option is provided and the value of initTimeJson is not JSON.

    throws

    {@link Error} if the runTimeJson option is provided and the value of runTimeJson is not JSON.

    Parameters

    • report: Uint8Array | Buffer | Blob

      An OpenEnclave report generated by an SGX enclave.

    • Default value 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.

attestSgxEnclave

  • Attests a quote generated from SGX Enclave using the Intel SDK.

    throws

    {@link Error} if the initTimeData option and initTimeJson option is provided.

    throws

    {@link Error} if the runTimeData option and runTimeJson option is provided.

    Parameters

    • quote: Uint8Array | Buffer | Blob

      An SGX quote generated by an SGX enclave.

    • Default value options: AttestSgxEnclaveOptions = {}

      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.

attestTpm

  • Attest a TPM based enclave.

    See the TPM Attestation Protocol Reference for more information.

    remarks

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

    example

    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.

    Parameters

    • request: string

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

    • Default value options: AttestTpmOptions = {}

      Pipeline options for TPM attestation request.

    Returns Promise<string>

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

getAttestationSigners

getOpenIdMetadata

Generated using TypeDoc