Package version:

Interface AttestationPolicyToken

An AttestationPolicyToken represents an AttestationToken which holds an attestation policy document.

When the attestation service receives a set policy request, the payload of the set policy token contains a JSON Web Signature whose body contains the actual attestation policy document.

The AttestationPolicyToken represents this JWS object.

interface AttestationPolicyToken {
    algorithm: string;
    certificateChain?: AttestationSigner;
    certificateSha256Thumbprint?: string;
    certificateThumbprint?: string;
    contentType?: string;
    critical?: boolean;
    expiresOn?: Date;
    issuedAt?: Date;
    issuer?: string;
    keyId?: string;
    keyUrl?: string;
    notBefore?: Date;
    type?: string;
    x509Url?: string;
    getBody(): unknown;
    getTokenProblems(
        possibleSigners?: AttestationSigner[],
        options?: AttestationTokenValidationOptions,
    ): string[];
    serialize(): string;
}

Hierarchy (View Summary)

Index
algorithm: string

Returns the algorithm from the header of the JSON Web Signature.

See RFC 7515 Section 4.1.1) for details.

If the value of algorithm is "none" it indicates that the token is unsecured.

certificateChain?: AttestationSigner

Json Web Token Header "x509 certificate chain".

See RFC 7515 Section 4.1.6)

certificateSha256Thumbprint?: string

Json Web Token Header "x509 SHA256 thumprint".

See RFC 7515 Section 4.1.8)

certificateThumbprint?: string

Json Web Token Header "x509 thumprint". See RFC 7515 Section 4.1.7)

contentType?: string

Json Web Token Header "content type". See RFC 7515 Section 4.1.10)

critical?: boolean

Json Web Signature Header "crit".

See RFC 7515 Section 4.1.11) for details.

expiresOn?: Date

Expiration time for the token, from JWT body.

See RFC 7519 Section 4.1.4) for details.

issuedAt?: Date

Issuance time for the token, from JWT body.

See RFC 7519 Section 4.1.6) for details.

issuer?: string

Issuer of the attestation token. See RFC 7519 Section 4.1.6) for details.

keyId?: string

Json Web Signature Header "kid". See RFC 7515 Section 4.1.4) for details.

keyUrl?: string

Json Web Token Header "key URL".

notBefore?: Date

Not Before time for the token, from JWT body.

See RFC 7519 Section 4.1.5) for details.

type?: string

Json Web Token Header "Typ".

x509Url?: string

Json Web Token Header "X509 Url".

  • Validates the attestation token to verify that it is semantically correct.

    Parameters

    Returns string[]

    Unlike the clients' validation of tokens returned by the service, which accepts an unsigned token only in response to a draft policy request, this method accepts any unsigned token, and it can verify the signature with the certificate embedded in the token itself, so an empty result does not show that the attestation service issued the token. A token returned by a client operation with validateToken: false was not validated by the client.