diff --git a/packages/solid-crs-id-proxy/config/local-config.json b/packages/solid-crs-id-proxy/config/local-config.json index 8f42c584..6dbcf365 100644 --- a/packages/solid-crs-id-proxy/config/local-config.json +++ b/packages/solid-crs-id-proxy/config/local-config.json @@ -107,6 +107,30 @@ } } }, + { + "@id": "urn:dgt-id-proxy:default:CookieStore", + "@type": "InMemoryStore" + }, + { + "@id": "urn:dgt-id-proxy:default:SafariCookieSaveHandler", + "@type": "SafariCookieSaveHandler", + "httpHandler": { + "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + }, + "cookieStore": { + "@id": "urn:dgt-id-proxy:default:CookieStore" + } + }, + { + "@id": "urn:dgt-id-proxy:default:SafariCookieRestoreHandler", + "@type": "SafariCookieRestoreHandler", + "httpHandler": { + "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + }, + "cookieStore": { + "@id": "urn:dgt-id-proxy:default:CookieStore" + } + }, { "@id": "urn:dgt-id-proxy:default:SingleClaimWebIdFactory", "@type": "SingleClaimWebIdFactory", @@ -271,7 +295,7 @@ "@id": "urn:dgt-id-proxy:default:ClientIdStaticAuthRequestHandler" }, { - "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + "@id": "urn:dgt-id-proxy:default:SafariCookieSaveHandler" }, { "@id": "urn:dgt-id-proxy:default:ClientIdStaticAuthResponseHandler" @@ -295,7 +319,7 @@ "@type": "PipeThroughHandler", "handlers": [ { - "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + "@id": "urn:dgt-id-proxy:default:SafariCookieRestoreHandler" }, { "@id": "urn:dgt-id-proxy:default:ClientIdStaticAuthResponseHandler" @@ -319,7 +343,7 @@ } ], "handler": { - "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + "@id": "urn:dgt-id-proxy:default:SafariCookieRestoreHandler" }, "path": "/u/login" }, @@ -335,7 +359,7 @@ } ], "handler": { - "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + "@id": "urn:dgt-id-proxy:default:SafariCookieRestoreHandler" }, "path": "/u/consent" }, @@ -413,10 +437,10 @@ ], "handler": { "@type": "HttpHandlerStaticAssetService", - "logger": { + "HttpHandlerStaticAssetService:_logger": { "@type": "ConsoleLogger", - "minimumLevel": 1, - "minimumLevelPrintData": 1 + "ConsoleLogger:_minimumLevel": 1, + "ConsoleLogger:_minimumLevelPrintData": 1 }, "path": { "@id": "urn:dgt-id-proxy:variables:openidConfigurationFilePath" diff --git a/packages/solid-crs-id-proxy/config/proxy-config.json b/packages/solid-crs-id-proxy/config/proxy-config.json index 1d055481..e3fc2aae 100644 --- a/packages/solid-crs-id-proxy/config/proxy-config.json +++ b/packages/solid-crs-id-proxy/config/proxy-config.json @@ -107,6 +107,30 @@ } } }, + { + "@id": "urn:dgt-id-proxy:default:CookieStore", + "@type": "InMemoryStore" + }, + { + "@id": "urn:dgt-id-proxy:default:SafariCookieSaveHandler", + "@type": "SafariCookieSaveHandler", + "httpHandler": { + "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + }, + "cookieStore": { + "@id": "urn:dgt-id-proxy:default:CookieStore" + } + }, + { + "@id": "urn:dgt-id-proxy:default:SafariCookieRestoreHandler", + "@type": "SafariCookieRestoreHandler", + "httpHandler": { + "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + }, + "cookieStore": { + "@id": "urn:dgt-id-proxy:default:CookieStore" + } + }, { "@id": "urn:dgt-id-proxy:default:SingleClaimWebIdFactory", "@type": "SingleClaimWebIdFactory", @@ -269,7 +293,7 @@ "@id": "urn:dgt-id-proxy:default:ClientIdStaticAuthRequestHandler" }, { - "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + "@id": "urn:dgt-id-proxy:default:SafariCookieSaveHandler" }, { "@id": "urn:dgt-id-proxy:default:ClientIdStaticAuthResponseHandler" @@ -293,7 +317,7 @@ "@type": "PipeThroughHandler", "handlers": [ { - "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + "@id": "urn:dgt-id-proxy:default:SafariCookieRestoreHandler" }, { "@id": "urn:dgt-id-proxy:default:ClientIdStaticAuthResponseHandler" @@ -317,7 +341,7 @@ } ], "handler": { - "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + "@id": "urn:dgt-id-proxy:default:SafariCookieRestoreHandler" }, "path": "/u/login" }, @@ -333,7 +357,7 @@ } ], "handler": { - "@id": "urn:dgt-id-proxy:default:PassThroughHandler" + "@id": "urn:dgt-id-proxy:default:SafariCookieRestoreHandler" }, "path": "/u/consent" }, @@ -411,10 +435,10 @@ ], "handler": { "@type": "HttpHandlerStaticAssetService", - "logger": { + "HttpHandlerStaticAssetService:_logger": { "@type": "ConsoleLogger", - "minimumLevel": 1, - "minimumLevelPrintData": 1 + "ConsoleLogger:_minimumLevel": 1, + "ConsoleLogger:_minimumLevelPrintData": 1 }, "path": { "@id": "urn:dgt-id-proxy:variables:openidConfigurationFilePath" diff --git a/packages/solid-crs-id-proxy/package-lock.json b/packages/solid-crs-id-proxy/package-lock.json index 7d8b00ff..23549a3c 100644 --- a/packages/solid-crs-id-proxy/package-lock.json +++ b/packages/solid-crs-id-proxy/package-lock.json @@ -623,6 +623,11 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==" + }, "@comunica/actor-abstract-mediatyped": { "version": "1.22.0", "resolved": "https://registry.npmjs.org/@comunica/actor-abstract-mediatyped/-/actor-abstract-mediatyped-1.22.0.tgz", @@ -789,9 +794,9 @@ } }, "@dabh/diagnostics": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.2.tgz", - "integrity": "sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", + "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", "requires": { "colorspace": "1.1.x", "enabled": "2.0.x", @@ -799,69 +804,146 @@ } }, "@digita-ai/dgt-id-proxy": { - "version": "0.12.4", - "resolved": "https://npm.pkg.github.com/download/@digita-ai/dgt-id-proxy/0.12.4/c3cde77679729eafb5c06b82a13f716e1406107c9a4d588033b42ab45fe47ac4", - "integrity": "sha512-ikOLFbj8lI37yIdFphRivhze1U5NQBbmuODUtSbcPNzp3fCSnqVl02DPPrMGxe/SicB9UIoBDmV8Fbo+fdsabg==", - "requires": { - "@digita-ai/handlersjs-core": "^0.5.0", - "@digita-ai/handlersjs-http": "^0.5.0", + "version": "0.17.0", + "resolved": "https://npm.pkg.github.com/download/@digita-ai/dgt-id-proxy/0.17.0/b7c41ec10af110f2449b63370feae8e6e8700c0458d354d772573d5492d45828", + "integrity": "sha512-VMyHkymBr3wArBPe6PduC8cOjOU5+mm+tZs5IN28XQBeP9F3fNquqJE9cfgzCEEa984tFxsTP/FsROeJThfLCw==", + "requires": { + "@digita-ai/handlersjs-core": "^0.7.0", + "@digita-ai/handlersjs-http": "^0.7.0", + "@digita-ai/handlersjs-logging": "^0.7.0", + "@digita-ai/handlersjs-storage": "^0.7.0", "@types/uuid": "^8.3.0", "@types/yargs": "^16.0.1", "componentsjs": "^4.5.0", - "jose": "^3.11.6", + "jose": "^4.3.8", "lint-staged": "^10.5.4", "nock": "^13.1.1", "node-fetch": "^2.6.1", - "rxjs": "^7.4.0", + "rxjs": "^7.5.1", "slugify": "^1.5.3", "uuid": "^8.3.2", "yargs": "^17.0.1" }, "dependencies": { "node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "requires": { "whatwg-url": "^5.0.0" } + }, + "rxjs": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", + "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "requires": { + "tslib": "^2.1.0" + } } } }, "@digita-ai/handlersjs-core": { - "version": "0.5.2", - "resolved": "https://npm.pkg.github.com/download/@digita-ai/handlersjs-core/0.5.2/1b87395f6755ca5e661d085f8f0a71da8df6129d17382ac0fc348f522323d0e0", - "integrity": "sha512-tc5MWaSyAwxOWqnRW13BUIQ0jtmV/g3JWravxIcJkk/kyFUAQXIGJyzJN20d39CJmCFUb0oiIM3pDjbktibfKg==", + "version": "0.7.1", + "resolved": "https://npm.pkg.github.com/download/@digita-ai/handlersjs-core/0.7.1/afc3d1ce472b44840fddd3f057902dc95e539180aa3e3053d2e4a28932ecfada", + "integrity": "sha512-Np6VI/joTITTchsb+wpb2/GV9tjNThc/+qRvkFvFgpkfx0/SkCH4nWEheTM8e+ZglTb24XSoS8xPm/NiOKxxsg==", "requires": { "@types/node": "^16.11.7", "clone": "^2.1.2", - "rxjs": "^7.4.0" + "rxjs": "^7.5.1" }, "dependencies": { "@types/node": { - "version": "16.11.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", - "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + "version": "16.11.26", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.26.tgz", + "integrity": "sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==" + }, + "rxjs": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", + "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "requires": { + "tslib": "^2.1.0" + } } } }, "@digita-ai/handlersjs-http": { - "version": "0.5.2", - "resolved": "https://npm.pkg.github.com/download/@digita-ai/handlersjs-http/0.5.2/5ad951fb4a4651a12745c841df8aeed61f60388e891ce7866efad235c9280710", - "integrity": "sha512-GE+Y/mP4oO94TO9KJrrZLY8XAN/JJJA+L6wYqioBXemqCFgUpIAhdblYFG3gZSZQvfFf2ExSF3Wc0tqtiLL/lQ==", + "version": "0.7.1", + "resolved": "https://npm.pkg.github.com/download/@digita-ai/handlersjs-http/0.7.1/fc0d4a9dd6af8935be9d4655cdf8a1db6e32de4c5ecc4bca6adec191523f5e21", + "integrity": "sha512-tZ7phRSJaJnmepdmKycmFR9r3rkg5keLIHR0/JS3y2GmFzPiq8K/Tbr4Mn8/Ka3rFRd5xw+la+A9bHXm8IoLAw==", "requires": { - "@digita-ai/handlersjs-core": "0.5.2", + "@digita-ai/handlersjs-core": "0.7.1", + "@digita-ai/handlersjs-storage": "0.7.1", "node-fetch": "^2.6.1", - "rxjs": "^7.4.0" + "rxjs": "^7.5.1" }, "dependencies": { "node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "requires": { "whatwg-url": "^5.0.0" } + }, + "rxjs": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", + "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "requires": { + "tslib": "^2.1.0" + } + } + } + }, + "@digita-ai/handlersjs-logging": { + "version": "0.7.1", + "resolved": "https://npm.pkg.github.com/download/@digita-ai/handlersjs-logging/0.7.1/a18315c5e6b7d1574a4df1312ee2bbd06c072c29abe56f14071ed03831e487b2", + "integrity": "sha512-a7wCZ7LqOne4lODtFRf5/aRrgLSQ2WqhvUhxKteksNPXjFltgEqlF6ZlWDrVxyz25RzIjZJKH7ii9qIzwPqJ3g==", + "requires": { + "@digita-ai/handlersjs-core": "0.7.1", + "@types/node": "^17.0.8", + "rxjs": "^7.5.1" + }, + "dependencies": { + "@types/node": { + "version": "17.0.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.24.tgz", + "integrity": "sha512-aveCYRQbgTH9Pssp1voEP7HiuWlD2jW2BO56w+bVrJn04i61yh6mRfoKO6hEYQD9vF+W8Chkwc6j1M36uPkx4g==" + }, + "rxjs": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", + "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "requires": { + "tslib": "^2.1.0" + } + } + } + }, + "@digita-ai/handlersjs-storage": { + "version": "0.7.1", + "resolved": "https://npm.pkg.github.com/download/@digita-ai/handlersjs-storage/0.7.1/92ef12299105cd9052eea6e3d60e30731233c6540da9b27bbd60f5e57a80139e", + "integrity": "sha512-Ur8m8mc5oftndQr05a6fPG1vthrIJ5+Fmvat1i2VZucjoIef9kFZtdkS9sK5GUUoLLipqXmxIRJm76xRY688wA==", + "requires": { + "@types/node": "^16.11.7", + "clone": "^2.1.2", + "rxjs": "^7.5.1" + }, + "dependencies": { + "@types/node": { + "version": "16.11.26", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.26.tgz", + "integrity": "sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==" + }, + "rxjs": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", + "integrity": "sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==", + "requires": { + "tslib": "^2.1.0" + } } } }, @@ -1355,9 +1437,9 @@ } }, "@rdfjs/types": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rdfjs/types/-/types-1.0.1.tgz", - "integrity": "sha512-YxVkH0XrCNG3MWeZxfg596GFe+oorTVusmNxRP6ZHTsGczZ8AGvG3UchRNkg3Fy4MyysI7vBAA5YZbESL+VmHQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rdfjs/types/-/types-1.1.0.tgz", + "integrity": "sha512-5zm8bN2/CC634dTcn/0AhTRLaQRjXDZs3QfcAsQKNturHT7XVWcKy/8p3P5gXl+YkZTAmy7T5M/LyiT/jbkENw==", "requires": { "@types/node": "*" } @@ -1524,9 +1606,9 @@ "dev": true }, "@types/readable-stream": { - "version": "2.3.12", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.12.tgz", - "integrity": "sha512-IVe0ietigIRWjRg0gv2sydr0rhyPzdXQsBMU/gda8fl82xQL+J9UWRBcD0asxoe4pb5wTOsPrOz0KYJZVCXZJQ==", + "version": "2.3.13", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.13.tgz", + "integrity": "sha512-4JSCx8EUzaW9Idevt+9lsRAt1lcSccoQfE+AouM1gk8sFxnnytKNIO3wTl9Dy+4m6jRJ1yXhboLHHT/LXBQiEw==", "requires": { "@types/node": "*", "safe-buffer": "*" @@ -1552,9 +1634,9 @@ "dev": true }, "@types/uuid": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.3.tgz", - "integrity": "sha512-0LbEEx1zxrYB3pgpd1M5lEhLcXjKJnYghvhTRgaBeUivLHMDM1TzF3IJ6hXU2+8uA4Xz+5BA63mtZo5DjVT8iA==" + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" }, "@types/yargs": { "version": "16.0.4", @@ -1705,14 +1787,14 @@ "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==" }, "async": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.2.tgz", - "integrity": "sha512-H0E+qZaDEfx/FY4t7iLRv1W2fFI6+pyCeTw1uN20AQPiwqwM6ojPxHxdLv4z8hi2DtnW9BOckSspLucW7pIE5g==" + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", + "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" }, "asynciterator": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/asynciterator/-/asynciterator-3.2.1.tgz", - "integrity": "sha512-sVOetIEbK8Rs13+l/RGAGjaGem8nihMsBiRpH+Sb4B1s8nWQsiWU2Xj+rk5wnJ/MhFP9O+y1ObEg3AufA2EzSQ==" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/asynciterator/-/asynciterator-3.4.0.tgz", + "integrity": "sha512-jFuvnCHjUAyW33E3zpZhQxBM3SDuyxkDwtjhXD27WKwB/7UrZHaDAia7ZbqL94zLbUGhgxhO0vfopTLi7Jcrig==" }, "asynckit": { "version": "0.4.0", @@ -2028,11 +2110,6 @@ "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz", "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==" }, - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" - }, "colorspace": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", @@ -2118,17 +2195,20 @@ "dev": true }, "cross-fetch": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz", - "integrity": "sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", "requires": { - "node-fetch": "2.6.1" + "node-fetch": "2.6.7" }, "dependencies": { "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + } } } }, @@ -2281,9 +2361,9 @@ } }, "dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", "requires": { "domelementtype": "^2.0.1", "domhandler": "^4.2.0", @@ -2298,9 +2378,9 @@ } }, "domelementtype": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", - "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==" }, "domexception": { "version": "2.0.1", @@ -2320,9 +2400,9 @@ } }, "domhandler": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", - "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", "requires": { "domelementtype": "^2.2.0" } @@ -2724,9 +2804,9 @@ } }, "fecha": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.1.tgz", - "integrity": "sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q==" + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.2.tgz", + "integrity": "sha512-5rOQWkBVz3FnYWTi/ELZmq4CoK1Pb+xKNZWuJRsOwo0+8DrP43CrWJtyLVvb5U7z7ggE5llahfDbLjaVNzXVJQ==" }, "fetch-blob": { "version": "3.1.3", @@ -2785,9 +2865,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "follow-redirects": { - "version": "1.14.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz", - "integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==" + "version": "1.14.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", + "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" }, "form-data": { "version": "3.0.1", @@ -2959,9 +3039,9 @@ } }, "http-link-header": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.0.3.tgz", - "integrity": "sha512-nARK1wSKoBBrtcoESlHBx36c1Ln/gnbNQi1eB6MeTUefJIT3NvUOsV15bClga0k38f0q/kN5xxrGSDS3EFnm9w==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.0.4.tgz", + "integrity": "sha512-Cnv3Q+FF+35avekdnH/ML8dls++tdnSgrvUIWw0YEszrWeLSuw5Iq1vyCVTb5v0rEUgFTy0x4shxXyrO0MDUzw==" }, "http-proxy-agent": { "version": "4.0.1", @@ -4606,9 +4686,9 @@ } }, "jose": { - "version": "3.20.3", - "resolved": "https://registry.npmjs.org/jose/-/jose-3.20.3.tgz", - "integrity": "sha512-Z4a5Nl4pmGivdSgaq+a5EbNjrvSO4vtBTmVy5C3HNxWfJ92aG8DTNZrQywowxyOlSqdX/BmCPAy/ieElXDM3pw==" + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.6.1.tgz", + "integrity": "sha512-EFnufEivlIB6j7+JwaenYQzdUDs/McajDr9WnhT6EI0WxbexnfuZimpWX1GnobF6OnQsUFmWFXUXdWyZHWdQow==" }, "js-tokens": { "version": "4.0.0", @@ -4752,9 +4832,9 @@ } }, "jsonld-streaming-parser": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/jsonld-streaming-parser/-/jsonld-streaming-parser-2.4.2.tgz", - "integrity": "sha512-kA1+LD9jTPX3bz81c+zjF4ng8UVmVnOmLhKj5pE8pQE0GHc4HJrr0+dHRUgAQzg8jvCml1B9HRmr9egYw4ZfJA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/jsonld-streaming-parser/-/jsonld-streaming-parser-2.4.3.tgz", + "integrity": "sha512-ysuevJ+l8+Y4W3J/yQW3pa9VCBNDHo2tZkKmPAnfhfsmFMyxuueAeXMmTbpJZdrpagzeeDVr3A8EZVuHliQJ9A==", "requires": { "@rdfjs/types": "*", "@types/http-link-header": "^1.0.1", @@ -4877,11 +4957,6 @@ "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", "dev": true }, - "lodash.uniqwith": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", - "integrity": "sha1-egy/ZfQ7WShiWp1NDcVLGMrcfvM=" - }, "log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -4925,14 +5000,14 @@ } }, "logform": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.3.0.tgz", - "integrity": "sha512-graeoWUH2knKbGthMtuG1EfaSPMZFZBIrhuJHhkS5ZseFBrc7DupCzihOQAzsK/qIKPQaPJ/lFQFctILUY5ARQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.4.0.tgz", + "integrity": "sha512-CPSJw4ftjf517EhXZGGvTHHkYobo7ZCc0kvwUoOYcjfR2UVrI66RHj8MCrfAdEitdmFqbu2BYdYs8FHHZSb6iw==", "requires": { - "colors": "^1.2.1", + "@colors/colors": "1.5.0", "fecha": "^4.2.0", "ms": "^2.1.1", - "safe-stable-stringify": "^1.1.0", + "safe-stable-stringify": "^2.3.1", "triple-beam": "^1.3.0" } }, @@ -5064,9 +5139,9 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "n3": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/n3/-/n3-1.12.2.tgz", - "integrity": "sha512-vY1HBEraMPWQFLEK6sn67DeGMqTuwXnlEYpZ8gTVukKQSz2f44d+t+ZcmwEt8c99FlVAbpmMb/435Q8t0OC+7w==", + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/n3/-/n3-1.16.1.tgz", + "integrity": "sha512-XhCtfs9pR8TRydTRHdy7arkeJlLB2NscJix6NMe4eP+3RLWv7bxusECt2gNmmRGKvII5j+Pzl+Fx8Ny0NX3UNg==", "requires": { "queue-microtask": "^1.1.2", "readable-stream": "^3.6.0" @@ -5079,9 +5154,9 @@ "dev": true }, "nock": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.1.tgz", - "integrity": "sha512-CoHAabbqq/xZEknubuyQMjq6Lfi5b7RtK6SoNK6m40lebGp3yiMagWtIoYaw2s9sISD7wPuCfwFpivVHX/35RA==", + "version": "13.2.4", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.2.4.tgz", + "integrity": "sha512-8GPznwxcPNCH/h8B+XZcKjYPXnUV5clOKCjAqyjsiqA++MpNx9E9+t8YPp0MbThO+KauRo7aZJ1WuIZmOrT2Ug==", "requires": { "debug": "^4.1.0", "json-stringify-safe": "^5.0.1", @@ -5402,9 +5477,9 @@ } }, "rdf-object": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/rdf-object/-/rdf-object-1.12.0.tgz", - "integrity": "sha512-LF4LjYCneh2RJcUSPWbTfGgsYqRMcElmHDR3lPkMrJQ6azrCqY9DLdVWaqK7xRn1ujeHWiOkS34ThTZgzzvuUQ==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/rdf-object/-/rdf-object-1.13.1.tgz", + "integrity": "sha512-Sgq+GbsqdPsMYh+d4OZ4C9brXlzqa9MvfVHG4pkuT9p7o+AX39nqjTWE/8HVaXjjOZBIDe8T54WWTMWphu3BpA==", "requires": { "@rdfjs/types": "*", "jsonld-context-parser": "^2.0.2", @@ -5459,13 +5534,13 @@ } }, "rdf-terms": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/rdf-terms/-/rdf-terms-1.7.0.tgz", - "integrity": "sha512-K83ACD+MuWFS3mNxwCRNYQAmc/Z9iK7PgqJq9N4VP8sUVlP7ioB2pPNQHKHy0IQh4RTkEq6fg4R4q7YlweLBZQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/rdf-terms/-/rdf-terms-1.8.0.tgz", + "integrity": "sha512-uw6gSvy0qlsJBog83d7fHjM+YD8kpKImYuh6Z/4CAQtJC8wHgQTkCpml5lmPpaupCfpkt0apXnk9hyKVk0obJQ==", "requires": { "@rdfjs/types": "*", - "lodash.uniqwith": "^4.5.0", - "rdf-data-factory": "^1.1.0" + "rdf-data-factory": "^1.1.0", + "rdf-string": "^1.6.0" } }, "rdfa-streaming-parser": { @@ -5643,9 +5718,9 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safe-stable-stringify": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-1.1.1.tgz", - "integrity": "sha512-ERq4hUjKDbJfE4+XtZLFPCDi8Vb1JqaxAPTxWFLBx8XcAlf9Bda/ZJdVezs/NAfsMQScyIlUMx+Yeu7P7rx5jw==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.3.1.tgz", + "integrity": "sha512-kYBSfT+troD9cDA85VDnHZ1rpHC50O0g1e6WlGHVCz/g+JS+9WKLj+XwFYyR8UbrZN8ll9HUpDAAddY58MGisg==" }, "safer-buffer": { "version": "2.1.2", @@ -5750,9 +5825,9 @@ } }, "slugify": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.6.4.tgz", - "integrity": "sha512-Pcz296CK0uGnTf4iNQId79Uv6/5G16t0g0x3OsxWS8qVSOW+JXNnNHKVcuDiMgEGTWyK6zjlWXo2dvzV/FLf9Q==" + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.6.5.tgz", + "integrity": "sha512-8mo9bslnBO3tr5PEVFzMPIWwWnipGS0xVbYf65zxDqfNwmzYn1LpiKNrR6DlClusuvo+hDHd1zKpmfAe83NQSQ==" }, "source-map": { "version": "0.6.1", @@ -6266,29 +6341,30 @@ } }, "winston": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", - "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.7.2.tgz", + "integrity": "sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng==", "requires": { "@dabh/diagnostics": "^2.0.2", - "async": "^3.1.0", + "async": "^3.2.3", "is-stream": "^2.0.0", - "logform": "^2.2.0", + "logform": "^2.4.0", "one-time": "^1.0.0", "readable-stream": "^3.4.0", + "safe-stable-stringify": "^2.3.1", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", - "winston-transport": "^4.4.0" + "winston-transport": "^4.5.0" } }, "winston-transport": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.4.1.tgz", - "integrity": "sha512-ciZRlU4CSjHqHe8RQG1iPxKMRVwv6ZJ0RC7DxStKWd0KjpAhPDy5gVYSCpIUq+5CUsP+IyNOTZy1X0tO2QZqjg==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.5.0.tgz", + "integrity": "sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==", "requires": { - "logform": "^2.2.0", - "readable-stream": "^3.4.0", - "triple-beam": "^1.2.0" + "logform": "^2.3.2", + "readable-stream": "^3.6.0", + "triple-beam": "^1.3.0" } }, "word-wrap": { @@ -6363,9 +6439,9 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" }, "yargs": { - "version": "17.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.0.tgz", - "integrity": "sha512-GQl1pWyDoGptFPJx9b9L6kmR33TGusZvXIZUT+BOz9f7X2L94oeAskFYLEg/FkhV06zZPBYLvLZRWeYId29lew==", + "version": "17.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", + "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==", "requires": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -6377,9 +6453,9 @@ }, "dependencies": { "yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==" + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.1.tgz", + "integrity": "sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==" } } }, diff --git a/packages/solid-crs-id-proxy/package.json b/packages/solid-crs-id-proxy/package.json index 60862457..aa26f2e1 100644 --- a/packages/solid-crs-id-proxy/package.json +++ b/packages/solid-crs-id-proxy/package.json @@ -48,9 +48,9 @@ "typescript": "^4.2.3" }, "dependencies": { - "@digita-ai/dgt-id-proxy": "^0.12.4", - "@digita-ai/handlersjs-core": "^0.5.2", - "@digita-ai/handlersjs-http": "^0.5.2", + "@digita-ai/dgt-id-proxy": "^0.17.0", + "@digita-ai/handlersjs-core": "^0.7.0", + "@digita-ai/handlersjs-http": "^0.7.0", "node-fetch": "^3.0.0" }, "eslintIgnore": [ diff --git a/packages/solid-crs-id-proxy/scripts/generate-keys.js b/packages/solid-crs-id-proxy/scripts/generate-keys.js index 973d5d7f..406bf836 100644 --- a/packages/solid-crs-id-proxy/scripts/generate-keys.js +++ b/packages/solid-crs-id-proxy/scripts/generate-keys.js @@ -1,15 +1,14 @@ const fs = require('fs'); const path = require('path'); -const { generateKeyPair } = require('jose/util/generate_key_pair'); -const { fromKeyLike } = require('jose/jwk/from_key_like'); +const jose = require('jose'); const { v4: uuid } = require('uuid'); const args = process.argv.slice(2); const filePath = args[0] ?? '../../assets/jwks.json'; const generateKeys = async () => { - const rsaKey = await generateKeyPair('RS256'); - const rsaJwk = await fromKeyLike(rsaKey.privateKey); + const rsaKey = await jose.generateKeyPair('RS256'); + const rsaJwk = await jose.exportJWK(rsaKey.privateKey); rsaJwk.kid = uuid(); rsaJwk.alg = 'RS256'; rsaJwk.use = 'sig';