@credo-ts/openid4vc 0.6.0-pr-2100-20241124170219 → 0.6.0-pr-2094-20241125134525
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/build/openid4vc-holder/OpenId4VcHolderApi.d.ts +11 -12
- package/build/openid4vc-holder/OpenId4VcHolderApi.js +9 -15
- package/build/openid4vc-holder/OpenId4VcHolderApi.js.map +1 -1
- package/build/openid4vc-holder/OpenId4vcSiopHolderService.d.ts +170 -5
- package/build/openid4vc-holder/OpenId4vcSiopHolderService.js +89 -70
- package/build/openid4vc-holder/OpenId4vcSiopHolderService.js.map +1 -1
- package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.d.ts +26 -13
- package/build/openid4vc-issuer/OpenId4VcIssuerModule.js +2 -0
- package/build/openid4vc-issuer/OpenId4VcIssuerModule.js.map +1 -1
- package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.ts +7 -7
- package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js +10 -2
- package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js.map +1 -1
- package/build/openid4vc-issuer/OpenId4VcIssuerService.js +6 -14
- package/build/openid4vc-issuer/OpenId4VcIssuerService.js.map +1 -1
- package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.ts +2 -7
- package/build/openid4vc-issuer/router/federationEndpoint.d.ts +2 -0
- package/build/openid4vc-issuer/router/federationEndpoint.js +89 -0
- package/build/openid4vc-issuer/router/federationEndpoint.js.map +1 -0
- package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.d.ts +12 -3
- package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js +25 -28
- package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js.map +1 -1
- package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.d.ts +1 -12
- package/build/openid4vc-verifier/OpenId4VcVerifierModule.js +3 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierModule.js.map +1 -1
- package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.d.ts +26 -1
- package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.js +3 -0
- package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.js.map +1 -1
- package/build/openid4vc-verifier/router/federationEndpoint.d.ts +3 -0
- package/build/openid4vc-verifier/router/federationEndpoint.js +196 -0
- package/build/openid4vc-verifier/router/federationEndpoint.js.map +1 -0
- package/build/openid4vc-verifier/router/index.d.ts +1 -0
- package/build/openid4vc-verifier/router/index.js +3 -1
- package/build/openid4vc-verifier/router/index.js.map +1 -1
- package/build/shared/models/OpenId4VcJwtIssuer.d.ts +4 -1
- package/build/shared/transform.d.ts +3 -3
- package/build/shared/transform.js +32 -4
- package/build/shared/transform.js.map +1 -1
- package/build/shared/utils.d.ts +11 -3
- package/build/shared/utils.js +100 -8
- package/build/shared/utils.js.map +1 -1
- package/package.json +6 -4
package/build/shared/utils.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.getProofTypeFromKey = getProofTypeFromKey;
|
|
|
9
9
|
exports.addSecondsToDate = addSecondsToDate;
|
|
10
10
|
exports.dateToSeconds = dateToSeconds;
|
|
11
11
|
const core_1 = require("@credo-ts/core");
|
|
12
|
+
const core_2 = require("@openid-federation/core");
|
|
12
13
|
/**
|
|
13
14
|
* Returns the JWA Signature Algorithms that are supported by the wallet.
|
|
14
15
|
*
|
|
@@ -35,8 +36,10 @@ async function getKeyFromDid(agentContext, didUrl, allowedPurposes = ['authentic
|
|
|
35
36
|
const verificationMethod = didDocument.dereferenceKey(didUrl, allowedPurposes);
|
|
36
37
|
return (0, core_1.getKeyFromVerificationMethod)(verificationMethod);
|
|
37
38
|
}
|
|
38
|
-
function getVerifyJwtCallback(agentContext) {
|
|
39
|
+
function getVerifyJwtCallback(agentContext, options = {}) {
|
|
40
|
+
const logger = agentContext.config.logger;
|
|
39
41
|
return async (jwtVerifier, jwt) => {
|
|
42
|
+
var _a, _b, _c, _d;
|
|
40
43
|
const jwsService = agentContext.dependencyManager.resolve(core_1.JwsService);
|
|
41
44
|
if (jwtVerifier.method === 'did') {
|
|
42
45
|
const key = await getKeyFromDid(agentContext, jwtVerifier.didUrl);
|
|
@@ -44,17 +47,55 @@ function getVerifyJwtCallback(agentContext) {
|
|
|
44
47
|
const res = await jwsService.verifyJws(agentContext, { jws: jwt.raw, jwkResolver: () => jwk });
|
|
45
48
|
return res.isValid;
|
|
46
49
|
}
|
|
47
|
-
|
|
50
|
+
if (jwtVerifier.method === 'x5c' || jwtVerifier.method === 'jwk') {
|
|
48
51
|
const res = await jwsService.verifyJws(agentContext, { jws: jwt.raw });
|
|
49
52
|
return res.isValid;
|
|
50
53
|
}
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
if (jwtVerifier.method === 'openid-federation') {
|
|
55
|
+
const { entityId } = jwtVerifier;
|
|
56
|
+
const trustedEntityIds = (_a = options.federation) === null || _a === void 0 ? void 0 : _a.trustedEntityIds;
|
|
57
|
+
if (!trustedEntityIds) {
|
|
58
|
+
logger.error('No trusted entity ids provided but is required for the "openid-federation" method.');
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
const validTrustChains = await (0, core_2.resolveTrustChains)({
|
|
62
|
+
entityId,
|
|
63
|
+
trustAnchorEntityIds: trustedEntityIds,
|
|
64
|
+
verifyJwtCallback: async ({ jwt, jwk }) => {
|
|
65
|
+
const res = await jwsService.verifyJws(agentContext, {
|
|
66
|
+
jws: jwt,
|
|
67
|
+
jwkResolver: () => (0, core_1.getJwkFromJson)(jwk),
|
|
68
|
+
});
|
|
69
|
+
return res.isValid;
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
// When the chain is already invalid we can return false immediately
|
|
73
|
+
if (validTrustChains.length === 0) {
|
|
74
|
+
logger.error(`${entityId} is not part of a trusted federation.`);
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
// Pick the first valid trust chain for validation of the leaf entity jwks
|
|
78
|
+
const { leafEntityConfiguration } = validTrustChains[0];
|
|
79
|
+
// TODO: No support yet for signed jwks and external jwks
|
|
80
|
+
const rpSigningKeys = (_d = (_c = (_b = leafEntityConfiguration === null || leafEntityConfiguration === void 0 ? void 0 : leafEntityConfiguration.metadata) === null || _b === void 0 ? void 0 : _b.openid_relying_party) === null || _c === void 0 ? void 0 : _c.jwks) === null || _d === void 0 ? void 0 : _d.keys;
|
|
81
|
+
if (!rpSigningKeys || rpSigningKeys.length === 0)
|
|
82
|
+
throw new core_1.CredoError('No rp signing keys found in the entity configuration.');
|
|
83
|
+
const res = await jwsService.verifyJws(agentContext, {
|
|
84
|
+
jws: jwt.raw,
|
|
85
|
+
jwkResolver: () => (0, core_1.getJwkFromJson)(rpSigningKeys[0]),
|
|
86
|
+
});
|
|
87
|
+
if (!res.isValid) {
|
|
88
|
+
logger.error(`${entityId} does not match the expected signing key.`);
|
|
89
|
+
}
|
|
90
|
+
// TODO: There is no check yet for the policies
|
|
91
|
+
return res.isValid;
|
|
53
92
|
}
|
|
93
|
+
throw new Error(`Unsupported jwt verifier method: '${jwtVerifier.method}'`);
|
|
54
94
|
};
|
|
55
95
|
}
|
|
56
96
|
function getCreateJwtCallback(agentContext) {
|
|
57
97
|
return async (jwtIssuer, jwt) => {
|
|
98
|
+
var _a;
|
|
58
99
|
const jwsService = agentContext.dependencyManager.resolve(core_1.JwsService);
|
|
59
100
|
if (jwtIssuer.method === 'did') {
|
|
60
101
|
const key = await getKeyFromDid(agentContext, jwtIssuer.didUrl);
|
|
@@ -65,7 +106,7 @@ function getCreateJwtCallback(agentContext) {
|
|
|
65
106
|
});
|
|
66
107
|
return jws;
|
|
67
108
|
}
|
|
68
|
-
|
|
109
|
+
if (jwtIssuer.method === 'jwk') {
|
|
69
110
|
if (!jwtIssuer.jwk.kty) {
|
|
70
111
|
throw new core_1.CredoError('Missing required key type (kty) in the jwk.');
|
|
71
112
|
}
|
|
@@ -78,7 +119,7 @@ function getCreateJwtCallback(agentContext) {
|
|
|
78
119
|
});
|
|
79
120
|
return jws;
|
|
80
121
|
}
|
|
81
|
-
|
|
122
|
+
if (jwtIssuer.method === 'x5c') {
|
|
82
123
|
const leafCertificate = core_1.X509Service.getLeafCertificate(agentContext, { certificateChain: jwtIssuer.x5c });
|
|
83
124
|
const jws = await jwsService.createJwsCompact(agentContext, {
|
|
84
125
|
protectedHeaderOptions: Object.assign(Object.assign({}, jwt.header), { alg: jwtIssuer.alg, jwk: undefined }),
|
|
@@ -87,6 +128,47 @@ function getCreateJwtCallback(agentContext) {
|
|
|
87
128
|
});
|
|
88
129
|
return jws;
|
|
89
130
|
}
|
|
131
|
+
if (jwtIssuer.method === 'custom') {
|
|
132
|
+
// TODO: This could be used as the issuer and verifier. Based on that we need to search for a jwk in the entity configuration
|
|
133
|
+
const { options } = jwtIssuer;
|
|
134
|
+
if (!options)
|
|
135
|
+
throw new core_1.CredoError(`Custom jwtIssuer must have options defined.`);
|
|
136
|
+
if (!options.method)
|
|
137
|
+
throw new core_1.CredoError(`Custom jwtIssuer's options must have a 'method' property defined.`);
|
|
138
|
+
if (options.method !== 'openid-federation')
|
|
139
|
+
throw new core_1.CredoError(`Custom jwtIssuer's options 'method' property must be 'openid-federation' when using the 'custom' method.`);
|
|
140
|
+
if (!options.entityId)
|
|
141
|
+
throw new core_1.CredoError(`Custom jwtIssuer must have entityId defined.`);
|
|
142
|
+
if (typeof options.entityId !== 'string')
|
|
143
|
+
throw new core_1.CredoError(`Custom jwtIssuer's entityId must be a string.`);
|
|
144
|
+
const { entityId } = options;
|
|
145
|
+
const entityConfiguration = await (0, core_2.fetchEntityConfiguration)({
|
|
146
|
+
entityId,
|
|
147
|
+
verifyJwtCallback: async ({ jwt, jwk }) => {
|
|
148
|
+
const res = await jwsService.verifyJws(agentContext, { jws: jwt, jwkResolver: () => (0, core_1.getJwkFromJson)(jwk) });
|
|
149
|
+
return res.isValid;
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
// TODO: Not really sure if this is also used for the issuer so if so we need to change this logic. But currently it's not possible to specify a issuer method with issuance so I think it's fine.
|
|
153
|
+
// NOTE: Hardcoded part for the verifier
|
|
154
|
+
const openIdRelyingParty = (_a = entityConfiguration.metadata) === null || _a === void 0 ? void 0 : _a.openid_relying_party;
|
|
155
|
+
if (!openIdRelyingParty)
|
|
156
|
+
throw new core_1.CredoError('No openid-relying-party found in the entity configuration.');
|
|
157
|
+
// NOTE: No support for signed jwks and external jwks
|
|
158
|
+
const jwks = openIdRelyingParty.jwks;
|
|
159
|
+
if (!jwks)
|
|
160
|
+
throw new core_1.CredoError('No jwks found in the openid-relying-party.');
|
|
161
|
+
// TODO: Not 100% sure what key to pick here I think the one that matches the kid in the jwt header of the entity configuration or we should pass a alg and pick a jwk based on that?
|
|
162
|
+
const jwk = (0, core_1.getJwkFromJson)(jwks.keys[0]);
|
|
163
|
+
// TODO: This gives a weird error when the private key is not available in the wallet so we should handle that better
|
|
164
|
+
const jws = await jwsService.createJwsCompact(agentContext, {
|
|
165
|
+
protectedHeaderOptions: Object.assign(Object.assign({}, jwt.header), { jwk, alg: jwk.supportedSignatureAlgorithms[0] }),
|
|
166
|
+
payload: core_1.JwtPayload.fromJson(jwt.payload),
|
|
167
|
+
key: jwk.key,
|
|
168
|
+
});
|
|
169
|
+
return jws;
|
|
170
|
+
}
|
|
171
|
+
// @ts-expect-error - All methods are supported currently so there is no unsupported method anymore
|
|
90
172
|
throw new Error(`Unsupported jwt issuer method '${jwtIssuer.method}'`);
|
|
91
173
|
};
|
|
92
174
|
}
|
|
@@ -103,7 +185,7 @@ async function openIdTokenIssuerToJwtIssuer(agentContext, openId4VcTokenIssuer)
|
|
|
103
185
|
alg,
|
|
104
186
|
};
|
|
105
187
|
}
|
|
106
|
-
|
|
188
|
+
if (openId4VcTokenIssuer.method === 'x5c') {
|
|
107
189
|
const leafCertificate = core_1.X509Service.getLeafCertificate(agentContext, {
|
|
108
190
|
certificateChain: openId4VcTokenIssuer.x5c,
|
|
109
191
|
});
|
|
@@ -128,13 +210,23 @@ async function openIdTokenIssuerToJwtIssuer(agentContext, openId4VcTokenIssuer)
|
|
|
128
210
|
}
|
|
129
211
|
return Object.assign(Object.assign({}, openId4VcTokenIssuer), { alg });
|
|
130
212
|
}
|
|
131
|
-
|
|
213
|
+
if (openId4VcTokenIssuer.method === 'jwk') {
|
|
132
214
|
const alg = openId4VcTokenIssuer.jwk.supportedSignatureAlgorithms[0];
|
|
133
215
|
if (!alg) {
|
|
134
216
|
throw new core_1.CredoError(`No supported signature algorithms for key type: '${openId4VcTokenIssuer.jwk.keyType}'`);
|
|
135
217
|
}
|
|
136
218
|
return Object.assign(Object.assign({}, openId4VcTokenIssuer), { jwk: openId4VcTokenIssuer.jwk.toJson(), alg });
|
|
137
219
|
}
|
|
220
|
+
if (openId4VcTokenIssuer.method === 'openid-federation') {
|
|
221
|
+
// TODO: Not sure what we want here if we need to add a new type to the sphereon library or that we can do it with the custom issuer
|
|
222
|
+
return {
|
|
223
|
+
method: 'custom',
|
|
224
|
+
options: {
|
|
225
|
+
method: 'openid-federation',
|
|
226
|
+
entityId: openId4VcTokenIssuer.entityId,
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
}
|
|
138
230
|
throw new core_1.CredoError(`Unsupported jwt issuer method '${openId4VcTokenIssuer.method}'`);
|
|
139
231
|
}
|
|
140
232
|
function getProofTypeFromKey(agentContext, key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/shared/utils.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/shared/utils.ts"],"names":[],"mappings":";;AA4BA,gFAaC;AAED,sCAUC;AAQD,oDAsEC;AAED,oDA4FC;AAED,oEAoFC;AAED,kDASC;AAED,4CAEC;AAED,sCAEC;AArUD,yCAYuB;AACvB,kDAAsF;AAEtF;;;;;;;GAOG;AACH,SAAgB,kCAAkC,CAAC,YAA0B;IAC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sB,GAAG,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,6BAAsB,CAAC,CAAA;IAE7F,MAAM,wBAAwB,GAAG,sBAAsB,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACpF,IAAI,wBAAwB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,iBAAU,CAAC,qEAAqE,GAAG,CAAC,OAAO,IAAI,CAAC,CAAA;IAC5G,CAAC;IAED,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AAC9C,CAAC;AAED,SAAgB,gBAAgB,CAAC,IAAU,EAAE,OAAe;IAC1D,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,OAAO,GAAG,IAAI,CAAC,CAAA;AAClD,CAAC;AAED,SAAgB,aAAa,CAAC,IAAU;IACtC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAA;AAC1C,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@credo-ts/openid4vc",
|
|
3
3
|
"main": "build/index",
|
|
4
4
|
"types": "build/index",
|
|
5
|
-
"version": "0.6.0-pr-
|
|
5
|
+
"version": "0.6.0-pr-2094-20241125134525",
|
|
6
6
|
"files": [
|
|
7
7
|
"build"
|
|
8
8
|
],
|
|
@@ -17,14 +17,16 @@
|
|
|
17
17
|
"directory": "packages/openid4vc"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@sphereon/did-auth-siop": "
|
|
20
|
+
"@sphereon/did-auth-siop": "0.16.1-fix.173",
|
|
21
21
|
"@sphereon/oid4vc-common": "0.16.1-fix.173",
|
|
22
22
|
"@sphereon/ssi-types": "0.30.2-next.135",
|
|
23
|
+
"@openid-federation/core": "0.1.1-alpha.15",
|
|
23
24
|
"class-transformer": "^0.5.1",
|
|
24
25
|
"rxjs": "^7.8.0",
|
|
26
|
+
"zod": "^3.23.8",
|
|
25
27
|
"@animo-id/oid4vci": "0.1.4",
|
|
26
28
|
"@animo-id/oauth2": "0.1.4",
|
|
27
|
-
"@credo-ts/core": "0.6.0-pr-
|
|
29
|
+
"@credo-ts/core": "0.6.0-pr-2094-20241125134525"
|
|
28
30
|
},
|
|
29
31
|
"devDependencies": {
|
|
30
32
|
"@types/express": "^4.17.21",
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
"nock": "^14.0.0-beta.16",
|
|
33
35
|
"rimraf": "^4.4.0",
|
|
34
36
|
"typescript": "~5.5.2",
|
|
35
|
-
"@credo-ts/tenants": "0.6.0-pr-
|
|
37
|
+
"@credo-ts/tenants": "0.6.0-pr-2094-20241125134525"
|
|
36
38
|
},
|
|
37
39
|
"scripts": {
|
|
38
40
|
"build": "pnpm run clean && pnpm run compile",
|