diff --git a/packages/oid4vci-holder/package.json b/packages/oid4vci-holder/package.json index 5ed8490e2..2fff5d149 100644 --- a/packages/oid4vci-holder/package.json +++ b/packages/oid4vci-holder/package.json @@ -17,10 +17,10 @@ "@sphereon/kmp-mdl-mdoc": "0.2.0-SNAPSHOT.22", "@sphereon/oid4vci-client": "0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161", "@sphereon/oid4vci-common": "0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161", - "@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.130", - "@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.130", - "@sphereon/ssi-sdk-ext.jwt-service": "0.24.1-unstable.130", - "@sphereon/ssi-sdk-ext.key-utils": "0.24.1-unstable.130", + "@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.137", + "@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.137", + "@sphereon/ssi-sdk-ext.jwt-service": "0.24.1-unstable.137", + "@sphereon/ssi-sdk-ext.key-utils": "0.24.1-unstable.137", "@sphereon/ssi-sdk.contact-manager": "workspace:*", "@sphereon/ssi-sdk.core": "workspace:*", "@sphereon/ssi-sdk.credential-store": "workspace:*", diff --git a/packages/oid4vci-issuer-store/package.json b/packages/oid4vci-issuer-store/package.json index cf23914d7..5e63756c3 100644 --- a/packages/oid4vci-issuer-store/package.json +++ b/packages/oid4vci-issuer-store/package.json @@ -15,8 +15,8 @@ }, "dependencies": { "@sphereon/oid4vci-common": "0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161", - "@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.130", - "@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.130", + "@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.137", + "@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.137", "@sphereon/ssi-sdk.kv-store-temp": "workspace:*", "@veramo/core": "4.2.0", "@veramo/credential-w3c": "4.2.0", diff --git a/packages/oid4vci-issuer/package.json b/packages/oid4vci-issuer/package.json index 5fdd52da8..98a4f8081 100644 --- a/packages/oid4vci-issuer/package.json +++ b/packages/oid4vci-issuer/package.json @@ -16,8 +16,8 @@ "dependencies": { "@sphereon/oid4vci-common": "0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161", "@sphereon/oid4vci-issuer": "0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161", - "@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.130", - "@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.130", + "@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.137", + "@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.137", "@sphereon/ssi-sdk.agent-config": "workspace:*", "@sphereon/ssi-sdk.core": "workspace:*", "@sphereon/ssi-sdk.kv-store-temp": "workspace:*", diff --git a/packages/public-key-hosting/src/api-functions.ts b/packages/public-key-hosting/src/api-functions.ts index 6f0379a19..d809dcbdf 100644 --- a/packages/public-key-hosting/src/api-functions.ts +++ b/packages/public-key-hosting/src/api-functions.ts @@ -1,4 +1,6 @@ import { checkAuth, ISingleEndpointOpts, sendErrorResponse } from '@sphereon/ssi-express-support' +import { ISphereonKeyManager } from '@sphereon/ssi-sdk-ext.key-manager' +import { contextHasPlugin } from '@sphereon/ssi-sdk.agent-config' import { Request, Response, Router } from 'express' import { JKWS_HOSTING_ALL_KEYS_PATH, JWKS_HOSTING_DID_KEYS_PATH } from './environment' import { toJWKS } from './functions' @@ -15,8 +17,16 @@ export function getAllJWKSEndpoint(router: Router, context: IRequiredContext, op logger.info(`All JWKS endpoint enabled, path ${path}`) router.get(path, checkAuth(opts?.endpoint), async (request: Request, response: Response) => { try { + if (!contextHasPlugin(context, 'keyManagerListKeys')) { + return sendErrorResponse( + response, + 500, + 'Key manager plugin that can list keys is not found. Please enable the Sphereon Key Manager plugin if you want to use this endpoint', + ) + } response.statusCode = 202 - return response.send({}) + const keys = await context.agent.keyManagerListKeys() + return response.send(toJWKS({ keys })) } catch (e) { return sendErrorResponse(response, 500, e.message as string, e) } diff --git a/packages/public-key-hosting/src/environment.ts b/packages/public-key-hosting/src/environment.ts index 2e7d08674..4576ece9d 100644 --- a/packages/public-key-hosting/src/environment.ts +++ b/packages/public-key-hosting/src/environment.ts @@ -1,2 +1,2 @@ export const JKWS_HOSTING_ALL_KEYS_PATH = process.env.JWKS_HOSTING_BASE_PATH ?? '/.well-known/jwks.json' -export const JWKS_HOSTING_DID_KEYS_PATH = process.env.JWKS_HOSTING_BASE_PATH ?? '/.well-known/jwks/dids/:did' +export const JWKS_HOSTING_DID_KEYS_PATH = process.env.JWKS_HOSTING_DID_PATH ?? '/.well-known/jwks/dids/:did' diff --git a/packages/siopv2-oid4vp-rp-auth/package.json b/packages/siopv2-oid4vp-rp-auth/package.json index abc49c8d7..9f186a30b 100644 --- a/packages/siopv2-oid4vp-rp-auth/package.json +++ b/packages/siopv2-oid4vp-rp-auth/package.json @@ -18,9 +18,9 @@ "@sphereon/did-auth-siop-adapter": "0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161", "@sphereon/oid4vc-common": "0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161", "@sphereon/pex": "5.0.0-unstable.9", - "@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.130", - "@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.130", - "@sphereon/ssi-sdk-ext.jwt-service": "0.24.1-unstable.130", + "@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.137", + "@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.137", + "@sphereon/ssi-sdk-ext.jwt-service": "0.24.1-unstable.137", "@sphereon/ssi-sdk.core": "workspace:*", "@sphereon/ssi-sdk.kv-store-temp": "workspace:*", "@sphereon/ssi-sdk.mdl-mdoc": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7814cdd71..0ba468163 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1043,17 +1043,17 @@ importers: specifier: 0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161 version: 0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161 '@sphereon/ssi-sdk-ext.did-utils': - specifier: 0.24.1-unstable.130 - version: 0.24.1-unstable.130(pg@8.12.0)(sqlite3@5.1.7)(ts-node@10.9.2) + specifier: 0.24.1-unstable.137 + version: 0.24.1-unstable.137(ts-node@10.9.2) '@sphereon/ssi-sdk-ext.identifier-resolution': - specifier: 0.24.1-unstable.130 - version: 0.24.1-unstable.130(pg@8.12.0)(sqlite3@5.1.7)(ts-node@10.9.2) + specifier: 0.24.1-unstable.137 + version: 0.24.1-unstable.137(ts-node@10.9.2) '@sphereon/ssi-sdk-ext.jwt-service': - specifier: 0.24.1-unstable.130 - version: 0.24.1-unstable.130(ts-node@10.9.2) + specifier: 0.24.1-unstable.137 + version: 0.24.1-unstable.137(ts-node@10.9.2) '@sphereon/ssi-sdk-ext.key-utils': - specifier: 0.24.1-unstable.130 - version: 0.24.1-unstable.130 + specifier: 0.24.1-unstable.137 + version: 0.24.1-unstable.137 '@sphereon/ssi-sdk.contact-manager': specifier: workspace:* version: link:../contact-manager @@ -1140,11 +1140,11 @@ importers: specifier: 0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161 version: 0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161(awesome-qr@2.1.5-rc.0) '@sphereon/ssi-sdk-ext.did-utils': - specifier: 0.24.1-unstable.130 - version: 0.24.1-unstable.130(pg@8.12.0)(sqlite3@5.1.7)(ts-node@10.9.2) + specifier: 0.24.1-unstable.137 + version: 0.24.1-unstable.137(ts-node@10.9.2) '@sphereon/ssi-sdk-ext.identifier-resolution': - specifier: 0.24.1-unstable.130 - version: 0.24.1-unstable.130(pg@8.12.0)(sqlite3@5.1.7)(ts-node@10.9.2) + specifier: 0.24.1-unstable.137 + version: 0.24.1-unstable.137(ts-node@10.9.2) '@sphereon/ssi-sdk.agent-config': specifier: workspace:* version: link:../agent-config @@ -1416,11 +1416,11 @@ importers: specifier: 0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161 version: 0.16.1-feature.sdk.38.rfc8414.auth.server.metadata.161 '@sphereon/ssi-sdk-ext.did-utils': - specifier: 0.24.1-unstable.130 - version: 0.24.1-unstable.130(pg@8.12.0)(sqlite3@5.1.7)(ts-node@10.9.2) + specifier: 0.24.1-unstable.137 + version: 0.24.1-unstable.137(ts-node@10.9.2) '@sphereon/ssi-sdk-ext.identifier-resolution': - specifier: 0.24.1-unstable.130 - version: 0.24.1-unstable.130(pg@8.12.0)(sqlite3@5.1.7)(ts-node@10.9.2) + specifier: 0.24.1-unstable.137 + version: 0.24.1-unstable.137(ts-node@10.9.2) '@sphereon/ssi-sdk.kv-store-temp': specifier: workspace:* version: link:../kv-store @@ -2164,14 +2164,14 @@ importers: specifier: 5.0.0-unstable.9 version: 5.0.0-unstable.9 '@sphereon/ssi-sdk-ext.did-utils': - specifier: 0.24.1-unstable.130 - version: 0.24.1-unstable.130(pg@8.12.0)(sqlite3@5.1.7)(ts-node@10.9.2) + specifier: 0.24.1-unstable.137 + version: 0.24.1-unstable.137(ts-node@10.9.2) '@sphereon/ssi-sdk-ext.identifier-resolution': - specifier: 0.24.1-unstable.130 - version: 0.24.1-unstable.130(pg@8.12.0)(sqlite3@5.1.7)(ts-node@10.9.2) + specifier: 0.24.1-unstable.137 + version: 0.24.1-unstable.137(ts-node@10.9.2) '@sphereon/ssi-sdk-ext.jwt-service': - specifier: 0.24.1-unstable.130 - version: 0.24.1-unstable.130(ts-node@10.9.2) + specifier: 0.24.1-unstable.137 + version: 0.24.1-unstable.137(ts-node@10.9.2) '@sphereon/ssi-sdk.core': specifier: workspace:* version: link:../ssi-sdk-core @@ -9403,6 +9403,46 @@ packages: - ts-node - typeorm-aurora-data-api-driver + /@sphereon/ssi-sdk-ext.did-utils@0.24.1-unstable.137(ts-node@10.9.2): + resolution: {integrity: sha512-IYE1uWbxhzm5Sbhn5iubqqxeB6vwCFQRSqD5IPsDwUgYvn7dIb6haG/h0LZv6j4pxZ39O4BnYy7c5L1bOOQXGQ==} + dependencies: + '@ethersproject/networks': 5.7.1 + '@ethersproject/transactions': 5.7.0 + '@sphereon/did-uni-client': 0.6.3 + '@sphereon/ssi-sdk-ext.key-utils': 0.24.1-unstable.137 + '@sphereon/ssi-sdk-ext.x509-utils': 0.24.1-unstable.137 + '@sphereon/ssi-sdk.agent-config': 0.30.1(ts-node@10.9.2) + '@sphereon/ssi-sdk.core': link:packages/ssi-sdk-core + '@sphereon/ssi-types': link:packages/ssi-types + '@stablelib/ed25519': 1.0.3 + '@veramo/core': 4.2.0(patch_hash=c5oempznsz4br5w3tcuk2i2mau) + '@veramo/utils': 4.2.0 + did-jwt: 6.11.6(patch_hash=afqywxnnjnsy6hwgax66dyyiey) + did-resolver: 4.1.0 + elliptic: 6.5.4 + uint8arrays: 3.1.1 + transitivePeerDependencies: + - '@google-cloud/spanner' + - '@sap/hana-client' + - better-sqlite3 + - encoding + - hdb-pool + - ioredis + - mongodb + - mssql + - mysql2 + - oracledb + - pg + - pg-native + - pg-query-stream + - redis + - sql.js + - sqlite3 + - supports-color + - ts-node + - typeorm-aurora-data-api-driver + dev: false + /@sphereon/ssi-sdk-ext.identifier-resolution@0.24.1-next.96(ts-node@10.9.2): resolution: {integrity: sha512-24Uc2ZiLp+vLlNuWD+pbjueaXC031mq6mfpUnn6HxShL5/epausBtZ7qSQyxJW0tHJ6ytB33JpB6tQXQ/ts1TA==} dependencies: @@ -9472,6 +9512,41 @@ packages: - ts-node - typeorm-aurora-data-api-driver + /@sphereon/ssi-sdk-ext.identifier-resolution@0.24.1-unstable.137(ts-node@10.9.2): + resolution: {integrity: sha512-eMgZboFUT9KNYAOB4rQdosacMgU2kGTPEwBNwR/0UQTJvCZ1myJ5sHASM9hFhkCX+vgZH3cUSq56pA6XTACB8A==} + dependencies: + '@sphereon/ssi-sdk-ext.did-utils': 0.24.1-unstable.137(ts-node@10.9.2) + '@sphereon/ssi-sdk-ext.key-utils': 0.24.1-unstable.137 + '@sphereon/ssi-sdk-ext.x509-utils': 0.24.1-unstable.137 + '@sphereon/ssi-sdk.agent-config': 0.30.1(ts-node@10.9.2) + '@sphereon/ssi-types': link:packages/ssi-types + '@veramo/core': 4.2.0(patch_hash=c5oempznsz4br5w3tcuk2i2mau) + '@veramo/utils': 4.2.0 + debug: 4.3.6 + pkijs: 3.2.4 + uint8arrays: 3.1.1 + transitivePeerDependencies: + - '@google-cloud/spanner' + - '@sap/hana-client' + - better-sqlite3 + - encoding + - hdb-pool + - ioredis + - mongodb + - mssql + - mysql2 + - oracledb + - pg + - pg-native + - pg-query-stream + - redis + - sql.js + - sqlite3 + - supports-color + - ts-node + - typeorm-aurora-data-api-driver + dev: false + /@sphereon/ssi-sdk-ext.jwt-service@0.24.1-unstable.130(ts-node@10.9.2): resolution: {integrity: sha512-MHLGRmJODEYJyFoXKwlKMYzf48vS5JcUkGk0W4sqmrY1wwcw+ro3l8adIprG37mNuknXBs9Mv0x/tvibE9wwCQ==} dependencies: @@ -9509,6 +9584,45 @@ packages: - typeorm-aurora-data-api-driver dev: false + /@sphereon/ssi-sdk-ext.jwt-service@0.24.1-unstable.137(ts-node@10.9.2): + resolution: {integrity: sha512-foYq8mBh8LNVgYzqr2U6auPM9pcMpP9jhJQbZLY7+CT0wbF9Ns/WGOdzTu/PNiCLkaOjVEYh7sDKYHcq9Vn8wQ==} + dependencies: + '@sphereon/ssi-sdk-ext.did-utils': 0.24.1-unstable.137(ts-node@10.9.2) + '@sphereon/ssi-sdk-ext.identifier-resolution': 0.24.1-unstable.137(ts-node@10.9.2) + '@sphereon/ssi-sdk-ext.key-manager': 0.24.1-unstable.137 + '@sphereon/ssi-sdk-ext.key-utils': 0.24.1-unstable.137 + '@sphereon/ssi-sdk-ext.x509-utils': 0.24.1-unstable.137 + '@sphereon/ssi-sdk.agent-config': 0.30.1(ts-node@10.9.2) + '@sphereon/ssi-types': link:packages/ssi-types + '@stablelib/random': 1.0.2 + '@veramo/core': 4.2.0(patch_hash=c5oempznsz4br5w3tcuk2i2mau) + '@veramo/utils': 4.2.0 + debug: 4.3.6 + jose: 5.9.6 + jwt-decode: 4.0.0 + uint8arrays: 3.1.1 + transitivePeerDependencies: + - '@google-cloud/spanner' + - '@sap/hana-client' + - better-sqlite3 + - encoding + - hdb-pool + - ioredis + - mongodb + - mssql + - mysql2 + - oracledb + - pg + - pg-native + - pg-query-stream + - redis + - sql.js + - sqlite3 + - supports-color + - ts-node + - typeorm-aurora-data-api-driver + dev: false + /@sphereon/ssi-sdk-ext.key-manager@0.24.1-next.112: resolution: {integrity: sha512-50sqAdbgu+3D7TFIxYjw6RDyEl4zinstEPiYyradMx1zaYs8Gw/MQJXkvkeeEKaABkQS8G4KUgOa8ph6AUwl0A==} dependencies: @@ -9528,6 +9642,16 @@ packages: transitivePeerDependencies: - supports-color + /@sphereon/ssi-sdk-ext.key-manager@0.24.1-unstable.137: + resolution: {integrity: sha512-BQ5lKi05ZC1lDl0dKNgSvTS4eEzZzp9zXjKoBIhCO5RFwPlzafMYqAd6tRv2AAdXrf9P1sF//QL6t6/82bjvdg==} + dependencies: + '@veramo/core': 4.2.0(patch_hash=c5oempznsz4br5w3tcuk2i2mau) + '@veramo/key-manager': 4.2.0 + uint8arrays: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: false + /@sphereon/ssi-sdk-ext.key-utils@0.24.1-next.112: resolution: {integrity: sha512-pySpFqfKn4fJ1wJMWRiVMh6zDyEQFs7adkyxlO5uDTKEYJ/9hQ++MD2t+seDpYjq5x2Wh+g60OzD1uiVdbL2aA==} dependencies: @@ -9598,6 +9722,30 @@ packages: transitivePeerDependencies: - supports-color + /@sphereon/ssi-sdk-ext.key-utils@0.24.1-unstable.137: + resolution: {integrity: sha512-huymqLV4BltmkNc5/jHK2Un5Cy0lnYsxvgNdhrbpWW4tgM1KQ2XFXL1bwADLxuVm2jGo5kw674wgySSzScdisw==} + dependencies: + '@ethersproject/random': 5.7.0 + '@sphereon/ssi-sdk-ext.x509-utils': 0.24.1-unstable.137 + '@sphereon/ssi-types': link:packages/ssi-types + '@stablelib/ed25519': 1.0.3 + '@stablelib/sha256': 1.0.1 + '@stablelib/sha512': 1.0.1 + '@trust/keyto': 1.0.1 + '@veramo/core': 4.2.0(patch_hash=c5oempznsz4br5w3tcuk2i2mau) + base64url: 3.0.1 + debug: 4.3.6 + did-resolver: 4.1.0 + elliptic: 6.5.4 + lodash.isplainobject: 4.0.6 + multiformats: 9.9.0 + uint8arrays: 3.1.1 + varint: 6.0.0 + web-encoding: 1.1.5 + transitivePeerDependencies: + - supports-color + dev: false + /@sphereon/ssi-sdk-ext.kms-local@0.24.1-next.112(ts-node@10.9.2): resolution: {integrity: sha512-f4Gq0ehPDJk1h7zaWPMKA4ofmr9lEqIGbKUF5LPdWmcj8OSdETtj2WLbDmsPDc4E32v81YnKrncS8IuxShYQrw==} dependencies: @@ -9698,6 +9846,18 @@ packages: transitivePeerDependencies: - supports-color + /@sphereon/ssi-sdk-ext.x509-utils@0.24.1-unstable.137: + resolution: {integrity: sha512-tZ2t/cnUQb+2Q/WtlASdoMre5lnY8jH+NsdMfznfWKSO0dzH8UmAO/FyKRLKJLc+zz9WCmpYjJCJf+BjoOQzVw==} + dependencies: + '@trust/keyto': 1.0.1 + debug: 4.3.6 + js-x509-utils: 1.0.7 + pkijs: 3.2.4 + uint8arrays: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: false + /@sphereon/ssi-sdk.agent-config@0.29.1-unstable.161(pg@8.12.0)(sqlite3@5.1.7)(ts-node@10.9.2): resolution: {integrity: sha512-ZP/TjapF/Gv/AwnNr9e1U3rjyRwdLtAj4un9j1csnKcgYe9ff2fhYbe06y9mU4tfQilH69mAW4Tz1t6N5U7XbA==} dependencies: @@ -9756,6 +9916,36 @@ packages: - ts-node - typeorm-aurora-data-api-driver + /@sphereon/ssi-sdk.agent-config@0.30.1(ts-node@10.9.2): + resolution: {integrity: sha512-8IRct+v8l9T+NACJzm78fH9LzoLiU7q+nHj8keOjFcLrV4CmdpyfuMYdRwrbFXTrLqV1rndAJQ7GGxX+UEq4JA==} + dependencies: + '@veramo/core': 4.2.0(patch_hash=c5oempznsz4br5w3tcuk2i2mau) + debug: 4.3.6 + jsonpointer: 5.0.1 + typeorm: 0.3.20(pg@8.12.0)(sqlite3@5.1.7)(ts-node@10.9.2) + url-parse: 1.5.10 + yaml: 2.5.0 + transitivePeerDependencies: + - '@google-cloud/spanner' + - '@sap/hana-client' + - better-sqlite3 + - hdb-pool + - ioredis + - mongodb + - mssql + - mysql2 + - oracledb + - pg + - pg-native + - pg-query-stream + - redis + - sql.js + - sqlite3 + - supports-color + - ts-node + - typeorm-aurora-data-api-driver + dev: false + /@sphereon/vc-status-list@7.0.0-next.0(expo@51.0.29)(react-native@0.75.2): resolution: {integrity: sha512-4GIZq12SXbEbO4vCh5TwWzWk7tviDUP8aOzRGsEw6UW2344qZ31CLsU+bHurdnG4OlLRyosv4khN1ha6OiJHZQ==} engines: {node: '>=16'} @@ -18049,6 +18239,10 @@ packages: resolution: {integrity: sha512-3P9qfTYDVnNn642LCAqIKbTGb9a1TBxZ9ti5zEVEr48aDdflgRjhspWFb6WM4PzAfFbGMJYC4+803v8riCRAKw==} dev: true + /jose@5.9.6: + resolution: {integrity: sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ==} + dev: false + /js-base64@3.7.7: resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==}