@pagopa/io-react-native-wallet 1.1.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/lib/commonjs/credential/presentation/01-start-flow.js +7 -5
  2. package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
  3. package/lib/commonjs/credential/presentation/03-get-request-object.js +47 -0
  4. package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -0
  5. package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +82 -0
  6. package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +1 -0
  7. package/lib/commonjs/credential/presentation/05-verify-request-object.js +35 -0
  8. package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +1 -0
  9. package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +63 -0
  10. package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +1 -0
  11. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +169 -0
  12. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -0
  13. package/lib/commonjs/credential/presentation/08-send-authorization-response.js +202 -0
  14. package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +1 -0
  15. package/lib/commonjs/credential/presentation/README.md +43 -4
  16. package/lib/commonjs/credential/presentation/errors.js +52 -1
  17. package/lib/commonjs/credential/presentation/errors.js.map +1 -1
  18. package/lib/commonjs/credential/presentation/index.js +27 -6
  19. package/lib/commonjs/credential/presentation/index.js.map +1 -1
  20. package/lib/commonjs/credential/presentation/types.js +69 -4
  21. package/lib/commonjs/credential/presentation/types.js.map +1 -1
  22. package/lib/commonjs/entity/trust/types.js +4 -1
  23. package/lib/commonjs/entity/trust/types.js.map +1 -1
  24. package/lib/module/credential/presentation/01-start-flow.js +8 -6
  25. package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
  26. package/lib/module/credential/presentation/03-get-request-object.js +39 -0
  27. package/lib/module/credential/presentation/03-get-request-object.js.map +1 -0
  28. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +75 -0
  29. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +1 -0
  30. package/lib/module/credential/presentation/05-verify-request-object.js +28 -0
  31. package/lib/module/credential/presentation/05-verify-request-object.js.map +1 -0
  32. package/lib/module/credential/presentation/06-fetch-presentation-definition.js +56 -0
  33. package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +1 -0
  34. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +161 -0
  35. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -0
  36. package/lib/module/credential/presentation/08-send-authorization-response.js +188 -0
  37. package/lib/module/credential/presentation/08-send-authorization-response.js.map +1 -0
  38. package/lib/module/credential/presentation/README.md +43 -4
  39. package/lib/module/credential/presentation/errors.js +48 -0
  40. package/lib/module/credential/presentation/errors.js.map +1 -1
  41. package/lib/module/credential/presentation/index.js +7 -4
  42. package/lib/module/credential/presentation/index.js.map +1 -1
  43. package/lib/module/credential/presentation/types.js +67 -3
  44. package/lib/module/credential/presentation/types.js.map +1 -1
  45. package/lib/module/entity/trust/types.js +4 -1
  46. package/lib/module/entity/trust/types.js.map +1 -1
  47. package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
  48. package/lib/typescript/credential/presentation/{04-get-request-object.d.ts → 03-get-request-object.d.ts} +3 -5
  49. package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -0
  50. package/lib/typescript/credential/presentation/{03-retrieve-jwks.d.ts → 04-retrieve-rp-jwks.d.ts} +6 -5
  51. package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +1 -0
  52. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +8 -0
  53. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +1 -0
  54. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +26 -0
  55. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +1 -0
  56. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +27 -0
  57. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -0
  58. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +99 -0
  59. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +1 -0
  60. package/lib/typescript/credential/presentation/errors.d.ts +33 -0
  61. package/lib/typescript/credential/presentation/errors.d.ts.map +1 -1
  62. package/lib/typescript/credential/presentation/index.d.ts +8 -5
  63. package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
  64. package/lib/typescript/credential/presentation/types.d.ts +612 -9
  65. package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
  66. package/lib/typescript/entity/trust/index.d.ts +152 -0
  67. package/lib/typescript/entity/trust/index.d.ts.map +1 -1
  68. package/lib/typescript/entity/trust/types.d.ts +2088 -0
  69. package/lib/typescript/entity/trust/types.d.ts.map +1 -1
  70. package/package.json +5 -1
  71. package/src/credential/presentation/01-start-flow.ts +10 -6
  72. package/src/credential/presentation/{04-get-request-object.ts → 03-get-request-object.ts} +6 -51
  73. package/src/credential/presentation/04-retrieve-rp-jwks.ts +88 -0
  74. package/src/credential/presentation/05-verify-request-object.ts +35 -0
  75. package/src/credential/presentation/06-fetch-presentation-definition.ts +78 -0
  76. package/src/credential/presentation/07-evaluate-input-descriptor.ts +204 -0
  77. package/src/credential/presentation/08-send-authorization-response.ts +251 -0
  78. package/src/credential/presentation/README.md +43 -4
  79. package/src/credential/presentation/errors.ts +48 -0
  80. package/src/credential/presentation/index.ts +27 -9
  81. package/src/credential/presentation/types.ts +59 -3
  82. package/src/entity/trust/types.ts +3 -0
  83. package/lib/commonjs/credential/presentation/03-retrieve-jwks.js +0 -68
  84. package/lib/commonjs/credential/presentation/03-retrieve-jwks.js.map +0 -1
  85. package/lib/commonjs/credential/presentation/04-get-request-object.js +0 -82
  86. package/lib/commonjs/credential/presentation/04-get-request-object.js.map +0 -1
  87. package/lib/commonjs/credential/presentation/05-send-authorization-response.js +0 -139
  88. package/lib/commonjs/credential/presentation/05-send-authorization-response.js.map +0 -1
  89. package/lib/module/credential/presentation/03-retrieve-jwks.js +0 -61
  90. package/lib/module/credential/presentation/03-retrieve-jwks.js.map +0 -1
  91. package/lib/module/credential/presentation/04-get-request-object.js +0 -74
  92. package/lib/module/credential/presentation/04-get-request-object.js.map +0 -1
  93. package/lib/module/credential/presentation/05-send-authorization-response.js +0 -128
  94. package/lib/module/credential/presentation/05-send-authorization-response.js.map +0 -1
  95. package/lib/typescript/credential/presentation/03-retrieve-jwks.d.ts.map +0 -1
  96. package/lib/typescript/credential/presentation/04-get-request-object.d.ts.map +0 -1
  97. package/lib/typescript/credential/presentation/05-send-authorization-response.d.ts +0 -34
  98. package/lib/typescript/credential/presentation/05-send-authorization-response.d.ts.map +0 -1
  99. package/src/credential/presentation/03-retrieve-jwks.ts +0 -73
  100. package/src/credential/presentation/05-send-authorization-response.ts +0 -168
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/entity/trust/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,SAAS;;;;;;;;;EAAuD,CAAC;AAC9E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AA0ElD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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-native-wallet",
3
- "version": "1.1.2",
3
+ "version": "1.2.3",
4
4
  "description": "Provide data structures, helpers and API for IO Wallet",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -63,6 +63,7 @@
63
63
  "@types/react-native": "0.70.0",
64
64
  "del-cli": "^5.0.0",
65
65
  "eslint": "^8.4.1",
66
+ "eslint-config-prettier": "^10.0.1",
66
67
  "jest": "^28.1.1",
67
68
  "pod-install": "^0.1.0",
68
69
  "prettier": "^2.0.5",
@@ -107,11 +108,14 @@
107
108
  ]
108
109
  },
109
110
  "dependencies": {
111
+ "ajv": "^8.17.1",
110
112
  "js-base64": "^3.7.7",
111
113
  "js-sha256": "^0.9.0",
114
+ "jsonpath-plus": "^10.2.0",
112
115
  "parse-url": "^9.2.0",
113
116
  "react-native-url-polyfill": "^2.0.0",
114
117
  "react-native-uuid": "^2.0.1",
118
+ "yarn.lock": "^0.0.1-security",
115
119
  "zod": "^3.21.4"
116
120
  }
117
121
  }
@@ -1,6 +1,5 @@
1
1
  import * as z from "zod";
2
- import { decodeBase64 } from "@pagopa/io-react-native-jwt";
3
- import { AuthRequestDecodeError } from "./errors";
2
+ import { InvalidQRCodeError } from "./errors";
4
3
 
5
4
  const QRCodePayload = z.object({
6
5
  protocol: z.string(),
@@ -31,10 +30,15 @@ export type StartFlow<T extends Array<unknown> = []> = (...args: T) => {
31
30
  export const startFlowFromQR: StartFlow<[string]> = (qrcode) => {
32
31
  let decodedUrl: URL;
33
32
  try {
34
- const decoded = decodeBase64(qrcode);
35
- decodedUrl = new URL(decoded);
33
+ // splitting qrcode to identify which is link format
34
+ const originalQrCode = qrcode.split("://");
35
+ const replacedQrcode = originalQrCode[1]?.startsWith("?")
36
+ ? qrcode.replace(`${originalQrCode[0]}://`, "https://wallet.example/")
37
+ : qrcode;
38
+
39
+ decodedUrl = new URL(replacedQrcode);
36
40
  } catch (error) {
37
- throw new AuthRequestDecodeError("Failed to decode QR code: ", qrcode);
41
+ throw new InvalidQRCodeError(`Failed to decode QR code: ${qrcode}`);
38
42
  }
39
43
 
40
44
  const protocol = decodedUrl.protocol;
@@ -52,6 +56,6 @@ export const startFlowFromQR: StartFlow<[string]> = (qrcode) => {
52
56
  if (result.success) {
53
57
  return result.data;
54
58
  } else {
55
- throw new AuthRequestDecodeError(result.error.message, `${decodedUrl}`);
59
+ throw new InvalidQRCodeError(`${result.error.message}, ${decodedUrl}`);
56
60
  }
57
61
  };
@@ -1,17 +1,12 @@
1
1
  import uuid from "react-native-uuid";
2
2
  import {
3
- decode as decodeJwt,
4
3
  sha256ToBase64,
5
- verify,
6
4
  type CryptoContext,
7
5
  } from "@pagopa/io-react-native-jwt";
8
6
 
9
7
  import { createDPopToken } from "../../utils/dpop";
10
- import { NoSuitableKeysFoundInEntityConfiguration } from "./errors";
11
- import type { FetchJwks } from "./03-retrieve-jwks";
12
8
  import { hasStatusOrThrow, type Out } from "../../utils/misc";
13
9
  import type { StartFlow } from "./01-start-flow";
14
- import { RequestObject } from "./types";
15
10
 
16
11
  export type GetRequestObject = (
17
12
  requestUri: Out<StartFlow>["requestURI"],
@@ -19,9 +14,8 @@ export type GetRequestObject = (
19
14
  wiaCryptoContext: CryptoContext;
20
15
  appFetch?: GlobalFetch["fetch"];
21
16
  walletInstanceAttestation: string;
22
- },
23
- jwkKeys?: Out<FetchJwks>["keys"]
24
- ) => Promise<{ requestObject: RequestObject }>;
17
+ }
18
+ ) => Promise<{ requestObjectEncodedJwt: string }>;
25
19
 
26
20
  /**
27
21
  * Obtain the Request Object for RP authentication
@@ -36,8 +30,7 @@ export type GetRequestObject = (
36
30
  */
37
31
  export const getRequestObject: GetRequestObject = async (
38
32
  requestUri,
39
- { wiaCryptoContext, appFetch = fetch, walletInstanceAttestation },
40
- jwkKeys
33
+ { wiaCryptoContext, appFetch = fetch, walletInstanceAttestation }
41
34
  ) => {
42
35
  const signedWalletInstanceDPoP = await createDPopToken(
43
36
  {
@@ -49,7 +42,7 @@ export const getRequestObject: GetRequestObject = async (
49
42
  wiaCryptoContext
50
43
  );
51
44
 
52
- const responseEncodedJwt = await appFetch(requestUri, {
45
+ const requestObjectEncodedJwt = await appFetch(requestUri, {
53
46
  method: "GET",
54
47
  headers: {
55
48
  Authorization: `DPoP ${walletInstanceAttestation}`,
@@ -57,47 +50,9 @@ export const getRequestObject: GetRequestObject = async (
57
50
  },
58
51
  })
59
52
  .then(hasStatusOrThrow(200))
60
- .then((res) => res.json())
61
- .then((responseJson) => responseJson.response);
62
-
63
- const responseJwt = decodeJwt(responseEncodedJwt);
64
-
65
- await verifyTokenSignature(jwkKeys, responseJwt);
66
-
67
- // Ensure that the request object conforms to the expected specification.
68
- const requestObject = RequestObject.parse(responseJwt.payload);
53
+ .then((res) => res.text());
69
54
 
70
55
  return {
71
- requestObject,
56
+ requestObjectEncodedJwt,
72
57
  };
73
58
  };
74
-
75
- const verifyTokenSignature = async (
76
- jwkKeys?: Out<FetchJwks>["keys"],
77
- responseJwt?: any
78
- ): Promise<void> => {
79
- // verify token signature to ensure the request object is authentic
80
- // 1. according to entity configuration if present
81
- if (jwkKeys) {
82
- const pubKey = jwkKeys.find(
83
- ({ kid }) => kid === responseJwt.protectedHeader.kid
84
- );
85
- if (!pubKey) {
86
- throw new NoSuitableKeysFoundInEntityConfiguration(
87
- "Request Object signature verification"
88
- );
89
- }
90
- await verify(responseJwt, pubKey);
91
- return;
92
- }
93
-
94
- // 2. If jwk is not retrieved from entity config, check if the token contains the 'jwk' attribute
95
- if (responseJwt.protectedHeader?.jwk) {
96
- const pubKey = responseJwt.protectedHeader.jwk;
97
- await verify(responseJwt, pubKey);
98
- return;
99
- }
100
-
101
- // No verification condition matched: skipping signature verification for now.
102
- // TODO: [EUDIW-215] Remove skipping signature verification
103
- };
@@ -0,0 +1,88 @@
1
+ import { JWKS, JWK } from "../../utils/jwk";
2
+ import { hasStatusOrThrow } from "../../utils/misc";
3
+ import { RelyingPartyEntityConfiguration } from "../../entity/trust/types";
4
+ import { decode as decodeJwt } from "@pagopa/io-react-native-jwt";
5
+ import { NoSuitableKeysFoundInEntityConfiguration } from "./errors";
6
+
7
+ /**
8
+ * Defines the signature for a function that retrieves JSON Web Key Sets (JWKS) from a client.
9
+ *
10
+ * @template T - The tuple type representing the function arguments.
11
+ * @param args - The arguments passed to the function.
12
+ * @returns A promise resolving to an object containing an array of JWKs.
13
+ */
14
+ export type FetchJwks<T extends Array<unknown> = []> = (...args: T) => Promise<{
15
+ keys: JWK[];
16
+ }>;
17
+
18
+ /**
19
+ * Retrieves the JSON Web Key Set (JWKS) from the specified client's well-known endpoint.
20
+ * It is formed using `{issUrl.base}/.well-known/jar-issuer${issUrl.pah}` as explained in SD-JWT VC issuer metadata section
21
+ *
22
+ * @param requestObjectEncodedJwt - Request Object in JWT format.
23
+ * @param options - Optional context containing a custom fetch implementation.
24
+ * @param options.context - Optional context object.
25
+ * @param options.context.appFetch - Optional custom fetch function to use instead of the global `fetch`.
26
+ * @returns A promise resolving to an object containing an array of JWKs.
27
+ * @throws Will throw an error if the JWKS retrieval fails.
28
+ */
29
+ export const fetchJwksFromRequestObject: FetchJwks<
30
+ [string, { context?: { appFetch?: GlobalFetch["fetch"] } }?]
31
+ > = async (requestObjectEncodedJwt, { context = {} } = {}) => {
32
+ const { appFetch = fetch } = context;
33
+ const requestObjectJwt = decodeJwt(requestObjectEncodedJwt);
34
+
35
+ // 1. check if request object jwt contains the 'jwk' attribute
36
+ if (requestObjectJwt.protectedHeader?.jwk) {
37
+ return {
38
+ keys: [JWK.parse(requestObjectJwt.protectedHeader.jwk)],
39
+ };
40
+ }
41
+
42
+ // 2. According to Potential profile, retrieve from RP endpoint using iss claim
43
+ const issClaimValue = requestObjectJwt.payload?.iss as string;
44
+ if (issClaimValue) {
45
+ const issUrl = new URL(issClaimValue);
46
+ const wellKnownUrl = new URL(
47
+ `/.well-known/jar-issuer${issUrl.pathname}`,
48
+ `${issUrl.protocol}//${issUrl.host}`
49
+ ).toString();
50
+
51
+ // Fetches the JWKS from a specific endpoint of the entity's well-known configuration
52
+ const jwks = await appFetch(wellKnownUrl, {
53
+ method: "GET",
54
+ })
55
+ .then(hasStatusOrThrow(200))
56
+ .then((raw) => raw.json())
57
+ .then((json) => JWKS.parse(json.jwks));
58
+
59
+ return {
60
+ keys: jwks.keys,
61
+ };
62
+ }
63
+
64
+ throw new NoSuitableKeysFoundInEntityConfiguration(
65
+ "Request Object signature verification"
66
+ );
67
+ };
68
+
69
+ /**
70
+ * Retrieves the JSON Web Key Set (JWKS) from a Relying Party's entity configuration.
71
+ *
72
+ * @param rpConfig - The configuration object of the Relying Party entity.
73
+ * @returns An object containing an array of JWKs.
74
+ * @throws Will throw an error if the configuration is invalid or if JWKS is not found.
75
+ */
76
+ export const fetchJwksFromConfig: FetchJwks<
77
+ [RelyingPartyEntityConfiguration["payload"]["metadata"]]
78
+ > = async (rpConfig) => {
79
+ const jwks = rpConfig.wallet_relying_party.jwks;
80
+
81
+ if (!jwks || !Array.isArray(jwks.keys)) {
82
+ throw new Error("JWKS not found in Relying Party configuration.");
83
+ }
84
+
85
+ return {
86
+ keys: jwks.keys,
87
+ };
88
+ };
@@ -0,0 +1,35 @@
1
+ import { UnverifiedEntityError } from "./errors";
2
+
3
+ import { decode as decodeJwt, verify } from "@pagopa/io-react-native-jwt";
4
+ import { RequestObject } from "./types";
5
+ import type { FetchJwks } from "./04-retrieve-rp-jwks";
6
+ import { type Out } from "../../utils/misc";
7
+
8
+ export type VerifyRequestObjectSignature = (
9
+ requestObjectEncodedJwt: string,
10
+ jwkKeys?: Out<FetchJwks>["keys"]
11
+ ) => Promise<{ requestObject: RequestObject }>;
12
+
13
+ export const verifyRequestObjectSignature: VerifyRequestObjectSignature =
14
+ async (requestObjectEncodedJwt, jwkKeys) => {
15
+ const requestObjectJwt = decodeJwt(requestObjectEncodedJwt);
16
+
17
+ // verify token signature to ensure the request object is authentic
18
+ const pubKey = jwkKeys?.find(
19
+ ({ kid }) => kid === requestObjectJwt.protectedHeader.kid
20
+ );
21
+
22
+ if (!pubKey) {
23
+ throw new UnverifiedEntityError("Request Object signature verification!");
24
+ }
25
+ await verify(requestObjectEncodedJwt, pubKey);
26
+
27
+ const requestObject = RequestObject.parse(requestObjectJwt.payload);
28
+ // Check if exp exists and is expired
29
+ // exp is typically in seconds since epoch, Get current time in seconds
30
+ if (requestObject.exp && requestObject.exp <= Date.now() / 1000) {
31
+ throw new UnverifiedEntityError("Request Object is expired!");
32
+ }
33
+
34
+ return { requestObject };
35
+ };
@@ -0,0 +1,78 @@
1
+ import { PresentationDefinition, RequestObject } from "./types";
2
+ import { RelyingPartyEntityConfiguration } from "../../entity/trust/types";
3
+ import { hasStatusOrThrow } from "../../utils/misc";
4
+
5
+ export type FetchPresentationDefinition = (
6
+ requestObject: RequestObject,
7
+ context?: {
8
+ appFetch?: GlobalFetch["fetch"];
9
+ },
10
+ rpConf?: RelyingPartyEntityConfiguration["payload"]["metadata"]
11
+ ) => Promise<{
12
+ presentationDefinition: PresentationDefinition;
13
+ }>;
14
+
15
+ /**
16
+ * Retrieves a PresentationDefinition based on the given parameters.
17
+ *
18
+ * The method attempts the following strategies in order:
19
+ * 1. Checks if `presentation_definition` is directly available in the request object.
20
+ * 2. Fetches the `presentation_definition` from the URI provided in the relying party configuration.
21
+ * 3. Uses a pre-configured `presentation_definition` from the relying party configuration if the `scope` is present in the request object.
22
+ *
23
+ * If none of the above conditions are met, the function throws an error indicating the definition could not be found.
24
+ *
25
+ * @param {RequestObject} requestObject - The request object containing the presentation definition or references to it.
26
+ * @param {RelyingPartyEntityConfiguration["payload"]["metadata"]} [rpConf] - Optional relying party configuration.
27
+ * @param {Object} [context] - Optional context for providing a custom fetch implementation.
28
+ * @param {GlobalFetch["fetch"]} [context.appFetch] - Custom fetch function, defaults to global `fetch`.
29
+ * @returns {Promise<{ presentationDefinition: PresentationDefinition }>} - Resolves with the presentation definition.
30
+ * @throws {Error} - Throws if the presentation definition cannot be found or fetched.
31
+ */
32
+ export const fetchPresentDefinition: FetchPresentationDefinition = async (
33
+ requestObject,
34
+ { appFetch = fetch } = {},
35
+ rpConf
36
+ ) => {
37
+ // Check if `presentation_definition` is directly available in the request object
38
+ if (requestObject.presentation_definition) {
39
+ return {
40
+ presentationDefinition: requestObject.presentation_definition,
41
+ };
42
+ }
43
+
44
+ // Check if `presentation_definition_uri` is provided in the relying party configuration
45
+ if (rpConf?.wallet_relying_party?.presentation_definition_uri) {
46
+ try {
47
+ // Fetch the presentation definition from the provided URI
48
+ const presentationDefinition = await appFetch(
49
+ rpConf?.wallet_relying_party.presentation_definition_uri,
50
+ {
51
+ method: "GET",
52
+ }
53
+ )
54
+ .then(hasStatusOrThrow(200))
55
+ .then((raw) => raw.json())
56
+ .then((json) => PresentationDefinition.parse(json));
57
+
58
+ return {
59
+ presentationDefinition,
60
+ };
61
+ } catch (error) {
62
+ throw new Error(`Failed to fetch presentation definition: ${error}`);
63
+ }
64
+ }
65
+
66
+ // Check if `scope` is present in the request object and a pre-configured presentation definition exists
67
+ if (
68
+ requestObject.scope &&
69
+ rpConf?.wallet_relying_party?.presentation_definition
70
+ ) {
71
+ return {
72
+ presentationDefinition:
73
+ rpConf.wallet_relying_party.presentation_definition,
74
+ };
75
+ }
76
+
77
+ throw new Error("Presentation definition not found");
78
+ };
@@ -0,0 +1,204 @@
1
+ import { InputDescriptor } from "./types";
2
+ import { SdJwt4VC, type DisclosureWithEncoded } from "../../sd-jwt/types";
3
+ import { JSONPath } from "jsonpath-plus";
4
+ import { MissingDataError } from "./errors";
5
+ import Ajv from "ajv";
6
+ const ajv = new Ajv({ allErrors: true });
7
+ const INDEX_CLAIM_NAME = 1;
8
+
9
+ export type EvaluatedDisclosures = {
10
+ requiredDisclosures: DisclosureWithEncoded[];
11
+ optionalDisclosures: DisclosureWithEncoded[];
12
+ };
13
+
14
+ export type EvaluateInputDescriptorSdJwt4VC = (
15
+ inputDescriptor: InputDescriptor,
16
+ payloadCredential: SdJwt4VC["payload"],
17
+ disclosures: DisclosureWithEncoded[]
18
+ ) => EvaluatedDisclosures;
19
+
20
+ /**
21
+ * Transforms an array of DisclosureWithEncoded objects into a key-value map.
22
+ * @param disclosures - An array of DisclosureWithEncoded, each containing a decoded property with [?, claimName, claimValue].
23
+ * @returns An object mapping claim names to their corresponding values.
24
+ */
25
+ const mapDisclosuresToObject = (
26
+ disclosures: DisclosureWithEncoded[]
27
+ ): Record<string, unknown> => {
28
+ return disclosures.reduce((obj, { decoded }) => {
29
+ const [, claimName, claimValue] = decoded;
30
+ obj[claimName] = claimValue;
31
+ return obj;
32
+ }, {} as Record<string, unknown>);
33
+ };
34
+
35
+ /**
36
+ * Finds a claim within the payload based on provided JSONPath expressions.
37
+ * @param paths - An array of JSONPath expressions to search for in the payload.
38
+ * @param payload - The object to search within using JSONPath.
39
+ * @returns A tuple with the first matched JSONPath and its corresponding value, or [undefined, undefined] if not found.
40
+ */
41
+ const findMatchedClaim = (
42
+ paths: string[],
43
+ payload: any
44
+ ): [string?, string?] => {
45
+ let matchedPath;
46
+ let matchedValue;
47
+ paths.some((singlePath) => {
48
+ try {
49
+ const result = JSONPath({ path: singlePath, json: payload });
50
+ if (result.length > 0) {
51
+ matchedPath = singlePath;
52
+ matchedValue = result[0];
53
+ return true;
54
+ }
55
+ } catch (error) {
56
+ throw new MissingDataError(
57
+ `JSONPath for "${singlePath}" does not match the provided payload.`
58
+ );
59
+ }
60
+ return false;
61
+ });
62
+
63
+ return [matchedPath, matchedValue];
64
+ };
65
+
66
+ /**
67
+ * Extracts the claim name from a path that can be in one of the following formats:
68
+ * 1. $.propertyName
69
+ * 2. $["propertyName"] or $['propertyName']
70
+ *
71
+ * @param path - The path string containing the claim reference.
72
+ * @returns The extracted claim name if matched; otherwise, throws an exception.
73
+ */
74
+ const extractClaimName = (path: string): string | undefined => {
75
+ // Define a regular expression that matches both formats:
76
+ // 1. $.propertyName
77
+ // 2. $["propertyName"] or $['propertyName']
78
+ const regex = /^\$\.(\w+)$|^\$\[(?:'|")(\w+)(?:'|")\]$/;
79
+
80
+ const match = path.match(regex);
81
+ if (match) {
82
+ // match[1] corresponds to the first capture group (\w+) after $.
83
+ // match[2] corresponds to the second capture group (\w+) inside [""] or ['']
84
+ return match[1] || match[2];
85
+ }
86
+
87
+ // If the input doesn't match any of the expected formats, return null
88
+
89
+ throw new Error(
90
+ `Invalid input format: "${path}". Expected formats are "$.propertyName", "$['propertyName']", or '$["propertyName"]'.`
91
+ );
92
+ };
93
+
94
+ /**
95
+ * Evaluates an InputDescriptor for an SD-JWT-based verifiable credential.
96
+ *
97
+ * - Checks each field in the InputDescriptor against the provided `payloadCredential`
98
+ * and `disclosures` (selectively disclosed claims).
99
+ * - Validates whether required fields are present (unless marked optional)
100
+ * and match any specified JSONPath.
101
+ * - If a field includes a JSON Schema filter, validates the claim value against that schema.
102
+ * - Enforces `limit_disclosure` rules by returning only disclosures matching the specified fields
103
+ * if set to "required". Otherwise return the array of all disclosures.
104
+ * - Throws an error if a required field is invalid or missing.
105
+ *
106
+ * @param inputDescriptor - Describes constraints (fields, filters, etc.) that must be satisfied.
107
+ * @param payloadCredential - The credential payload to check against.
108
+ * @param disclosures - An array of DisclosureWithEncoded objects representing selective disclosures.
109
+ * @returns A filtered list of disclosures satisfying the descriptor constraints, or throws an error if not.
110
+ * @throws Will throw an error if any required constraint fails or if JSONPath lookups are invalid.
111
+ */
112
+ export const evaluateInputDescriptorForSdJwt4VC: EvaluateInputDescriptorSdJwt4VC =
113
+ (inputDescriptor, payloadCredential, disclosures) => {
114
+ if (!inputDescriptor?.constraints?.fields) {
115
+ // No validation, all field are optional
116
+ return {
117
+ requiredDisclosures: [],
118
+ optionalDisclosures: disclosures,
119
+ };
120
+ }
121
+ const requiredClaimNames: string[] = [];
122
+ const optionalClaimNames: string[] = [];
123
+
124
+ // Transform disclosures to find claim using JSONPath
125
+ const disclosuresAsPayload = mapDisclosuresToObject(disclosures);
126
+
127
+ // For each field, we need at least one matching path
128
+ // If we succeed, we push the matched disclosure in matchedDisclosures and stop checking further paths
129
+ const allFieldsValid = inputDescriptor.constraints.fields.every((field) => {
130
+ // For Potential profile, selectively disclosed claims will always be built as an individual object property, by using a name-value pair.
131
+ // Hence that selective claim for array element and recursive disclosures are not supported by Potential for the first iteration of Piloting.
132
+ // We need to check inside disclosures or inside credential payload. Example path: "$.given_name"
133
+ let [matchedPath, matchedValue] = findMatchedClaim(
134
+ field.path,
135
+ disclosuresAsPayload
136
+ );
137
+
138
+ if (!matchedPath) {
139
+ [matchedPath, matchedValue] = findMatchedClaim(
140
+ field.path,
141
+ payloadCredential
142
+ );
143
+
144
+ if (!matchedPath) {
145
+ // Path could be optional, in this case no need to validate! continue to next field
146
+ return field?.optional;
147
+ }
148
+ } else {
149
+ // if match a disclouse we save which is required or optional
150
+ const claimName = extractClaimName(matchedPath);
151
+ if (claimName) {
152
+ (field?.optional ? optionalClaimNames : requiredClaimNames).push(
153
+ claimName
154
+ );
155
+ }
156
+ }
157
+
158
+ // FILTER validation
159
+ // If this field has a "filter" (JSON Schema), validate the claimValue
160
+ if (field.filter) {
161
+ try {
162
+ const validateSchema = ajv.compile(field.filter);
163
+ if (!validateSchema(matchedValue)) {
164
+ throw new MissingDataError(
165
+ `Claim value "${matchedValue}" for path "${matchedPath}" does not match the provided JSON Schema.`
166
+ );
167
+ }
168
+ } catch (error) {
169
+ return false;
170
+ }
171
+ }
172
+ // Submission Requirements validation
173
+ // TODO: [EUDIW-216] Read rule value if “all” o “pick” and validate
174
+
175
+ return true;
176
+ });
177
+
178
+ if (!allFieldsValid) {
179
+ throw new MissingDataError(
180
+ "Credential validation failed: Required fields are missing or do not match the input descriptor."
181
+ );
182
+ }
183
+
184
+ // Categorizes disclosures into required and optional based on claim names and disclosure constraints.
185
+ const isNotLimitDisclosure = !(
186
+ inputDescriptor.constraints.limit_disclosure === "required"
187
+ );
188
+
189
+ const requiredDisclosures = disclosures.filter((disclosure) =>
190
+ requiredClaimNames.includes(disclosure.decoded[INDEX_CLAIM_NAME])
191
+ );
192
+
193
+ const optionalDisclosures = disclosures.filter(
194
+ (disclosure) =>
195
+ optionalClaimNames.includes(disclosure.decoded[INDEX_CLAIM_NAME]) ||
196
+ (isNotLimitDisclosure &&
197
+ !requiredClaimNames.includes(disclosure.decoded[INDEX_CLAIM_NAME]))
198
+ );
199
+
200
+ return {
201
+ requiredDisclosures,
202
+ optionalDisclosures,
203
+ };
204
+ };