@microsoft/ccf-app 5.0.0-dev14 → 5.0.0-dev16

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/crypto.d.ts CHANGED
@@ -71,7 +71,7 @@ export declare const eddsaPemToJwk: (pem: string, kid?: string | undefined) => i
71
71
  */
72
72
  export declare const pubJwkToPem: (jwk: import("./global.js").JsonWebKeyECPublic) => string;
73
73
  /**
74
- * @inheritDoc global!CCFCrypto.JwkToPem
74
+ * @inheritDoc global!CCFCrypto.jwkToPem
75
75
  */
76
76
  export declare const jwkToPem: (jwk: import("./global.js").JsonWebKeyECPrivate) => string;
77
77
  /**
package/crypto.js CHANGED
@@ -87,7 +87,7 @@ export const eddsaPemToJwk = ccf.crypto.eddsaPemToJwk;
87
87
  */
88
88
  export const pubJwkToPem = ccf.crypto.pubJwkToPem;
89
89
  /**
90
- * @inheritDoc global!CCFCrypto.JwkToPem
90
+ * @inheritDoc global!CCFCrypto.jwkToPem
91
91
  */
92
92
  export const jwkToPem = ccf.crypto.jwkToPem;
93
93
  /**
package/endpoints.d.ts CHANGED
@@ -93,9 +93,10 @@ export interface AuthnIdentityCommon {
93
93
  /**
94
94
  * A string indicating which policy accepted this request,
95
95
  * for use when multiple policies are listed in the endpoint
96
- * configuration of ``app.json``.
96
+ * configuration of ``app.json``, or list-of-strings to identify
97
+ * an all_of policy.
97
98
  */
98
- policy: string;
99
+ policy: string | string[];
99
100
  }
100
101
  export interface EmptyAuthnIdentity extends AuthnIdentityCommon {
101
102
  policy: "no_auth";
@@ -155,12 +156,20 @@ export interface JwtAuthnIdentity extends AuthnIdentityCommon {
155
156
  payload: any;
156
157
  };
157
158
  }
159
+ export interface AllOfAuthnIdentity extends AuthnIdentityCommon {
160
+ policy: string[];
161
+ user_cert?: UserCertAuthnIdentity;
162
+ member_cert?: MemberCertAuthnIdentity;
163
+ user_cose_sign1?: UserCOSESign1AuthnIdentity;
164
+ member_cose_sign1?: MemberCOSESign1AuthnIdentity;
165
+ jwt?: JwtAuthnIdentity;
166
+ }
158
167
  /**
159
168
  * Authentication identities supported by CCF.
160
169
  * Each identity corresponds to a matching {@linkcode AuthnIdentityCommon.policy | policy}.
161
170
  * Policies have to be declared for each endpoint in ``app.json``.
162
171
  */
163
- export type AuthnIdentity = EmptyAuthnIdentity | UserCertAuthnIdentity | MemberCertAuthnIdentity | JwtAuthnIdentity | MemberCOSESign1AuthnIdentity | UserCOSESign1AuthnIdentity;
172
+ export type AuthnIdentity = EmptyAuthnIdentity | UserCertAuthnIdentity | MemberCertAuthnIdentity | JwtAuthnIdentity | MemberCOSESign1AuthnIdentity | UserCOSESign1AuthnIdentity | AllOfAuthnIdentity;
164
173
  /** See {@linkcode Response.body}. */
165
174
  export type ResponseBodyType<T> = string | ArrayBuffer | JsonCompatible<T>;
166
175
  /**
package/global.d.ts CHANGED
@@ -385,33 +385,33 @@ export interface CCFCrypto {
385
385
  /**
386
386
  * Converts an elliptic curve private key as JSON Web Key (JWK) object to PEM.
387
387
  *
388
- * @param pem Elliptic curve private key as JWK
388
+ * @param jwk Elliptic curve private key as JWK
389
389
  */
390
390
  jwkToPem(jwk: JsonWebKeyECPrivate): string;
391
391
  /**
392
392
  * Converts an RSA public key as JSON Web Key (JWK) object to PEM.
393
393
  *
394
- * @param pem RSA public key as JWK
394
+ * @param jwk RSA public key as JWK
395
395
  */
396
396
  pubRsaJwkToPem(jwk: JsonWebKeyRSAPublic): string;
397
397
  /**
398
398
  * Converts an RSA private key as JSON Web Key (JWK) object to PEM.
399
399
  *
400
- * @param pem RSA private key as JWK
400
+ * @param jwk RSA private key as JWK
401
401
  */
402
402
  rsaJwkToPem(jwk: JsonWebKeyRSAPrivate): string;
403
403
  /**
404
404
  * Converts an EdDSA public key as JSON Web Key (JWK) object to PEM.
405
405
  * Currently only Curve25519 is supported.
406
406
  *
407
- * @param pem EdDSA public key as JWK
407
+ * @param jwk EdDSA public key as JWK
408
408
  */
409
409
  pubEddsaJwkToPem(jwk: JsonWebKeyEdDSAPublic): string;
410
410
  /**
411
411
  * Converts an EdDSA private key as JSON Web Key (JWK) object to PEM.
412
412
  * Currently only Curve25519 is supported.
413
413
  *
414
- * @param pem EdDSA private key as JWK
414
+ * @param jwk EdDSA private key as JWK
415
415
  */
416
416
  eddsaJwkToPem(jwk: JsonWebKeyEdDSAPrivate): string;
417
417
  }
@@ -677,5 +677,13 @@ export interface SnpAttestationResult {
677
677
  }
678
678
  export declare const snp_attestation: SnpAttestation;
679
679
  export interface SnpAttestation {
680
+ /**
681
+ * Verify SNP Attestation
682
+ *
683
+ * @param evidence Raw SNP attestation evidence
684
+ * @param endorsements SNP attestation endorsements
685
+ * @param uvm_endorsements UVM endorsements, optional
686
+ * @param endorsed_tcb Endorsed TCB version, optional
687
+ */
680
688
  verifySnpAttestation(evidence: ArrayBuffer, endorsements: ArrayBuffer, uvm_endorsements?: ArrayBuffer, endorsed_tcb?: string): SnpAttestationResult;
681
689
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/ccf-app",
3
- "version": "5.0.0-dev14",
3
+ "version": "5.0.0-dev16",
4
4
  "description": "CCF app support package",
5
5
  "main": "index.js",
6
6
  "files": [