@azure/attestation 1.0.1-alpha.20241002.1 → 1.0.1-alpha.20241004.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist-esm/src/attestationAdministrationClient.js +1 -0
- package/dist-esm/src/attestationAdministrationClient.js.map +1 -1
- package/dist-esm/src/attestationClient.js +6 -2
- package/dist-esm/src/attestationClient.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/generated/models/index.ts","../src/utils/utf8.ts","../src/utils/typeDeserializer.ts","../src/generated/models/mappers.ts","../src/models/storedAttestationPolicy.ts","../src/utils/base64.ts","../src/utils/helpers.ts","../src/models/attestationSigner.ts","../src/models/attestationToken.ts","../src/models/attestationPolicyToken.ts","../src/generated/tracing.ts","../src/generated/models/parameters.ts","../src/generated/operations/policy.ts","../src/generated/operations/policyCertificates.ts","../src/generated/operations/attestation.ts","../src/generated/operations/signingCertificates.ts","../src/generated/operations/metadataConfiguration.ts","../src/generated/generatedClient.ts","../src/logger.ts","../src/models/attestationResponse.ts","../src/models/attestationResult.ts","../src/utils/buffer.ts","../src/attestationClient.ts","../src/models/policyResult.ts","../src/attestationAdministrationClient.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\n/** The response to an attestation policy operation */\nexport interface PolicyResponse {\n /** An RFC7519 JSON Web Token structure whose body is an PolicyResult object. */\n token: string;\n}\n\n/** An error response from Attestation. */\nexport interface CloudError {\n /** An error response from Attestation. */\n error?: CloudErrorBody;\n}\n\n/** An error response from Attestation. */\nexport interface CloudErrorBody {\n /** An identifier for the error. Codes are invariant and are intended to be consumed programmatically. */\n code?: string;\n /** A message describing the error, intended to be suitable for displaying in a user interface. */\n message?: string;\n}\n\n/** The response to an attestation policy management API */\nexport interface PolicyCertificatesResponse {\n /** An RFC7519 JSON Web Token structure containing a PolicyCertificatesResults object which contains the certificates used to validate policy changes */\n token: string;\n}\n\n/** The response to an attestation policy management API */\nexport interface PolicyCertificatesModifyResponse {\n /** An RFC7519 JSON Web Token structure whose body is a PolicyCertificatesModificationResult object. */\n token: string;\n}\n\n/** Attestation request for Intel SGX enclaves */\nexport interface AttestOpenEnclaveRequest {\n /** OpenEnclave report from the enclave to be attested */\n report?: Uint8Array;\n /** Runtime data provided by the enclave at the time of report generation. The MAA will verify that the first 32 bytes of the report_data field of the quote contains the SHA256 hash of the decoded \"data\" field of the runtime data. */\n runtimeData?: RuntimeData;\n /** Base64Url encoded \"InitTime data\". The MAA will verify that the init data was known to the enclave. Note that InitTimeData is invalid for CoffeeLake processors. */\n initTimeData?: InitTimeData;\n /** Attest against the provided draft policy. Note that the resulting token cannot be validated. */\n draftPolicyForAttestation?: string;\n}\n\n/** Defines the \"run time data\" provided by the attestation target for use by the MAA */\nexport interface RuntimeData {\n /** UTF-8 encoded Runtime Data generated by the trusted environment */\n data?: Uint8Array;\n /** The type of data contained within the \"data\" field */\n dataType?: DataType;\n}\n\n/** Defines the \"initialization time data\" used to provision the attestation target for use by the MAA */\nexport interface InitTimeData {\n /** UTF-8 encoded Initialization Data passed into the trusted environment when it is created. */\n data?: Uint8Array;\n /** The type of data contained within the \"data\" field */\n dataType?: DataType;\n}\n\n/** The result of an attestation operation */\nexport interface AttestationResponse {\n /** An RFC 7519 JSON Web Token, the body of which is an AttestationResult object. */\n token: string;\n}\n\n/** Attestation request for Intel SGX enclaves */\nexport interface AttestSgxEnclaveRequest {\n /** Quote of the enclave to be attested */\n quote?: Uint8Array;\n /** Runtime data provided by the enclave at the time of quote generation. The MAA will verify that the first 32 bytes of the report_data field of the quote contains the SHA256 hash of the decoded \"data\" field of the runtime data. */\n runtimeData?: RuntimeData;\n /** Initialization data provided when the enclave is created. MAA will verify that the init data was known to the enclave. Note that InitTimeData is invalid for CoffeeLake processors. */\n initTimeData?: InitTimeData;\n /** Attest against the provided draft policy. Note that the resulting token cannot be validated. */\n draftPolicyForAttestation?: string;\n}\n\n/** Attestation request for Trusted Platform Module (TPM) attestation. */\nexport interface TpmAttestationRequest {\n /** Protocol data containing artifacts for attestation. */\n data?: Uint8Array;\n}\n\n/** Attestation response for Trusted Platform Module (TPM) attestation. */\nexport interface TpmAttestationResponse {\n /** Protocol data containing attestation service response. */\n data?: Uint8Array;\n}\n\nexport interface JsonWebKeySet {\n /**\n * The value of the \"keys\" parameter is an array of JWK values. By\n * default, the order of the JWK values within the array does not imply\n * an order of preference among them, although applications of JWK Sets\n * can choose to assign a meaning to the order for their purposes, if\n * desired.\n */\n keys: JsonWebKey[];\n}\n\nexport interface JsonWebKey {\n /**\n * The \"alg\" (algorithm) parameter identifies the algorithm intended for\n * use with the key. The values used should either be registered in the\n * IANA \"JSON Web Signature and Encryption Algorithms\" registry\n * established by [JWA] or be a value that contains a Collision-\n * Resistant Name.\n */\n alg?: string;\n /** The \"crv\" (curve) parameter identifies the curve type */\n crv?: string;\n /** RSA private exponent or ECC private key */\n d?: string;\n /** RSA Private Key Parameter */\n dp?: string;\n /** RSA Private Key Parameter */\n dq?: string;\n /** RSA public exponent, in Base64 */\n e?: string;\n /** Symmetric key */\n k?: string;\n /**\n * The \"kid\" (key ID) parameter is used to match a specific key. This\n * is used, for instance, to choose among a set of keys within a JWK Set\n * during key rollover. The structure of the \"kid\" value is\n * unspecified. When \"kid\" values are used within a JWK Set, different\n * keys within the JWK Set SHOULD use distinct \"kid\" values. (One\n * example in which different keys might use the same \"kid\" value is if\n * they have different \"kty\" (key type) values but are considered to be\n * equivalent alternatives by the application using them.) The \"kid\"\n * value is a case-sensitive string.\n */\n kid?: string;\n /**\n * The \"kty\" (key type) parameter identifies the cryptographic algorithm\n * family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should\n * either be registered in the IANA \"JSON Web Key Types\" registry\n * established by [JWA] or be a value that contains a Collision-\n * Resistant Name. The \"kty\" value is a case-sensitive string.\n */\n kty: string;\n /** RSA modulus, in Base64 */\n n?: string;\n /** RSA secret prime */\n p?: string;\n /** RSA secret prime, with p < q */\n q?: string;\n /** RSA Private Key Parameter */\n qi?: string;\n /**\n * Use (\"public key use\") identifies the intended use of\n * the public key. The \"use\" parameter is employed to indicate whether\n * a public key is used for encrypting data or verifying the signature\n * on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).\n */\n use?: string;\n /** X coordinate for the Elliptic Curve point */\n x?: string;\n /**\n * The \"x5c\" (X.509 certificate chain) parameter contains a chain of one\n * or more PKIX certificates [RFC5280]. The certificate chain is\n * represented as a JSON array of certificate value strings. Each\n * string in the array is a base64-encoded (Section 4 of [RFC4648] --\n * not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value.\n * The PKIX certificate containing the key value MUST be the first\n * certificate.\n */\n x5C?: string[];\n /** Y coordinate for the Elliptic Curve point */\n y?: string;\n}\n\n/** The body of the JWT used for the PolicyCertificates APIs */\nexport interface AttestationCertificateManagementBody {\n /** RFC 7517 Json Web Key describing the certificate. */\n policyCertificate?: JsonWebKey;\n}\n\n/** The result of a call to retrieve policy certificates. */\nexport interface PolicyCertificatesResult {\n /** SHA256 Hash of the binary representation certificate which was added or removed */\n policyCertificates: JsonWebKeySet;\n}\n\n/** The result of a policy certificate modification */\nexport interface PolicyCertificatesModificationResult {\n /** Hex encoded SHA1 Hash of the binary representation certificate which was added or removed */\n certificateThumbprint: string;\n /** The result of the operation */\n certificateResolution: CertificateModification;\n}\n\nexport interface StoredAttestationPolicy {\n /** Policy text to set as a sequence of UTF-8 encoded octets. */\n attestationPolicy?: Uint8Array;\n}\n\n/** The result of a policy certificate modification */\nexport interface PolicyResult {\n /** The result of the operation */\n policyResolution: PolicyModification;\n /** The SHA256 hash of the policy object modified */\n policyTokenHash: Uint8Array;\n /** The certificate used to sign the policy object, if specified */\n policySigner?: JsonWebKey;\n /** A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy */\n policy?: string;\n}\n\n/** A Microsoft Azure Attestation response token body - the body of a response token issued by MAA */\nexport interface GeneratedAttestationResult {\n /** Unique Identifier for the token */\n jti: string;\n /** The Principal who issued the token */\n iss: string;\n /** The time at which the token was issued, in the number of seconds since 1970-01-0T00:00:00Z UTC */\n iat?: number;\n /** The expiration time after which the token is no longer valid, in the number of seconds since 1970-01-0T00:00:00Z UTC */\n exp?: number;\n /** The not before time before which the token cannot be considered valid, in the number of seconds since 1970-01-0T00:00:00Z UTC */\n nbf?: number;\n /** An RFC 7800 Proof of Possession Key */\n cnf?: Record<string, unknown>;\n /** The Nonce input to the attestation request, if provided. */\n nonce?: string;\n /** The Schema version of this structure. Current Value: 1.0 */\n version: string;\n /** Runtime Claims */\n runtimeClaims?: Record<string, unknown>;\n /** Inittime Claims */\n inittimeClaims?: Record<string, unknown>;\n /** Policy Generated Claims */\n policyClaims?: Record<string, unknown>;\n /** The Attestation type being attested. */\n verifierType: string;\n /** The certificate used to sign the policy object, if specified. */\n policySigner?: JsonWebKey;\n /** The SHA256 hash of the BASE64URL encoded policy text used for attestation */\n policyHash: Uint8Array;\n /** True if the enclave is debuggable, false otherwise */\n isDebuggable: boolean;\n /** The SGX Product ID for the enclave. */\n productId: number;\n /** The HEX encoded SGX MRENCLAVE value for the enclave. */\n mrEnclave: string;\n /** The HEX encoded SGX MRSIGNER value for the enclave. */\n mrSigner: string;\n /** The SGX SVN value for the enclave. */\n svn: number;\n /** A copy of the RuntimeData specified as an input to the attest call. */\n enclaveHeldData?: Uint8Array;\n /** The SGX SVN value for the enclave. */\n sgxCollateral?: Record<string, unknown>;\n /** DEPRECATED: Private Preview version of x-ms-ver claim. */\n deprecatedVersion?: string;\n /** DEPRECATED: Private Preview version of x-ms-sgx-is-debuggable claim. */\n deprecatedIsDebuggable?: boolean;\n /** DEPRECATED: Private Preview version of x-ms-sgx-collateral claim. */\n deprecatedSgxCollateral?: Record<string, unknown>;\n /** DEPRECATED: Private Preview version of x-ms-sgx-ehd claim. */\n deprecatedEnclaveHeldData?: Uint8Array;\n /** DEPRECATED: Private Preview version of x-ms-sgx-ehd claim. */\n deprecatedEnclaveHeldData2?: Uint8Array;\n /** DEPRECATED: Private Preview version of x-ms-sgx-product-id */\n deprecatedProductId?: number;\n /** DEPRECATED: Private Preview version of x-ms-sgx-mrenclave. */\n deprecatedMrEnclave?: string;\n /** DEPRECATED: Private Preview version of x-ms-sgx-mrsigner. */\n deprecatedMrSigner?: string;\n /** DEPRECATED: Private Preview version of x-ms-sgx-svn. */\n deprecatedSvn?: number;\n /** DEPRECATED: Private Preview version of x-ms-tee. */\n deprecatedTee?: string;\n /** DEPRECATED: Private Preview version of x-ms-policy-signer */\n deprecatedPolicySigner?: JsonWebKey;\n /** DEPRECATED: Private Preview version of x-ms-policy-hash */\n deprecatedPolicyHash?: Uint8Array;\n /** DEPRECATED: Private Preview version of nonce */\n deprecatedRpData?: string;\n}\n\n/** Known values of {@link AttestationType} that the service accepts. */\nexport enum KnownAttestationType {\n /** Intel Software Guard eXtensions */\n SgxEnclave = \"SgxEnclave\",\n /** OpenEnclave extensions to SGX */\n OpenEnclave = \"OpenEnclave\",\n /** Edge TPM Virtualization Based Security */\n Tpm = \"Tpm\"\n}\n\n/**\n * Defines values for AttestationType. \\\n * {@link KnownAttestationType} can be used interchangeably with AttestationType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **SgxEnclave**: Intel Software Guard eXtensions \\\n * **OpenEnclave**: OpenEnclave extensions to SGX \\\n * **Tpm**: Edge TPM Virtualization Based Security\n */\nexport type AttestationType = string;\n\n/** Known values of {@link DataType} that the service accepts. */\nexport enum KnownDataType {\n /** The contents of the field should be treated as binary and not interpreted by MAA. */\n Binary = \"Binary\",\n /** The contents of the field should be treated as a JSON object and may be further interpreted by MAA. */\n Json = \"JSON\"\n}\n\n/**\n * Defines values for DataType. \\\n * {@link KnownDataType} can be used interchangeably with DataType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Binary**: The contents of the field should be treated as binary and not interpreted by MAA. \\\n * **JSON**: The contents of the field should be treated as a JSON object and may be further interpreted by MAA.\n */\nexport type DataType = string;\n\n/** Known values of {@link CertificateModification} that the service accepts. */\nexport enum KnownCertificateModification {\n /** After the operation was performed, the certificate is in the set of certificates. */\n IsPresent = \"IsPresent\",\n /** After the operation was performed, the certificate is no longer present in the set of certificates. */\n IsAbsent = \"IsAbsent\"\n}\n\n/**\n * Defines values for CertificateModification. \\\n * {@link KnownCertificateModification} can be used interchangeably with CertificateModification,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **IsPresent**: After the operation was performed, the certificate is in the set of certificates. \\\n * **IsAbsent**: After the operation was performed, the certificate is no longer present in the set of certificates.\n */\nexport type CertificateModification = string;\n\n/** Known values of {@link PolicyModification} that the service accepts. */\nexport enum KnownPolicyModification {\n /** The specified policy object was updated. */\n Updated = \"Updated\",\n /** The specified policy object was removed. */\n Removed = \"Removed\"\n}\n\n/**\n * Defines values for PolicyModification. \\\n * {@link KnownPolicyModification} can be used interchangeably with PolicyModification,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Updated**: The specified policy object was updated. \\\n * **Removed**: The specified policy object was removed.\n */\nexport type PolicyModification = string;\n\n/** Optional parameters. */\nexport interface PolicyGetOptionalParams extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type PolicyGetResponse = PolicyResponse;\n\n/** Optional parameters. */\nexport interface PolicySetModelOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the set operation. */\nexport type PolicySetModelResponse = PolicyResponse;\n\n/** Optional parameters. */\nexport interface PolicyResetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the reset operation. */\nexport type PolicyResetResponse = PolicyResponse;\n\n/** Optional parameters. */\nexport interface PolicyCertificatesGetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type PolicyCertificatesGetResponse = PolicyCertificatesResponse;\n\n/** Optional parameters. */\nexport interface PolicyCertificatesAddOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the add operation. */\nexport type PolicyCertificatesAddResponse = PolicyCertificatesModifyResponse;\n\n/** Optional parameters. */\nexport interface PolicyCertificatesRemoveOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the remove operation. */\nexport type PolicyCertificatesRemoveResponse = PolicyCertificatesModifyResponse;\n\n/** Optional parameters. */\nexport interface AttestationAttestOpenEnclaveOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the attestOpenEnclave operation. */\nexport type AttestationAttestOpenEnclaveResponse = AttestationResponse;\n\n/** Optional parameters. */\nexport interface AttestationAttestSgxEnclaveOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the attestSgxEnclave operation. */\nexport type AttestationAttestSgxEnclaveResponse = AttestationResponse;\n\n/** Optional parameters. */\nexport interface AttestationAttestTpmOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the attestTpm operation. */\nexport type AttestationAttestTpmResponse = TpmAttestationResponse;\n\n/** Optional parameters. */\nexport interface SigningCertificatesGetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type SigningCertificatesGetResponse = JsonWebKeySet;\n\n/** Optional parameters. */\nexport interface MetadataConfigurationGetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type MetadataConfigurationGetResponse = Record<string, unknown>;\n\n/** Optional parameters. */\nexport interface GeneratedClientOptionalParams\n extends coreClient.ServiceClientOptions {\n /** Api Version */\n apiVersion?: string;\n /** Overrides client endpoint. */\n endpoint?: string;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nconst decoder = typeof Buffer === \"undefined\" ? new TextDecoder(\"ascii\") : undefined;\n\nconst encoder = typeof Buffer === \"undefined\" ? new TextEncoder() : undefined;\n\nconst decode: (buffer: ArrayBuffer) => string = decoder\n ? (buffer) => decoder.decode(buffer)\n : (buffer) => (buffer as Buffer).toString(\"ascii\");\n\nconst encode: (str: string) => Uint8Array = encoder\n ? (str) => encoder.encode(str)\n : (str) => Buffer.from(str, \"utf8\");\n\n/**\n * Converts a string into a utf8 encoded byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function stringToBytes(content: string): Uint8Array {\n return encode(content);\n}\n\n/**\n * Converts a utf8 string into a byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function bytesToString(content: Uint8Array): string {\n return decode(content);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Mapper, createSerializer } from \"@azure/core-client\";\n\n/**\n * The TypeDeserializer class enables easy access to the Attestation Model serialization\n * and deserialization APIs.\n */\nexport class TypeDeserializer {\n /**\n * Deserializes a JSON object into a model type.\n * @param rawJson - The JSON encoded object to convert into model type.\n * @param bodyMapper - A mapping between type names and {@link Mapper} objects\n * which defines the model properties for the type. the {@link bodyTypeName}\n * must be one of the properties in the {@link bodyMapper} parameter.\n * @param bodyTypeName - The name of the type of the body.\n * @returns The deserialized type. It is the responsibility of the caller to cast to the\n * expected return type.\n *\n * @internal\n */\n public static deserialize(\n rawJson: unknown,\n typeMappers: { [key: string]: any },\n bodyTypeName: string,\n ): unknown {\n const serializer = createSerializer(typeMappers);\n return serializer.deserialize(typeMappers[bodyTypeName], rawJson, bodyTypeName);\n }\n\n /**\n * Serializes a JSON object into a model type.\n * @param objectToSerialize - The JSON encoded object to convert into model type.\n * @param bodyMapper - A {@link Mapper} object which defines the model properties for the type.\n * @returns The serialized type as a JSON encoded string.\n *\n * @internal\n */\n public static serialize(\n objectToSerialize: unknown,\n typeMappers: { [key: string]: Mapper },\n bodyMapper: Mapper,\n ): string {\n const serializer = createSerializer(typeMappers);\n return JSON.stringify(serializer.serialize(bodyMapper, objectToSerialize));\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\nexport const PolicyResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyResponse\",\n modelProperties: {\n token: {\n constraints: {\n Pattern: new RegExp(\n \"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\"\n )\n },\n serializedName: \"token\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const CloudError: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CloudError\",\n modelProperties: {\n error: {\n serializedName: \"error\",\n type: {\n name: \"Composite\",\n className: \"CloudErrorBody\"\n }\n }\n }\n }\n};\n\nexport const CloudErrorBody: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CloudErrorBody\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PolicyCertificatesResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyCertificatesResponse\",\n modelProperties: {\n token: {\n constraints: {\n Pattern: new RegExp(\n \"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\"\n )\n },\n serializedName: \"token\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PolicyCertificatesModifyResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyCertificatesModifyResponse\",\n modelProperties: {\n token: {\n constraints: {\n Pattern: new RegExp(\n \"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\"\n )\n },\n serializedName: \"token\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AttestOpenEnclaveRequest: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AttestOpenEnclaveRequest\",\n modelProperties: {\n report: {\n serializedName: \"report\",\n type: {\n name: \"Base64Url\"\n }\n },\n runtimeData: {\n serializedName: \"runtimeData\",\n type: {\n name: \"Composite\",\n className: \"RuntimeData\"\n }\n },\n initTimeData: {\n serializedName: \"initTimeData\",\n type: {\n name: \"Composite\",\n className: \"InitTimeData\"\n }\n },\n draftPolicyForAttestation: {\n serializedName: \"draftPolicyForAttestation\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const RuntimeData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"RuntimeData\",\n modelProperties: {\n data: {\n serializedName: \"data\",\n type: {\n name: \"Base64Url\"\n }\n },\n dataType: {\n serializedName: \"dataType\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const InitTimeData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"InitTimeData\",\n modelProperties: {\n data: {\n serializedName: \"data\",\n type: {\n name: \"Base64Url\"\n }\n },\n dataType: {\n serializedName: \"dataType\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AttestationResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AttestationResponse\",\n modelProperties: {\n token: {\n constraints: {\n Pattern: new RegExp(\n \"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\"\n )\n },\n serializedName: \"token\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AttestSgxEnclaveRequest: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AttestSgxEnclaveRequest\",\n modelProperties: {\n quote: {\n serializedName: \"quote\",\n type: {\n name: \"Base64Url\"\n }\n },\n runtimeData: {\n serializedName: \"runtimeData\",\n type: {\n name: \"Composite\",\n className: \"RuntimeData\"\n }\n },\n initTimeData: {\n serializedName: \"initTimeData\",\n type: {\n name: \"Composite\",\n className: \"InitTimeData\"\n }\n },\n draftPolicyForAttestation: {\n serializedName: \"draftPolicyForAttestation\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const TpmAttestationRequest: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TpmAttestationRequest\",\n modelProperties: {\n data: {\n serializedName: \"data\",\n type: {\n name: \"Base64Url\"\n }\n }\n }\n }\n};\n\nexport const TpmAttestationResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TpmAttestationResponse\",\n modelProperties: {\n data: {\n serializedName: \"data\",\n type: {\n name: \"Base64Url\"\n }\n }\n }\n }\n};\n\nexport const JsonWebKeySet: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"JsonWebKeySet\",\n modelProperties: {\n keys: {\n serializedName: \"keys\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const JsonWebKey: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\",\n modelProperties: {\n alg: {\n serializedName: \"alg\",\n type: {\n name: \"String\"\n }\n },\n crv: {\n serializedName: \"crv\",\n type: {\n name: \"String\"\n }\n },\n d: {\n serializedName: \"d\",\n type: {\n name: \"String\"\n }\n },\n dp: {\n serializedName: \"dp\",\n type: {\n name: \"String\"\n }\n },\n dq: {\n serializedName: \"dq\",\n type: {\n name: \"String\"\n }\n },\n e: {\n serializedName: \"e\",\n type: {\n name: \"String\"\n }\n },\n k: {\n serializedName: \"k\",\n type: {\n name: \"String\"\n }\n },\n kid: {\n serializedName: \"kid\",\n type: {\n name: \"String\"\n }\n },\n kty: {\n serializedName: \"kty\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n n: {\n serializedName: \"n\",\n type: {\n name: \"String\"\n }\n },\n p: {\n serializedName: \"p\",\n type: {\n name: \"String\"\n }\n },\n q: {\n serializedName: \"q\",\n type: {\n name: \"String\"\n }\n },\n qi: {\n serializedName: \"qi\",\n type: {\n name: \"String\"\n }\n },\n use: {\n serializedName: \"use\",\n type: {\n name: \"String\"\n }\n },\n x: {\n serializedName: \"x\",\n type: {\n name: \"String\"\n }\n },\n x5C: {\n serializedName: \"x5c\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n y: {\n serializedName: \"y\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AttestationCertificateManagementBody: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AttestationCertificateManagementBody\",\n modelProperties: {\n policyCertificate: {\n serializedName: \"policyCertificate\",\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\"\n }\n }\n }\n }\n};\n\nexport const PolicyCertificatesResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyCertificatesResult\",\n modelProperties: {\n policyCertificates: {\n serializedName: \"x-ms-policy-certificates\",\n type: {\n name: \"Composite\",\n className: \"JsonWebKeySet\"\n }\n }\n }\n }\n};\n\nexport const PolicyCertificatesModificationResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyCertificatesModificationResult\",\n modelProperties: {\n certificateThumbprint: {\n serializedName: \"x-ms-certificate-thumbprint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n certificateResolution: {\n serializedName: \"x-ms-policycertificates-result\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const StoredAttestationPolicy: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"StoredAttestationPolicy\",\n modelProperties: {\n attestationPolicy: {\n serializedName: \"AttestationPolicy\",\n type: {\n name: \"Base64Url\"\n }\n }\n }\n }\n};\n\nexport const PolicyResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyResult\",\n modelProperties: {\n policyResolution: {\n serializedName: \"x-ms-policy-result\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n policyTokenHash: {\n serializedName: \"x-ms-policy-token-hash\",\n required: true,\n type: {\n name: \"Base64Url\"\n }\n },\n policySigner: {\n serializedName: \"x-ms-policy-signer\",\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\"\n }\n },\n policy: {\n constraints: {\n Pattern: new RegExp(\n \"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\"\n )\n },\n serializedName: \"x-ms-policy\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const GeneratedAttestationResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"GeneratedAttestationResult\",\n modelProperties: {\n jti: {\n serializedName: \"jti\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n iss: {\n serializedName: \"iss\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n iat: {\n serializedName: \"iat\",\n type: {\n name: \"Number\"\n }\n },\n exp: {\n serializedName: \"exp\",\n type: {\n name: \"Number\"\n }\n },\n nbf: {\n serializedName: \"nbf\",\n type: {\n name: \"Number\"\n }\n },\n cnf: {\n serializedName: \"cnf\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n nonce: {\n serializedName: \"nonce\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-ver\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n runtimeClaims: {\n serializedName: \"x-ms-runtime\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n inittimeClaims: {\n serializedName: \"x-ms-inittime\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n policyClaims: {\n serializedName: \"x-ms-policy\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n verifierType: {\n serializedName: \"x-ms-attestation-type\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n policySigner: {\n serializedName: \"x-ms-policy-signer\",\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\"\n }\n },\n policyHash: {\n serializedName: \"x-ms-policy-hash\",\n required: true,\n type: {\n name: \"Base64Url\"\n }\n },\n isDebuggable: {\n serializedName: \"x-ms-sgx-is-debuggable\",\n required: true,\n type: {\n name: \"Boolean\"\n }\n },\n productId: {\n serializedName: \"x-ms-sgx-product-id\",\n required: true,\n type: {\n name: \"Number\"\n }\n },\n mrEnclave: {\n serializedName: \"x-ms-sgx-mrenclave\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n mrSigner: {\n serializedName: \"x-ms-sgx-mrsigner\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n svn: {\n serializedName: \"x-ms-sgx-svn\",\n required: true,\n type: {\n name: \"Number\"\n }\n },\n enclaveHeldData: {\n serializedName: \"x-ms-sgx-ehd\",\n type: {\n name: \"Base64Url\"\n }\n },\n sgxCollateral: {\n serializedName: \"x-ms-sgx-collateral\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n deprecatedVersion: {\n serializedName: \"ver\",\n type: {\n name: \"String\"\n }\n },\n deprecatedIsDebuggable: {\n serializedName: \"is-debuggable\",\n type: {\n name: \"Boolean\"\n }\n },\n deprecatedSgxCollateral: {\n serializedName: \"maa-attestationcollateral\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n deprecatedEnclaveHeldData: {\n serializedName: \"aas-ehd\",\n type: {\n name: \"Base64Url\"\n }\n },\n deprecatedEnclaveHeldData2: {\n serializedName: \"maa-ehd\",\n type: {\n name: \"Base64Url\"\n }\n },\n deprecatedProductId: {\n serializedName: \"product-id\",\n type: {\n name: \"Number\"\n }\n },\n deprecatedMrEnclave: {\n serializedName: \"sgx-mrenclave\",\n type: {\n name: \"String\"\n }\n },\n deprecatedMrSigner: {\n serializedName: \"sgx-mrsigner\",\n type: {\n name: \"String\"\n }\n },\n deprecatedSvn: {\n serializedName: \"svn\",\n type: {\n name: \"Number\"\n }\n },\n deprecatedTee: {\n serializedName: \"tee\",\n type: {\n name: \"String\"\n }\n },\n deprecatedPolicySigner: {\n serializedName: \"policy_signer\",\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\"\n }\n },\n deprecatedPolicyHash: {\n serializedName: \"policy_hash\",\n type: {\n name: \"Base64Url\"\n }\n },\n deprecatedRpData: {\n serializedName: \"rp_data\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport { stringToBytes } from \"../utils/utf8\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer\";\n\nimport * as Mappers from \"../generated/models/mappers\";\n\n/**\n * Represents a stored attestation policy sent to the attestation service.\n */\nexport class StoredAttestationPolicy {\n constructor(value: string) {\n this.attestationPolicy = stringToBytes(value);\n }\n\n /**\n * Serializes a StoredAttestationPolicy object to a JSON encoded string.\n *\n * @returns The serialized JSON policy.\n */\n serialize(): string {\n return TypeDeserializer.serialize(\n this,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n Mappers.StoredAttestationPolicy,\n );\n }\n\n /**\n * Deserializes a stored attestation policy object returned from the attestation service.\n *\n * @param value - Raw JSON object from service to serialize as an attestation policy.\n * @returns Stored attestation policy.\n */\n static deserialize(value: unknown): StoredAttestationPolicy {\n return TypeDeserializer.deserialize(\n value,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n \"StoredAttestationPolicy\",\n ) as StoredAttestationPolicy;\n }\n\n /**\n * Stored attestation policy, utf8 encoded.\n */\n attestationPolicy: Uint8Array;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Encodes a string in base64 format.\n * @param value - the string to encode\n */\nexport function encodeString(value: string): string {\n return Buffer.from(value).toString(\"base64\");\n}\n\n/**\n * Encodes a byte array in base64 format.\n * @param value - the Uint8Array to encode\n */\nexport function base64EncodeByteArray(value: Uint8Array): string {\n // Buffer.from accepts <ArrayBuffer> | <SharedArrayBuffer>-- the TypeScript definition is off here\n // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\n const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer as ArrayBuffer);\n return bufferValue.toString(\"base64\");\n}\n\n/**\n * Encodes a byte array in base64 format.\n * @param value - the Uint8Array to encode\n */\nexport function base64UrlEncodeByteArray(value: Uint8Array): string {\n // Buffer.from accepts <ArrayBuffer> | <SharedArrayBuffer>-- the TypeScript definition is off here\n // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\n const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer as ArrayBuffer);\n const base64 = bufferValue.toString(\"base64\");\n // Convert the base64 buffer to base64url.\n return base64.replace(/\\+/g, \"-\").replace(/\\//, \"_\").split(\"=\")[0];\n}\n\n/**\n * Decodes a base64 string into a byte array.\n * @param value - the base64 string to decode\n */\nexport function base64DecodeString(value: string): Uint8Array {\n return Buffer.from(value, \"base64\");\n}\n\n/**\n * Adds missing padding to a Base64 encoded string\n * @param unpadded - The unpadded input string\n * @returns The padded string\n */\nfunction fixPadding(unpadded: string): string {\n const count = 3 - ((unpadded.length + 3) % 4);\n return unpadded + \"=\".repeat(count);\n}\n\n/**\n * Decodes a base64url string into a byte array.\n * @param value - the base64url string to decode\n */\nexport function base64UrlDecodeString(value: string): Uint8Array {\n const encoded = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const paddedEncoded = fixPadding(encoded);\n return base64DecodeString(paddedEncoded);\n}\n\nexport function hexToByteArray(value: string): Uint8Array {\n if (value.length % 2 !== 0) {\n throw new Error(\"base64FromHex: Input must be a multiple of 2 characters\");\n }\n const byteArray = new Array();\n for (let i = 0; i < value.length; i += 2) {\n byteArray.push(parseInt(value.substr(i, 2), 16));\n }\n return Uint8Array.from(byteArray);\n}\n\nexport function byteArrayToHex(value: Uint8Array): string {\n return value.reduce((str, byte) => str + byte.toString(16).padStart(2, \"0\"), \"\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"../jsrsasign.d.ts\"/>\nimport * as jsrsasign from \"jsrsasign\";\nimport { base64EncodeByteArray, hexToByteArray } from \"./base64\";\n\n/** Create an AttestationSigningKey from the provided private key and certificate.\n *\n * @param privateKey - PEM encoded DER Encoded RSA or ECDS key.\n * @param certificate - PEM encoded DER encoded X.509 certificate.\n */\nexport function verifyAttestationSigningKey(\n privateKey: string,\n certificate: string,\n): { certificate: string; privateKey: string } {\n //\n // Ensure that the key and certificate are associated with each other.\n //\n // Sign a buffer with the key, then verify the signature with the\n // certificate.\n const x509 = new jsrsasign.X509();\n x509.readCertPEM(certificate);\n\n const alg = x509.getSignatureAlgorithmName();\n\n const signer = new jsrsasign.KJUR.crypto.Signature({ alg: alg });\n\n // Confirm that the certificate and private key are related to each other.\n const bufferToSign = \"1234\";\n\n signer.init(privateKey);\n signer.updateString(bufferToSign);\n const sigVal = signer.sign();\n\n const verifier = new jsrsasign.KJUR.crypto.Signature({ alg: alg });\n verifier.init(x509.getPublicKey());\n verifier.updateString(bufferToSign);\n if (!verifier.verify(sigVal)) {\n throw new Error(\"verifyAttestationSigningKey: Key does not match Certificate.\");\n }\n return { certificate: certificate, privateKey: privateKey };\n}\n\nexport type PemType = \"CERTIFICATE\" | \"PRIVATE KEY\";\n\n/**\n *\n * @param base64 - Base64 encoded DER object to encode as PEM.\n * @param pemType - PEM object type - typically \"CERTIFICATE\" |\n */\nexport function pemFromBase64(base64: string, pemType: PemType): string {\n let pem = \"-----BEGIN \" + pemType + \"-----\\n\";\n while (base64 !== \"\") {\n pem += base64.substr(0, 64) + \"\\n\";\n base64 = base64.substr(64);\n }\n pem += \"-----END \" + pemType + \"-----\\n\";\n\n return pem;\n}\n\n/**\n * Converts a hex encoded string to its base64 equivalent.\n * @param value - Hex encoded value\n */\nexport function hexToBase64(value: string): string {\n return base64EncodeByteArray(hexToByteArray(value));\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { JsonWebKey } from \"../generated/models\";\nimport { pemFromBase64 } from \"../utils/helpers\";\n\n/**\n * An AttestationSigner represents a signing certificate chain/Key ID combination\n * returned by the attestation service.\n */\nexport interface AttestationSigner {\n /**\n * The Key ID for the signer, as defined by the \"kid\" parameter in\n * {@link https://datatracker.ietf.org/doc/html/rfc7517#section-4.5 | RFC 7517 section 4.5}\n */\n keyId?: string;\n\n /**\n * An array of X.509 certificates DER encoded and PEM encoded one of which\n * will be used to sign an attestation token. Also the \"x5c\" parameter in\n * {@link https://datatracker.ietf.org/doc/html/rfc7517#section-4.7 | RFC 7517 section 4.7}\n */\n certificates: string[];\n}\n\n/**\n *\n * @param key - JsonWebKey for signing key.\n * @returns AttestationSigner created from the JsonWebKey.\n *\n * @internal\n */\nexport function _attestationSignerFromGenerated(key?: JsonWebKey): AttestationSigner {\n return {\n keyId: key?.kid,\n certificates: key?.x5C?.map((cert) => pemFromBase64(cert, \"CERTIFICATE\")) ?? [],\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"../jsrsasign.d.ts\"/>\nimport * as jsrsasign from \"jsrsasign\";\n\nimport { JsonWebKey } from \"../generated/models\";\nimport { base64UrlDecodeString } from \"../utils/base64\";\nimport { bytesToString } from \"../utils/utf8\";\nimport { AttestationSigner, _attestationSignerFromGenerated } from \"./attestationSigner\";\n\nimport * as Mappers from \"../generated/models/mappers\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer\";\nimport { hexToBase64, verifyAttestationSigningKey } from \"../utils/helpers\";\n\n/**\n * Options used to validate attestation tokens.\n *\n * @typeparam issuer - if provided, specifies the expected issuer of the attestation token.\n * @typeparam validateExpirationTime - if true, validate the expiration time in the token.\n * @typeparam validateNotBeforeTime - if true, validate the \"not before\" time in the token.\n * @typeparam validateToken - if true, validate the token.\n * @typeparam timeValidationSlack - the validation time slack in the time based validations.\n *\n * @remarks\n *\n * If validateToken, validateNotBeforeTime, or validateExpirationTime are not\n * provided, they are all assumed to be 'true'.\n *\n */\nexport interface AttestationTokenValidationOptions {\n /**\n * If true, validate the attestation token, if false, skip validation.\n */\n validateToken?: boolean;\n /**\n * If true, validate the expiration time for the token.\n */\n validateExpirationTime?: boolean;\n /**\n * If true, validate the \"not before\" time for the token.\n */\n validateNotBeforeTime?: boolean;\n /**\n * If true, validate the issuer of the token.\n */\n validateIssuer?: boolean;\n /**\n * The expected issuer for the {@link AttestationToken}. Only checked if {@link validateIssuer} is set.\n */\n expectedIssuer?: string;\n\n /**\n * Tolerance time (in seconds) used to accound for clock drift between the local machine\n * and the server creating the token.\n */\n timeValidationSlack?: number;\n\n /**\n * Validation function which allows developers to provide their own validation\n * functionality for the attestation token. This can be used to perform additional\n * validations for signing certificate in AttestationSigner.\n *\n * @param token - Attestation Token to validate.\n * @param signer - Signing Certificate which validated the token.\n *\n * @remarks\n *\n * If there is a problem with token validation, the validateAttestationCallback function\n * will return an array of strings indicating the set of problems found in the token.\n *\n * @returns an array of problems in the token, or undefined if there are no problems.\n */\n validateAttestationToken?: (\n token: AttestationToken,\n signer?: AttestationSigner,\n ) => string[] | undefined;\n}\n\n/**\n *\n * An AttestationToken represents an RFC 7515 JSON Web Signature object.\n *\n * It can represent either the token returned by the attestation service,\n * or it can be used to create a token locally which can be used to verify\n * attestation policy changes.\n */\nexport interface AttestationToken {\n /**\n * Returns the deserialized body of the AttestationToken object.\n *\n * @returns The body of the attestation token as an object.\n */\n getBody(): unknown;\n\n /**\n * the token to a string.\n *\n * @remarks\n * Serializes the token to a string.\n *\n * @returns The token serialized to a RFC 7515 JSON Web Signature.\n */\n serialize(): string;\n\n /**\n * Validates the attestation token to verify that it is semantically correct.\n *\n * @param possibleSigners - the set of possible signers for this attestation token.\n * @param options - validation options\n */\n getTokenProblems(\n possibleSigners?: AttestationSigner[],\n options?: AttestationTokenValidationOptions,\n ): string[];\n\n /** ********* JSON WEB SIGNATURE (RFC 7515) PROPERTIES */\n\n /**\n * Returns the algorithm from the header of the JSON Web Signature.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.1 | RFC 7515 Section 4.1.1})\n * for details.\n *\n * If the value of algorithm is \"none\" it indicates that the token is unsecured.\n */\n algorithm: string;\n\n /**\n * Json Web Signature Header \"kid\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.4 | RFC 7515 Section 4.1.4})\n * for details.\n */\n keyId?: string;\n\n /**\n * Json Web Signature Header \"crit\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.11 | RFC 7515 Section 4.1.11})\n * for details.\n *\n */\n critical?: boolean;\n\n /**\n * Json Web Token Header \"content type\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.10 | RFC 7515 Section 4.1.10})\n *\n */\n contentType?: string;\n\n /**\n * Json Web Token Header \"key URL\".\n *\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.2 | RFC 7515 Section 4.1.2})\n *\n */\n keyUrl?: string;\n\n /**\n * Json Web Token Header \"X509 Url\".\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.5 | RFC 7515 Section 4.1.5})\n *\n */\n x509Url?: string;\n\n /** Json Web Token Header \"Typ\".\n *\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.9 | RFC 7515 Section 4.1.9})\n *\n */\n type?: string;\n /**\n * Json Web Token Header \"x509 thumprint\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.7 | RFC 7515 Section 4.1.7})\n */\n certificateThumbprint?: string;\n\n /** Json Web Token Header \"x509 SHA256 thumprint\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.8 | RFC 7515 Section 4.1.8})\n *\n */\n certificateSha256Thumbprint?: string;\n\n /** Json Web Token Header \"x509 certificate chain\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.6 | RFC 7515 Section 4.1.6})\n *\n */\n certificateChain?: AttestationSigner;\n\n /** ********* JSON WEB TOKEN (RFC 7519) PROPERTIES */\n\n /** Issuer of the attestation token.\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.6 | RFC 7519 Section 4.1.6})\n * for details.\n */\n issuer?: string;\n\n /** Expiration time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4 | RFC 7519 Section 4.1.4})\n * for details.\n */\n expiresOn?: Date;\n\n /** Issuance time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.6 | RFC 7519 Section 4.1.6})\n * for details.\n */\n issuedAt?: Date;\n\n /**\n * Not Before time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.5 | RFC 7519 Section 4.1.5})\n * for details.\n */\n notBefore?: Date;\n}\n\n/**\n *\n * An AttestationToken represents an RFC 7515 JSON Web Signature object.\n *\n * It can represent either the token returned by the attestation service,\n * or it can be used to create a token locally which can be used to verify\n * attestation policy changes.\n */\nexport class AttestationTokenImpl implements AttestationToken {\n /**\n * @internal\n *\n * @param token - Attetation token returned by the attestation service.\n */\n constructor(token: string) {\n this._token = token;\n\n const pieces = token.split(\".\");\n if (pieces.length !== 3) {\n throw Error(\"Incorrectly formatted token:\");\n }\n this._headerBytes = base64UrlDecodeString(pieces[0]);\n this._header = safeJsonParse(bytesToString(this._headerBytes));\n this._bodyBytes = base64UrlDecodeString(pieces[1]);\n this._body = safeJsonParse(bytesToString(this._bodyBytes));\n // this._signature = base64UrlDecodeString(pieces[2]);\n\n this._jwsVerifier = jsrsasign.KJUR.jws.JWS.parse(token);\n }\n\n private _token: string;\n private _headerBytes: Uint8Array;\n private _header: any;\n private _bodyBytes: Uint8Array;\n private _body: any;\n // private _signature: Uint8Array;\n\n private _jwsVerifier: any; // jsrsasign.KJUR.jws.JWS.JWSResult;\n\n /**\n * Returns the deserialized body of the AttestationToken object.\n *\n * @returns The body of the attestation token as an object.\n */\n public getBody(): unknown {\n return this._jwsVerifier.payloadObj;\n }\n\n /**\n * the token to a string.\n *\n * @remarks\n * Serializes the token to a string.\n *\n * @returns The token serialized to a RFC 7515 JSON Web Signature.\n */\n public serialize(): string {\n return this._token;\n }\n\n /**\n * Returns the set of problems discovered in the attestation token.\n *\n * @param possibleSigners - the set of possible signers for this attestation token.\n * @param options - validation options\n * @returns an array of string values. If there are no problems, returns an empty array.\n */\n public getTokenProblems(\n possibleSigners?: AttestationSigner[],\n options: AttestationTokenValidationOptions = {\n validateExpirationTime: true,\n validateToken: true,\n validateNotBeforeTime: true,\n },\n ): string[] {\n let problems = new Array<string>();\n if (!options.validateToken) {\n return problems;\n }\n\n let foundSigner: AttestationSigner | undefined = undefined;\n if (this.algorithm !== \"none\") {\n const signers = this.getCandidateSigners(possibleSigners);\n\n signers.some((signer) => {\n const cert = this.certFromSigner(signer);\n // const pubKeyObj = cert.getPublicKey();\n\n const isValid = jsrsasign.KJUR.jws.JWS.verify(this._token, cert);\n\n if (isValid) {\n foundSigner = signer;\n }\n });\n\n if (foundSigner === undefined) {\n problems.push(\"Attestation Token is not properly signed.\");\n }\n }\n\n // If the token has a body, check the expiration time and issuer.\n if (this._body !== undefined) {\n problems = problems.concat(this.validateTimeProperties(options));\n problems = problems.concat(this.validateIssuer(options));\n }\n\n if (options.validateAttestationToken !== undefined) {\n // If there is a validation error, the getProblemsCallback will return the list of\n // problems found.\n const validationErrors = options.validateAttestationToken(this, foundSigner);\n if (validationErrors) {\n problems = problems.concat(validationErrors);\n }\n }\n return problems;\n }\n\n private validateIssuer(options: AttestationTokenValidationOptions): string[] {\n const problems = new Array<string>();\n if (this.issuer && options.validateIssuer) {\n if (this.issuer !== options.expectedIssuer) {\n problems.push(\n \"Found issuer: \" + this.issuer + \"; expected issuer: \" + options.expectedIssuer,\n );\n }\n }\n return problems;\n }\n /**\n * Validate the expiration and notbefore time claims in the JSON web token.\n *\n * @param options - Options to be used validating the time properties.\n */\n private validateTimeProperties(options: AttestationTokenValidationOptions): string[] {\n // Calculate the current time as a number of seconds since the start of the\n // Unix epoch.\n const problems = new Array<string>();\n const timeNow = Math.floor(new Date().getTime() / 1000);\n\n // Validate expiration time.\n if (this.expiresOn !== undefined && options.validateExpirationTime) {\n const expTime = this.expiresOn.getTime() / 1000;\n if (timeNow > expTime) {\n const delta = timeNow - expTime;\n if (delta > (options.timeValidationSlack ?? 0)) {\n problems.push(\"AttestationToken has expired.\");\n }\n }\n }\n\n // Validate not before time.\n if (this.notBefore !== undefined && options.validateNotBeforeTime) {\n const nbfTime = this.notBefore.getTime() / 1000;\n if (nbfTime > timeNow) {\n const delta = nbfTime - timeNow;\n if (delta > (options.timeValidationSlack ?? 0)) {\n problems.push(\"AttestationToken is not yet valid.\");\n }\n }\n }\n return problems;\n }\n\n private certFromSigner(signer: AttestationSigner): string {\n // return the PEM encoded certificate.\n return signer.certificates[0];\n }\n\n private getCandidateSigners(\n possibleSigningCertificates?: AttestationSigner[],\n ): AttestationSigner[] {\n const candidateSigners = new Array<AttestationSigner>();\n\n const desiredKeyId = this.keyId;\n\n if (desiredKeyId !== undefined && possibleSigningCertificates !== undefined) {\n possibleSigningCertificates.forEach((possibleSigner) => {\n if (possibleSigner.keyId === desiredKeyId) {\n candidateSigners.push(possibleSigner);\n }\n });\n\n // If we didn't find any candidate signers looking through the provided\n // signing certificates, then maybe there's a certificate chain in the\n // token itself that might be used to sign the token.\n if (candidateSigners.length === 0) {\n if (this.certificateChain !== undefined && this.certificateChain !== null) {\n candidateSigners.push(this.certificateChain);\n }\n }\n } else {\n possibleSigningCertificates?.map((value) => candidateSigners.push(value));\n if (this.certificateChain !== undefined) {\n candidateSigners.push(this.certificateChain);\n }\n }\n return candidateSigners;\n }\n\n /** ********* JSON WEB SIGNATURE (RFC 7515) PROPERTIES */\n\n /**\n * Returns the algorithm from the header of the JSON Web Signature.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.1 | RFC 7515 Section 4.1.1})\n * for details.\n *\n * If the value of algorithm is \"none\" it indicates that the token is unsecured.\n */\n public get algorithm(): string {\n return this._header?.alg;\n }\n\n /**\n * Json Web Signature Header \"kid\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.4 | RFC 7515 Section 4.1.4})\n * for details.\n */\n public get keyId(): string | undefined {\n return this._header.kid;\n }\n\n /**\n * Json Web Signature Header \"crit\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.11 | RFC 7515 Section 4.1.11})\n * for details.\n *\n */\n public get critical(): boolean | undefined {\n return this._header.crit;\n }\n\n /**\n * Json Web Token Header \"content type\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.10 | RFC 7515 Section 4.1.10})\n *\n */\n public get contentType(): string | undefined {\n return this._header.cty;\n }\n\n /**\n * Json Web Token Header \"key URL\".\n *\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.2 | RFC 7515 Section 4.1.2})\n *\n */\n public get keyUrl(): string | undefined {\n return this._header.jku;\n }\n\n /**\n * Json Web Token Header \"X509 Url\".\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.5 | RFC 7515 Section 4.1.5})\n *\n */\n public get x509Url(): string | undefined {\n return this._header.x5u;\n }\n\n /** Json Web Token Header \"Typ\".\n *\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.9 | RFC 7515 Section 4.1.9})\n *\n */\n public get type(): string | undefined {\n return this._header.typ;\n }\n\n /**\n * Json Web Token Header \"x509 thumprint\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.7 | RFC 7515 Section 4.1.7})\n */\n public get certificateThumbprint(): string | undefined {\n return this._header.x5t;\n }\n\n /** Json Web Token Header \"x509 SHA256 thumprint\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.8 | RFC 7515 Section 4.1.8})\n *\n */\n public get certificateSha256Thumbprint(): string | undefined {\n return this._header[\"x5t#256\"];\n }\n\n /** Json Web Token Header \"x509 certificate chain\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.6 | RFC 7515 Section 4.1.6})\n *\n */\n public get certificateChain(): AttestationSigner | undefined {\n let jwk: JsonWebKey;\n if (this._header.jwk !== undefined) {\n jwk = TypeDeserializer.deserialize(\n this._header.jwk,\n [Mappers.JsonWebKey],\n \"JsonWebKey\",\n ) as JsonWebKey;\n } else {\n jwk = TypeDeserializer.deserialize(\n this._header,\n { JsonWebKey: Mappers.JsonWebKey },\n \"JsonWebKey\",\n ) as JsonWebKey;\n }\n return _attestationSignerFromGenerated(jwk);\n }\n\n /** ********* JSON WEB TOKEN (RFC 7519) PROPERTIES */\n\n /** Issuer of the attestation token.\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.6 | RFC 7519 Section 4.1.6})\n * for details.\n */\n public get issuer(): string | undefined {\n return this._body.iss;\n }\n\n /** Expiration time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4 | RFC 7519 Section 4.1.4})\n * for details.\n */\n public get expiresOn(): Date | undefined {\n return this._body.exp ? new Date(this._body.exp * 1000) : undefined;\n }\n\n /** Issuance time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.6 | RFC 7519 Section 4.1.6})\n * for details.\n */\n public get issuedAt(): Date | undefined {\n return this._body.iat ? new Date(this._body.iat * 1000) : undefined;\n }\n\n /**\n * Not Before time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.5 | RFC 7519 Section 4.1.5})\n * for details.\n */\n public get notBefore(): Date | undefined {\n return this._body.nbf ? new Date(this._body.nbf * 1000) : undefined;\n }\n\n /**\n * Creates a new attestation token from a body and signing key.\n * @param body - stringified body of the body of the token to be created.\n * @param signer - Optional signing key used to sign the newly created token.\n * @returns an {@link AttestationToken | attestation token}\n */\n public static create(params: {\n body?: string;\n privateKey?: string;\n certificate?: string;\n }): AttestationToken {\n const header: {\n alg: string;\n [k: string]: any;\n } = { alg: \"none\" };\n\n if ((!params.privateKey && params.certificate) || (params.privateKey && !params.certificate)) {\n throw new Error(\n \"If privateKey is specified, certificate must also be provided. If certificate is provided, privateKey must also be provided.\",\n );\n }\n\n if (params.privateKey && params.certificate) {\n verifyAttestationSigningKey(params.privateKey, params.certificate);\n }\n\n if (params.privateKey || params.certificate) {\n const x5c = new jsrsasign.X509();\n x5c.readCertPEM(params.certificate);\n const pubKey = x5c.getPublicKey();\n if (pubKey instanceof jsrsasign.RSAKey) {\n header.alg = \"RS256\";\n } else if (pubKey instanceof jsrsasign.KJUR.crypto.ECDSA) {\n header.alg = \"ES256\";\n } else {\n throw new Error(\"Unknown public key type: \" + typeof pubKey);\n }\n header.x5c = [hexToBase64(x5c.hex)];\n } else {\n header.alg = \"none\";\n }\n\n const encodedToken = jsrsasign.KJUR.jws.JWS.sign(\n header.alg,\n header,\n params.body ?? \"\",\n params.privateKey,\n );\n return new AttestationTokenImpl(encodedToken);\n }\n}\n\nfunction isObject(thing: any): boolean {\n return Object.prototype.toString.call(thing) === \"[object Object]\";\n}\n\nfunction safeJsonParse(thing: any): any {\n if (isObject(thing)) return thing;\n try {\n return JSON.parse(thing);\n } catch (e: any) {\n return undefined;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StoredAttestationPolicy } from \"./storedAttestationPolicy\";\n// import { AttestationSigningKey } from \"./attestationSigningKey\";\nimport { AttestationToken, AttestationTokenImpl } from \"./attestationToken\";\n\n/**\n *\n * An AttestationPolicyToken represents an AttestationToken which holds an attestation\n * policy document.\n *\n * When the attestation service receives a set policy request, the payload of the\n * set policy token contains a {@link https://datatracker.ietf.org/doc/html/rfc7515 | JSON Web Signature}\n * whose body contains the actual attestation policy document.\n *\n * The AttestationPolicyToken represents this JWS object.\n */\nexport interface AttestationPolicyToken extends AttestationToken {}\n\n/** Constructs an AttestationToken containing an Attestation Policy document.\n *\n * @param policy - Attestation policy to embed in the attestation token.\n * @param privateKey - optional private key used to sign the attestation token.\n * @param certificate - optional certificate used to verify the attestation token.\n *\n * @remarks Note that if the attestation instance is running in `Isolated` mode,\n * the privateKey and certificate are required. If the attestation instance\n * is running in `AAD` mode, they are optional.\n *\n * @throws {@link Error} when the key in the certificate provided does not match the private key.\n */\nexport function createAttestationPolicyToken(\n policy: string,\n privateKey?: string,\n certificate?: string,\n): AttestationPolicyToken {\n const token = AttestationTokenImpl.create({\n body: new StoredAttestationPolicy(policy).serialize(),\n privateKey: privateKey,\n certificate: certificate,\n });\n return token;\n}\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Azure.Security.Attestation\",\n packageName: \"@azure/attestation\",\n packageVersion: \"1.0.1\"\n});\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\nimport {\n AttestOpenEnclaveRequest as AttestOpenEnclaveRequestMapper,\n AttestSgxEnclaveRequest as AttestSgxEnclaveRequestMapper,\n TpmAttestationRequest as TpmAttestationRequestMapper\n} from \"../models/mappers\";\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const instanceUrl: OperationURLParameter = {\n parameterPath: \"instanceUrl\",\n mapper: {\n serializedName: \"instanceUrl\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2020-10-01\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const attestationType: OperationURLParameter = {\n parameterPath: \"attestationType\",\n mapper: {\n serializedName: \"attestationType\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"text/plain\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const newAttestationPolicy: OperationParameter = {\n parameterPath: \"newAttestationPolicy\",\n mapper: {\n serializedName: \"newAttestationPolicy\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const accept1: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const policyJws: OperationParameter = {\n parameterPath: \"policyJws\",\n mapper: {\n serializedName: \"policyJws\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const contentType1: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const policyCertificateToAdd: OperationParameter = {\n parameterPath: \"policyCertificateToAdd\",\n mapper: {\n constraints: {\n Pattern: new RegExp(\"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\")\n },\n serializedName: \"policyCertificateToAdd\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const policyCertificateToRemove: OperationParameter = {\n parameterPath: \"policyCertificateToRemove\",\n mapper: {\n constraints: {\n Pattern: new RegExp(\"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\")\n },\n serializedName: \"policyCertificateToRemove\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const request: OperationParameter = {\n parameterPath: \"request\",\n mapper: AttestOpenEnclaveRequestMapper\n};\n\nexport const request1: OperationParameter = {\n parameterPath: \"request\",\n mapper: AttestSgxEnclaveRequestMapper\n};\n\nexport const request2: OperationParameter = {\n parameterPath: \"request\",\n mapper: TpmAttestationRequestMapper\n};\n\nexport const accept2: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/jwk+json, application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { Policy } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n AttestationType,\n PolicyGetOptionalParams,\n PolicyGetResponse,\n PolicySetModelOptionalParams,\n PolicySetModelResponse,\n PolicyResetOptionalParams,\n PolicyResetResponse\n} from \"../models\";\n\n/** Class containing Policy operations. */\nexport class PolicyImpl implements Policy {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class Policy class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the current policy for an attestation type.\n * @param attestationType Specifies the trusted execution environment to be used to validate the\n * evidence\n * @param options The options parameters.\n */\n async get(\n attestationType: AttestationType,\n options?: PolicyGetOptionalParams\n ): Promise<PolicyGetResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { attestationType, options },\n getOperationSpec\n ) as Promise<PolicyGetResponse>;\n }\n );\n }\n\n /**\n * Sets the policy for a given attestation type.\n * @param attestationType Specifies the trusted execution environment to be used to validate the\n * evidence\n * @param newAttestationPolicy JWT Expressing the new policy whose body is a StoredAttestationPolicy\n * object.\n * @param options The options parameters.\n */\n async set(\n attestationType: AttestationType,\n newAttestationPolicy: string,\n options?: PolicySetModelOptionalParams\n ): Promise<PolicySetModelResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.set\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { attestationType, newAttestationPolicy, options },\n setOperationSpec\n ) as Promise<PolicySetModelResponse>;\n }\n );\n }\n\n /**\n * Resets the attestation policy for the specified tenant and reverts to the default policy.\n * @param attestationType Specifies the trusted execution environment to be used to validate the\n * evidence\n * @param policyJws JSON Web Signature with an empty policy document\n * @param options The options parameters.\n */\n async reset(\n attestationType: AttestationType,\n policyJws: string,\n options?: PolicyResetOptionalParams\n ): Promise<PolicyResetResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.reset\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { attestationType, policyJws, options },\n resetOperationSpec\n ) as Promise<PolicyResetResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/policies/{attestationType}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl, Parameters.attestationType],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst setOperationSpec: coreClient.OperationSpec = {\n path: \"/policies/{attestationType}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.newAttestationPolicy,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl, Parameters.attestationType],\n headerParameters: [Parameters.contentType, Parameters.accept1],\n mediaType: \"text\",\n serializer\n};\nconst resetOperationSpec: coreClient.OperationSpec = {\n path: \"/policies/{attestationType}:reset\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.policyJws,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl, Parameters.attestationType],\n headerParameters: [Parameters.contentType, Parameters.accept1],\n mediaType: \"text\",\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { PolicyCertificates } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n PolicyCertificatesGetOptionalParams,\n PolicyCertificatesGetResponse,\n PolicyCertificatesAddOptionalParams,\n PolicyCertificatesAddResponse,\n PolicyCertificatesRemoveOptionalParams,\n PolicyCertificatesRemoveResponse\n} from \"../models\";\n\n/** Class containing PolicyCertificates operations. */\nexport class PolicyCertificatesImpl implements PolicyCertificates {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class PolicyCertificates class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the set of certificates used to express policy for the current tenant.\n * @param options The options parameters.\n */\n async get(\n options?: PolicyCertificatesGetOptionalParams\n ): Promise<PolicyCertificatesGetResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getOperationSpec\n ) as Promise<PolicyCertificatesGetResponse>;\n }\n );\n }\n\n /**\n * Adds a new attestation policy certificate to the set of policy management certificates.\n * @param policyCertificateToAdd An RFC7519 JSON Web Token whose body is an RFC7517 JSON Web Key\n * object. The RFC7519 JWT must be signed with one of the existing signing certificates\n * @param options The options parameters.\n */\n async add(\n policyCertificateToAdd: string,\n options?: PolicyCertificatesAddOptionalParams\n ): Promise<PolicyCertificatesAddResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.add\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { policyCertificateToAdd, options },\n addOperationSpec\n ) as Promise<PolicyCertificatesAddResponse>;\n }\n );\n }\n\n /**\n * Removes the specified policy management certificate. Note that the final policy management\n * certificate cannot be removed.\n * @param policyCertificateToRemove An RFC7519 JSON Web Token whose body is an\n * AttestationCertificateManagementBody object. The RFC7519 JWT must be signed with one of the existing\n * signing certificates\n * @param options The options parameters.\n */\n async remove(\n policyCertificateToRemove: string,\n options?: PolicyCertificatesRemoveOptionalParams\n ): Promise<PolicyCertificatesRemoveResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.remove\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { policyCertificateToRemove, options },\n removeOperationSpec\n ) as Promise<PolicyCertificatesRemoveResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/certificates\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyCertificatesResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst addOperationSpec: coreClient.OperationSpec = {\n path: \"/certificates:add\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyCertificatesModifyResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.policyCertificateToAdd,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst removeOperationSpec: coreClient.OperationSpec = {\n path: \"/certificates:remove\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyCertificatesModifyResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.policyCertificateToRemove,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { Attestation } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n AttestOpenEnclaveRequest,\n AttestationAttestOpenEnclaveOptionalParams,\n AttestationAttestOpenEnclaveResponse,\n AttestSgxEnclaveRequest,\n AttestationAttestSgxEnclaveOptionalParams,\n AttestationAttestSgxEnclaveResponse,\n TpmAttestationRequest,\n AttestationAttestTpmOptionalParams,\n AttestationAttestTpmResponse\n} from \"../models\";\n\n/** Class containing Attestation operations. */\nexport class AttestationImpl implements Attestation {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class Attestation class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Processes an OpenEnclave report , producing an artifact. The type of artifact produced is dependent\n * upon attestation policy.\n * @param request Request object containing the quote\n * @param options The options parameters.\n */\n async attestOpenEnclave(\n request: AttestOpenEnclaveRequest,\n options?: AttestationAttestOpenEnclaveOptionalParams\n ): Promise<AttestationAttestOpenEnclaveResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.attestOpenEnclave\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { request, options },\n attestOpenEnclaveOperationSpec\n ) as Promise<AttestationAttestOpenEnclaveResponse>;\n }\n );\n }\n\n /**\n * Processes an SGX enclave quote, producing an artifact. The type of artifact produced is dependent\n * upon attestation policy.\n * @param request Request object containing the quote\n * @param options The options parameters.\n */\n async attestSgxEnclave(\n request: AttestSgxEnclaveRequest,\n options?: AttestationAttestSgxEnclaveOptionalParams\n ): Promise<AttestationAttestSgxEnclaveResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.attestSgxEnclave\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { request, options },\n attestSgxEnclaveOperationSpec\n ) as Promise<AttestationAttestSgxEnclaveResponse>;\n }\n );\n }\n\n /**\n * Processes attestation evidence from a VBS enclave, producing an attestation result. The attestation\n * result produced is dependent upon the attestation policy.\n * @param request Request object\n * @param options The options parameters.\n */\n async attestTpm(\n request: TpmAttestationRequest,\n options?: AttestationAttestTpmOptionalParams\n ): Promise<AttestationAttestTpmResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.attestTpm\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { request, options },\n attestTpmOperationSpec\n ) as Promise<AttestationAttestTpmResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst attestOpenEnclaveOperationSpec: coreClient.OperationSpec = {\n path: \"/attest/OpenEnclave\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AttestationResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.request,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst attestSgxEnclaveOperationSpec: coreClient.OperationSpec = {\n path: \"/attest/SgxEnclave\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AttestationResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.request1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst attestTpmOperationSpec: coreClient.OperationSpec = {\n path: \"/attest/Tpm\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.TpmAttestationResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.request2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { SigningCertificates } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n SigningCertificatesGetOptionalParams,\n SigningCertificatesGetResponse\n} from \"../models\";\n\n/** Class containing SigningCertificates operations. */\nexport class SigningCertificatesImpl implements SigningCertificates {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class SigningCertificates class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Retrieves metadata signing certificates in use by the attestation service\n * @param options The options parameters.\n */\n async get(\n options?: SigningCertificatesGetOptionalParams\n ): Promise<SigningCertificatesGetResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getOperationSpec\n ) as Promise<SigningCertificatesGetResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/certs\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.JsonWebKeySet\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept2],\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { MetadataConfiguration } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n MetadataConfigurationGetOptionalParams,\n MetadataConfigurationGetResponse\n} from \"../models\";\n\n/** Class containing MetadataConfiguration operations. */\nexport class MetadataConfigurationImpl implements MetadataConfiguration {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class MetadataConfiguration class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Retrieves metadata about the attestation signing keys in use by the attestation service\n * @param options The options parameters.\n */\n async get(\n options?: MetadataConfigurationGetOptionalParams\n ): Promise<MetadataConfigurationGetResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getOperationSpec\n ) as Promise<MetadataConfigurationGetResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/.well-known/openid-configuration\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Dictionary\", value: { type: { name: \"any\" } } }\n }\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept],\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport {\n PolicyImpl,\n PolicyCertificatesImpl,\n AttestationImpl,\n SigningCertificatesImpl,\n MetadataConfigurationImpl\n} from \"./operations\";\nimport {\n Policy,\n PolicyCertificates,\n Attestation,\n SigningCertificates,\n MetadataConfiguration\n} from \"./operationsInterfaces\";\nimport { GeneratedClientOptionalParams } from \"./models\";\n\nexport class GeneratedClient extends coreClient.ServiceClient {\n instanceUrl: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClient class.\n * @param instanceUrl The attestation instance base URI, for example https://mytenant.attest.azure.net.\n * @param options The parameter options\n */\n constructor(instanceUrl: string, options?: GeneratedClientOptionalParams) {\n if (instanceUrl === undefined) {\n throw new Error(\"'instanceUrl' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-attestation/1.0.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint ?? options.baseUri ?? \"{instanceUrl}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.instanceUrl = instanceUrl;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2020-10-01\";\n this.policy = new PolicyImpl(this);\n this.policyCertificates = new PolicyCertificatesImpl(this);\n this.attestation = new AttestationImpl(this);\n this.signingCertificates = new SigningCertificatesImpl(this);\n this.metadataConfiguration = new MetadataConfigurationImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n policy: Policy;\n policyCertificates: PolicyCertificates;\n attestation: Attestation;\n signingCertificates: SigningCertificates;\n metadataConfiguration: MetadataConfiguration;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The \\@azure/logger configuration for this package.\n *\n * @internal\n */\nexport const logger = createClientLogger(\"attestation\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AttestationToken } from \"./attestationToken\";\n\n/**\n * An AttestationResponse represents the response from the Microsoft Azure\n * Attestation service. It has two properties:\n *\n * @param token - The attestation token returned from the attestation service.\n * @param body - The value of the response from the attestation service.\n * @typeparam T - The type of the {@link body} property.\n *\n */\nexport interface AttestationResponse<T> {\n /**\n * The Attestation Token returned from the attestation service.\n */\n token: AttestationToken;\n\n /**\n * The value of the response from the attestation service, derived\n * from the body of the {@link token} property.\n */\n\n body: T;\n}\n\n/** Create an AttestationResponse object.\n *\n * @param token - Token which was returned from the attestation service.\n * @param value - Value for the response. Usually derived from the body of the token\n * returned by the service.\n * @returns - A newly created AttestationResponse object.\n */\nexport function createAttestationResponse<T>(\n token: AttestationToken,\n value: T,\n): AttestationResponse<T> {\n return { token: token, body: value };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AttestationSigner } from \".\";\nimport { GeneratedAttestationResult } from \"../generated\";\nimport { _attestationSignerFromGenerated } from \"./attestationSigner\";\n\n/**\n * Defines the contents of the {@link AttestationResult.sgxCollateral} claim in\n * an {@link AttestationResult}.\n */\nexport interface AttestationSgxCollateralInfo {\n /**\n * Hex encoded Sha256 hash of the Quoting Enclave Certificates.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n qeidcertshash?: string;\n /**\n * Hex encoded Sha256 hash of the Quoting Enclave Certificate CRL.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n qeidcrlhash?: string;\n /**\n * Hex encoded Sha256 hash of the Quoting Enclave Identity.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n qeidhash?: string;\n /**\n * Hex encoded Sha256 hash of the SGX Quote or OpenEnclave Report validated\n * by this token.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n quotehash?: string;\n /**\n * Hex encoded Sha256 hash of the TCB Info Certificates.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n tcbinfocertshash?: string;\n /**\n * Hex encoded Sha256 hash of the TCB Info Certificate CRL.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n tcbinfocrlhash?: string;\n /**\n * Hex encoded Sha256 hash of the TCB Info for the device being attested.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n tcbinfohash?: string;\n}\n\n/**\n * A Microsoft Azure Attestation response token body - the body of a response token issued by MAA\n */\nexport interface AttestationResult {\n /**\n * Unique Identifier for the token.\n *\n * Corresponds to the 'jti' claim defined in\n * {@link https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7 | RFC 7519 section 4.1.7}\n */\n uniqueId: string;\n\n /**\n * Returns the issuer of the attestation token. MUST be the same as the\n * endpoint used when constructing the attestation client instance.\n */\n issuer: string;\n\n /**\n * Returns the \"nonce\" value if one was specified in the Attest request.\n */\n nonce?: string;\n\n /**\n * The Schema version of this structure. Current Value: 1.0\n */\n version: string;\n\n /**\n * Returns the runtime claims in the token.\n *\n * This value will match the input `runTimeJson` property to the\n * {@link AttestationClient.attestSgxEnclave} or\n * {@link AttestationClient.attestOpenEnclave} API.\n *\n * @remarks\n *\n * The `runtimeClaims` property will only be populated if the\n * `runtimeJson` parameter to the `Attest` API is specified. It will\n * not be populated if the `runtimeData` parameter is specified.\n */\n runTimeClaims: unknown;\n /**\n * Returns the initialization time claims in the token.\n * This value will match the input `initTimeJson` property to the\n * {@link AttestationClient.attestSgxEnclave} or\n * {@link AttestationClient.attestOpenEnclave} API.\n *\n * @remarks\n *\n * The `initTimeClaims` property will only be populated if the `initTimeJson`\n * parameter to the `Attest` API is specified. It will not be populated if\n * the `initTimeData` parameter is specified.\n */\n initTimeClaims: unknown;\n\n /**\n * Returns the set of claims generated by the attestation policy on the instance.\n */\n policyClaims: unknown;\n\n /**\n * Returns the verifier which generated this attestation token. Normally one of:\n * \"SGX\" or \"TPM\", but others can be specified.\n */\n verifierType: string;\n /**\n * The certificate used to sign the policy object, if specified.\n */\n policySigner?: AttestationSigner;\n /**\n * The base64url encoded SHA256 hash of the BASE64URL encoded policy text\n * used for attestation.\n */\n policyHash: Uint8Array;\n /**\n * True if the enclave is debuggable, false otherwise. Only valid if `verifierType` is SGX.\n */\n isDebuggable?: boolean;\n\n /**\n * The SGX Product ID for the enclave. Only valid if the `verifierType` field is \"SGX\"\n */\n productId?: number;\n /**\n * The HEX encoded SGX MRENCLAVE value for the enclave. Only valid if the\n * `verifierType` field is \"SGX\"\n */\n mrEnclave?: string;\n\n /**\n * The HEX encoded SGX MRSIGNER value for the enclave. Only valid if the\n * `verifierType` field is \"SGX\"\n */\n mrSigner?: string;\n\n /**\n * The SGX SVN value for the enclave. Only valid if the `verifierType` field is \"SGX\"\n */\n svn?: number;\n\n /**\n * Returns the value of the runtime_data field specified as an input to the\n * {@link AttestationClient.attestSgxEnclave} or {@link AttestationClient.attestOpenEnclave} API.\n *\n * @remarks\n *\n * The `enclaveHeldData` property will only be populated if the\n * `runtimeData` parameter to the `Attest` API is specified.\n */\n enclaveHeldData?: Uint8Array;\n\n /**\n * Returns a set of information describing the complete set of inputs to the\n * Attestation validation logic.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n sgxCollateral?: AttestationSgxCollateralInfo;\n}\n\n/**\n * A Microsoft Azure Attestation response token body - the body of a response token issued by MAA\n */\nexport class AttestationResultImpl implements AttestationResult {\n /**\n *\n * @param params - The parameters for the constructor.\n *\n * @hidden\n */\n constructor(params: {\n issuer: string;\n version: string;\n nonce?: string;\n uniqueId: string;\n runTimeClaims?: unknown;\n initTimeClaims?: unknown;\n policyClaims?: unknown;\n verifierType: string;\n policySigner?: AttestationSigner;\n policyHash: Uint8Array;\n isDebuggable?: boolean;\n productId?: number;\n mrEnclave?: string;\n mrSigner?: string;\n svn?: number;\n enclaveHeldData?: Uint8Array;\n sgxCollateral?: AttestationSgxCollateralInfo;\n }) {\n this._issuer = params.issuer;\n this._nonce = params.nonce;\n this._version = params.version;\n this._uniqueId = params.uniqueId;\n this._runTimeClaims = params.runTimeClaims;\n this._initTimeClaims = params.initTimeClaims;\n this._policyClaims = params.policyClaims;\n this._verifierType = params.verifierType;\n this._policySigner = params.policySigner;\n this._policyHash = params.policyHash;\n this._isDebuggable = params.isDebuggable;\n this._productId = params.productId;\n this._mrEnclave = params.mrEnclave;\n this._mrSigner = params.mrSigner;\n this._svn = params.svn;\n this._enclaveHeldData = params.enclaveHeldData;\n this._sgxCollateral = params.sgxCollateral;\n }\n\n private _issuer: string;\n private _version: string;\n private _nonce?: string;\n private _uniqueId: string;\n private _runTimeClaims?: unknown;\n private _initTimeClaims?: unknown;\n private _policyClaims?: unknown;\n private _verifierType: string;\n private _policySigner?: AttestationSigner;\n private _policyHash: Uint8Array;\n private _isDebuggable?: boolean;\n private _productId?: number;\n private _mrEnclave?: string;\n private _mrSigner?: string;\n private _svn?: number;\n private _enclaveHeldData?: Uint8Array;\n private _sgxCollateral?: AttestationSgxCollateralInfo;\n\n /**\n * Unique Identifier for the token\n *\n */\n get uniqueId(): string {\n return this._uniqueId;\n }\n\n /**\n * Returns the issuer of the attestation token. MUST be the same as the\n * endpoint used when constructing the attestation client instance.\n */\n get issuer(): string {\n return this._issuer;\n }\n\n /**\n * Returns the \"nonce\" value specified in the Attest request.\n */\n get nonce(): string | undefined {\n return this._nonce;\n }\n\n /**\n * The Schema version of this structure. Current Value: 1.0\n */\n get version(): string {\n return this._version;\n }\n\n /**\n * Runtime Claims\n */\n get runTimeClaims(): unknown {\n return this._runTimeClaims;\n }\n /**\n * Inittime Claims\n */\n get initTimeClaims(): unknown {\n return this._initTimeClaims;\n }\n\n /**\n * Policy Generated Claims\n */\n get policyClaims(): unknown {\n return this._policyClaims;\n }\n /**\n * The Attestation type being attested.\n */\n get verifierType(): string {\n return this._verifierType;\n }\n /**\n * The certificate used to sign the policy object, if specified.\n */\n get policySigner(): AttestationSigner | undefined {\n return this._policySigner;\n }\n /**\n * The SHA256 hash of the BASE64URL encoded policy text used for attestation\n */\n get policyHash(): Uint8Array {\n return this._policyHash;\n }\n /**\n * True if the enclave is debuggable, false otherwise\n */\n get isDebuggable(): boolean | undefined {\n return this._isDebuggable;\n }\n /**\n * The SGX Product ID for the enclave.\n */\n get productId(): number | undefined {\n return this._productId;\n }\n /**\n * The HEX encoded SGX MRENCLAVE value for the enclave.\n */\n get mrEnclave(): string | undefined {\n return this._mrEnclave;\n }\n /**\n * The HEX encoded SGX MRSIGNER value for the enclave.\n */\n get mrSigner(): string | undefined {\n return this._mrSigner;\n }\n /**\n * The SGX SVN value for the enclave.\n */\n get svn(): number | undefined {\n return this._svn;\n }\n /**\n * A copy of the RuntimeData specified as an input to the attest call.\n */\n get enclaveHeldData(): Uint8Array | undefined {\n return this._enclaveHeldData;\n }\n /**\n * The SGX SVN value for the enclave.\n */\n get sgxCollateral(): AttestationSgxCollateralInfo | undefined {\n return this._sgxCollateral;\n }\n}\n\n/**\n *\n * @param generated - Generated attestation result object.\n * @returns newly created AttestationResult from the generated result.\n *\n * @internal\n */\nexport function _attestationResultFromGenerated(\n generated: GeneratedAttestationResult,\n): AttestationResultImpl {\n return new AttestationResultImpl({\n issuer: generated.iss,\n version: generated.version,\n nonce: generated.nonce,\n uniqueId: generated.jti,\n policySigner: generated.policySigner\n ? _attestationSignerFromGenerated(generated.policySigner)\n : undefined,\n runTimeClaims: generated.runtimeClaims,\n initTimeClaims: generated.inittimeClaims,\n policyClaims: generated.policyClaims,\n verifierType: generated.verifierType,\n policyHash: generated.policyHash,\n isDebuggable: generated.isDebuggable,\n productId: generated.productId,\n mrEnclave: generated.mrEnclave,\n mrSigner: generated.mrSigner,\n svn: generated.svn,\n enclaveHeldData: generated.enclaveHeldData,\n sgxCollateral: generated.sgxCollateral,\n });\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Converts an attestation input from Uint8Array/Buffer/Blob to Uint8Array.\n *\n * @param input - Input to attestation API.\n * @returns Promise which completes with the input data as a Uint8Array.\n */\nexport async function Uint8ArrayFromInput(\n input: Uint8Array | Buffer | Blob | undefined,\n): Promise<Uint8Array | undefined> {\n if (input === undefined) {\n return input;\n }\n\n if ((input as any).byteLength === undefined) {\n throw TypeError(\"Blob is unsupported in node.\");\n }\n\n // We've eliminated the 'Blob' case above, so we know this must be either a Buffer or Uint8Array.\n return input as Uint8Array;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient } from \"./generated/generatedClient\";\n\nimport { AttestationResult, AttestationSigner, AttestationTokenValidationOptions } from \"./models\";\n\nimport {\n GeneratedAttestationResult,\n InitTimeData,\n KnownDataType,\n RuntimeData,\n} from \"./generated/models\";\n\nimport { logger } from \"./logger\";\nimport { GeneratedClientOptionalParams } from \"./generated/models\";\nimport * as Mappers from \"./generated/models/mappers\";\n\nimport { AttestationResponse, createAttestationResponse } from \"./models/attestationResponse\";\n\nimport { TypeDeserializer } from \"./utils/typeDeserializer\";\nimport { TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport { bytesToString, stringToBytes } from \"./utils/utf8\";\nimport { _attestationResultFromGenerated } from \"./models/attestationResult\";\nimport { _attestationSignerFromGenerated } from \"./models/attestationSigner\";\nimport { AttestationTokenImpl } from \"./models/attestationToken\";\nimport { Uint8ArrayFromInput } from \"./utils/buffer\";\nimport { tracingClient } from \"./generated/tracing\";\n\n/**\n * Attestation Client Construction Options.\n */\nexport interface AttestationClientOptions extends CommonClientOptions {\n /**\n * Validation options to be used to validate attestation tokens received\n * from the attestation service.\n */\n validationOptions?: AttestationTokenValidationOptions;\n}\n\n/**\n * Operation options for the Attestation Client operations.\n */\nexport interface AttestationClientOperationOptions extends OperationOptions {\n /**\n * Validation options to be used to validate attestation tokens received\n * from the attestation service for the individual operation.\n */\n validationOptions?: AttestationTokenValidationOptions;\n}\n\n/**\n * Optional parameters for the AttestOpenEnclave API.\n *\n * @param initTimeData - data provided at the time the enclave was initialized.\n * @param runTimeData - data provided at the time the SGX quote being attested was created.\n * @param draftPolicyForAttestation - If specified, the attestation policy to be used during the attestation request.\n */\nexport interface AttestOpenEnclaveOptions extends AttestationClientOperationOptions {\n /**\n *initTimeData : data provided at the time the enclave was initialized, to be interpreted as binary data.\n *\n */\n initTimeData?: Uint8Array | Buffer | Blob;\n\n /**\n * inittimeJson : data provided at the time the enclave was initialized, to be interpreted as JSON data.\n */\n initTimeJson?: Uint8Array | Buffer | Blob;\n\n /**\n * runTimeData - data provided at the time the OpenEnclave report being attested was created to be interpreted as binary data.\n */\n runTimeData?: Uint8Array | Buffer | Blob;\n\n /**\n * runTimeJson - data provided at the time the OpenEnclave report being attested was created to be interpreted as JSON data.\n */\n runTimeJson?: Uint8Array | Buffer | Blob;\n\n /**\n * draftPolicyForAttestation - If specified, the attestation policy to be used during the attestation request.\n */\n draftPolicyForAttestation?: string;\n}\n\n/**\n * Optional parameters for the AttestSgxEnclave API.\n *\n * @param initTimeData - data provided at the time the enclave was initialized.\n * @param runTimeData - data provided at the time the SGX quote being attested was created.\n * @param draftPolicyForAttestation - If specified, the attestation policy to be used during the attestation request.\n */\nexport interface AttestSgxEnclaveOptions extends AttestationClientOperationOptions {\n /**\n *initTimeData : data provided at the time the enclave was initialized, to be interpreted as binary data.\n *\n */\n initTimeData?: Uint8Array | Buffer | Blob;\n\n /**\n * inittimeJson : data provided at the time the enclave was initialized, to be interpreted as JSON data.\n */\n initTimeJson?: Uint8Array | Buffer | Blob;\n\n /**\n * runTimeData - data provided at the time the OpenEnclave report being attested was created to be interpreted as binary data.\n */\n runTimeData?: Uint8Array | Buffer | Blob;\n\n /**\n * runTimeJson - data provided at the time the OpenEnclave report being attested was created to be interpreted as JSON data.\n */\n runTimeJson?: Uint8Array | Buffer | Blob;\n\n /**\n * draftPolicyForAttestation - If specified, the attestation policy to be used during the attestation request.\n */\n draftPolicyForAttestation?: string;\n}\n\n/**\n * Operation options for the AttestTpm API.\n */\nexport interface AttestTpmOptions extends AttestationClientOperationOptions {}\n\n/**\n * Attestation Client class.\n *\n * The AttestationClient class enables access to the Attestation related APIs:\n *\n * - getOpenIdMetadata\n * - getAttestationSigners\n * - attestSgxEnclave\n * - attestOpenEnclave\n * - attestTpm\n */\nexport class AttestationClient {\n /**\n * Creates an instance of AttestationClient.\n *\n * Example usage:\n * ```ts\n * import { AttestationClient } from \"@azure/attestation\";\n *\n * const client = new AttestationClient(\n * \"<service endpoint>\"\n * );\n * ```\n *\n * @param endpoint - The attestation instance base URI, for example https://mytenant.attest.azure.net.\n * @param options - Options used to configure the Attestation Client.\n *\n */\n public constructor(endpoint: string, options?: AttestationClientOptions);\n\n /**\n * Creates an instance of AttestationClient with options and credentials.\n *\n * Example usage:\n * ```ts\n * import { AttestationClient } from \"@azure/attestation\";\n *\n * const client = new AttestationClient(\n * \"<service endpoint>\",\n * new TokenCredential(\"<>\"),\n * { tokenValidationOptions: { validateToken: false } }\n * );\n * ```\n *\n * Note that credentials are required to call the `attestTpm` API.\n *\n * @param endpoint - The attestation instance base URI, for example https://mytenant.attest.azure.net.\n * @param credentials - Credentials used to configure the attestation client.\n *\n */\n public constructor(\n endpoint: string,\n credentials: TokenCredential,\n options?: AttestationClientOptions,\n );\n public constructor(\n endpoint: string,\n credentialsOrOptions?: TokenCredential | AttestationClientOptions,\n clientOptions: AttestationClientOptions = {},\n ) {\n let credentialScopes: string[] | undefined = undefined;\n let credential: TokenCredential | undefined = undefined;\n let options: AttestationClientOptions;\n\n if (credentialsOrOptions && isTokenCredential(credentialsOrOptions)) {\n credential = credentialsOrOptions;\n credentialScopes = [\"https://attest.azure.net/.default\"];\n options = clientOptions;\n } else {\n options = credentialsOrOptions || {};\n }\n\n const internalPipelineOptions: GeneratedClientOptionalParams = {\n ...options,\n ...{\n credentialScopes: credentialScopes,\n credential: credential,\n loggingOptions: {\n logger: logger.info,\n allowedHeaderNames: [\"x-ms-request-id\", \"x-ms-maa-service-version\"],\n },\n },\n };\n\n this._client = new GeneratedClient(endpoint, internalPipelineOptions);\n this._validationOptions = options.validationOptions;\n }\n\n /** Attests an OpenEnclave report generated from an SGX Enclave using the OpenEnclave SDK.\n *\n * @param report - An OpenEnclave report generated by an SGX enclave.\n * @param options - Operation options for the attestOpenEnclave API call.\n * @returns Returns an AttestationResponse whose body is an AttestationResult describing\n * the claims returned by the attestation service.\n *\n * @throws {@link Error} if the `initTimeData` option and `initTimeJson` option is provided.\n * @throws {@link Error} if the `runTimeData` option and `runTimeJson` option is provided.\n * @throws {@link Error} if the `initTimeJson` option is provided and the value of `initTimeJson` is not JSON.\n * @throws {@link Error} if the `runTimeJson` option is provided and the value of `runTimeJson` is not JSON.\n */\n public async attestOpenEnclave(\n report: Uint8Array | Buffer | Blob,\n options: AttestOpenEnclaveOptions = {},\n ): Promise<AttestationResponse<AttestationResult>> {\n return tracingClient.withSpan(\n \"AttestationClient-attestOpenEnclave\",\n options,\n async (updatedOptions) => {\n if (options.initTimeData !== undefined && options.initTimeJson !== undefined) {\n throw new Error(\"Cannot provide both initTimeData and initTimeJson.\");\n }\n\n if (options.runTimeData !== undefined && options.runTimeJson !== undefined) {\n throw new Error(\"Cannot provide both runTimeData and runTimeJson.\");\n }\n\n const initData = await Uint8ArrayFromInput(options.initTimeData ?? options.initTimeJson);\n\n const initTimeData: InitTimeData | undefined = initData\n ? {\n data: initData,\n dataType:\n options.initTimeJson !== undefined ? KnownDataType.Json : KnownDataType.Binary,\n }\n : undefined;\n\n const runData = await Uint8ArrayFromInput(options.runTimeData ?? options.runTimeJson);\n\n const runTimeData: RuntimeData | undefined = runData\n ? {\n data: runData,\n dataType:\n options.runTimeJson !== undefined ? KnownDataType.Json : KnownDataType.Binary,\n }\n : undefined;\n\n const attestationResponse = await this._client.attestation.attestOpenEnclave(\n {\n report: await Uint8ArrayFromInput(report),\n initTimeData: initTimeData,\n runtimeData: runTimeData,\n draftPolicyForAttestation: options.draftPolicyForAttestation ?? undefined,\n },\n updatedOptions,\n );\n\n const token = new AttestationTokenImpl(attestationResponse.token);\n const problems = token.getTokenProblems(\n await this._signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n const attestationResult = TypeDeserializer.deserialize(\n token.getBody(),\n {\n GeneratedAttestationResult: Mappers.GeneratedAttestationResult,\n JsonWebKey: Mappers.JsonWebKey,\n },\n \"GeneratedAttestationResult\",\n ) as GeneratedAttestationResult;\n\n return createAttestationResponse<AttestationResult>(\n token,\n _attestationResultFromGenerated(attestationResult),\n );\n },\n );\n }\n\n /** Attests a quote generated from SGX Enclave using the Intel SDK.\n *\n * @param quote - An SGX quote generated by an SGX enclave.\n * @param options - Operation options for the attestOpenEnclave API call.\n * @returns Returns an AttestationResponse whose body is an AttestationResult describing\n * the claims returned by the attestation service.\n * @throws {@link Error} if the `initTimeData` option and `initTimeJson` option is provided.\n * @throws {@link Error} if the `runTimeData` option and `runTimeJson` option is provided.\n */\n public async attestSgxEnclave(\n quote: Uint8Array | Buffer | Blob,\n options: AttestSgxEnclaveOptions = {},\n ): Promise<AttestationResponse<AttestationResult>> {\n return tracingClient.withSpan(\n \"AttestationClient-attestSgxEnclave\",\n options,\n async (updatedOptions) => {\n if (options.initTimeData !== undefined && options.initTimeJson !== undefined) {\n throw new Error(\"Cannot provide both initTimeData and initTimeJson.\");\n }\n\n if (options.runTimeData !== undefined && options.runTimeJson !== undefined) {\n throw new Error(\"Cannot provide both runTimeData and runTimeJson.\");\n }\n\n const initData = await Uint8ArrayFromInput(options.initTimeData ?? options.initTimeJson);\n\n const initTimeData: InitTimeData | undefined = initData\n ? {\n data: initData,\n dataType:\n options.initTimeJson !== undefined ? KnownDataType.Json : KnownDataType.Binary,\n }\n : undefined;\n\n const runData = await Uint8ArrayFromInput(options.runTimeData ?? options.runTimeJson);\n const runTimeData: RuntimeData | undefined = runData\n ? {\n data: runData,\n dataType:\n options.runTimeJson !== undefined ? KnownDataType.Json : KnownDataType.Binary,\n }\n : undefined;\n\n const attestationResponse = await this._client.attestation.attestSgxEnclave(\n {\n quote: await Uint8ArrayFromInput(quote),\n initTimeData: initTimeData,\n runtimeData: runTimeData,\n draftPolicyForAttestation: options.draftPolicyForAttestation ?? undefined,\n },\n updatedOptions,\n );\n\n const token = new AttestationTokenImpl(attestationResponse.token);\n const problems = token.getTokenProblems(\n await this._signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n const attestationResult = TypeDeserializer.deserialize(\n token.getBody(),\n {\n GeneratedAttestationResult: Mappers.GeneratedAttestationResult,\n JsonWebKey: Mappers.JsonWebKey,\n },\n \"GeneratedAttestationResult\",\n ) as GeneratedAttestationResult;\n\n return createAttestationResponse<AttestationResult>(\n token,\n _attestationResultFromGenerated(attestationResult),\n );\n },\n );\n }\n\n /** Attest a TPM based enclave.\n\n * See the {@link https://docs.microsoft.com/en-us/azure/attestation/virtualization-based-security-protocol | TPM Attestation Protocol Reference} for more information.\n * \n * @param request - Incoming request to send to the TPM attestation service, Utf8 encoded.\n * @param options - Pipeline options for TPM attestation request.\n * @returns A structure containing the response from the TPM attestation, Utf8 encoded.\n * \n * @remarks\n * \n * The incoming requests to the TPM attestation API are stringified JSON objects.\n * \n * @example\n * For example, the initial call for a TPM attestation operation is:\n * \n * ```js\n * const encodedPayload = JSON.stringify({ payload: { type: \"aikcert\" } });\n * const result = await client.attestTpm(encodedPayload);\n * ```\n * \n * where stringToBytes converts the string to UTF8.\n * \n * Note that the attestTpm requires an attestation client which is configured with\n * authentication credentials.\n * \n */\n public async attestTpm(request: string, options: AttestTpmOptions = {}): Promise<string> {\n return tracingClient.withSpan(\n \"AttestationClient-attestSgxEnclave\",\n options,\n async (updatedOptions) => {\n const response = await this._client.attestation.attestTpm(\n { data: stringToBytes(request) },\n updatedOptions,\n );\n if (response.data) {\n return bytesToString(response.data);\n } else {\n throw Error(\"Internal error - response data cannot be undefined.\");\n }\n },\n );\n }\n\n /**\n * Returns the list of attestation signers which can be used to sign attestation\n * service tokens.\n *\n * @param options - Client operation options.\n * @returns the set of AttestationSigners which may be used to sign attestation tokens.\n */\n public async getAttestationSigners(\n options: AttestationClientOperationOptions = {},\n ): Promise<AttestationSigner[]> {\n return tracingClient.withSpan(\n \"AttestationClient-getAttestationSigners\",\n options,\n async (updatedOptions) => {\n const signingCertificates = await this._client.signingCertificates.get(updatedOptions);\n const signers: AttestationSigner[] = new Array();\n signingCertificates.keys?.forEach((element) => {\n signers.push(_attestationSignerFromGenerated(element));\n });\n return signers;\n },\n );\n }\n\n /**\n * Returns the OpenID Metadata discovery document for the attestation service instance.\n * @param options - Client operation options.\n * @returns The OpenID metadata discovery document for the attestation service.\n */\n public async getOpenIdMetadata(\n options: AttestationClientOperationOptions = {},\n ): Promise<Record<string, unknown>> {\n return tracingClient.withSpan(\n \"AttestationClient-getOpenIdMetadata\",\n options,\n async (updatedOptions) => {\n const configs = await this._client.metadataConfiguration.get(updatedOptions);\n return configs;\n },\n );\n }\n\n private _client: GeneratedClient;\n private _validationOptions?: AttestationTokenValidationOptions;\n private _signers?: AttestationSigner[];\n\n private async _signingKeys(): Promise<AttestationSigner[]> {\n if (this._signers !== undefined) {\n return this._signers;\n }\n const jwks = await this._client.signingCertificates.get();\n const signers: AttestationSigner[] = new Array();\n jwks.keys?.forEach((element) => {\n signers.push(_attestationSignerFromGenerated(element));\n });\n this._signers = signers;\n return this._signers;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport { PolicyModification } from \"./index\";\nimport * as Mappers from \"../generated/models/mappers\";\n\nimport { PolicyResult as GeneratedPolicyResult } from \"../generated/models\";\n\nimport { TypeDeserializer } from \"../utils/typeDeserializer\";\nimport { AttestationSigner, _attestationSignerFromGenerated } from \"./attestationSigner\";\n\n/**\n * The result of a policy certificate modification\n */\nexport interface PolicyResult {\n /**\n * The result of the operation\n */\n policyResolution: PolicyModification;\n /**\n * The SHA256 hash of the policy object modified\n */\n policyTokenHash: Uint8Array;\n /**\n * The certificate used to sign the policy object, if specified\n */\n policySigner?: AttestationSigner;\n /**\n * A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy\n */\n policy?: string;\n}\n\n/**\n * Create a new instance of a {@link PolicyResult} from a raw JSON object.\n * @param rawJson - JSON Policy Result object returned from the Attestation service.\n * @returns a newly created {@link PolicyResult} object whose contents reflect the JSON received from\n * the attestation service.\n */\nexport function _policyResultFromGenerated(rawJson: unknown): PolicyResult {\n const policyResult: GeneratedPolicyResult = TypeDeserializer.deserialize(\n rawJson,\n { PolicyResult: Mappers.PolicyResult, JsonWebKey: Mappers.JsonWebKey },\n \"PolicyResult\",\n ) as GeneratedPolicyResult;\n return {\n policyResolution: policyResult.policyResolution,\n policyTokenHash: policyResult.policyTokenHash,\n policy: policyResult.policy,\n policySigner: policyResult.policySigner\n ? _attestationSignerFromGenerated(policyResult.policySigner)\n : undefined,\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient } from \"./generated/generatedClient\";\nimport { logger } from \"./logger\";\n\nimport {\n AttestationCertificateManagementBody,\n GeneratedClientOptionalParams,\n JsonWebKey,\n PolicyCertificatesResult,\n} from \"./generated/models\";\n\nimport { bytesToString } from \"./utils/utf8\";\n\nimport {\n AttestationResponse,\n AttestationSigner,\n AttestationTokenValidationOptions,\n AttestationType,\n PolicyCertificatesModificationResult,\n PolicyResult,\n} from \"./models\";\nimport { StoredAttestationPolicy } from \"./models/storedAttestationPolicy\";\n\nimport { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { TypeDeserializer } from \"./utils/typeDeserializer\";\nimport * as Mappers from \"./generated/models/mappers\";\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"../jsrsasign.d.ts\"/>\nimport * as jsrsasign from \"jsrsasign\";\nimport { hexToBase64 } from \"./utils/helpers\";\nimport { _policyResultFromGenerated } from \"./models/policyResult\";\nimport { _attestationSignerFromGenerated } from \"./models/attestationSigner\";\nimport { verifyAttestationSigningKey } from \"./utils/helpers\";\nimport { createAttestationResponse } from \"./models/attestationResponse\";\nimport { AttestationTokenImpl } from \"./models/attestationToken\";\nimport { tracingClient } from \"./generated/tracing\";\n\n/**\n * Attestation Client Construction Options.\n */\nexport interface AttestationAdministrationClientOptions extends CommonClientOptions {\n /**\n * Options to be used globally to validate attestation tokens received from\n * the attestation service.\n */\n validationOptions?: AttestationTokenValidationOptions;\n}\n\n/**\n * Operation options for the Attestation Administration Client operations.\n */\nexport interface AttestationAdministrationClientOperationOptions extends OperationOptions {\n /**\n * Options to be used globally to validate attestation tokens received from\n * the attestation service.\n */\n validationOptions?: AttestationTokenValidationOptions;\n}\n\n/**\n * Operation options for the administration Policy operations.\n */\nexport interface AttestationAdministrationClientPolicyOperationOptions\n extends AttestationAdministrationClientOperationOptions {\n /**\n * Optional Private key used to sign the token sent to the attestation service.\n *\n * Required for Isolated Mode attestation instances.\n */\n privateKey?: string;\n\n /**\n * Optional certificate which can validate the token sent to the attestation service.\n *\n * Required for Isolated Mode attestation instances.\n *\n * If the service instance is in Isolated mode, the certificate *must* be one\n * of the configured policy management certificates.\n */\n certificate?: string;\n}\n\n/**\n * Operation options for the Policy Certificates operations.\n */\nexport interface AttestationAdministrationClientPolicyCertificateOperationOptions\n extends AttestationAdministrationClientOperationOptions {}\n\n/**\n * Attestation Client class.\n *\n * The AttestationClient class enables access to the Attestation related APIs:\n *\n * - getPolicy\n * - setPolicy\n * - resetPolicy\n * - getPolicyManagementCertificates\n * - addPolicyManagementCertificate\n * - removePolicyManagementCertificate\n */\nexport class AttestationAdministrationClient {\n /**\n * Creates an instance of AttestationAdministrationClient.\n *\n * Example usage:\n * ```ts\n * import { AttestationAdministrationClient } from \"@azure/attestation\";\n *\n * const client = new AttestationAdministrationClient(\n * \"<service endpoint>\",\n * new TokenCredential(\"<>\")\n * );\n * ```\n *\n * @param endpoint - The attestation instance endpoint, for example https://mytenant.attest.azure.net.\n * @param credential - Used to authenticate requests to the service.\n * @param options - Used to configure the Form Recognizer client.\n */\n\n constructor(\n endpoint: string,\n credentials: TokenCredential,\n options: AttestationAdministrationClientOptions = {},\n ) {\n this._validationOptions = options.validationOptions;\n\n const internalPipelineOptions: GeneratedClientOptionalParams = {\n ...options,\n ...{\n credential: credentials,\n credentialScopes: [\"https://attest.azure.net/.default\"],\n loggingOptions: {\n logger: logger.info,\n allowedHeaderNames: [\"x-ms-request-id\", \"x-ms-maa-service-version\"],\n },\n },\n };\n\n this._client = new GeneratedClient(endpoint, internalPipelineOptions);\n }\n\n /**\n * Retrieves the attestation policy document from the server, and returns it\n * to the caller.\n *\n * @param attestationType - AttestationType for which to retrieve policy.\n * @param options - Pipeline and client options for the `getPolicy` call.\n * @returns `AttestationResponse<string>` - the `value` property is the\n * attestation policy, the `token` property will be the actual token\n * returned by the attestation service.\n */\n public async getPolicy(\n attestationType: AttestationType,\n options: AttestationAdministrationClientPolicyOperationOptions = {},\n ): Promise<AttestationResponse<string>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-getPolicy\",\n options,\n async (updatedOptions) => {\n const getPolicyResult = await this._client.policy.get(attestationType, updatedOptions);\n\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(getPolicyResult.token);\n\n // Validate the token returned from the service.\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyResult object to retrieve the underlying policy\n // token\n const policyResult = _policyResultFromGenerated(token.getBody());\n\n // The policyResult.policy value will be a JSON Web Signature representing\n // the actual policy object being retrieved. Serialize the token to an\n // AttestationToken object so we can access the body properties on the token.\n if (!policyResult.policy) {\n throw Error(\"Server returned an invalid getPolicy response!\");\n }\n\n const policyToken = new AttestationTokenImpl(policyResult.policy);\n\n const storedPolicy = StoredAttestationPolicy.deserialize(policyToken.getBody());\n\n // Finally, retrieve the stored attestationPolicy value and return that\n // as the AttestationResponse to the caller.\n return createAttestationResponse<string>(\n token,\n bytesToString(storedPolicy.attestationPolicy),\n );\n },\n );\n }\n\n /**\n * Sets the attestation policy for the specified {@link attestationType}.\n *\n * @param attestationType - Attestation Type for which to set policy.\n * @param newPolicyDocument - Policy document to be set.\n * @param options - call options.\n * @returns An {@link AttestationResponse} wrapping a {@link PolicyResult}.\n * Clients can use the PolicyResult to validate that the policy was actually\n * set by the attestation service.\n *\n * @remarks\n *\n * Please note that if the attestation service instance is running in \"Isolated\"\n * mode, the {@link signingKey} must be one of the signing keys configured for the\n * service instance.\n *\n * @throws {@link Error} when a private key is specified without a certificate and vice versa.\n * @throws {@link Error} when the key in the certificate provided does not match the private key.\n */\n public async setPolicy(\n attestationType: AttestationType,\n newPolicyDocument: string,\n options: AttestationAdministrationClientPolicyOperationOptions = {},\n ): Promise<AttestationResponse<PolicyResult>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-setPolicy\",\n options,\n async (updatedOptions) => {\n if (\n (!options.privateKey && options.certificate) ||\n (options.privateKey && !options.certificate)\n ) {\n throw new Error(\n \"If privateKey is specified, certificate must also be provided. If certificate is provided, privateKey must also be provided.\",\n );\n }\n\n if (options.privateKey && options.certificate) {\n verifyAttestationSigningKey(options.privateKey, options.certificate);\n }\n\n const storedAttestationPolicy = new StoredAttestationPolicy(newPolicyDocument).serialize();\n const setPolicyToken = AttestationTokenImpl.create({\n body: storedAttestationPolicy,\n ...options,\n });\n\n const setPolicyResult = await this._client.policy.set(\n attestationType,\n setPolicyToken.serialize(),\n updatedOptions,\n );\n\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(setPolicyResult.token);\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyResult object to retrieve the underlying policy\n // token\n const policyResult = _policyResultFromGenerated(token.getBody());\n\n // The policyResult.policy value will be a JSON Web Signature representing\n // the actual policy object being retrieved. Serialize the token to an\n // AttestationToken object so we can access the body properties on the token.\n return createAttestationResponse<PolicyResult>(token, policyResult);\n },\n );\n }\n\n /**\n * Resets the attestation policy for the specified {@link attestationType} to\n * the default value.\n *\n * @param attestationType - Attestation Type for which to set policy.\n * @param options - call options.\n * @returns An {@link AttestationResponse} wrapping a {@link PolicyResult}.\n * Clients can use the PolicyResult to validate that the policy was actually\n * reset by the attestation service.\n *\n * @remarks\n *\n * Please note that if the attestation service instance is running in \"Isolated\"\n * mode, the {@link signingKey} must be one of the signing keys configured for the\n * service instance.\n *\n * @throws {@link Error} when a private key is specified without a certificate and vice versa.\n * @throws {@link Error} when the key in the certificate provided does not match the private key.\n */\n\n public async resetPolicy(\n attestationType: AttestationType,\n options: AttestationAdministrationClientPolicyOperationOptions = {},\n ): Promise<AttestationResponse<PolicyResult>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-setPolicy\",\n options,\n async (updatedOptions) => {\n if (\n (!options.privateKey && options.certificate) ||\n (options.privateKey && !options.certificate)\n ) {\n throw new Error(\n \"If privateKey is specified, certificate must also be provided. If certificate is provided, privateKey must also be provided.\",\n );\n }\n\n if (options.privateKey && options.certificate) {\n verifyAttestationSigningKey(options.privateKey, options.certificate);\n }\n\n const resetPolicyToken = AttestationTokenImpl.create({\n privateKey: options.privateKey,\n certificate: options.certificate,\n });\n\n const resetPolicyResult = await this._client.policy.reset(\n attestationType,\n resetPolicyToken.serialize(),\n updatedOptions,\n );\n\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(resetPolicyResult.token);\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyResult object to retrieve the underlying policy\n // token\n const policyResult = _policyResultFromGenerated(token.getBody());\n\n // The policyResult.policy value will be a JSON Web Signature representing\n // the actual policy object being retrieved. Serialize the token to an\n // AttestationToken object so we can access the body properties on the token.\n return createAttestationResponse<PolicyResult>(token, policyResult);\n },\n );\n }\n\n /** Returns the set of policy management certificates for this attestation instance.\n *\n * @remarks If the attestation instance is not in `Isolated` mode, this list will\n * always be empty.\n *\n * @param options - Options for the call to the attestation service.\n * @returns AttestationResponse wrapping a list of Attestation Signers.\n */\n public async getPolicyManagementCertificates(\n options: AttestationAdministrationClientPolicyCertificateOperationOptions = {},\n ): Promise<AttestationResponse<AttestationSigner[]>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-getPolicyManagementCertificates\",\n options,\n async (updatedOptions) => {\n const getCertificatesResult = await this._client.policyCertificates.get(updatedOptions);\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(getCertificatesResult.token);\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyResult object to retrieve the underlying policy\n // token\n const jwks = TypeDeserializer.deserialize(\n token.getBody(),\n {\n PolicyCertificatesResult: Mappers.PolicyCertificatesResult,\n JsonWebKeySet: Mappers.JsonWebKeySet,\n JsonWebKey: Mappers.JsonWebKey,\n },\n \"PolicyCertificatesResult\",\n ) as PolicyCertificatesResult;\n\n const policyCertificates = new Array<AttestationSigner>();\n jwks.policyCertificates.keys.forEach((jwk) => {\n policyCertificates.push(_attestationSignerFromGenerated(jwk));\n });\n\n return createAttestationResponse<AttestationSigner[]>(token, policyCertificates);\n },\n );\n }\n\n /** Add a new certificate chain to the set of policy management certificates.\n *\n * @param pemCertificate - PEM encoded certificate to add to the set of policy management certificates.\n * @param privateKey - Existing attestation private key used to sign the incoming request.\n * @param certificate - Existing attestation certificate used to verify the incoming request.\n * @param options - Options used in the call to the service.\n * @returns An attestation response including a PolicyCertificatesModificationResult\n *\n * @remarks This API is only supported on `isolated` attestation instances.\n *\n * The signing key MUST be one of the existing attestation signing certificates. The\n * new pemCertificate is signed using the signingKey and the service will validate the\n * signature before allowing the addition.\n *\n * @throws {@link Error} when a private key is specified without a certificate and vice versa.\n * @throws {@link Error} when the key in the certificate provided does not match the private key.\n *\n */\n public async addPolicyManagementCertificate(\n pemCertificate: string,\n privateKey: string,\n certificate: string,\n options: AttestationAdministrationClientPolicyCertificateOperationOptions = {},\n ): Promise<AttestationResponse<PolicyCertificatesModificationResult>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-addPolicyManagementCertificate\",\n options,\n async (updatedOptions) => {\n if ((!privateKey && certificate) || (privateKey && !certificate)) {\n throw new Error(\n \"If privateKey is specified, certificate must also be provided. If certificate is provided, privateKey must also be provided.\",\n );\n }\n\n if (privateKey && certificate) {\n verifyAttestationSigningKey(privateKey, certificate);\n }\n\n const cert = new jsrsasign.X509();\n cert.readCertPEM(pemCertificate);\n const kty = this.keyTypeFromCertificate(cert);\n\n const jwk: JsonWebKey = {\n x5C: [hexToBase64(cert.hex)],\n kty: kty,\n };\n\n const addBody: AttestationCertificateManagementBody = {\n policyCertificate: jwk,\n };\n\n const addCertToken = AttestationTokenImpl.create({\n body: TypeDeserializer.serialize(\n addBody,\n {\n AttestationCertificateManagementBody: Mappers.AttestationCertificateManagementBody,\n JsonWebKey: Mappers.JsonWebKey,\n },\n Mappers.AttestationCertificateManagementBody,\n ),\n privateKey: privateKey,\n certificate: certificate,\n });\n\n const addCertificateResult = await this._client.policyCertificates.add(\n addCertToken.serialize(),\n updatedOptions,\n );\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(addCertificateResult.token);\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyCertificatesModificationResult object.\n const result = TypeDeserializer.deserialize(\n token.getBody(),\n {\n PolicyCertificatesModificationResult: Mappers.PolicyCertificatesModificationResult,\n JsonWebKeySet: Mappers.JsonWebKeySet,\n JsonWebKey: Mappers.JsonWebKey,\n },\n \"PolicyCertificatesModificationResult\",\n ) as PolicyCertificatesModificationResult;\n\n return createAttestationResponse<PolicyCertificatesModificationResult>(token, result);\n },\n );\n }\n\n private keyTypeFromCertificate(cert: any): string {\n let kty: string;\n switch (cert.getSignatureAlgorithmName()) {\n case \"SHA256withRSA\":\n case \"SHA384withRSA\":\n case \"SHA512withRSA\":\n kty = \"RSA\";\n break;\n case \"SHA256withECDSA\":\n case \"SHA384withECDSA\":\n kty = \"EC\";\n break;\n default:\n kty = \"RSA\";\n break;\n }\n return kty;\n }\n\n /** Add a new certificate chain to the set of policy management certificates.\n *\n * @param pemCertificate - PEM encoded certificate to add to the set of policy management certificates.\n * @param privateKey - Existing attestation private key used to sign the incoming request.\n * @param certificate - Existing attestation certificate used to verify the incoming request.\n * @param options - Options used in the call to the service.\n * @returns An attestation response including a PolicyCertificatesModificationResult\n *\n * @remarks This API is only supported on `isolated` attestation instances.\n *\n * The signing key MUST be one of the existing attestation signing certificates. The\n * new pemCertificate is signed using the signingKey and the service will validate the\n * signature before allowing the addition.\n *\n * @throws {@link Error} when a private key is specified without a certificate and vice versa.\n * @throws {@link Error} when the key in the certificate provided does not match the private key.\n */\n public async removePolicyManagementCertificate(\n pemCertificate: string,\n privateKey: string,\n certificate: string,\n options: AttestationAdministrationClientPolicyCertificateOperationOptions = {},\n ): Promise<AttestationResponse<PolicyCertificatesModificationResult>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-removePolicyManagementCertificate\",\n options,\n async (updatedOptions) => {\n if ((!privateKey && certificate) || (privateKey && !certificate)) {\n throw new Error(\n \"If privateKey is specified, certificate must also be provided. If certificate is provided, privateKey must also be provided.\",\n );\n }\n\n if (privateKey && certificate) {\n verifyAttestationSigningKey(privateKey, certificate);\n }\n\n const cert = new jsrsasign.X509();\n cert.readCertPEM(pemCertificate);\n const kty = this.keyTypeFromCertificate(cert);\n\n const jwk: JsonWebKey = {\n x5C: [hexToBase64(cert.hex)],\n kty: kty,\n };\n\n const addBody: AttestationCertificateManagementBody = {\n policyCertificate: jwk,\n };\n\n const removeCertToken = AttestationTokenImpl.create({\n body: TypeDeserializer.serialize(\n addBody,\n {\n AttestationCertificateManagementBody: Mappers.AttestationCertificateManagementBody,\n JsonWebKey: Mappers.JsonWebKey,\n },\n Mappers.AttestationCertificateManagementBody,\n ),\n privateKey: privateKey,\n certificate: certificate,\n });\n\n const removeCertificateResult = await this._client.policyCertificates.remove(\n removeCertToken.serialize(),\n updatedOptions,\n );\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(removeCertificateResult.token);\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyCertificatesModificationResult object.\n const result = TypeDeserializer.deserialize(\n token.getBody(),\n {\n PolicyCertificatesModificationResult: Mappers.PolicyCertificatesModificationResult,\n JsonWebKeySet: Mappers.JsonWebKeySet,\n JsonWebKey: Mappers.JsonWebKey,\n },\n \"PolicyCertificatesModificationResult\",\n ) as PolicyCertificatesModificationResult;\n\n return createAttestationResponse<PolicyCertificatesModificationResult>(token, result);\n },\n );\n }\n\n private async signingKeys(): Promise<AttestationSigner[]> {\n if (this._signers !== undefined) {\n return this._signers;\n }\n const jwks = await this._client.signingCertificates.get();\n const signers: AttestationSigner[] = new Array();\n jwks.keys?.forEach((element) => {\n signers.push(_attestationSignerFromGenerated(element));\n });\n this._signers = signers;\n return this._signers;\n }\n\n private _client: GeneratedClient;\n private _signers?: AttestationSigner[];\n private _validationOptions?: AttestationTokenValidationOptions;\n}\n"],"names":["KnownAttestationType","KnownCertificateModification","KnownPolicyModification","createSerializer","StoredAttestationPolicy","Mappers.StoredAttestationPolicy","jsrsasign","Mappers.JsonWebKey","createTracingClient","AttestOpenEnclaveRequestMapper","AttestSgxEnclaveRequestMapper","TpmAttestationRequestMapper","getOperationSpec","serializer","coreClient","Mappers.PolicyResponse","Mappers.CloudError","Parameters.apiVersion","Parameters.instanceUrl","Parameters.attestationType","Parameters.accept","Parameters.newAttestationPolicy","Parameters.contentType","Parameters.accept1","Parameters.policyJws","Mappers.PolicyCertificatesResponse","Mappers.PolicyCertificatesModifyResponse","Parameters.policyCertificateToAdd","Parameters.contentType1","Parameters.policyCertificateToRemove","Mappers.AttestationResponse","Parameters.request","Parameters.request1","Mappers.TpmAttestationResponse","Parameters.request2","Mappers.JsonWebKeySet","Parameters.accept2","createClientLogger","isTokenCredential","Mappers.GeneratedAttestationResult","Mappers.PolicyResult","Mappers.PolicyCertificatesResult","Mappers.AttestationCertificateManagementBody","Mappers.PolicyCertificatesModificationResult"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;AA8RH;AACYA,sCAOX;AAPD,CAAA,UAAY,oBAAoB,EAAA;;AAE9B,IAAA,oBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;;AAEzB,IAAA,oBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;;AAE3B,IAAA,oBAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACb,CAAC,EAPWA,4BAAoB,KAApBA,4BAAoB,GAO/B,EAAA,CAAA,CAAA,CAAA;AAaD;AACA,IAAY,aAKX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AAA,GAAA,EAAA,CAAE,OAAO,CAAC,CAAC,OAAO,KAAI;YAC7B,OAAO,CAAC,IAAI,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC,CAAC;AACzD,SAAC,CAAC,CAAC;AACH,QAAA,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;AAKF;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/generated/models/index.ts","../src/utils/utf8.ts","../src/utils/typeDeserializer.ts","../src/generated/models/mappers.ts","../src/models/storedAttestationPolicy.ts","../src/utils/base64.ts","../src/utils/helpers.ts","../src/models/attestationSigner.ts","../src/models/attestationToken.ts","../src/models/attestationPolicyToken.ts","../src/generated/tracing.ts","../src/generated/models/parameters.ts","../src/generated/operations/policy.ts","../src/generated/operations/policyCertificates.ts","../src/generated/operations/attestation.ts","../src/generated/operations/signingCertificates.ts","../src/generated/operations/metadataConfiguration.ts","../src/generated/generatedClient.ts","../src/logger.ts","../src/models/attestationResponse.ts","../src/models/attestationResult.ts","../src/utils/buffer.ts","../src/attestationClient.ts","../src/models/policyResult.ts","../src/attestationAdministrationClient.ts"],"sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\n/** The response to an attestation policy operation */\nexport interface PolicyResponse {\n /** An RFC7519 JSON Web Token structure whose body is an PolicyResult object. */\n token: string;\n}\n\n/** An error response from Attestation. */\nexport interface CloudError {\n /** An error response from Attestation. */\n error?: CloudErrorBody;\n}\n\n/** An error response from Attestation. */\nexport interface CloudErrorBody {\n /** An identifier for the error. Codes are invariant and are intended to be consumed programmatically. */\n code?: string;\n /** A message describing the error, intended to be suitable for displaying in a user interface. */\n message?: string;\n}\n\n/** The response to an attestation policy management API */\nexport interface PolicyCertificatesResponse {\n /** An RFC7519 JSON Web Token structure containing a PolicyCertificatesResults object which contains the certificates used to validate policy changes */\n token: string;\n}\n\n/** The response to an attestation policy management API */\nexport interface PolicyCertificatesModifyResponse {\n /** An RFC7519 JSON Web Token structure whose body is a PolicyCertificatesModificationResult object. */\n token: string;\n}\n\n/** Attestation request for Intel SGX enclaves */\nexport interface AttestOpenEnclaveRequest {\n /** OpenEnclave report from the enclave to be attested */\n report?: Uint8Array;\n /** Runtime data provided by the enclave at the time of report generation. The MAA will verify that the first 32 bytes of the report_data field of the quote contains the SHA256 hash of the decoded \"data\" field of the runtime data. */\n runtimeData?: RuntimeData;\n /** Base64Url encoded \"InitTime data\". The MAA will verify that the init data was known to the enclave. Note that InitTimeData is invalid for CoffeeLake processors. */\n initTimeData?: InitTimeData;\n /** Attest against the provided draft policy. Note that the resulting token cannot be validated. */\n draftPolicyForAttestation?: string;\n}\n\n/** Defines the \"run time data\" provided by the attestation target for use by the MAA */\nexport interface RuntimeData {\n /** UTF-8 encoded Runtime Data generated by the trusted environment */\n data?: Uint8Array;\n /** The type of data contained within the \"data\" field */\n dataType?: DataType;\n}\n\n/** Defines the \"initialization time data\" used to provision the attestation target for use by the MAA */\nexport interface InitTimeData {\n /** UTF-8 encoded Initialization Data passed into the trusted environment when it is created. */\n data?: Uint8Array;\n /** The type of data contained within the \"data\" field */\n dataType?: DataType;\n}\n\n/** The result of an attestation operation */\nexport interface AttestationResponse {\n /** An RFC 7519 JSON Web Token, the body of which is an AttestationResult object. */\n token: string;\n}\n\n/** Attestation request for Intel SGX enclaves */\nexport interface AttestSgxEnclaveRequest {\n /** Quote of the enclave to be attested */\n quote?: Uint8Array;\n /** Runtime data provided by the enclave at the time of quote generation. The MAA will verify that the first 32 bytes of the report_data field of the quote contains the SHA256 hash of the decoded \"data\" field of the runtime data. */\n runtimeData?: RuntimeData;\n /** Initialization data provided when the enclave is created. MAA will verify that the init data was known to the enclave. Note that InitTimeData is invalid for CoffeeLake processors. */\n initTimeData?: InitTimeData;\n /** Attest against the provided draft policy. Note that the resulting token cannot be validated. */\n draftPolicyForAttestation?: string;\n}\n\n/** Attestation request for Trusted Platform Module (TPM) attestation. */\nexport interface TpmAttestationRequest {\n /** Protocol data containing artifacts for attestation. */\n data?: Uint8Array;\n}\n\n/** Attestation response for Trusted Platform Module (TPM) attestation. */\nexport interface TpmAttestationResponse {\n /** Protocol data containing attestation service response. */\n data?: Uint8Array;\n}\n\nexport interface JsonWebKeySet {\n /**\n * The value of the \"keys\" parameter is an array of JWK values. By\n * default, the order of the JWK values within the array does not imply\n * an order of preference among them, although applications of JWK Sets\n * can choose to assign a meaning to the order for their purposes, if\n * desired.\n */\n keys: JsonWebKey[];\n}\n\nexport interface JsonWebKey {\n /**\n * The \"alg\" (algorithm) parameter identifies the algorithm intended for\n * use with the key. The values used should either be registered in the\n * IANA \"JSON Web Signature and Encryption Algorithms\" registry\n * established by [JWA] or be a value that contains a Collision-\n * Resistant Name.\n */\n alg?: string;\n /** The \"crv\" (curve) parameter identifies the curve type */\n crv?: string;\n /** RSA private exponent or ECC private key */\n d?: string;\n /** RSA Private Key Parameter */\n dp?: string;\n /** RSA Private Key Parameter */\n dq?: string;\n /** RSA public exponent, in Base64 */\n e?: string;\n /** Symmetric key */\n k?: string;\n /**\n * The \"kid\" (key ID) parameter is used to match a specific key. This\n * is used, for instance, to choose among a set of keys within a JWK Set\n * during key rollover. The structure of the \"kid\" value is\n * unspecified. When \"kid\" values are used within a JWK Set, different\n * keys within the JWK Set SHOULD use distinct \"kid\" values. (One\n * example in which different keys might use the same \"kid\" value is if\n * they have different \"kty\" (key type) values but are considered to be\n * equivalent alternatives by the application using them.) The \"kid\"\n * value is a case-sensitive string.\n */\n kid?: string;\n /**\n * The \"kty\" (key type) parameter identifies the cryptographic algorithm\n * family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should\n * either be registered in the IANA \"JSON Web Key Types\" registry\n * established by [JWA] or be a value that contains a Collision-\n * Resistant Name. The \"kty\" value is a case-sensitive string.\n */\n kty: string;\n /** RSA modulus, in Base64 */\n n?: string;\n /** RSA secret prime */\n p?: string;\n /** RSA secret prime, with p < q */\n q?: string;\n /** RSA Private Key Parameter */\n qi?: string;\n /**\n * Use (\"public key use\") identifies the intended use of\n * the public key. The \"use\" parameter is employed to indicate whether\n * a public key is used for encrypting data or verifying the signature\n * on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).\n */\n use?: string;\n /** X coordinate for the Elliptic Curve point */\n x?: string;\n /**\n * The \"x5c\" (X.509 certificate chain) parameter contains a chain of one\n * or more PKIX certificates [RFC5280]. The certificate chain is\n * represented as a JSON array of certificate value strings. Each\n * string in the array is a base64-encoded (Section 4 of [RFC4648] --\n * not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value.\n * The PKIX certificate containing the key value MUST be the first\n * certificate.\n */\n x5C?: string[];\n /** Y coordinate for the Elliptic Curve point */\n y?: string;\n}\n\n/** The body of the JWT used for the PolicyCertificates APIs */\nexport interface AttestationCertificateManagementBody {\n /** RFC 7517 Json Web Key describing the certificate. */\n policyCertificate?: JsonWebKey;\n}\n\n/** The result of a call to retrieve policy certificates. */\nexport interface PolicyCertificatesResult {\n /** SHA256 Hash of the binary representation certificate which was added or removed */\n policyCertificates: JsonWebKeySet;\n}\n\n/** The result of a policy certificate modification */\nexport interface PolicyCertificatesModificationResult {\n /** Hex encoded SHA1 Hash of the binary representation certificate which was added or removed */\n certificateThumbprint: string;\n /** The result of the operation */\n certificateResolution: CertificateModification;\n}\n\nexport interface StoredAttestationPolicy {\n /** Policy text to set as a sequence of UTF-8 encoded octets. */\n attestationPolicy?: Uint8Array;\n}\n\n/** The result of a policy certificate modification */\nexport interface PolicyResult {\n /** The result of the operation */\n policyResolution: PolicyModification;\n /** The SHA256 hash of the policy object modified */\n policyTokenHash: Uint8Array;\n /** The certificate used to sign the policy object, if specified */\n policySigner?: JsonWebKey;\n /** A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy */\n policy?: string;\n}\n\n/** A Microsoft Azure Attestation response token body - the body of a response token issued by MAA */\nexport interface GeneratedAttestationResult {\n /** Unique Identifier for the token */\n jti: string;\n /** The Principal who issued the token */\n iss: string;\n /** The time at which the token was issued, in the number of seconds since 1970-01-0T00:00:00Z UTC */\n iat?: number;\n /** The expiration time after which the token is no longer valid, in the number of seconds since 1970-01-0T00:00:00Z UTC */\n exp?: number;\n /** The not before time before which the token cannot be considered valid, in the number of seconds since 1970-01-0T00:00:00Z UTC */\n nbf?: number;\n /** An RFC 7800 Proof of Possession Key */\n cnf?: Record<string, unknown>;\n /** The Nonce input to the attestation request, if provided. */\n nonce?: string;\n /** The Schema version of this structure. Current Value: 1.0 */\n version: string;\n /** Runtime Claims */\n runtimeClaims?: Record<string, unknown>;\n /** Inittime Claims */\n inittimeClaims?: Record<string, unknown>;\n /** Policy Generated Claims */\n policyClaims?: Record<string, unknown>;\n /** The Attestation type being attested. */\n verifierType: string;\n /** The certificate used to sign the policy object, if specified. */\n policySigner?: JsonWebKey;\n /** The SHA256 hash of the BASE64URL encoded policy text used for attestation */\n policyHash: Uint8Array;\n /** True if the enclave is debuggable, false otherwise */\n isDebuggable: boolean;\n /** The SGX Product ID for the enclave. */\n productId: number;\n /** The HEX encoded SGX MRENCLAVE value for the enclave. */\n mrEnclave: string;\n /** The HEX encoded SGX MRSIGNER value for the enclave. */\n mrSigner: string;\n /** The SGX SVN value for the enclave. */\n svn: number;\n /** A copy of the RuntimeData specified as an input to the attest call. */\n enclaveHeldData?: Uint8Array;\n /** The SGX SVN value for the enclave. */\n sgxCollateral?: Record<string, unknown>;\n /** DEPRECATED: Private Preview version of x-ms-ver claim. */\n deprecatedVersion?: string;\n /** DEPRECATED: Private Preview version of x-ms-sgx-is-debuggable claim. */\n deprecatedIsDebuggable?: boolean;\n /** DEPRECATED: Private Preview version of x-ms-sgx-collateral claim. */\n deprecatedSgxCollateral?: Record<string, unknown>;\n /** DEPRECATED: Private Preview version of x-ms-sgx-ehd claim. */\n deprecatedEnclaveHeldData?: Uint8Array;\n /** DEPRECATED: Private Preview version of x-ms-sgx-ehd claim. */\n deprecatedEnclaveHeldData2?: Uint8Array;\n /** DEPRECATED: Private Preview version of x-ms-sgx-product-id */\n deprecatedProductId?: number;\n /** DEPRECATED: Private Preview version of x-ms-sgx-mrenclave. */\n deprecatedMrEnclave?: string;\n /** DEPRECATED: Private Preview version of x-ms-sgx-mrsigner. */\n deprecatedMrSigner?: string;\n /** DEPRECATED: Private Preview version of x-ms-sgx-svn. */\n deprecatedSvn?: number;\n /** DEPRECATED: Private Preview version of x-ms-tee. */\n deprecatedTee?: string;\n /** DEPRECATED: Private Preview version of x-ms-policy-signer */\n deprecatedPolicySigner?: JsonWebKey;\n /** DEPRECATED: Private Preview version of x-ms-policy-hash */\n deprecatedPolicyHash?: Uint8Array;\n /** DEPRECATED: Private Preview version of nonce */\n deprecatedRpData?: string;\n}\n\n/** Known values of {@link AttestationType} that the service accepts. */\nexport enum KnownAttestationType {\n /** Intel Software Guard eXtensions */\n SgxEnclave = \"SgxEnclave\",\n /** OpenEnclave extensions to SGX */\n OpenEnclave = \"OpenEnclave\",\n /** Edge TPM Virtualization Based Security */\n Tpm = \"Tpm\"\n}\n\n/**\n * Defines values for AttestationType. \\\n * {@link KnownAttestationType} can be used interchangeably with AttestationType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **SgxEnclave**: Intel Software Guard eXtensions \\\n * **OpenEnclave**: OpenEnclave extensions to SGX \\\n * **Tpm**: Edge TPM Virtualization Based Security\n */\nexport type AttestationType = string;\n\n/** Known values of {@link DataType} that the service accepts. */\nexport enum KnownDataType {\n /** The contents of the field should be treated as binary and not interpreted by MAA. */\n Binary = \"Binary\",\n /** The contents of the field should be treated as a JSON object and may be further interpreted by MAA. */\n Json = \"JSON\"\n}\n\n/**\n * Defines values for DataType. \\\n * {@link KnownDataType} can be used interchangeably with DataType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Binary**: The contents of the field should be treated as binary and not interpreted by MAA. \\\n * **JSON**: The contents of the field should be treated as a JSON object and may be further interpreted by MAA.\n */\nexport type DataType = string;\n\n/** Known values of {@link CertificateModification} that the service accepts. */\nexport enum KnownCertificateModification {\n /** After the operation was performed, the certificate is in the set of certificates. */\n IsPresent = \"IsPresent\",\n /** After the operation was performed, the certificate is no longer present in the set of certificates. */\n IsAbsent = \"IsAbsent\"\n}\n\n/**\n * Defines values for CertificateModification. \\\n * {@link KnownCertificateModification} can be used interchangeably with CertificateModification,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **IsPresent**: After the operation was performed, the certificate is in the set of certificates. \\\n * **IsAbsent**: After the operation was performed, the certificate is no longer present in the set of certificates.\n */\nexport type CertificateModification = string;\n\n/** Known values of {@link PolicyModification} that the service accepts. */\nexport enum KnownPolicyModification {\n /** The specified policy object was updated. */\n Updated = \"Updated\",\n /** The specified policy object was removed. */\n Removed = \"Removed\"\n}\n\n/**\n * Defines values for PolicyModification. \\\n * {@link KnownPolicyModification} can be used interchangeably with PolicyModification,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Updated**: The specified policy object was updated. \\\n * **Removed**: The specified policy object was removed.\n */\nexport type PolicyModification = string;\n\n/** Optional parameters. */\nexport interface PolicyGetOptionalParams extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type PolicyGetResponse = PolicyResponse;\n\n/** Optional parameters. */\nexport interface PolicySetModelOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the set operation. */\nexport type PolicySetModelResponse = PolicyResponse;\n\n/** Optional parameters. */\nexport interface PolicyResetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the reset operation. */\nexport type PolicyResetResponse = PolicyResponse;\n\n/** Optional parameters. */\nexport interface PolicyCertificatesGetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type PolicyCertificatesGetResponse = PolicyCertificatesResponse;\n\n/** Optional parameters. */\nexport interface PolicyCertificatesAddOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the add operation. */\nexport type PolicyCertificatesAddResponse = PolicyCertificatesModifyResponse;\n\n/** Optional parameters. */\nexport interface PolicyCertificatesRemoveOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the remove operation. */\nexport type PolicyCertificatesRemoveResponse = PolicyCertificatesModifyResponse;\n\n/** Optional parameters. */\nexport interface AttestationAttestOpenEnclaveOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the attestOpenEnclave operation. */\nexport type AttestationAttestOpenEnclaveResponse = AttestationResponse;\n\n/** Optional parameters. */\nexport interface AttestationAttestSgxEnclaveOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the attestSgxEnclave operation. */\nexport type AttestationAttestSgxEnclaveResponse = AttestationResponse;\n\n/** Optional parameters. */\nexport interface AttestationAttestTpmOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the attestTpm operation. */\nexport type AttestationAttestTpmResponse = TpmAttestationResponse;\n\n/** Optional parameters. */\nexport interface SigningCertificatesGetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type SigningCertificatesGetResponse = JsonWebKeySet;\n\n/** Optional parameters. */\nexport interface MetadataConfigurationGetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type MetadataConfigurationGetResponse = Record<string, unknown>;\n\n/** Optional parameters. */\nexport interface GeneratedClientOptionalParams\n extends coreClient.ServiceClientOptions {\n /** Api Version */\n apiVersion?: string;\n /** Overrides client endpoint. */\n endpoint?: string;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nconst decoder = typeof Buffer === \"undefined\" ? new TextDecoder(\"ascii\") : undefined;\n\nconst encoder = typeof Buffer === \"undefined\" ? new TextEncoder() : undefined;\n\nconst decode: (buffer: ArrayBuffer) => string = decoder\n ? (buffer) => decoder.decode(buffer)\n : (buffer) => (buffer as Buffer).toString(\"ascii\");\n\nconst encode: (str: string) => Uint8Array = encoder\n ? (str) => encoder.encode(str)\n : (str) => Buffer.from(str, \"utf8\");\n\n/**\n * Converts a string into a utf8 encoded byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function stringToBytes(content: string): Uint8Array {\n return encode(content);\n}\n\n/**\n * Converts a utf8 string into a byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function bytesToString(content: Uint8Array): string {\n return decode(content);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Mapper, createSerializer } from \"@azure/core-client\";\n\n/**\n * The TypeDeserializer class enables easy access to the Attestation Model serialization\n * and deserialization APIs.\n */\nexport class TypeDeserializer {\n /**\n * Deserializes a JSON object into a model type.\n * @param rawJson - The JSON encoded object to convert into model type.\n * @param bodyMapper - A mapping between type names and {@link Mapper} objects\n * which defines the model properties for the type. the {@link bodyTypeName}\n * must be one of the properties in the {@link bodyMapper} parameter.\n * @param bodyTypeName - The name of the type of the body.\n * @returns The deserialized type. It is the responsibility of the caller to cast to the\n * expected return type.\n *\n * @internal\n */\n public static deserialize(\n rawJson: unknown,\n typeMappers: { [key: string]: any },\n bodyTypeName: string,\n ): unknown {\n const serializer = createSerializer(typeMappers);\n return serializer.deserialize(typeMappers[bodyTypeName], rawJson, bodyTypeName);\n }\n\n /**\n * Serializes a JSON object into a model type.\n * @param objectToSerialize - The JSON encoded object to convert into model type.\n * @param bodyMapper - A {@link Mapper} object which defines the model properties for the type.\n * @returns The serialized type as a JSON encoded string.\n *\n * @internal\n */\n public static serialize(\n objectToSerialize: unknown,\n typeMappers: { [key: string]: Mapper },\n bodyMapper: Mapper,\n ): string {\n const serializer = createSerializer(typeMappers);\n return JSON.stringify(serializer.serialize(bodyMapper, objectToSerialize));\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\nexport const PolicyResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyResponse\",\n modelProperties: {\n token: {\n constraints: {\n Pattern: new RegExp(\n \"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\"\n )\n },\n serializedName: \"token\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const CloudError: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CloudError\",\n modelProperties: {\n error: {\n serializedName: \"error\",\n type: {\n name: \"Composite\",\n className: \"CloudErrorBody\"\n }\n }\n }\n }\n};\n\nexport const CloudErrorBody: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CloudErrorBody\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PolicyCertificatesResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyCertificatesResponse\",\n modelProperties: {\n token: {\n constraints: {\n Pattern: new RegExp(\n \"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\"\n )\n },\n serializedName: \"token\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const PolicyCertificatesModifyResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyCertificatesModifyResponse\",\n modelProperties: {\n token: {\n constraints: {\n Pattern: new RegExp(\n \"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\"\n )\n },\n serializedName: \"token\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AttestOpenEnclaveRequest: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AttestOpenEnclaveRequest\",\n modelProperties: {\n report: {\n serializedName: \"report\",\n type: {\n name: \"Base64Url\"\n }\n },\n runtimeData: {\n serializedName: \"runtimeData\",\n type: {\n name: \"Composite\",\n className: \"RuntimeData\"\n }\n },\n initTimeData: {\n serializedName: \"initTimeData\",\n type: {\n name: \"Composite\",\n className: \"InitTimeData\"\n }\n },\n draftPolicyForAttestation: {\n serializedName: \"draftPolicyForAttestation\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const RuntimeData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"RuntimeData\",\n modelProperties: {\n data: {\n serializedName: \"data\",\n type: {\n name: \"Base64Url\"\n }\n },\n dataType: {\n serializedName: \"dataType\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const InitTimeData: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"InitTimeData\",\n modelProperties: {\n data: {\n serializedName: \"data\",\n type: {\n name: \"Base64Url\"\n }\n },\n dataType: {\n serializedName: \"dataType\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AttestationResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AttestationResponse\",\n modelProperties: {\n token: {\n constraints: {\n Pattern: new RegExp(\n \"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\"\n )\n },\n serializedName: \"token\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AttestSgxEnclaveRequest: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AttestSgxEnclaveRequest\",\n modelProperties: {\n quote: {\n serializedName: \"quote\",\n type: {\n name: \"Base64Url\"\n }\n },\n runtimeData: {\n serializedName: \"runtimeData\",\n type: {\n name: \"Composite\",\n className: \"RuntimeData\"\n }\n },\n initTimeData: {\n serializedName: \"initTimeData\",\n type: {\n name: \"Composite\",\n className: \"InitTimeData\"\n }\n },\n draftPolicyForAttestation: {\n serializedName: \"draftPolicyForAttestation\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const TpmAttestationRequest: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TpmAttestationRequest\",\n modelProperties: {\n data: {\n serializedName: \"data\",\n type: {\n name: \"Base64Url\"\n }\n }\n }\n }\n};\n\nexport const TpmAttestationResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"TpmAttestationResponse\",\n modelProperties: {\n data: {\n serializedName: \"data\",\n type: {\n name: \"Base64Url\"\n }\n }\n }\n }\n};\n\nexport const JsonWebKeySet: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"JsonWebKeySet\",\n modelProperties: {\n keys: {\n serializedName: \"keys\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\"\n }\n }\n }\n }\n }\n }\n};\n\nexport const JsonWebKey: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\",\n modelProperties: {\n alg: {\n serializedName: \"alg\",\n type: {\n name: \"String\"\n }\n },\n crv: {\n serializedName: \"crv\",\n type: {\n name: \"String\"\n }\n },\n d: {\n serializedName: \"d\",\n type: {\n name: \"String\"\n }\n },\n dp: {\n serializedName: \"dp\",\n type: {\n name: \"String\"\n }\n },\n dq: {\n serializedName: \"dq\",\n type: {\n name: \"String\"\n }\n },\n e: {\n serializedName: \"e\",\n type: {\n name: \"String\"\n }\n },\n k: {\n serializedName: \"k\",\n type: {\n name: \"String\"\n }\n },\n kid: {\n serializedName: \"kid\",\n type: {\n name: \"String\"\n }\n },\n kty: {\n serializedName: \"kty\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n n: {\n serializedName: \"n\",\n type: {\n name: \"String\"\n }\n },\n p: {\n serializedName: \"p\",\n type: {\n name: \"String\"\n }\n },\n q: {\n serializedName: \"q\",\n type: {\n name: \"String\"\n }\n },\n qi: {\n serializedName: \"qi\",\n type: {\n name: \"String\"\n }\n },\n use: {\n serializedName: \"use\",\n type: {\n name: \"String\"\n }\n },\n x: {\n serializedName: \"x\",\n type: {\n name: \"String\"\n }\n },\n x5C: {\n serializedName: \"x5c\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n y: {\n serializedName: \"y\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const AttestationCertificateManagementBody: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AttestationCertificateManagementBody\",\n modelProperties: {\n policyCertificate: {\n serializedName: \"policyCertificate\",\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\"\n }\n }\n }\n }\n};\n\nexport const PolicyCertificatesResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyCertificatesResult\",\n modelProperties: {\n policyCertificates: {\n serializedName: \"x-ms-policy-certificates\",\n type: {\n name: \"Composite\",\n className: \"JsonWebKeySet\"\n }\n }\n }\n }\n};\n\nexport const PolicyCertificatesModificationResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyCertificatesModificationResult\",\n modelProperties: {\n certificateThumbprint: {\n serializedName: \"x-ms-certificate-thumbprint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n certificateResolution: {\n serializedName: \"x-ms-policycertificates-result\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const StoredAttestationPolicy: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"StoredAttestationPolicy\",\n modelProperties: {\n attestationPolicy: {\n serializedName: \"AttestationPolicy\",\n type: {\n name: \"Base64Url\"\n }\n }\n }\n }\n};\n\nexport const PolicyResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"PolicyResult\",\n modelProperties: {\n policyResolution: {\n serializedName: \"x-ms-policy-result\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n policyTokenHash: {\n serializedName: \"x-ms-policy-token-hash\",\n required: true,\n type: {\n name: \"Base64Url\"\n }\n },\n policySigner: {\n serializedName: \"x-ms-policy-signer\",\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\"\n }\n },\n policy: {\n constraints: {\n Pattern: new RegExp(\n \"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\"\n )\n },\n serializedName: \"x-ms-policy\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nexport const GeneratedAttestationResult: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"GeneratedAttestationResult\",\n modelProperties: {\n jti: {\n serializedName: \"jti\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n iss: {\n serializedName: \"iss\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n iat: {\n serializedName: \"iat\",\n type: {\n name: \"Number\"\n }\n },\n exp: {\n serializedName: \"exp\",\n type: {\n name: \"Number\"\n }\n },\n nbf: {\n serializedName: \"nbf\",\n type: {\n name: \"Number\"\n }\n },\n cnf: {\n serializedName: \"cnf\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n nonce: {\n serializedName: \"nonce\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-ver\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n runtimeClaims: {\n serializedName: \"x-ms-runtime\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n inittimeClaims: {\n serializedName: \"x-ms-inittime\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n policyClaims: {\n serializedName: \"x-ms-policy\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n verifierType: {\n serializedName: \"x-ms-attestation-type\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n policySigner: {\n serializedName: \"x-ms-policy-signer\",\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\"\n }\n },\n policyHash: {\n serializedName: \"x-ms-policy-hash\",\n required: true,\n type: {\n name: \"Base64Url\"\n }\n },\n isDebuggable: {\n serializedName: \"x-ms-sgx-is-debuggable\",\n required: true,\n type: {\n name: \"Boolean\"\n }\n },\n productId: {\n serializedName: \"x-ms-sgx-product-id\",\n required: true,\n type: {\n name: \"Number\"\n }\n },\n mrEnclave: {\n serializedName: \"x-ms-sgx-mrenclave\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n mrSigner: {\n serializedName: \"x-ms-sgx-mrsigner\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n svn: {\n serializedName: \"x-ms-sgx-svn\",\n required: true,\n type: {\n name: \"Number\"\n }\n },\n enclaveHeldData: {\n serializedName: \"x-ms-sgx-ehd\",\n type: {\n name: \"Base64Url\"\n }\n },\n sgxCollateral: {\n serializedName: \"x-ms-sgx-collateral\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n deprecatedVersion: {\n serializedName: \"ver\",\n type: {\n name: \"String\"\n }\n },\n deprecatedIsDebuggable: {\n serializedName: \"is-debuggable\",\n type: {\n name: \"Boolean\"\n }\n },\n deprecatedSgxCollateral: {\n serializedName: \"maa-attestationcollateral\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"any\" } }\n }\n },\n deprecatedEnclaveHeldData: {\n serializedName: \"aas-ehd\",\n type: {\n name: \"Base64Url\"\n }\n },\n deprecatedEnclaveHeldData2: {\n serializedName: \"maa-ehd\",\n type: {\n name: \"Base64Url\"\n }\n },\n deprecatedProductId: {\n serializedName: \"product-id\",\n type: {\n name: \"Number\"\n }\n },\n deprecatedMrEnclave: {\n serializedName: \"sgx-mrenclave\",\n type: {\n name: \"String\"\n }\n },\n deprecatedMrSigner: {\n serializedName: \"sgx-mrsigner\",\n type: {\n name: \"String\"\n }\n },\n deprecatedSvn: {\n serializedName: \"svn\",\n type: {\n name: \"Number\"\n }\n },\n deprecatedTee: {\n serializedName: \"tee\",\n type: {\n name: \"String\"\n }\n },\n deprecatedPolicySigner: {\n serializedName: \"policy_signer\",\n type: {\n name: \"Composite\",\n className: \"JsonWebKey\"\n }\n },\n deprecatedPolicyHash: {\n serializedName: \"policy_hash\",\n type: {\n name: \"Base64Url\"\n }\n },\n deprecatedRpData: {\n serializedName: \"rp_data\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport { stringToBytes } from \"../utils/utf8\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer\";\n\nimport * as Mappers from \"../generated/models/mappers\";\n\n/**\n * Represents a stored attestation policy sent to the attestation service.\n */\nexport class StoredAttestationPolicy {\n constructor(value: string) {\n this.attestationPolicy = stringToBytes(value);\n }\n\n /**\n * Serializes a StoredAttestationPolicy object to a JSON encoded string.\n *\n * @returns The serialized JSON policy.\n */\n serialize(): string {\n return TypeDeserializer.serialize(\n this,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n Mappers.StoredAttestationPolicy,\n );\n }\n\n /**\n * Deserializes a stored attestation policy object returned from the attestation service.\n *\n * @param value - Raw JSON object from service to serialize as an attestation policy.\n * @returns Stored attestation policy.\n */\n static deserialize(value: unknown): StoredAttestationPolicy {\n return TypeDeserializer.deserialize(\n value,\n { StoredAttestationPolicy: Mappers.StoredAttestationPolicy },\n \"StoredAttestationPolicy\",\n ) as StoredAttestationPolicy;\n }\n\n /**\n * Stored attestation policy, utf8 encoded.\n */\n attestationPolicy: Uint8Array;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Encodes a string in base64 format.\n * @param value - the string to encode\n */\nexport function encodeString(value: string): string {\n return Buffer.from(value).toString(\"base64\");\n}\n\n/**\n * Encodes a byte array in base64 format.\n * @param value - the Uint8Array to encode\n */\nexport function base64EncodeByteArray(value: Uint8Array): string {\n // Buffer.from accepts <ArrayBuffer> | <SharedArrayBuffer>-- the TypeScript definition is off here\n // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\n const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer as ArrayBuffer);\n return bufferValue.toString(\"base64\");\n}\n\n/**\n * Encodes a byte array in base64 format.\n * @param value - the Uint8Array to encode\n */\nexport function base64UrlEncodeByteArray(value: Uint8Array): string {\n // Buffer.from accepts <ArrayBuffer> | <SharedArrayBuffer>-- the TypeScript definition is off here\n // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\n const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer as ArrayBuffer);\n const base64 = bufferValue.toString(\"base64\");\n // Convert the base64 buffer to base64url.\n return base64.replace(/\\+/g, \"-\").replace(/\\//, \"_\").split(\"=\")[0];\n}\n\n/**\n * Decodes a base64 string into a byte array.\n * @param value - the base64 string to decode\n */\nexport function base64DecodeString(value: string): Uint8Array {\n return Buffer.from(value, \"base64\");\n}\n\n/**\n * Adds missing padding to a Base64 encoded string\n * @param unpadded - The unpadded input string\n * @returns The padded string\n */\nfunction fixPadding(unpadded: string): string {\n const count = 3 - ((unpadded.length + 3) % 4);\n return unpadded + \"=\".repeat(count);\n}\n\n/**\n * Decodes a base64url string into a byte array.\n * @param value - the base64url string to decode\n */\nexport function base64UrlDecodeString(value: string): Uint8Array {\n const encoded = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const paddedEncoded = fixPadding(encoded);\n return base64DecodeString(paddedEncoded);\n}\n\nexport function hexToByteArray(value: string): Uint8Array {\n if (value.length % 2 !== 0) {\n throw new Error(\"base64FromHex: Input must be a multiple of 2 characters\");\n }\n const byteArray = new Array();\n for (let i = 0; i < value.length; i += 2) {\n byteArray.push(parseInt(value.substr(i, 2), 16));\n }\n return Uint8Array.from(byteArray);\n}\n\nexport function byteArrayToHex(value: Uint8Array): string {\n return value.reduce((str, byte) => str + byte.toString(16).padStart(2, \"0\"), \"\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"../jsrsasign.d.ts\"/>\nimport * as jsrsasign from \"jsrsasign\";\nimport { base64EncodeByteArray, hexToByteArray } from \"./base64\";\n\n/** Create an AttestationSigningKey from the provided private key and certificate.\n *\n * @param privateKey - PEM encoded DER Encoded RSA or ECDS key.\n * @param certificate - PEM encoded DER encoded X.509 certificate.\n */\nexport function verifyAttestationSigningKey(\n privateKey: string,\n certificate: string,\n): { certificate: string; privateKey: string } {\n //\n // Ensure that the key and certificate are associated with each other.\n //\n // Sign a buffer with the key, then verify the signature with the\n // certificate.\n const x509 = new jsrsasign.X509();\n x509.readCertPEM(certificate);\n\n const alg = x509.getSignatureAlgorithmName();\n\n const signer = new jsrsasign.KJUR.crypto.Signature({ alg: alg });\n\n // Confirm that the certificate and private key are related to each other.\n const bufferToSign = \"1234\";\n\n signer.init(privateKey);\n signer.updateString(bufferToSign);\n const sigVal = signer.sign();\n\n const verifier = new jsrsasign.KJUR.crypto.Signature({ alg: alg });\n verifier.init(x509.getPublicKey());\n verifier.updateString(bufferToSign);\n if (!verifier.verify(sigVal)) {\n throw new Error(\"verifyAttestationSigningKey: Key does not match Certificate.\");\n }\n return { certificate: certificate, privateKey: privateKey };\n}\n\nexport type PemType = \"CERTIFICATE\" | \"PRIVATE KEY\";\n\n/**\n *\n * @param base64 - Base64 encoded DER object to encode as PEM.\n * @param pemType - PEM object type - typically \"CERTIFICATE\" |\n */\nexport function pemFromBase64(base64: string, pemType: PemType): string {\n let pem = \"-----BEGIN \" + pemType + \"-----\\n\";\n while (base64 !== \"\") {\n pem += base64.substr(0, 64) + \"\\n\";\n base64 = base64.substr(64);\n }\n pem += \"-----END \" + pemType + \"-----\\n\";\n\n return pem;\n}\n\n/**\n * Converts a hex encoded string to its base64 equivalent.\n * @param value - Hex encoded value\n */\nexport function hexToBase64(value: string): string {\n return base64EncodeByteArray(hexToByteArray(value));\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { JsonWebKey } from \"../generated/models\";\nimport { pemFromBase64 } from \"../utils/helpers\";\n\n/**\n * An AttestationSigner represents a signing certificate chain/Key ID combination\n * returned by the attestation service.\n */\nexport interface AttestationSigner {\n /**\n * The Key ID for the signer, as defined by the \"kid\" parameter in\n * {@link https://datatracker.ietf.org/doc/html/rfc7517#section-4.5 | RFC 7517 section 4.5}\n */\n keyId?: string;\n\n /**\n * An array of X.509 certificates DER encoded and PEM encoded one of which\n * will be used to sign an attestation token. Also the \"x5c\" parameter in\n * {@link https://datatracker.ietf.org/doc/html/rfc7517#section-4.7 | RFC 7517 section 4.7}\n */\n certificates: string[];\n}\n\n/**\n *\n * @param key - JsonWebKey for signing key.\n * @returns AttestationSigner created from the JsonWebKey.\n *\n * @internal\n */\nexport function _attestationSignerFromGenerated(key?: JsonWebKey): AttestationSigner {\n return {\n keyId: key?.kid,\n certificates: key?.x5C?.map((cert) => pemFromBase64(cert, \"CERTIFICATE\")) ?? [],\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"../jsrsasign.d.ts\"/>\nimport * as jsrsasign from \"jsrsasign\";\n\nimport { JsonWebKey } from \"../generated/models\";\nimport { base64UrlDecodeString } from \"../utils/base64\";\nimport { bytesToString } from \"../utils/utf8\";\nimport { AttestationSigner, _attestationSignerFromGenerated } from \"./attestationSigner\";\n\nimport * as Mappers from \"../generated/models/mappers\";\nimport { TypeDeserializer } from \"../utils/typeDeserializer\";\nimport { hexToBase64, verifyAttestationSigningKey } from \"../utils/helpers\";\n\n/**\n * Options used to validate attestation tokens.\n *\n * @typeparam issuer - if provided, specifies the expected issuer of the attestation token.\n * @typeparam validateExpirationTime - if true, validate the expiration time in the token.\n * @typeparam validateNotBeforeTime - if true, validate the \"not before\" time in the token.\n * @typeparam validateToken - if true, validate the token.\n * @typeparam timeValidationSlack - the validation time slack in the time based validations.\n *\n * @remarks\n *\n * If validateToken, validateNotBeforeTime, or validateExpirationTime are not\n * provided, they are all assumed to be 'true'.\n *\n */\nexport interface AttestationTokenValidationOptions {\n /**\n * If true, validate the attestation token, if false, skip validation.\n */\n validateToken?: boolean;\n /**\n * If true, validate the expiration time for the token.\n */\n validateExpirationTime?: boolean;\n /**\n * If true, validate the \"not before\" time for the token.\n */\n validateNotBeforeTime?: boolean;\n /**\n * If true, validate the issuer of the token.\n */\n validateIssuer?: boolean;\n /**\n * The expected issuer for the {@link AttestationToken}. Only checked if {@link validateIssuer} is set.\n */\n expectedIssuer?: string;\n\n /**\n * Tolerance time (in seconds) used to accound for clock drift between the local machine\n * and the server creating the token.\n */\n timeValidationSlack?: number;\n\n /**\n * Validation function which allows developers to provide their own validation\n * functionality for the attestation token. This can be used to perform additional\n * validations for signing certificate in AttestationSigner.\n *\n * @param token - Attestation Token to validate.\n * @param signer - Signing Certificate which validated the token.\n *\n * @remarks\n *\n * If there is a problem with token validation, the validateAttestationCallback function\n * will return an array of strings indicating the set of problems found in the token.\n *\n * @returns an array of problems in the token, or undefined if there are no problems.\n */\n validateAttestationToken?: (\n token: AttestationToken,\n signer?: AttestationSigner,\n ) => string[] | undefined;\n}\n\n/**\n *\n * An AttestationToken represents an RFC 7515 JSON Web Signature object.\n *\n * It can represent either the token returned by the attestation service,\n * or it can be used to create a token locally which can be used to verify\n * attestation policy changes.\n */\nexport interface AttestationToken {\n /**\n * Returns the deserialized body of the AttestationToken object.\n *\n * @returns The body of the attestation token as an object.\n */\n getBody(): unknown;\n\n /**\n * the token to a string.\n *\n * @remarks\n * Serializes the token to a string.\n *\n * @returns The token serialized to a RFC 7515 JSON Web Signature.\n */\n serialize(): string;\n\n /**\n * Validates the attestation token to verify that it is semantically correct.\n *\n * @param possibleSigners - the set of possible signers for this attestation token.\n * @param options - validation options\n */\n getTokenProblems(\n possibleSigners?: AttestationSigner[],\n options?: AttestationTokenValidationOptions,\n ): string[];\n\n /** ********* JSON WEB SIGNATURE (RFC 7515) PROPERTIES */\n\n /**\n * Returns the algorithm from the header of the JSON Web Signature.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.1 | RFC 7515 Section 4.1.1})\n * for details.\n *\n * If the value of algorithm is \"none\" it indicates that the token is unsecured.\n */\n algorithm: string;\n\n /**\n * Json Web Signature Header \"kid\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.4 | RFC 7515 Section 4.1.4})\n * for details.\n */\n keyId?: string;\n\n /**\n * Json Web Signature Header \"crit\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.11 | RFC 7515 Section 4.1.11})\n * for details.\n *\n */\n critical?: boolean;\n\n /**\n * Json Web Token Header \"content type\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.10 | RFC 7515 Section 4.1.10})\n *\n */\n contentType?: string;\n\n /**\n * Json Web Token Header \"key URL\".\n *\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.2 | RFC 7515 Section 4.1.2})\n *\n */\n keyUrl?: string;\n\n /**\n * Json Web Token Header \"X509 Url\".\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.5 | RFC 7515 Section 4.1.5})\n *\n */\n x509Url?: string;\n\n /** Json Web Token Header \"Typ\".\n *\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.9 | RFC 7515 Section 4.1.9})\n *\n */\n type?: string;\n /**\n * Json Web Token Header \"x509 thumprint\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.7 | RFC 7515 Section 4.1.7})\n */\n certificateThumbprint?: string;\n\n /** Json Web Token Header \"x509 SHA256 thumprint\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.8 | RFC 7515 Section 4.1.8})\n *\n */\n certificateSha256Thumbprint?: string;\n\n /** Json Web Token Header \"x509 certificate chain\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.6 | RFC 7515 Section 4.1.6})\n *\n */\n certificateChain?: AttestationSigner;\n\n /** ********* JSON WEB TOKEN (RFC 7519) PROPERTIES */\n\n /** Issuer of the attestation token.\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.6 | RFC 7519 Section 4.1.6})\n * for details.\n */\n issuer?: string;\n\n /** Expiration time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4 | RFC 7519 Section 4.1.4})\n * for details.\n */\n expiresOn?: Date;\n\n /** Issuance time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.6 | RFC 7519 Section 4.1.6})\n * for details.\n */\n issuedAt?: Date;\n\n /**\n * Not Before time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.5 | RFC 7519 Section 4.1.5})\n * for details.\n */\n notBefore?: Date;\n}\n\n/**\n *\n * An AttestationToken represents an RFC 7515 JSON Web Signature object.\n *\n * It can represent either the token returned by the attestation service,\n * or it can be used to create a token locally which can be used to verify\n * attestation policy changes.\n */\nexport class AttestationTokenImpl implements AttestationToken {\n /**\n * @internal\n *\n * @param token - Attetation token returned by the attestation service.\n */\n constructor(token: string) {\n this._token = token;\n\n const pieces = token.split(\".\");\n if (pieces.length !== 3) {\n throw Error(\"Incorrectly formatted token:\");\n }\n this._headerBytes = base64UrlDecodeString(pieces[0]);\n this._header = safeJsonParse(bytesToString(this._headerBytes));\n this._bodyBytes = base64UrlDecodeString(pieces[1]);\n this._body = safeJsonParse(bytesToString(this._bodyBytes));\n // this._signature = base64UrlDecodeString(pieces[2]);\n\n this._jwsVerifier = jsrsasign.KJUR.jws.JWS.parse(token);\n }\n\n private _token: string;\n private _headerBytes: Uint8Array;\n private _header: any;\n private _bodyBytes: Uint8Array;\n private _body: any;\n // private _signature: Uint8Array;\n\n private _jwsVerifier: any; // jsrsasign.KJUR.jws.JWS.JWSResult;\n\n /**\n * Returns the deserialized body of the AttestationToken object.\n *\n * @returns The body of the attestation token as an object.\n */\n public getBody(): unknown {\n return this._jwsVerifier.payloadObj;\n }\n\n /**\n * the token to a string.\n *\n * @remarks\n * Serializes the token to a string.\n *\n * @returns The token serialized to a RFC 7515 JSON Web Signature.\n */\n public serialize(): string {\n return this._token;\n }\n\n /**\n * Returns the set of problems discovered in the attestation token.\n *\n * @param possibleSigners - the set of possible signers for this attestation token.\n * @param options - validation options\n * @returns an array of string values. If there are no problems, returns an empty array.\n */\n public getTokenProblems(\n possibleSigners?: AttestationSigner[],\n options: AttestationTokenValidationOptions = {\n validateExpirationTime: true,\n validateToken: true,\n validateNotBeforeTime: true,\n },\n ): string[] {\n let problems = new Array<string>();\n if (!options.validateToken) {\n return problems;\n }\n\n let foundSigner: AttestationSigner | undefined = undefined;\n if (this.algorithm !== \"none\") {\n const signers = this.getCandidateSigners(possibleSigners);\n\n signers.some((signer) => {\n const cert = this.certFromSigner(signer);\n // const pubKeyObj = cert.getPublicKey();\n\n const isValid = jsrsasign.KJUR.jws.JWS.verify(this._token, cert);\n\n if (isValid) {\n foundSigner = signer;\n }\n });\n\n if (foundSigner === undefined) {\n problems.push(\"Attestation Token is not properly signed.\");\n }\n }\n\n // If the token has a body, check the expiration time and issuer.\n if (this._body !== undefined) {\n problems = problems.concat(this.validateTimeProperties(options));\n problems = problems.concat(this.validateIssuer(options));\n }\n\n if (options.validateAttestationToken !== undefined) {\n // If there is a validation error, the getProblemsCallback will return the list of\n // problems found.\n const validationErrors = options.validateAttestationToken(this, foundSigner);\n if (validationErrors) {\n problems = problems.concat(validationErrors);\n }\n }\n return problems;\n }\n\n private validateIssuer(options: AttestationTokenValidationOptions): string[] {\n const problems = new Array<string>();\n if (this.issuer && options.validateIssuer) {\n if (this.issuer !== options.expectedIssuer) {\n problems.push(\n \"Found issuer: \" + this.issuer + \"; expected issuer: \" + options.expectedIssuer,\n );\n }\n }\n return problems;\n }\n /**\n * Validate the expiration and notbefore time claims in the JSON web token.\n *\n * @param options - Options to be used validating the time properties.\n */\n private validateTimeProperties(options: AttestationTokenValidationOptions): string[] {\n // Calculate the current time as a number of seconds since the start of the\n // Unix epoch.\n const problems = new Array<string>();\n const timeNow = Math.floor(new Date().getTime() / 1000);\n\n // Validate expiration time.\n if (this.expiresOn !== undefined && options.validateExpirationTime) {\n const expTime = this.expiresOn.getTime() / 1000;\n if (timeNow > expTime) {\n const delta = timeNow - expTime;\n if (delta > (options.timeValidationSlack ?? 0)) {\n problems.push(\"AttestationToken has expired.\");\n }\n }\n }\n\n // Validate not before time.\n if (this.notBefore !== undefined && options.validateNotBeforeTime) {\n const nbfTime = this.notBefore.getTime() / 1000;\n if (nbfTime > timeNow) {\n const delta = nbfTime - timeNow;\n if (delta > (options.timeValidationSlack ?? 0)) {\n problems.push(\"AttestationToken is not yet valid.\");\n }\n }\n }\n return problems;\n }\n\n private certFromSigner(signer: AttestationSigner): string {\n // return the PEM encoded certificate.\n return signer.certificates[0];\n }\n\n private getCandidateSigners(\n possibleSigningCertificates?: AttestationSigner[],\n ): AttestationSigner[] {\n const candidateSigners = new Array<AttestationSigner>();\n\n const desiredKeyId = this.keyId;\n\n if (desiredKeyId !== undefined && possibleSigningCertificates !== undefined) {\n possibleSigningCertificates.forEach((possibleSigner) => {\n if (possibleSigner.keyId === desiredKeyId) {\n candidateSigners.push(possibleSigner);\n }\n });\n\n // If we didn't find any candidate signers looking through the provided\n // signing certificates, then maybe there's a certificate chain in the\n // token itself that might be used to sign the token.\n if (candidateSigners.length === 0) {\n if (this.certificateChain !== undefined && this.certificateChain !== null) {\n candidateSigners.push(this.certificateChain);\n }\n }\n } else {\n possibleSigningCertificates?.map((value) => candidateSigners.push(value));\n if (this.certificateChain !== undefined) {\n candidateSigners.push(this.certificateChain);\n }\n }\n return candidateSigners;\n }\n\n /** ********* JSON WEB SIGNATURE (RFC 7515) PROPERTIES */\n\n /**\n * Returns the algorithm from the header of the JSON Web Signature.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.1 | RFC 7515 Section 4.1.1})\n * for details.\n *\n * If the value of algorithm is \"none\" it indicates that the token is unsecured.\n */\n public get algorithm(): string {\n return this._header?.alg;\n }\n\n /**\n * Json Web Signature Header \"kid\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.4 | RFC 7515 Section 4.1.4})\n * for details.\n */\n public get keyId(): string | undefined {\n return this._header.kid;\n }\n\n /**\n * Json Web Signature Header \"crit\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.11 | RFC 7515 Section 4.1.11})\n * for details.\n *\n */\n public get critical(): boolean | undefined {\n return this._header.crit;\n }\n\n /**\n * Json Web Token Header \"content type\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.10 | RFC 7515 Section 4.1.10})\n *\n */\n public get contentType(): string | undefined {\n return this._header.cty;\n }\n\n /**\n * Json Web Token Header \"key URL\".\n *\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.2 | RFC 7515 Section 4.1.2})\n *\n */\n public get keyUrl(): string | undefined {\n return this._header.jku;\n }\n\n /**\n * Json Web Token Header \"X509 Url\".\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.5 | RFC 7515 Section 4.1.5})\n *\n */\n public get x509Url(): string | undefined {\n return this._header.x5u;\n }\n\n /** Json Web Token Header \"Typ\".\n *\n * @see {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.9 | RFC 7515 Section 4.1.9})\n *\n */\n public get type(): string | undefined {\n return this._header.typ;\n }\n\n /**\n * Json Web Token Header \"x509 thumprint\".\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.7 | RFC 7515 Section 4.1.7})\n */\n public get certificateThumbprint(): string | undefined {\n return this._header.x5t;\n }\n\n /** Json Web Token Header \"x509 SHA256 thumprint\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.8 | RFC 7515 Section 4.1.8})\n *\n */\n public get certificateSha256Thumbprint(): string | undefined {\n return this._header[\"x5t#256\"];\n }\n\n /** Json Web Token Header \"x509 certificate chain\".\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.6 | RFC 7515 Section 4.1.6})\n *\n */\n public get certificateChain(): AttestationSigner | undefined {\n let jwk: JsonWebKey;\n if (this._header.jwk !== undefined) {\n jwk = TypeDeserializer.deserialize(\n this._header.jwk,\n [Mappers.JsonWebKey],\n \"JsonWebKey\",\n ) as JsonWebKey;\n } else {\n jwk = TypeDeserializer.deserialize(\n this._header,\n { JsonWebKey: Mappers.JsonWebKey },\n \"JsonWebKey\",\n ) as JsonWebKey;\n }\n return _attestationSignerFromGenerated(jwk);\n }\n\n /** ********* JSON WEB TOKEN (RFC 7519) PROPERTIES */\n\n /** Issuer of the attestation token.\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.6 | RFC 7519 Section 4.1.6})\n * for details.\n */\n public get issuer(): string | undefined {\n return this._body.iss;\n }\n\n /** Expiration time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4 | RFC 7519 Section 4.1.4})\n * for details.\n */\n public get expiresOn(): Date | undefined {\n return this._body.exp ? new Date(this._body.exp * 1000) : undefined;\n }\n\n /** Issuance time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.6 | RFC 7519 Section 4.1.6})\n * for details.\n */\n public get issuedAt(): Date | undefined {\n return this._body.iat ? new Date(this._body.iat * 1000) : undefined;\n }\n\n /**\n * Not Before time for the token, from JWT body.\n *\n * See {@link https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.5 | RFC 7519 Section 4.1.5})\n * for details.\n */\n public get notBefore(): Date | undefined {\n return this._body.nbf ? new Date(this._body.nbf * 1000) : undefined;\n }\n\n /**\n * Creates a new attestation token from a body and signing key.\n * @param body - stringified body of the body of the token to be created.\n * @param signer - Optional signing key used to sign the newly created token.\n * @returns an {@link AttestationToken | attestation token}\n */\n public static create(params: {\n body?: string;\n privateKey?: string;\n certificate?: string;\n }): AttestationToken {\n const header: {\n alg: string;\n [k: string]: any;\n } = { alg: \"none\" };\n\n if ((!params.privateKey && params.certificate) || (params.privateKey && !params.certificate)) {\n throw new Error(\n \"If privateKey is specified, certificate must also be provided. If certificate is provided, privateKey must also be provided.\",\n );\n }\n\n if (params.privateKey && params.certificate) {\n verifyAttestationSigningKey(params.privateKey, params.certificate);\n }\n\n if (params.privateKey || params.certificate) {\n const x5c = new jsrsasign.X509();\n x5c.readCertPEM(params.certificate);\n const pubKey = x5c.getPublicKey();\n if (pubKey instanceof jsrsasign.RSAKey) {\n header.alg = \"RS256\";\n } else if (pubKey instanceof jsrsasign.KJUR.crypto.ECDSA) {\n header.alg = \"ES256\";\n } else {\n throw new Error(\"Unknown public key type: \" + typeof pubKey);\n }\n header.x5c = [hexToBase64(x5c.hex)];\n } else {\n header.alg = \"none\";\n }\n\n const encodedToken = jsrsasign.KJUR.jws.JWS.sign(\n header.alg,\n header,\n params.body ?? \"\",\n params.privateKey,\n );\n return new AttestationTokenImpl(encodedToken);\n }\n}\n\nfunction isObject(thing: any): boolean {\n return Object.prototype.toString.call(thing) === \"[object Object]\";\n}\n\nfunction safeJsonParse(thing: any): any {\n if (isObject(thing)) return thing;\n try {\n return JSON.parse(thing);\n } catch (e: any) {\n return undefined;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StoredAttestationPolicy } from \"./storedAttestationPolicy\";\n// import { AttestationSigningKey } from \"./attestationSigningKey\";\nimport { AttestationToken, AttestationTokenImpl } from \"./attestationToken\";\n\n/**\n *\n * An AttestationPolicyToken represents an AttestationToken which holds an attestation\n * policy document.\n *\n * When the attestation service receives a set policy request, the payload of the\n * set policy token contains a {@link https://datatracker.ietf.org/doc/html/rfc7515 | JSON Web Signature}\n * whose body contains the actual attestation policy document.\n *\n * The AttestationPolicyToken represents this JWS object.\n */\nexport interface AttestationPolicyToken extends AttestationToken {}\n\n/** Constructs an AttestationToken containing an Attestation Policy document.\n *\n * @param policy - Attestation policy to embed in the attestation token.\n * @param privateKey - optional private key used to sign the attestation token.\n * @param certificate - optional certificate used to verify the attestation token.\n *\n * @remarks Note that if the attestation instance is running in `Isolated` mode,\n * the privateKey and certificate are required. If the attestation instance\n * is running in `AAD` mode, they are optional.\n *\n * @throws {@link Error} when the key in the certificate provided does not match the private key.\n */\nexport function createAttestationPolicyToken(\n policy: string,\n privateKey?: string,\n certificate?: string,\n): AttestationPolicyToken {\n const token = AttestationTokenImpl.create({\n body: new StoredAttestationPolicy(policy).serialize(),\n privateKey: privateKey,\n certificate: certificate,\n });\n return token;\n}\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Azure.Security.Attestation\",\n packageName: \"@azure/attestation\",\n packageVersion: \"1.0.1\"\n});\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\nimport {\n AttestOpenEnclaveRequest as AttestOpenEnclaveRequestMapper,\n AttestSgxEnclaveRequest as AttestSgxEnclaveRequestMapper,\n TpmAttestationRequest as TpmAttestationRequestMapper\n} from \"../models/mappers\";\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const instanceUrl: OperationURLParameter = {\n parameterPath: \"instanceUrl\",\n mapper: {\n serializedName: \"instanceUrl\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2020-10-01\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const attestationType: OperationURLParameter = {\n parameterPath: \"attestationType\",\n mapper: {\n serializedName: \"attestationType\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"text/plain\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const newAttestationPolicy: OperationParameter = {\n parameterPath: \"newAttestationPolicy\",\n mapper: {\n serializedName: \"newAttestationPolicy\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const accept1: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const policyJws: OperationParameter = {\n parameterPath: \"policyJws\",\n mapper: {\n serializedName: \"policyJws\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const contentType1: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const policyCertificateToAdd: OperationParameter = {\n parameterPath: \"policyCertificateToAdd\",\n mapper: {\n constraints: {\n Pattern: new RegExp(\"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\")\n },\n serializedName: \"policyCertificateToAdd\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const policyCertificateToRemove: OperationParameter = {\n parameterPath: \"policyCertificateToRemove\",\n mapper: {\n constraints: {\n Pattern: new RegExp(\"[A-Za-z0-9_-]+\\\\.[A-Za-z0-9_-]*\\\\.[A-Za-z0-9_-]*\")\n },\n serializedName: \"policyCertificateToRemove\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const request: OperationParameter = {\n parameterPath: \"request\",\n mapper: AttestOpenEnclaveRequestMapper\n};\n\nexport const request1: OperationParameter = {\n parameterPath: \"request\",\n mapper: AttestSgxEnclaveRequestMapper\n};\n\nexport const request2: OperationParameter = {\n parameterPath: \"request\",\n mapper: TpmAttestationRequestMapper\n};\n\nexport const accept2: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/jwk+json, application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { Policy } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n AttestationType,\n PolicyGetOptionalParams,\n PolicyGetResponse,\n PolicySetModelOptionalParams,\n PolicySetModelResponse,\n PolicyResetOptionalParams,\n PolicyResetResponse\n} from \"../models\";\n\n/** Class containing Policy operations. */\nexport class PolicyImpl implements Policy {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class Policy class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the current policy for an attestation type.\n * @param attestationType Specifies the trusted execution environment to be used to validate the\n * evidence\n * @param options The options parameters.\n */\n async get(\n attestationType: AttestationType,\n options?: PolicyGetOptionalParams\n ): Promise<PolicyGetResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { attestationType, options },\n getOperationSpec\n ) as Promise<PolicyGetResponse>;\n }\n );\n }\n\n /**\n * Sets the policy for a given attestation type.\n * @param attestationType Specifies the trusted execution environment to be used to validate the\n * evidence\n * @param newAttestationPolicy JWT Expressing the new policy whose body is a StoredAttestationPolicy\n * object.\n * @param options The options parameters.\n */\n async set(\n attestationType: AttestationType,\n newAttestationPolicy: string,\n options?: PolicySetModelOptionalParams\n ): Promise<PolicySetModelResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.set\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { attestationType, newAttestationPolicy, options },\n setOperationSpec\n ) as Promise<PolicySetModelResponse>;\n }\n );\n }\n\n /**\n * Resets the attestation policy for the specified tenant and reverts to the default policy.\n * @param attestationType Specifies the trusted execution environment to be used to validate the\n * evidence\n * @param policyJws JSON Web Signature with an empty policy document\n * @param options The options parameters.\n */\n async reset(\n attestationType: AttestationType,\n policyJws: string,\n options?: PolicyResetOptionalParams\n ): Promise<PolicyResetResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.reset\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { attestationType, policyJws, options },\n resetOperationSpec\n ) as Promise<PolicyResetResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/policies/{attestationType}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl, Parameters.attestationType],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst setOperationSpec: coreClient.OperationSpec = {\n path: \"/policies/{attestationType}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.newAttestationPolicy,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl, Parameters.attestationType],\n headerParameters: [Parameters.contentType, Parameters.accept1],\n mediaType: \"text\",\n serializer\n};\nconst resetOperationSpec: coreClient.OperationSpec = {\n path: \"/policies/{attestationType}:reset\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.policyJws,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl, Parameters.attestationType],\n headerParameters: [Parameters.contentType, Parameters.accept1],\n mediaType: \"text\",\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { PolicyCertificates } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n PolicyCertificatesGetOptionalParams,\n PolicyCertificatesGetResponse,\n PolicyCertificatesAddOptionalParams,\n PolicyCertificatesAddResponse,\n PolicyCertificatesRemoveOptionalParams,\n PolicyCertificatesRemoveResponse\n} from \"../models\";\n\n/** Class containing PolicyCertificates operations. */\nexport class PolicyCertificatesImpl implements PolicyCertificates {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class PolicyCertificates class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Retrieves the set of certificates used to express policy for the current tenant.\n * @param options The options parameters.\n */\n async get(\n options?: PolicyCertificatesGetOptionalParams\n ): Promise<PolicyCertificatesGetResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getOperationSpec\n ) as Promise<PolicyCertificatesGetResponse>;\n }\n );\n }\n\n /**\n * Adds a new attestation policy certificate to the set of policy management certificates.\n * @param policyCertificateToAdd An RFC7519 JSON Web Token whose body is an RFC7517 JSON Web Key\n * object. The RFC7519 JWT must be signed with one of the existing signing certificates\n * @param options The options parameters.\n */\n async add(\n policyCertificateToAdd: string,\n options?: PolicyCertificatesAddOptionalParams\n ): Promise<PolicyCertificatesAddResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.add\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { policyCertificateToAdd, options },\n addOperationSpec\n ) as Promise<PolicyCertificatesAddResponse>;\n }\n );\n }\n\n /**\n * Removes the specified policy management certificate. Note that the final policy management\n * certificate cannot be removed.\n * @param policyCertificateToRemove An RFC7519 JSON Web Token whose body is an\n * AttestationCertificateManagementBody object. The RFC7519 JWT must be signed with one of the existing\n * signing certificates\n * @param options The options parameters.\n */\n async remove(\n policyCertificateToRemove: string,\n options?: PolicyCertificatesRemoveOptionalParams\n ): Promise<PolicyCertificatesRemoveResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.remove\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { policyCertificateToRemove, options },\n removeOperationSpec\n ) as Promise<PolicyCertificatesRemoveResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/certificates\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyCertificatesResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst addOperationSpec: coreClient.OperationSpec = {\n path: \"/certificates:add\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyCertificatesModifyResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.policyCertificateToAdd,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst removeOperationSpec: coreClient.OperationSpec = {\n path: \"/certificates:remove\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.PolicyCertificatesModifyResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.policyCertificateToRemove,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { Attestation } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n AttestOpenEnclaveRequest,\n AttestationAttestOpenEnclaveOptionalParams,\n AttestationAttestOpenEnclaveResponse,\n AttestSgxEnclaveRequest,\n AttestationAttestSgxEnclaveOptionalParams,\n AttestationAttestSgxEnclaveResponse,\n TpmAttestationRequest,\n AttestationAttestTpmOptionalParams,\n AttestationAttestTpmResponse\n} from \"../models\";\n\n/** Class containing Attestation operations. */\nexport class AttestationImpl implements Attestation {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class Attestation class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Processes an OpenEnclave report , producing an artifact. The type of artifact produced is dependent\n * upon attestation policy.\n * @param request Request object containing the quote\n * @param options The options parameters.\n */\n async attestOpenEnclave(\n request: AttestOpenEnclaveRequest,\n options?: AttestationAttestOpenEnclaveOptionalParams\n ): Promise<AttestationAttestOpenEnclaveResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.attestOpenEnclave\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { request, options },\n attestOpenEnclaveOperationSpec\n ) as Promise<AttestationAttestOpenEnclaveResponse>;\n }\n );\n }\n\n /**\n * Processes an SGX enclave quote, producing an artifact. The type of artifact produced is dependent\n * upon attestation policy.\n * @param request Request object containing the quote\n * @param options The options parameters.\n */\n async attestSgxEnclave(\n request: AttestSgxEnclaveRequest,\n options?: AttestationAttestSgxEnclaveOptionalParams\n ): Promise<AttestationAttestSgxEnclaveResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.attestSgxEnclave\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { request, options },\n attestSgxEnclaveOperationSpec\n ) as Promise<AttestationAttestSgxEnclaveResponse>;\n }\n );\n }\n\n /**\n * Processes attestation evidence from a VBS enclave, producing an attestation result. The attestation\n * result produced is dependent upon the attestation policy.\n * @param request Request object\n * @param options The options parameters.\n */\n async attestTpm(\n request: TpmAttestationRequest,\n options?: AttestationAttestTpmOptionalParams\n ): Promise<AttestationAttestTpmResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.attestTpm\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { request, options },\n attestTpmOperationSpec\n ) as Promise<AttestationAttestTpmResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst attestOpenEnclaveOperationSpec: coreClient.OperationSpec = {\n path: \"/attest/OpenEnclave\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AttestationResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.request,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst attestSgxEnclaveOperationSpec: coreClient.OperationSpec = {\n path: \"/attest/SgxEnclave\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AttestationResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.request1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst attestTpmOperationSpec: coreClient.OperationSpec = {\n path: \"/attest/Tpm\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.TpmAttestationResponse\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n requestBody: Parameters.request2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { SigningCertificates } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n SigningCertificatesGetOptionalParams,\n SigningCertificatesGetResponse\n} from \"../models\";\n\n/** Class containing SigningCertificates operations. */\nexport class SigningCertificatesImpl implements SigningCertificates {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class SigningCertificates class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Retrieves metadata signing certificates in use by the attestation service\n * @param options The options parameters.\n */\n async get(\n options?: SigningCertificatesGetOptionalParams\n ): Promise<SigningCertificatesGetResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getOperationSpec\n ) as Promise<SigningCertificatesGetResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/certs\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.JsonWebKeySet\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept2],\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { MetadataConfiguration } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n MetadataConfigurationGetOptionalParams,\n MetadataConfigurationGetResponse\n} from \"../models\";\n\n/** Class containing MetadataConfiguration operations. */\nexport class MetadataConfigurationImpl implements MetadataConfiguration {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class MetadataConfiguration class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Retrieves metadata about the attestation signing keys in use by the attestation service\n * @param options The options parameters.\n */\n async get(\n options?: MetadataConfigurationGetOptionalParams\n ): Promise<MetadataConfigurationGetResponse> {\n return tracingClient.withSpan(\n \"GeneratedClient.get\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getOperationSpec\n ) as Promise<MetadataConfigurationGetResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/.well-known/openid-configuration\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Dictionary\", value: { type: { name: \"any\" } } }\n }\n },\n default: {\n bodyMapper: Mappers.CloudError\n }\n },\n urlParameters: [Parameters.instanceUrl],\n headerParameters: [Parameters.accept],\n serializer\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport {\n PolicyImpl,\n PolicyCertificatesImpl,\n AttestationImpl,\n SigningCertificatesImpl,\n MetadataConfigurationImpl\n} from \"./operations\";\nimport {\n Policy,\n PolicyCertificates,\n Attestation,\n SigningCertificates,\n MetadataConfiguration\n} from \"./operationsInterfaces\";\nimport { GeneratedClientOptionalParams } from \"./models\";\n\nexport class GeneratedClient extends coreClient.ServiceClient {\n instanceUrl: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClient class.\n * @param instanceUrl The attestation instance base URI, for example https://mytenant.attest.azure.net.\n * @param options The parameter options\n */\n constructor(instanceUrl: string, options?: GeneratedClientOptionalParams) {\n if (instanceUrl === undefined) {\n throw new Error(\"'instanceUrl' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-attestation/1.0.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint ?? options.baseUri ?? \"{instanceUrl}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.instanceUrl = instanceUrl;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2020-10-01\";\n this.policy = new PolicyImpl(this);\n this.policyCertificates = new PolicyCertificatesImpl(this);\n this.attestation = new AttestationImpl(this);\n this.signingCertificates = new SigningCertificatesImpl(this);\n this.metadataConfiguration = new MetadataConfigurationImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n policy: Policy;\n policyCertificates: PolicyCertificates;\n attestation: Attestation;\n signingCertificates: SigningCertificates;\n metadataConfiguration: MetadataConfiguration;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The \\@azure/logger configuration for this package.\n *\n * @internal\n */\nexport const logger = createClientLogger(\"attestation\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AttestationToken } from \"./attestationToken\";\n\n/**\n * An AttestationResponse represents the response from the Microsoft Azure\n * Attestation service. It has two properties:\n *\n * @param token - The attestation token returned from the attestation service.\n * @param body - The value of the response from the attestation service.\n * @typeparam T - The type of the {@link body} property.\n *\n */\nexport interface AttestationResponse<T> {\n /**\n * The Attestation Token returned from the attestation service.\n */\n token: AttestationToken;\n\n /**\n * The value of the response from the attestation service, derived\n * from the body of the {@link token} property.\n */\n\n body: T;\n}\n\n/** Create an AttestationResponse object.\n *\n * @param token - Token which was returned from the attestation service.\n * @param value - Value for the response. Usually derived from the body of the token\n * returned by the service.\n * @returns - A newly created AttestationResponse object.\n */\nexport function createAttestationResponse<T>(\n token: AttestationToken,\n value: T,\n): AttestationResponse<T> {\n return { token: token, body: value };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AttestationSigner } from \".\";\nimport { GeneratedAttestationResult } from \"../generated\";\nimport { _attestationSignerFromGenerated } from \"./attestationSigner\";\n\n/**\n * Defines the contents of the {@link AttestationResult.sgxCollateral} claim in\n * an {@link AttestationResult}.\n */\nexport interface AttestationSgxCollateralInfo {\n /**\n * Hex encoded Sha256 hash of the Quoting Enclave Certificates.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n qeidcertshash?: string;\n /**\n * Hex encoded Sha256 hash of the Quoting Enclave Certificate CRL.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n qeidcrlhash?: string;\n /**\n * Hex encoded Sha256 hash of the Quoting Enclave Identity.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n qeidhash?: string;\n /**\n * Hex encoded Sha256 hash of the SGX Quote or OpenEnclave Report validated\n * by this token.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n quotehash?: string;\n /**\n * Hex encoded Sha256 hash of the TCB Info Certificates.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n tcbinfocertshash?: string;\n /**\n * Hex encoded Sha256 hash of the TCB Info Certificate CRL.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n tcbinfocrlhash?: string;\n /**\n * Hex encoded Sha256 hash of the TCB Info for the device being attested.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n tcbinfohash?: string;\n}\n\n/**\n * A Microsoft Azure Attestation response token body - the body of a response token issued by MAA\n */\nexport interface AttestationResult {\n /**\n * Unique Identifier for the token.\n *\n * Corresponds to the 'jti' claim defined in\n * {@link https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7 | RFC 7519 section 4.1.7}\n */\n uniqueId: string;\n\n /**\n * Returns the issuer of the attestation token. MUST be the same as the\n * endpoint used when constructing the attestation client instance.\n */\n issuer: string;\n\n /**\n * Returns the \"nonce\" value if one was specified in the Attest request.\n */\n nonce?: string;\n\n /**\n * The Schema version of this structure. Current Value: 1.0\n */\n version: string;\n\n /**\n * Returns the runtime claims in the token.\n *\n * This value will match the input `runTimeJson` property to the\n * {@link AttestationClient.attestSgxEnclave} or\n * {@link AttestationClient.attestOpenEnclave} API.\n *\n * @remarks\n *\n * The `runtimeClaims` property will only be populated if the\n * `runtimeJson` parameter to the `Attest` API is specified. It will\n * not be populated if the `runtimeData` parameter is specified.\n */\n runTimeClaims: unknown;\n /**\n * Returns the initialization time claims in the token.\n * This value will match the input `initTimeJson` property to the\n * {@link AttestationClient.attestSgxEnclave} or\n * {@link AttestationClient.attestOpenEnclave} API.\n *\n * @remarks\n *\n * The `initTimeClaims` property will only be populated if the `initTimeJson`\n * parameter to the `Attest` API is specified. It will not be populated if\n * the `initTimeData` parameter is specified.\n */\n initTimeClaims: unknown;\n\n /**\n * Returns the set of claims generated by the attestation policy on the instance.\n */\n policyClaims: unknown;\n\n /**\n * Returns the verifier which generated this attestation token. Normally one of:\n * \"SGX\" or \"TPM\", but others can be specified.\n */\n verifierType: string;\n /**\n * The certificate used to sign the policy object, if specified.\n */\n policySigner?: AttestationSigner;\n /**\n * The base64url encoded SHA256 hash of the BASE64URL encoded policy text\n * used for attestation.\n */\n policyHash: Uint8Array;\n /**\n * True if the enclave is debuggable, false otherwise. Only valid if `verifierType` is SGX.\n */\n isDebuggable?: boolean;\n\n /**\n * The SGX Product ID for the enclave. Only valid if the `verifierType` field is \"SGX\"\n */\n productId?: number;\n /**\n * The HEX encoded SGX MRENCLAVE value for the enclave. Only valid if the\n * `verifierType` field is \"SGX\"\n */\n mrEnclave?: string;\n\n /**\n * The HEX encoded SGX MRSIGNER value for the enclave. Only valid if the\n * `verifierType` field is \"SGX\"\n */\n mrSigner?: string;\n\n /**\n * The SGX SVN value for the enclave. Only valid if the `verifierType` field is \"SGX\"\n */\n svn?: number;\n\n /**\n * Returns the value of the runtime_data field specified as an input to the\n * {@link AttestationClient.attestSgxEnclave} or {@link AttestationClient.attestOpenEnclave} API.\n *\n * @remarks\n *\n * The `enclaveHeldData` property will only be populated if the\n * `runtimeData` parameter to the `Attest` API is specified.\n */\n enclaveHeldData?: Uint8Array;\n\n /**\n * Returns a set of information describing the complete set of inputs to the\n * Attestation validation logic.\n *\n * See the {@link https://software.intel.com/content/www/us/en/develop/articles/quote-verification-attestation-with-intel-sgx-dcap.html | Intel SGX documentation }\n * for more information on quote validation.\n */\n sgxCollateral?: AttestationSgxCollateralInfo;\n}\n\n/**\n * A Microsoft Azure Attestation response token body - the body of a response token issued by MAA\n */\nexport class AttestationResultImpl implements AttestationResult {\n /**\n *\n * @param params - The parameters for the constructor.\n *\n * @hidden\n */\n constructor(params: {\n issuer: string;\n version: string;\n nonce?: string;\n uniqueId: string;\n runTimeClaims?: unknown;\n initTimeClaims?: unknown;\n policyClaims?: unknown;\n verifierType: string;\n policySigner?: AttestationSigner;\n policyHash: Uint8Array;\n isDebuggable?: boolean;\n productId?: number;\n mrEnclave?: string;\n mrSigner?: string;\n svn?: number;\n enclaveHeldData?: Uint8Array;\n sgxCollateral?: AttestationSgxCollateralInfo;\n }) {\n this._issuer = params.issuer;\n this._nonce = params.nonce;\n this._version = params.version;\n this._uniqueId = params.uniqueId;\n this._runTimeClaims = params.runTimeClaims;\n this._initTimeClaims = params.initTimeClaims;\n this._policyClaims = params.policyClaims;\n this._verifierType = params.verifierType;\n this._policySigner = params.policySigner;\n this._policyHash = params.policyHash;\n this._isDebuggable = params.isDebuggable;\n this._productId = params.productId;\n this._mrEnclave = params.mrEnclave;\n this._mrSigner = params.mrSigner;\n this._svn = params.svn;\n this._enclaveHeldData = params.enclaveHeldData;\n this._sgxCollateral = params.sgxCollateral;\n }\n\n private _issuer: string;\n private _version: string;\n private _nonce?: string;\n private _uniqueId: string;\n private _runTimeClaims?: unknown;\n private _initTimeClaims?: unknown;\n private _policyClaims?: unknown;\n private _verifierType: string;\n private _policySigner?: AttestationSigner;\n private _policyHash: Uint8Array;\n private _isDebuggable?: boolean;\n private _productId?: number;\n private _mrEnclave?: string;\n private _mrSigner?: string;\n private _svn?: number;\n private _enclaveHeldData?: Uint8Array;\n private _sgxCollateral?: AttestationSgxCollateralInfo;\n\n /**\n * Unique Identifier for the token\n *\n */\n get uniqueId(): string {\n return this._uniqueId;\n }\n\n /**\n * Returns the issuer of the attestation token. MUST be the same as the\n * endpoint used when constructing the attestation client instance.\n */\n get issuer(): string {\n return this._issuer;\n }\n\n /**\n * Returns the \"nonce\" value specified in the Attest request.\n */\n get nonce(): string | undefined {\n return this._nonce;\n }\n\n /**\n * The Schema version of this structure. Current Value: 1.0\n */\n get version(): string {\n return this._version;\n }\n\n /**\n * Runtime Claims\n */\n get runTimeClaims(): unknown {\n return this._runTimeClaims;\n }\n /**\n * Inittime Claims\n */\n get initTimeClaims(): unknown {\n return this._initTimeClaims;\n }\n\n /**\n * Policy Generated Claims\n */\n get policyClaims(): unknown {\n return this._policyClaims;\n }\n /**\n * The Attestation type being attested.\n */\n get verifierType(): string {\n return this._verifierType;\n }\n /**\n * The certificate used to sign the policy object, if specified.\n */\n get policySigner(): AttestationSigner | undefined {\n return this._policySigner;\n }\n /**\n * The SHA256 hash of the BASE64URL encoded policy text used for attestation\n */\n get policyHash(): Uint8Array {\n return this._policyHash;\n }\n /**\n * True if the enclave is debuggable, false otherwise\n */\n get isDebuggable(): boolean | undefined {\n return this._isDebuggable;\n }\n /**\n * The SGX Product ID for the enclave.\n */\n get productId(): number | undefined {\n return this._productId;\n }\n /**\n * The HEX encoded SGX MRENCLAVE value for the enclave.\n */\n get mrEnclave(): string | undefined {\n return this._mrEnclave;\n }\n /**\n * The HEX encoded SGX MRSIGNER value for the enclave.\n */\n get mrSigner(): string | undefined {\n return this._mrSigner;\n }\n /**\n * The SGX SVN value for the enclave.\n */\n get svn(): number | undefined {\n return this._svn;\n }\n /**\n * A copy of the RuntimeData specified as an input to the attest call.\n */\n get enclaveHeldData(): Uint8Array | undefined {\n return this._enclaveHeldData;\n }\n /**\n * The SGX SVN value for the enclave.\n */\n get sgxCollateral(): AttestationSgxCollateralInfo | undefined {\n return this._sgxCollateral;\n }\n}\n\n/**\n *\n * @param generated - Generated attestation result object.\n * @returns newly created AttestationResult from the generated result.\n *\n * @internal\n */\nexport function _attestationResultFromGenerated(\n generated: GeneratedAttestationResult,\n): AttestationResultImpl {\n return new AttestationResultImpl({\n issuer: generated.iss,\n version: generated.version,\n nonce: generated.nonce,\n uniqueId: generated.jti,\n policySigner: generated.policySigner\n ? _attestationSignerFromGenerated(generated.policySigner)\n : undefined,\n runTimeClaims: generated.runtimeClaims,\n initTimeClaims: generated.inittimeClaims,\n policyClaims: generated.policyClaims,\n verifierType: generated.verifierType,\n policyHash: generated.policyHash,\n isDebuggable: generated.isDebuggable,\n productId: generated.productId,\n mrEnclave: generated.mrEnclave,\n mrSigner: generated.mrSigner,\n svn: generated.svn,\n enclaveHeldData: generated.enclaveHeldData,\n sgxCollateral: generated.sgxCollateral,\n });\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Converts an attestation input from Uint8Array/Buffer/Blob to Uint8Array.\n *\n * @param input - Input to attestation API.\n * @returns Promise which completes with the input data as a Uint8Array.\n */\nexport async function Uint8ArrayFromInput(\n input: Uint8Array | Buffer | Blob | undefined,\n): Promise<Uint8Array | undefined> {\n if (input === undefined) {\n return input;\n }\n\n if ((input as any).byteLength === undefined) {\n throw TypeError(\"Blob is unsupported in node.\");\n }\n\n // We've eliminated the 'Blob' case above, so we know this must be either a Buffer or Uint8Array.\n return input as Uint8Array;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { GeneratedClient } from \"./generated/generatedClient\";\n\nimport { AttestationResult, AttestationSigner, AttestationTokenValidationOptions } from \"./models\";\n\nimport {\n GeneratedAttestationResult,\n InitTimeData,\n KnownDataType,\n RuntimeData,\n} from \"./generated/models\";\n\nimport { logger } from \"./logger\";\nimport { GeneratedClientOptionalParams } from \"./generated/models\";\nimport * as Mappers from \"./generated/models/mappers\";\n\nimport { AttestationResponse, createAttestationResponse } from \"./models/attestationResponse\";\n\nimport { TypeDeserializer } from \"./utils/typeDeserializer\";\nimport { TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport { bytesToString, stringToBytes } from \"./utils/utf8\";\nimport { _attestationResultFromGenerated } from \"./models/attestationResult\";\nimport { _attestationSignerFromGenerated } from \"./models/attestationSigner\";\nimport { AttestationTokenImpl } from \"./models/attestationToken\";\nimport { Uint8ArrayFromInput } from \"./utils/buffer\";\nimport { tracingClient } from \"./generated/tracing\";\n\n/**\n * Attestation Client Construction Options.\n */\nexport interface AttestationClientOptions extends CommonClientOptions {\n /**\n * Validation options to be used to validate attestation tokens received\n * from the attestation service.\n */\n validationOptions?: AttestationTokenValidationOptions;\n}\n\n/**\n * Operation options for the Attestation Client operations.\n */\nexport interface AttestationClientOperationOptions extends OperationOptions {\n /**\n * Validation options to be used to validate attestation tokens received\n * from the attestation service for the individual operation.\n */\n validationOptions?: AttestationTokenValidationOptions;\n}\n\n/**\n * Optional parameters for the AttestOpenEnclave API.\n *\n * @param initTimeData - data provided at the time the enclave was initialized.\n * @param runTimeData - data provided at the time the SGX quote being attested was created.\n * @param draftPolicyForAttestation - If specified, the attestation policy to be used during the attestation request.\n */\nexport interface AttestOpenEnclaveOptions extends AttestationClientOperationOptions {\n /**\n *initTimeData : data provided at the time the enclave was initialized, to be interpreted as binary data.\n *\n */\n initTimeData?: Uint8Array | Buffer | Blob;\n\n /**\n * inittimeJson : data provided at the time the enclave was initialized, to be interpreted as JSON data.\n */\n initTimeJson?: Uint8Array | Buffer | Blob;\n\n /**\n * runTimeData - data provided at the time the OpenEnclave report being attested was created to be interpreted as binary data.\n */\n runTimeData?: Uint8Array | Buffer | Blob;\n\n /**\n * runTimeJson - data provided at the time the OpenEnclave report being attested was created to be interpreted as JSON data.\n */\n runTimeJson?: Uint8Array | Buffer | Blob;\n\n /**\n * draftPolicyForAttestation - If specified, the attestation policy to be used during the attestation request.\n */\n draftPolicyForAttestation?: string;\n}\n\n/**\n * Optional parameters for the AttestSgxEnclave API.\n *\n * @param initTimeData - data provided at the time the enclave was initialized.\n * @param runTimeData - data provided at the time the SGX quote being attested was created.\n * @param draftPolicyForAttestation - If specified, the attestation policy to be used during the attestation request.\n */\nexport interface AttestSgxEnclaveOptions extends AttestationClientOperationOptions {\n /**\n *initTimeData : data provided at the time the enclave was initialized, to be interpreted as binary data.\n *\n */\n initTimeData?: Uint8Array | Buffer | Blob;\n\n /**\n * inittimeJson : data provided at the time the enclave was initialized, to be interpreted as JSON data.\n */\n initTimeJson?: Uint8Array | Buffer | Blob;\n\n /**\n * runTimeData - data provided at the time the OpenEnclave report being attested was created to be interpreted as binary data.\n */\n runTimeData?: Uint8Array | Buffer | Blob;\n\n /**\n * runTimeJson - data provided at the time the OpenEnclave report being attested was created to be interpreted as JSON data.\n */\n runTimeJson?: Uint8Array | Buffer | Blob;\n\n /**\n * draftPolicyForAttestation - If specified, the attestation policy to be used during the attestation request.\n */\n draftPolicyForAttestation?: string;\n}\n\n/**\n * Operation options for the AttestTpm API.\n */\nexport interface AttestTpmOptions extends AttestationClientOperationOptions {}\n\n/**\n * Attestation Client class.\n *\n * The AttestationClient class enables access to the Attestation related APIs:\n *\n * - getOpenIdMetadata\n * - getAttestationSigners\n * - attestSgxEnclave\n * - attestOpenEnclave\n * - attestTpm\n */\nexport class AttestationClient {\n /**\n * Creates an instance of AttestationClient.\n *\n * Example usage:\n * ```ts\n * import { AttestationClient } from \"@azure/attestation\";\n *\n * const client = new AttestationClient(\n * \"<service endpoint>\"\n * );\n * ```\n *\n * @param endpoint - The attestation instance base URI, for example https://mytenant.attest.azure.net.\n * @param options - Options used to configure the Attestation Client.\n *\n */\n public constructor(endpoint: string, options?: AttestationClientOptions);\n\n /**\n * Creates an instance of AttestationClient with options and credentials.\n *\n * Example usage:\n * ```ts\n * import { AttestationClient } from \"@azure/attestation\";\n *\n * const client = new AttestationClient(\n * \"<service endpoint>\",\n * new TokenCredential(\"<>\"),\n * { tokenValidationOptions: { validateToken: false } }\n * );\n * ```\n *\n * Note that credentials are required to call the `attestTpm` API.\n *\n * @param endpoint - The attestation instance base URI, for example https://mytenant.attest.azure.net.\n * @param credentials - Credentials used to configure the attestation client.\n *\n */\n public constructor(\n endpoint: string,\n credentials: TokenCredential,\n options?: AttestationClientOptions,\n );\n public constructor(\n endpoint: string,\n credentialsOrOptions?: TokenCredential | AttestationClientOptions,\n clientOptions: AttestationClientOptions = {},\n ) {\n let credentialScopes: string[] | undefined = undefined;\n let credential: TokenCredential | undefined = undefined;\n let options: AttestationClientOptions;\n\n if (credentialsOrOptions && isTokenCredential(credentialsOrOptions)) {\n credential = credentialsOrOptions;\n credentialScopes = [\"https://attest.azure.net/.default\"];\n options = clientOptions;\n } else {\n options = credentialsOrOptions || {};\n }\n\n const internalPipelineOptions: GeneratedClientOptionalParams = {\n ...options,\n ...{\n credentialScopes: credentialScopes,\n credential: credential,\n loggingOptions: {\n logger: logger.info,\n allowedHeaderNames: [\"x-ms-request-id\", \"x-ms-maa-service-version\"],\n },\n },\n };\n\n this._client = new GeneratedClient(endpoint, internalPipelineOptions);\n this._validationOptions = options.validationOptions;\n }\n\n /** Attests an OpenEnclave report generated from an SGX Enclave using the OpenEnclave SDK.\n *\n * @param report - An OpenEnclave report generated by an SGX enclave.\n * @param options - Operation options for the attestOpenEnclave API call.\n * @returns Returns an AttestationResponse whose body is an AttestationResult describing\n * the claims returned by the attestation service.\n *\n * @throws {@link Error} if the `initTimeData` option and `initTimeJson` option is provided.\n * @throws {@link Error} if the `runTimeData` option and `runTimeJson` option is provided.\n * @throws {@link Error} if the `initTimeJson` option is provided and the value of `initTimeJson` is not JSON.\n * @throws {@link Error} if the `runTimeJson` option is provided and the value of `runTimeJson` is not JSON.\n */\n public async attestOpenEnclave(\n report: Uint8Array | Buffer | Blob,\n options: AttestOpenEnclaveOptions = {},\n ): Promise<AttestationResponse<AttestationResult>> {\n return tracingClient.withSpan(\n \"AttestationClient-attestOpenEnclave\",\n options,\n async (updatedOptions) => {\n if (options.initTimeData !== undefined && options.initTimeJson !== undefined) {\n throw new Error(\"Cannot provide both initTimeData and initTimeJson.\");\n }\n\n if (options.runTimeData !== undefined && options.runTimeJson !== undefined) {\n throw new Error(\"Cannot provide both runTimeData and runTimeJson.\");\n }\n\n const initData = await Uint8ArrayFromInput(options.initTimeData ?? options.initTimeJson);\n\n const initTimeData: InitTimeData | undefined = initData\n ? {\n data: initData,\n dataType:\n options.initTimeJson !== undefined ? KnownDataType.Json : KnownDataType.Binary,\n }\n : undefined;\n\n const runData = await Uint8ArrayFromInput(options.runTimeData ?? options.runTimeJson);\n\n const runTimeData: RuntimeData | undefined = runData\n ? {\n data: runData,\n dataType:\n options.runTimeJson !== undefined ? KnownDataType.Json : KnownDataType.Binary,\n }\n : undefined;\n\n const attestationResponse = await this._client.attestation.attestOpenEnclave(\n {\n report: await Uint8ArrayFromInput(report),\n initTimeData: initTimeData,\n runtimeData: runTimeData,\n draftPolicyForAttestation: options.draftPolicyForAttestation ?? undefined,\n },\n updatedOptions,\n );\n\n const token = new AttestationTokenImpl(attestationResponse.token);\n const problems = token.getTokenProblems(\n await this._signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n const attestationResult = TypeDeserializer.deserialize(\n token.getBody(),\n {\n GeneratedAttestationResult: Mappers.GeneratedAttestationResult,\n JsonWebKey: Mappers.JsonWebKey,\n },\n \"GeneratedAttestationResult\",\n ) as GeneratedAttestationResult;\n\n return createAttestationResponse<AttestationResult>(\n token,\n _attestationResultFromGenerated(attestationResult),\n );\n },\n );\n }\n\n /** Attests a quote generated from SGX Enclave using the Intel SDK.\n *\n * @param quote - An SGX quote generated by an SGX enclave.\n * @param options - Operation options for the attestOpenEnclave API call.\n * @returns Returns an AttestationResponse whose body is an AttestationResult describing\n * the claims returned by the attestation service.\n * @throws {@link Error} if the `initTimeData` option and `initTimeJson` option is provided.\n * @throws {@link Error} if the `runTimeData` option and `runTimeJson` option is provided.\n */\n public async attestSgxEnclave(\n quote: Uint8Array | Buffer | Blob,\n options: AttestSgxEnclaveOptions = {},\n ): Promise<AttestationResponse<AttestationResult>> {\n return tracingClient.withSpan(\n \"AttestationClient-attestSgxEnclave\",\n options,\n async (updatedOptions) => {\n if (options.initTimeData !== undefined && options.initTimeJson !== undefined) {\n throw new Error(\"Cannot provide both initTimeData and initTimeJson.\");\n }\n\n if (options.runTimeData !== undefined && options.runTimeJson !== undefined) {\n throw new Error(\"Cannot provide both runTimeData and runTimeJson.\");\n }\n\n const initData = await Uint8ArrayFromInput(options.initTimeData ?? options.initTimeJson);\n\n const initTimeData: InitTimeData | undefined = initData\n ? {\n data: initData,\n dataType:\n options.initTimeJson !== undefined ? KnownDataType.Json : KnownDataType.Binary,\n }\n : undefined;\n\n const runData = await Uint8ArrayFromInput(options.runTimeData ?? options.runTimeJson);\n const runTimeData: RuntimeData | undefined = runData\n ? {\n data: runData,\n dataType:\n options.runTimeJson !== undefined ? KnownDataType.Json : KnownDataType.Binary,\n }\n : undefined;\n\n const attestationResponse = await this._client.attestation.attestSgxEnclave(\n {\n quote: await Uint8ArrayFromInput(quote),\n initTimeData: initTimeData,\n runtimeData: runTimeData,\n draftPolicyForAttestation: options.draftPolicyForAttestation ?? undefined,\n },\n updatedOptions,\n );\n\n const token = new AttestationTokenImpl(attestationResponse.token);\n const problems = token.getTokenProblems(\n await this._signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n const attestationResult = TypeDeserializer.deserialize(\n token.getBody(),\n {\n GeneratedAttestationResult: Mappers.GeneratedAttestationResult,\n JsonWebKey: Mappers.JsonWebKey,\n },\n \"GeneratedAttestationResult\",\n ) as GeneratedAttestationResult;\n\n return createAttestationResponse<AttestationResult>(\n token,\n _attestationResultFromGenerated(attestationResult),\n );\n },\n );\n }\n\n /** Attest a TPM based enclave.\n\n * See the {@link https://docs.microsoft.com/en-us/azure/attestation/virtualization-based-security-protocol | TPM Attestation Protocol Reference} for more information.\n * \n * @param request - Incoming request to send to the TPM attestation service, Utf8 encoded.\n * @param options - Pipeline options for TPM attestation request.\n * @returns A structure containing the response from the TPM attestation, Utf8 encoded.\n * \n * @remarks\n * \n * The incoming requests to the TPM attestation API are stringified JSON objects.\n * \n * @example\n * For example, the initial call for a TPM attestation operation is:\n * \n * ```js\n * const encodedPayload = JSON.stringify({ payload: { type: \"aikcert\" } });\n * const result = await client.attestTpm(encodedPayload);\n * ```\n * \n * where stringToBytes converts the string to UTF8.\n * \n * Note that the attestTpm requires an attestation client which is configured with\n * authentication credentials.\n * \n */\n public async attestTpm(request: string, options: AttestTpmOptions = {}): Promise<string> {\n return tracingClient.withSpan(\n \"AttestationClient-attestSgxEnclave\",\n options,\n async (updatedOptions) => {\n const response = await this._client.attestation.attestTpm(\n { data: stringToBytes(request) },\n updatedOptions,\n );\n if (response.data) {\n return bytesToString(response.data);\n } else {\n throw Error(\"Internal error - response data cannot be undefined.\");\n }\n },\n );\n }\n\n /**\n * Returns the list of attestation signers which can be used to sign attestation\n * service tokens.\n *\n * @param options - Client operation options.\n * @returns the set of AttestationSigners which may be used to sign attestation tokens.\n */\n public async getAttestationSigners(\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: AttestationClientOperationOptions = {},\n ): Promise<AttestationSigner[]> {\n return tracingClient.withSpan(\n \"AttestationClient-getAttestationSigners\",\n options,\n async (updatedOptions) => {\n const signingCertificates = await this._client.signingCertificates.get(updatedOptions);\n const signers: AttestationSigner[] = new Array();\n signingCertificates.keys?.forEach((element) => {\n signers.push(_attestationSignerFromGenerated(element));\n });\n return signers;\n },\n );\n }\n\n /**\n * Returns the OpenID Metadata discovery document for the attestation service instance.\n * @param options - Client operation options.\n * @returns The OpenID metadata discovery document for the attestation service.\n */\n public async getOpenIdMetadata(\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: AttestationClientOperationOptions = {},\n ): Promise<Record<string, unknown>> {\n return tracingClient.withSpan(\n \"AttestationClient-getOpenIdMetadata\",\n options,\n async (updatedOptions) => {\n const configs = await this._client.metadataConfiguration.get(updatedOptions);\n return configs;\n },\n );\n }\n\n private _client: GeneratedClient;\n private _validationOptions?: AttestationTokenValidationOptions;\n private _signers?: AttestationSigner[];\n\n private async _signingKeys(): Promise<AttestationSigner[]> {\n if (this._signers !== undefined) {\n return this._signers;\n }\n const jwks = await this._client.signingCertificates.get();\n const signers: AttestationSigner[] = new Array();\n jwks.keys?.forEach((element) => {\n signers.push(_attestationSignerFromGenerated(element));\n });\n this._signers = signers;\n return this._signers;\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n */\n\nimport { PolicyModification } from \"./index\";\nimport * as Mappers from \"../generated/models/mappers\";\n\nimport { PolicyResult as GeneratedPolicyResult } from \"../generated/models\";\n\nimport { TypeDeserializer } from \"../utils/typeDeserializer\";\nimport { AttestationSigner, _attestationSignerFromGenerated } from \"./attestationSigner\";\n\n/**\n * The result of a policy certificate modification\n */\nexport interface PolicyResult {\n /**\n * The result of the operation\n */\n policyResolution: PolicyModification;\n /**\n * The SHA256 hash of the policy object modified\n */\n policyTokenHash: Uint8Array;\n /**\n * The certificate used to sign the policy object, if specified\n */\n policySigner?: AttestationSigner;\n /**\n * A JSON Web Token containing a StoredAttestationPolicy object with the attestation policy\n */\n policy?: string;\n}\n\n/**\n * Create a new instance of a {@link PolicyResult} from a raw JSON object.\n * @param rawJson - JSON Policy Result object returned from the Attestation service.\n * @returns a newly created {@link PolicyResult} object whose contents reflect the JSON received from\n * the attestation service.\n */\nexport function _policyResultFromGenerated(rawJson: unknown): PolicyResult {\n const policyResult: GeneratedPolicyResult = TypeDeserializer.deserialize(\n rawJson,\n { PolicyResult: Mappers.PolicyResult, JsonWebKey: Mappers.JsonWebKey },\n \"PolicyResult\",\n ) as GeneratedPolicyResult;\n return {\n policyResolution: policyResult.policyResolution,\n policyTokenHash: policyResult.policyTokenHash,\n policy: policyResult.policy,\n policySigner: policyResult.policySigner\n ? _attestationSignerFromGenerated(policyResult.policySigner)\n : undefined,\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @azure/azure-sdk/ts-naming-options */\nimport { GeneratedClient } from \"./generated/generatedClient\";\nimport { logger } from \"./logger\";\n\nimport {\n AttestationCertificateManagementBody,\n GeneratedClientOptionalParams,\n JsonWebKey,\n PolicyCertificatesResult,\n} from \"./generated/models\";\n\nimport { bytesToString } from \"./utils/utf8\";\n\nimport {\n AttestationResponse,\n AttestationSigner,\n AttestationTokenValidationOptions,\n AttestationType,\n PolicyCertificatesModificationResult,\n PolicyResult,\n} from \"./models\";\nimport { StoredAttestationPolicy } from \"./models/storedAttestationPolicy\";\n\nimport { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { TypeDeserializer } from \"./utils/typeDeserializer\";\nimport * as Mappers from \"./generated/models/mappers\";\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"../jsrsasign.d.ts\"/>\nimport * as jsrsasign from \"jsrsasign\";\nimport { hexToBase64 } from \"./utils/helpers\";\nimport { _policyResultFromGenerated } from \"./models/policyResult\";\nimport { _attestationSignerFromGenerated } from \"./models/attestationSigner\";\nimport { verifyAttestationSigningKey } from \"./utils/helpers\";\nimport { createAttestationResponse } from \"./models/attestationResponse\";\nimport { AttestationTokenImpl } from \"./models/attestationToken\";\nimport { tracingClient } from \"./generated/tracing\";\n\n/**\n * Attestation Client Construction Options.\n */\nexport interface AttestationAdministrationClientOptions extends CommonClientOptions {\n /**\n * Options to be used globally to validate attestation tokens received from\n * the attestation service.\n */\n validationOptions?: AttestationTokenValidationOptions;\n}\n\n/**\n * Operation options for the Attestation Administration Client operations.\n */\nexport interface AttestationAdministrationClientOperationOptions extends OperationOptions {\n /**\n * Options to be used globally to validate attestation tokens received from\n * the attestation service.\n */\n validationOptions?: AttestationTokenValidationOptions;\n}\n\n/**\n * Operation options for the administration Policy operations.\n */\nexport interface AttestationAdministrationClientPolicyOperationOptions\n extends AttestationAdministrationClientOperationOptions {\n /**\n * Optional Private key used to sign the token sent to the attestation service.\n *\n * Required for Isolated Mode attestation instances.\n */\n privateKey?: string;\n\n /**\n * Optional certificate which can validate the token sent to the attestation service.\n *\n * Required for Isolated Mode attestation instances.\n *\n * If the service instance is in Isolated mode, the certificate *must* be one\n * of the configured policy management certificates.\n */\n certificate?: string;\n}\n\n/**\n * Operation options for the Policy Certificates operations.\n */\nexport interface AttestationAdministrationClientPolicyCertificateOperationOptions\n extends AttestationAdministrationClientOperationOptions {}\n\n/**\n * Attestation Client class.\n *\n * The AttestationClient class enables access to the Attestation related APIs:\n *\n * - getPolicy\n * - setPolicy\n * - resetPolicy\n * - getPolicyManagementCertificates\n * - addPolicyManagementCertificate\n * - removePolicyManagementCertificate\n */\nexport class AttestationAdministrationClient {\n /**\n * Creates an instance of AttestationAdministrationClient.\n *\n * Example usage:\n * ```ts\n * import { AttestationAdministrationClient } from \"@azure/attestation\";\n *\n * const client = new AttestationAdministrationClient(\n * \"<service endpoint>\",\n * new TokenCredential(\"<>\")\n * );\n * ```\n *\n * @param endpoint - The attestation instance endpoint, for example https://mytenant.attest.azure.net.\n * @param credential - Used to authenticate requests to the service.\n * @param options - Used to configure the Form Recognizer client.\n */\n\n constructor(\n endpoint: string,\n credentials: TokenCredential,\n options: AttestationAdministrationClientOptions = {},\n ) {\n this._validationOptions = options.validationOptions;\n\n const internalPipelineOptions: GeneratedClientOptionalParams = {\n ...options,\n ...{\n credential: credentials,\n credentialScopes: [\"https://attest.azure.net/.default\"],\n loggingOptions: {\n logger: logger.info,\n allowedHeaderNames: [\"x-ms-request-id\", \"x-ms-maa-service-version\"],\n },\n },\n };\n\n this._client = new GeneratedClient(endpoint, internalPipelineOptions);\n }\n\n /**\n * Retrieves the attestation policy document from the server, and returns it\n * to the caller.\n *\n * @param attestationType - AttestationType for which to retrieve policy.\n * @param options - Pipeline and client options for the `getPolicy` call.\n * @returns `AttestationResponse<string>` - the `value` property is the\n * attestation policy, the `token` property will be the actual token\n * returned by the attestation service.\n */\n public async getPolicy(\n attestationType: AttestationType,\n options: AttestationAdministrationClientPolicyOperationOptions = {},\n ): Promise<AttestationResponse<string>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-getPolicy\",\n options,\n async (updatedOptions) => {\n const getPolicyResult = await this._client.policy.get(attestationType, updatedOptions);\n\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(getPolicyResult.token);\n\n // Validate the token returned from the service.\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyResult object to retrieve the underlying policy\n // token\n const policyResult = _policyResultFromGenerated(token.getBody());\n\n // The policyResult.policy value will be a JSON Web Signature representing\n // the actual policy object being retrieved. Serialize the token to an\n // AttestationToken object so we can access the body properties on the token.\n if (!policyResult.policy) {\n throw Error(\"Server returned an invalid getPolicy response!\");\n }\n\n const policyToken = new AttestationTokenImpl(policyResult.policy);\n\n const storedPolicy = StoredAttestationPolicy.deserialize(policyToken.getBody());\n\n // Finally, retrieve the stored attestationPolicy value and return that\n // as the AttestationResponse to the caller.\n return createAttestationResponse<string>(\n token,\n bytesToString(storedPolicy.attestationPolicy),\n );\n },\n );\n }\n\n /**\n * Sets the attestation policy for the specified {@link attestationType}.\n *\n * @param attestationType - Attestation Type for which to set policy.\n * @param newPolicyDocument - Policy document to be set.\n * @param options - call options.\n * @returns An {@link AttestationResponse} wrapping a {@link PolicyResult}.\n * Clients can use the PolicyResult to validate that the policy was actually\n * set by the attestation service.\n *\n * @remarks\n *\n * Please note that if the attestation service instance is running in \"Isolated\"\n * mode, the {@link signingKey} must be one of the signing keys configured for the\n * service instance.\n *\n * @throws {@link Error} when a private key is specified without a certificate and vice versa.\n * @throws {@link Error} when the key in the certificate provided does not match the private key.\n */\n public async setPolicy(\n attestationType: AttestationType,\n newPolicyDocument: string,\n options: AttestationAdministrationClientPolicyOperationOptions = {},\n ): Promise<AttestationResponse<PolicyResult>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-setPolicy\",\n options,\n async (updatedOptions) => {\n if (\n (!options.privateKey && options.certificate) ||\n (options.privateKey && !options.certificate)\n ) {\n throw new Error(\n \"If privateKey is specified, certificate must also be provided. If certificate is provided, privateKey must also be provided.\",\n );\n }\n\n if (options.privateKey && options.certificate) {\n verifyAttestationSigningKey(options.privateKey, options.certificate);\n }\n\n const storedAttestationPolicy = new StoredAttestationPolicy(newPolicyDocument).serialize();\n const setPolicyToken = AttestationTokenImpl.create({\n body: storedAttestationPolicy,\n ...options,\n });\n\n const setPolicyResult = await this._client.policy.set(\n attestationType,\n setPolicyToken.serialize(),\n updatedOptions,\n );\n\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(setPolicyResult.token);\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyResult object to retrieve the underlying policy\n // token\n const policyResult = _policyResultFromGenerated(token.getBody());\n\n // The policyResult.policy value will be a JSON Web Signature representing\n // the actual policy object being retrieved. Serialize the token to an\n // AttestationToken object so we can access the body properties on the token.\n return createAttestationResponse<PolicyResult>(token, policyResult);\n },\n );\n }\n\n /**\n * Resets the attestation policy for the specified {@link attestationType} to\n * the default value.\n *\n * @param attestationType - Attestation Type for which to set policy.\n * @param options - call options.\n * @returns An {@link AttestationResponse} wrapping a {@link PolicyResult}.\n * Clients can use the PolicyResult to validate that the policy was actually\n * reset by the attestation service.\n *\n * @remarks\n *\n * Please note that if the attestation service instance is running in \"Isolated\"\n * mode, the {@link signingKey} must be one of the signing keys configured for the\n * service instance.\n *\n * @throws {@link Error} when a private key is specified without a certificate and vice versa.\n * @throws {@link Error} when the key in the certificate provided does not match the private key.\n */\n\n public async resetPolicy(\n attestationType: AttestationType,\n options: AttestationAdministrationClientPolicyOperationOptions = {},\n ): Promise<AttestationResponse<PolicyResult>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-setPolicy\",\n options,\n async (updatedOptions) => {\n if (\n (!options.privateKey && options.certificate) ||\n (options.privateKey && !options.certificate)\n ) {\n throw new Error(\n \"If privateKey is specified, certificate must also be provided. If certificate is provided, privateKey must also be provided.\",\n );\n }\n\n if (options.privateKey && options.certificate) {\n verifyAttestationSigningKey(options.privateKey, options.certificate);\n }\n\n const resetPolicyToken = AttestationTokenImpl.create({\n privateKey: options.privateKey,\n certificate: options.certificate,\n });\n\n const resetPolicyResult = await this._client.policy.reset(\n attestationType,\n resetPolicyToken.serialize(),\n updatedOptions,\n );\n\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(resetPolicyResult.token);\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyResult object to retrieve the underlying policy\n // token\n const policyResult = _policyResultFromGenerated(token.getBody());\n\n // The policyResult.policy value will be a JSON Web Signature representing\n // the actual policy object being retrieved. Serialize the token to an\n // AttestationToken object so we can access the body properties on the token.\n return createAttestationResponse<PolicyResult>(token, policyResult);\n },\n );\n }\n\n /** Returns the set of policy management certificates for this attestation instance.\n *\n * @remarks If the attestation instance is not in `Isolated` mode, this list will\n * always be empty.\n *\n * @param options - Options for the call to the attestation service.\n * @returns AttestationResponse wrapping a list of Attestation Signers.\n */\n public async getPolicyManagementCertificates(\n options: AttestationAdministrationClientPolicyCertificateOperationOptions = {},\n ): Promise<AttestationResponse<AttestationSigner[]>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-getPolicyManagementCertificates\",\n options,\n async (updatedOptions) => {\n const getCertificatesResult = await this._client.policyCertificates.get(updatedOptions);\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(getCertificatesResult.token);\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyResult object to retrieve the underlying policy\n // token\n const jwks = TypeDeserializer.deserialize(\n token.getBody(),\n {\n PolicyCertificatesResult: Mappers.PolicyCertificatesResult,\n JsonWebKeySet: Mappers.JsonWebKeySet,\n JsonWebKey: Mappers.JsonWebKey,\n },\n \"PolicyCertificatesResult\",\n ) as PolicyCertificatesResult;\n\n const policyCertificates = new Array<AttestationSigner>();\n jwks.policyCertificates.keys.forEach((jwk) => {\n policyCertificates.push(_attestationSignerFromGenerated(jwk));\n });\n\n return createAttestationResponse<AttestationSigner[]>(token, policyCertificates);\n },\n );\n }\n\n /** Add a new certificate chain to the set of policy management certificates.\n *\n * @param pemCertificate - PEM encoded certificate to add to the set of policy management certificates.\n * @param privateKey - Existing attestation private key used to sign the incoming request.\n * @param certificate - Existing attestation certificate used to verify the incoming request.\n * @param options - Options used in the call to the service.\n * @returns An attestation response including a PolicyCertificatesModificationResult\n *\n * @remarks This API is only supported on `isolated` attestation instances.\n *\n * The signing key MUST be one of the existing attestation signing certificates. The\n * new pemCertificate is signed using the signingKey and the service will validate the\n * signature before allowing the addition.\n *\n * @throws {@link Error} when a private key is specified without a certificate and vice versa.\n * @throws {@link Error} when the key in the certificate provided does not match the private key.\n *\n */\n public async addPolicyManagementCertificate(\n pemCertificate: string,\n privateKey: string,\n certificate: string,\n options: AttestationAdministrationClientPolicyCertificateOperationOptions = {},\n ): Promise<AttestationResponse<PolicyCertificatesModificationResult>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-addPolicyManagementCertificate\",\n options,\n async (updatedOptions) => {\n if ((!privateKey && certificate) || (privateKey && !certificate)) {\n throw new Error(\n \"If privateKey is specified, certificate must also be provided. If certificate is provided, privateKey must also be provided.\",\n );\n }\n\n if (privateKey && certificate) {\n verifyAttestationSigningKey(privateKey, certificate);\n }\n\n const cert = new jsrsasign.X509();\n cert.readCertPEM(pemCertificate);\n const kty = this.keyTypeFromCertificate(cert);\n\n const jwk: JsonWebKey = {\n x5C: [hexToBase64(cert.hex)],\n kty: kty,\n };\n\n const addBody: AttestationCertificateManagementBody = {\n policyCertificate: jwk,\n };\n\n const addCertToken = AttestationTokenImpl.create({\n body: TypeDeserializer.serialize(\n addBody,\n {\n AttestationCertificateManagementBody: Mappers.AttestationCertificateManagementBody,\n JsonWebKey: Mappers.JsonWebKey,\n },\n Mappers.AttestationCertificateManagementBody,\n ),\n privateKey: privateKey,\n certificate: certificate,\n });\n\n const addCertificateResult = await this._client.policyCertificates.add(\n addCertToken.serialize(),\n updatedOptions,\n );\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(addCertificateResult.token);\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyCertificatesModificationResult object.\n const result = TypeDeserializer.deserialize(\n token.getBody(),\n {\n PolicyCertificatesModificationResult: Mappers.PolicyCertificatesModificationResult,\n JsonWebKeySet: Mappers.JsonWebKeySet,\n JsonWebKey: Mappers.JsonWebKey,\n },\n \"PolicyCertificatesModificationResult\",\n ) as PolicyCertificatesModificationResult;\n\n return createAttestationResponse<PolicyCertificatesModificationResult>(token, result);\n },\n );\n }\n\n private keyTypeFromCertificate(cert: any): string {\n let kty: string;\n switch (cert.getSignatureAlgorithmName()) {\n case \"SHA256withRSA\":\n case \"SHA384withRSA\":\n case \"SHA512withRSA\":\n kty = \"RSA\";\n break;\n case \"SHA256withECDSA\":\n case \"SHA384withECDSA\":\n kty = \"EC\";\n break;\n default:\n kty = \"RSA\";\n break;\n }\n return kty;\n }\n\n /** Add a new certificate chain to the set of policy management certificates.\n *\n * @param pemCertificate - PEM encoded certificate to add to the set of policy management certificates.\n * @param privateKey - Existing attestation private key used to sign the incoming request.\n * @param certificate - Existing attestation certificate used to verify the incoming request.\n * @param options - Options used in the call to the service.\n * @returns An attestation response including a PolicyCertificatesModificationResult\n *\n * @remarks This API is only supported on `isolated` attestation instances.\n *\n * The signing key MUST be one of the existing attestation signing certificates. The\n * new pemCertificate is signed using the signingKey and the service will validate the\n * signature before allowing the addition.\n *\n * @throws {@link Error} when a private key is specified without a certificate and vice versa.\n * @throws {@link Error} when the key in the certificate provided does not match the private key.\n */\n public async removePolicyManagementCertificate(\n pemCertificate: string,\n privateKey: string,\n certificate: string,\n options: AttestationAdministrationClientPolicyCertificateOperationOptions = {},\n ): Promise<AttestationResponse<PolicyCertificatesModificationResult>> {\n return tracingClient.withSpan(\n \"AttestationAdministrationClient-removePolicyManagementCertificate\",\n options,\n async (updatedOptions) => {\n if ((!privateKey && certificate) || (privateKey && !certificate)) {\n throw new Error(\n \"If privateKey is specified, certificate must also be provided. If certificate is provided, privateKey must also be provided.\",\n );\n }\n\n if (privateKey && certificate) {\n verifyAttestationSigningKey(privateKey, certificate);\n }\n\n const cert = new jsrsasign.X509();\n cert.readCertPEM(pemCertificate);\n const kty = this.keyTypeFromCertificate(cert);\n\n const jwk: JsonWebKey = {\n x5C: [hexToBase64(cert.hex)],\n kty: kty,\n };\n\n const addBody: AttestationCertificateManagementBody = {\n policyCertificate: jwk,\n };\n\n const removeCertToken = AttestationTokenImpl.create({\n body: TypeDeserializer.serialize(\n addBody,\n {\n AttestationCertificateManagementBody: Mappers.AttestationCertificateManagementBody,\n JsonWebKey: Mappers.JsonWebKey,\n },\n Mappers.AttestationCertificateManagementBody,\n ),\n privateKey: privateKey,\n certificate: certificate,\n });\n\n const removeCertificateResult = await this._client.policyCertificates.remove(\n removeCertToken.serialize(),\n updatedOptions,\n );\n // The attestation token returned from the service has a PolicyResult\n // object as the body.\n const token = new AttestationTokenImpl(removeCertificateResult.token);\n const problems = token.getTokenProblems(\n await this.signingKeys(),\n options.validationOptions ?? this._validationOptions,\n );\n if (problems.length) {\n throw new Error(problems.join(\";\"));\n }\n\n // Deserialize the PolicyCertificatesModificationResult object.\n const result = TypeDeserializer.deserialize(\n token.getBody(),\n {\n PolicyCertificatesModificationResult: Mappers.PolicyCertificatesModificationResult,\n JsonWebKeySet: Mappers.JsonWebKeySet,\n JsonWebKey: Mappers.JsonWebKey,\n },\n \"PolicyCertificatesModificationResult\",\n ) as PolicyCertificatesModificationResult;\n\n return createAttestationResponse<PolicyCertificatesModificationResult>(token, result);\n },\n );\n }\n\n private async signingKeys(): Promise<AttestationSigner[]> {\n if (this._signers !== undefined) {\n return this._signers;\n }\n const jwks = await this._client.signingCertificates.get();\n const signers: AttestationSigner[] = new Array();\n jwks.keys?.forEach((element) => {\n signers.push(_attestationSignerFromGenerated(element));\n });\n this._signers = signers;\n return this._signers;\n }\n\n private _client: GeneratedClient;\n private _signers?: AttestationSigner[];\n private _validationOptions?: AttestationTokenValidationOptions;\n}\n"],"names":["KnownAttestationType","KnownCertificateModification","KnownPolicyModification","createSerializer","StoredAttestationPolicy","Mappers.StoredAttestationPolicy","jsrsasign","Mappers.JsonWebKey","createTracingClient","AttestOpenEnclaveRequestMapper","AttestSgxEnclaveRequestMapper","TpmAttestationRequestMapper","getOperationSpec","serializer","coreClient","Mappers.PolicyResponse","Mappers.CloudError","Parameters.apiVersion","Parameters.instanceUrl","Parameters.attestationType","Parameters.accept","Parameters.newAttestationPolicy","Parameters.contentType","Parameters.accept1","Parameters.policyJws","Mappers.PolicyCertificatesResponse","Mappers.PolicyCertificatesModifyResponse","Parameters.policyCertificateToAdd","Parameters.contentType1","Parameters.policyCertificateToRemove","Mappers.AttestationResponse","Parameters.request","Parameters.request1","Mappers.TpmAttestationResponse","Parameters.request2","Mappers.JsonWebKeySet","Parameters.accept2","createClientLogger","isTokenCredential","Mappers.GeneratedAttestationResult","Mappers.PolicyResult","Mappers.PolicyCertificatesResult","Mappers.AttestationCertificateManagementBody","Mappers.PolicyCertificatesModificationResult"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;AA8RH;AACYA,sCAOX;AAPD,CAAA,UAAY,oBAAoB,EAAA;;AAE9B,IAAA,oBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;;AAEzB,IAAA,oBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;;AAE3B,IAAA,oBAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACb,CAAC,EAPWA,4BAAoB,KAApBA,4BAAoB,GAO/B,EAAA,CAAA,CAAA,CAAA;AAaD;AACA,IAAY,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