From b6d3155011b21a89d62f02d443d1ec47e276d2e3 Mon Sep 17 00:00:00 2001 From: Lucas ONeil Date: Tue, 12 Nov 2024 16:38:28 -0800 Subject: [PATCH 1/2] Add middleware instead of library, update libs Signed-off-by: Lucas ONeil --- services/tenant-ui/package-lock.json | 235 ++++++++---------- services/tenant-ui/package.json | 9 +- .../src/middleware/oidcMiddleware.ts | 33 +++ services/tenant-ui/src/routes/router.ts | 9 +- .../test/middleware/oidcMiddleware.spec.ts | 68 +++++ 5 files changed, 207 insertions(+), 147 deletions(-) create mode 100644 services/tenant-ui/src/middleware/oidcMiddleware.ts create mode 100644 services/tenant-ui/test/middleware/oidcMiddleware.spec.ts diff --git a/services/tenant-ui/package-lock.json b/services/tenant-ui/package-lock.json index f4fc7ff57..7c62707d7 100644 --- a/services/tenant-ui/package-lock.json +++ b/services/tenant-ui/package-lock.json @@ -15,9 +15,8 @@ "cors": "^2.8.5", "eta": "^3.5.0", "express": "^4.21.1", - "express-oauth-jwt": "^2.0.2", "express-validator": "^7.2.0", - "jose": "^5.8.0", + "jose": "^5.9.6", "nodemailer": "^6.9.16" }, "devDependencies": { @@ -26,10 +25,10 @@ "@types/cors": "^2.8.17", "@types/express": "^5.0.0", "@types/jest": "^29.5.14", - "@types/node": "^22.8.5", + "@types/node": "^22.9.0", "@types/nodemailer": "^6.4.16", - "@typescript-eslint/eslint-plugin": "^8.12.2", - "@typescript-eslint/parser": "^8.12.2", + "@typescript-eslint/eslint-plugin": "^8.14.0", + "@typescript-eslint/parser": "^8.14.0", "eslint": "^8.57.0", "jest": "^29.7.0", "rimraf": "^6.0.1", @@ -1780,9 +1779,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "22.8.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.5.tgz", - "integrity": "sha512-5iYk6AMPtsMbkZqCO1UGF9W5L38twq11S2pYWkybGHH2ogPUvXWNlQqJBzuEZWKj/WRH+QTeiv6ySWqJtvIEgA==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1866,17 +1865,17 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.12.2.tgz", - "integrity": "sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.14.0.tgz", + "integrity": "sha512-tqp8H7UWFaZj0yNO6bycd5YjMwxa6wIHOLZvWPkidwbgLCsBMetQoGj7DPuAlWa2yGO3H48xmPwjhsSPPCGU5w==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/type-utils": "8.12.2", - "@typescript-eslint/utils": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/scope-manager": "8.14.0", + "@typescript-eslint/type-utils": "8.14.0", + "@typescript-eslint/utils": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1900,16 +1899,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.12.2.tgz", - "integrity": "sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.14.0.tgz", + "integrity": "sha512-2p82Yn9juUJq0XynBXtFCyrBDb6/dJombnz6vbo6mgQEtWHfvHbQuEa9kAOVIt1c9YFwi7H6WxtPj1kg+80+RA==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/typescript-estree": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/scope-manager": "8.14.0", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/typescript-estree": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", "debug": "^4.3.4" }, "engines": { @@ -1954,14 +1953,14 @@ "license": "MIT" }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.12.2.tgz", - "integrity": "sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.14.0.tgz", + "integrity": "sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2" + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1972,14 +1971,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.12.2.tgz", - "integrity": "sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.14.0.tgz", + "integrity": "sha512-Xcz9qOtZuGusVOH5Uk07NGs39wrKkf3AxlkK79RBK6aJC1l03CobXjJbwBPSidetAOV+5rEVuiT1VSBUOAsanQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.12.2", - "@typescript-eslint/utils": "8.12.2", + "@typescript-eslint/typescript-estree": "8.14.0", + "@typescript-eslint/utils": "8.14.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -2022,9 +2021,9 @@ "license": "MIT" }, "node_modules/@typescript-eslint/types": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.12.2.tgz", - "integrity": "sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.14.0.tgz", + "integrity": "sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==", "dev": true, "license": "MIT", "engines": { @@ -2036,14 +2035,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.12.2.tgz", - "integrity": "sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.14.0.tgz", + "integrity": "sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2116,16 +2115,16 @@ "license": "MIT" }, "node_modules/@typescript-eslint/utils": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.12.2.tgz", - "integrity": "sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.14.0.tgz", + "integrity": "sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/typescript-estree": "8.12.2" + "@typescript-eslint/scope-manager": "8.14.0", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/typescript-estree": "8.14.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2139,13 +2138,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.12.2.tgz", - "integrity": "sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.14.0.tgz", + "integrity": "sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/types": "8.14.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -3394,25 +3393,6 @@ "node": ">= 0.10.0" } }, - "node_modules/express-oauth-jwt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/express-oauth-jwt/-/express-oauth-jwt-2.0.2.tgz", - "integrity": "sha512-dgu6IBM2nOmvbFP0dCBrQKuiVZf24cCOR2CKoW2seJ/4PJWlI36+dZBB3vOOFmgNd6URvpdIFE8g5b/qaR+tXA==", - "dependencies": { - "jose": "^4.14.4" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/express-oauth-jwt/node_modules/jose": { - "version": "4.15.5", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.5.tgz", - "integrity": "sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg==", - "funding": { - "url": "https://github.com/sponsors/panva" - } - }, "node_modules/express-validator": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/express-validator/-/express-validator-7.2.0.tgz", @@ -4850,9 +4830,9 @@ } }, "node_modules/jose": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/jose/-/jose-5.8.0.tgz", - "integrity": "sha512-E7CqYpL/t7MMnfGnK/eg416OsFCVUrU/Y3Vwe7QjKhu/BkS1Ms455+2xsqZQVN57/U2MHMBvEb5SrmAZWAIntA==", + "version": "5.9.6", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.9.6.tgz", + "integrity": "sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" @@ -8149,9 +8129,9 @@ "dev": true }, "@types/node": { - "version": "22.8.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.5.tgz", - "integrity": "sha512-5iYk6AMPtsMbkZqCO1UGF9W5L38twq11S2pYWkybGHH2ogPUvXWNlQqJBzuEZWKj/WRH+QTeiv6ySWqJtvIEgA==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "dev": true, "requires": { "undici-types": "~6.19.8" @@ -8232,16 +8212,16 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.12.2.tgz", - "integrity": "sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.14.0.tgz", + "integrity": "sha512-tqp8H7UWFaZj0yNO6bycd5YjMwxa6wIHOLZvWPkidwbgLCsBMetQoGj7DPuAlWa2yGO3H48xmPwjhsSPPCGU5w==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/type-utils": "8.12.2", - "@typescript-eslint/utils": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/scope-manager": "8.14.0", + "@typescript-eslint/type-utils": "8.14.0", + "@typescript-eslint/utils": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -8249,15 +8229,15 @@ } }, "@typescript-eslint/parser": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.12.2.tgz", - "integrity": "sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.14.0.tgz", + "integrity": "sha512-2p82Yn9juUJq0XynBXtFCyrBDb6/dJombnz6vbo6mgQEtWHfvHbQuEa9kAOVIt1c9YFwi7H6WxtPj1kg+80+RA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/typescript-estree": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/scope-manager": "8.14.0", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/typescript-estree": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", "debug": "^4.3.4" }, "dependencies": { @@ -8279,23 +8259,23 @@ } }, "@typescript-eslint/scope-manager": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.12.2.tgz", - "integrity": "sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.14.0.tgz", + "integrity": "sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==", "dev": true, "requires": { - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2" + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0" } }, "@typescript-eslint/type-utils": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.12.2.tgz", - "integrity": "sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.14.0.tgz", + "integrity": "sha512-Xcz9qOtZuGusVOH5Uk07NGs39wrKkf3AxlkK79RBK6aJC1l03CobXjJbwBPSidetAOV+5rEVuiT1VSBUOAsanQ==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "8.12.2", - "@typescript-eslint/utils": "8.12.2", + "@typescript-eslint/typescript-estree": "8.14.0", + "@typescript-eslint/utils": "8.14.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -8318,19 +8298,19 @@ } }, "@typescript-eslint/types": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.12.2.tgz", - "integrity": "sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.14.0.tgz", + "integrity": "sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.12.2.tgz", - "integrity": "sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.14.0.tgz", + "integrity": "sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==", "dev": true, "requires": { - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/visitor-keys": "8.12.2", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -8375,24 +8355,24 @@ } }, "@typescript-eslint/utils": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.12.2.tgz", - "integrity": "sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.14.0.tgz", + "integrity": "sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.12.2", - "@typescript-eslint/types": "8.12.2", - "@typescript-eslint/typescript-estree": "8.12.2" + "@typescript-eslint/scope-manager": "8.14.0", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/typescript-estree": "8.14.0" } }, "@typescript-eslint/visitor-keys": { - "version": "8.12.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.12.2.tgz", - "integrity": "sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.14.0.tgz", + "integrity": "sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==", "dev": true, "requires": { - "@typescript-eslint/types": "8.12.2", + "@typescript-eslint/types": "8.14.0", "eslint-visitor-keys": "^3.4.3" } }, @@ -9281,21 +9261,6 @@ "vary": "~1.1.2" } }, - "express-oauth-jwt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/express-oauth-jwt/-/express-oauth-jwt-2.0.2.tgz", - "integrity": "sha512-dgu6IBM2nOmvbFP0dCBrQKuiVZf24cCOR2CKoW2seJ/4PJWlI36+dZBB3vOOFmgNd6URvpdIFE8g5b/qaR+tXA==", - "requires": { - "jose": "^4.14.4" - }, - "dependencies": { - "jose": { - "version": "4.15.5", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.5.tgz", - "integrity": "sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg==" - } - } - }, "express-validator": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/express-validator/-/express-validator-7.2.0.tgz", @@ -10355,9 +10320,9 @@ } }, "jose": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/jose/-/jose-5.8.0.tgz", - "integrity": "sha512-E7CqYpL/t7MMnfGnK/eg416OsFCVUrU/Y3Vwe7QjKhu/BkS1Ms455+2xsqZQVN57/U2MHMBvEb5SrmAZWAIntA==" + "version": "5.9.6", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.9.6.tgz", + "integrity": "sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ==" }, "js-tokens": { "version": "4.0.0", diff --git a/services/tenant-ui/package.json b/services/tenant-ui/package.json index 5a7f674bd..421b182b8 100644 --- a/services/tenant-ui/package.json +++ b/services/tenant-ui/package.json @@ -21,9 +21,8 @@ "cors": "^2.8.5", "eta": "^3.5.0", "express": "^4.21.1", - "express-oauth-jwt": "^2.0.2", "express-validator": "^7.2.0", - "jose": "^5.8.0", + "jose": "^5.9.6", "nodemailer": "^6.9.16" }, "devDependencies": { @@ -32,10 +31,10 @@ "@types/cors": "^2.8.17", "@types/express": "^5.0.0", "@types/jest": "^29.5.14", - "@types/node": "^22.8.5", + "@types/node": "^22.9.0", "@types/nodemailer": "^6.4.16", - "@typescript-eslint/eslint-plugin": "^8.12.2", - "@typescript-eslint/parser": "^8.12.2", + "@typescript-eslint/eslint-plugin": "^8.14.0", + "@typescript-eslint/parser": "^8.14.0", "eslint": "^8.57.0", "jest": "^29.7.0", "rimraf": "^6.0.1", diff --git a/services/tenant-ui/src/middleware/oidcMiddleware.ts b/services/tenant-ui/src/middleware/oidcMiddleware.ts new file mode 100644 index 000000000..39706bd39 --- /dev/null +++ b/services/tenant-ui/src/middleware/oidcMiddleware.ts @@ -0,0 +1,33 @@ +import { createRemoteJWKSet, jwtVerify, JWTPayload } from "jose"; +import config from "config"; +import { Request, Response, NextFunction } from "express"; + +// Extend Express Request to include claims +interface AuthenticatedRequest extends Request { + claims?: JWTPayload; +} + +const jwksUri = new URL(config.get("server.oidc.jwksUri")); +const jwks = createRemoteJWKSet(jwksUri); + +const oidcMiddleware = async ( + req: AuthenticatedRequest, + res: Response, + next: NextFunction +) => { + const authHeader = req.headers.authorization; + if (!authHeader || !authHeader.startsWith("Bearer ")) { + res.status(401).json({ message: "Unauthorized" }); + return; + } + const token = authHeader.split(" ")[1]; + try { + const { payload } = await jwtVerify(token, jwks); + req.claims = payload; + next(); + } catch (error) { + res.status(401).json({ message: "Invalid token", error }); + } +}; + +export default oidcMiddleware; diff --git a/services/tenant-ui/src/routes/router.ts b/services/tenant-ui/src/routes/router.ts index 5ad8d455f..e67d332ca 100644 --- a/services/tenant-ui/src/routes/router.ts +++ b/services/tenant-ui/src/routes/router.ts @@ -6,14 +6,9 @@ import express, { Request, Response } from "express"; import config from "config"; import * as emailComponent from "../components/email"; import * as innkeeperComponent from "../components/innkeeper"; -import { secure } from "express-oauth-jwt"; import { body, validationResult } from "express-validator"; -import { createRemoteJWKSet } from "jose"; import { NextFunction } from "express"; - -const jwksService = createRemoteJWKSet( - new URL(config.get("server.oidc.jwksUri")) -); +import oidcMiddleware from "../middleware/oidcMiddleware"; export const router = express.Router(); @@ -22,7 +17,7 @@ router.use(express.json()); // For the secured innkeepr OIDC login request to verify the token and get a token from Traction router.get( "/innkeeperLogin", - secure(jwksService), + oidcMiddleware, async (req: any, res: Response, next: NextFunction) => { try { // Validate JWT from OIDC login before moving on diff --git a/services/tenant-ui/test/middleware/oidcMiddleware.spec.ts b/services/tenant-ui/test/middleware/oidcMiddleware.spec.ts new file mode 100644 index 000000000..6a69a5050 --- /dev/null +++ b/services/tenant-ui/test/middleware/oidcMiddleware.spec.ts @@ -0,0 +1,68 @@ +import { Request, Response, NextFunction } from "express"; +import oidcMiddleware from "../../src/middleware/oidcMiddleware"; +import { jwtVerify } from "jose"; + +jest.mock("config", () => ({ + get: jest.fn().mockReturnValue("http://example.com/.well-known/jwks.json"), + })); +jest.mock("jose", () => ({ + createRemoteJWKSet: jest.fn(), + jwtVerify: jest.fn(), +})); + +interface AuthenticatedRequest extends Request { + claims?: Record; +} + +describe("oidcMiddleware", () => { + let req: Partial; + let res: Partial; + let next: NextFunction; + + beforeEach(() => { + req = { + headers: {}, + }; + res = { + status: jest.fn().mockReturnThis(), + json: jest.fn(), + }; + next = jest.fn(); + }); + + it("should return 401 if no authorization header is present", async () => { + await oidcMiddleware(req as Request, res as Response, next); + + expect(res.status).toHaveBeenCalledWith(401); + expect(res.json).toHaveBeenCalledWith({ message: "Unauthorized" }); + }); + + it("should return 401 if authorization header does not start with 'Bearer '", async () => { + req.headers!.authorization = "Basic abcdef"; + + await oidcMiddleware(req as Request, res as Response, next); + + expect(res.status).toHaveBeenCalledWith(401); + expect(res.json).toHaveBeenCalledWith({ message: "Unauthorized" }); + }); + + it("should return 401 if token is invalid", async () => { + req.headers!.authorization = "Bearer invalidtoken"; + (jwtVerify as jest.Mock).mockRejectedValue(new Error("Invalid token")); + + await oidcMiddleware(req as Request, res as Response, next); + + expect(res.status).toHaveBeenCalledWith(401); + expect(res.json).toHaveBeenCalledWith({ message: "Invalid token", error: expect.any(Error) }); + }); + + it("should call next if token is valid", async () => { + req.headers!.authorization = "Bearer validtoken"; + (jwtVerify as jest.Mock).mockResolvedValue({ payload: { sub: "123" } }); + + await oidcMiddleware(req as AuthenticatedRequest, res as Response, next); + + expect(req.claims).toEqual({ sub: "123" }); + expect(next).toHaveBeenCalled(); + }); +}); \ No newline at end of file From 3f933b69682eb66aeb397f6e7e7f902eb04a1f77 Mon Sep 17 00:00:00 2001 From: Lucas ONeil Date: Tue, 12 Nov 2024 16:44:02 -0800 Subject: [PATCH 2/2] Frontend library updates Signed-off-by: Lucas ONeil --- services/tenant-ui/frontend/package-lock.json | 117 ++++++++++-------- services/tenant-ui/frontend/package.json | 20 +-- .../src/components/profile/SettingsForm.vue | 2 +- .../components/profile/issuance/Issuance.vue | 1 - .../components/profile/issuance/ReviewTaa.vue | 1 - 5 files changed, 73 insertions(+), 68 deletions(-) diff --git a/services/tenant-ui/frontend/package-lock.json b/services/tenant-ui/frontend/package-lock.json index 42061302e..0fc4ee5cd 100644 --- a/services/tenant-ui/frontend/package-lock.json +++ b/services/tenant-ui/frontend/package-lock.json @@ -15,15 +15,15 @@ "@vuelidate/validators": "^2.0.4", "axios": "^1.7.7", "date-fns": "^4.1.0", - "dompurify": "^3.1.7", + "dompurify": "^3.2.0", "json-editor-vue": "^0.17.3", - "marked": "^14.1.3", + "marked": "^15.0.0", "oidc-client-ts": "^3.1.0", - "pinia": "^2.2.5", + "pinia": "^2.2.6", "primeflex": "^3.3.1", "primeicons": "^7.0.0", "primevue": "^3.53.0", - "qrcode.vue": "^3.5.1", + "qrcode.vue": "^3.6.0", "vue": "^3.5.12", "vue-i18n": "^9.13.1", "vue-json-pretty": "^2.4.0", @@ -32,26 +32,26 @@ }, "devDependencies": { "@intlify/eslint-plugin-vue-i18n": "^3.0.0", - "@pinia/testing": "^0.1.6", + "@pinia/testing": "^0.1.7", "@types/dompurify": "^3.0.5", "@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/parser": "^7.18.0", - "@vitejs/plugin-vue": "^5.1.4", + "@vitejs/plugin-vue": "^5.1.5", "@vitest/coverage-v8": "^2.1.4", "@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-typescript": "^13.0.0", "@vue/test-utils": "^2.4.6", "eslint": "^8.57.0", "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-vue": "^9.30.0", + "eslint-plugin-vue": "^9.31.0", "flat": "^6.0.1", "glob": "^11.0.0", "jsdom": "^25.0.1", - "msw": "^2.6.0", + "msw": "^2.6.4", "prettier": "^3.3.3", - "sass": "^1.80.5", + "sass": "^1.80.7", "typescript": "^5.6.3", - "vite": "^5.4.10", + "vite": "^5.4.11", "vitest": "^2.1.4", "vue-tsc": "^2.1.10", "whatwg-fetch": "^3.6.20" @@ -143,13 +143,13 @@ "dev": true }, "node_modules/@bundled-es-modules/cookie": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@bundled-es-modules/cookie/-/cookie-2.0.0.tgz", - "integrity": "sha512-Or6YHg/kamKHpxULAdSqhGqnWFneIXu1NKvvfBBzKGwpVsYuFIQ5aBPHDnnoR3ghW1nvSkALd+EF9iMtY7Vjxw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@bundled-es-modules/cookie/-/cookie-2.0.1.tgz", + "integrity": "sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==", "dev": true, "license": "ISC", "dependencies": { - "cookie": "^0.5.0" + "cookie": "^0.7.2" } }, "node_modules/@bundled-es-modules/statuses": { @@ -1455,6 +1455,7 @@ "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.4.1.tgz", "integrity": "sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA==", "license": "MIT", + "optional": true, "dependencies": { "detect-libc": "^1.0.3", "is-glob": "^4.0.3", @@ -1724,9 +1725,9 @@ } }, "node_modules/@pinia/testing": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@pinia/testing/-/testing-0.1.6.tgz", - "integrity": "sha512-Q40s3kpjXpjmcnc61l84wyG83yVmkBi5rRdSoPpwQoRfSnNKKr52XjFFt6hP8iBxehYS9NR+D57T1uzgnEVPHg==", + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/@pinia/testing/-/testing-0.1.7.tgz", + "integrity": "sha512-xcDq6Ry/kNhZ5bsUMl7DeoFXwdume1NYzDggCiDUDKoPQ6Mo0eH9VU7bJvBtlurqe6byAntWoX5IhVFqWzRz/Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1736,7 +1737,7 @@ "url": "https://github.com/sponsors/posva" }, "peerDependencies": { - "pinia": ">=2.2.3" + "pinia": ">=2.2.6" } }, "node_modules/@pinia/testing/node_modules/vue-demi": { @@ -2324,9 +2325,9 @@ "dev": true }, "node_modules/@vitejs/plugin-vue": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.4.tgz", - "integrity": "sha512-N2XSI2n3sQqp5w7Y/AN/L2XDjBIRGqXko+eDp42sydYSBeJuSm5a1sLf8zakmo8u7tA8NmBgoDLA1HeOESjp9A==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.5.tgz", + "integrity": "sha512-dlnib73G05CDBAUR/YpuZcQQ47fpjihnnNouAAqN62z+oqSsWJ+kh52GRzIxpkgFG3q11eXK7Di7RMmoCwISZA==", "dev": true, "license": "MIT", "engines": { @@ -2594,6 +2595,7 @@ "resolved": "https://registry.npmjs.org/@vue/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", "integrity": "sha512-z1ZIAAUS9pKzo/ANEfd2sO+v2IUalz7cM/cTLOZ7vRFOPk5/xuRKQteOu1DErFLAh/lYGXMVZ0IfYKlyInuDVg==", "dev": true, + "license": "MIT", "dependencies": { "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.0" @@ -3330,9 +3332,9 @@ } }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, "license": "MIT", "engines": { @@ -3472,6 +3474,7 @@ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", "license": "Apache-2.0", + "optional": true, "bin": { "detect-libc": "bin/detect-libc.js" }, @@ -3513,9 +3516,9 @@ } }, "node_modules/dompurify": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.7.tgz", - "integrity": "sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.0.tgz", + "integrity": "sha512-AMdOzK44oFWqHEi0wpOqix/fUNY707OmoeFDnbi3Q5I8uOpy21ufUA5cDJPr0bosxrflOVD/H2DMSvuGKJGfmQ==", "license": "(MPL-2.0 OR Apache-2.0)" }, "node_modules/eastasianwidth": { @@ -3777,9 +3780,9 @@ } }, "node_modules/eslint-plugin-vue": { - "version": "9.30.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.30.0.tgz", - "integrity": "sha512-CyqlRgShvljFkOeYK8wN5frh/OGTvkj1S7wlr2Q2pUvwq+X5VYiLd6ZjujpgSgLnys2W8qrBLkXQ41SUYaoPIQ==", + "version": "9.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.31.0.tgz", + "integrity": "sha512-aYMUCgivhz1o4tLkRHj5oq9YgYPM4/EJc0M7TAKRLCUA5OYxRLAhYEVD2nLtTwLyixEFI+/QXSvKU9ESZFgqjQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4349,9 +4352,10 @@ } }, "node_modules/immutable": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.2.tgz", - "integrity": "sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA==" + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.2.tgz", + "integrity": "sha512-1NU7hWZDkV7hJ4PJ9dur9gTNQ4ePNPN4k9/0YhwjzykTi/+3Q5pF93YU5QoVj8BuOnhLgaY8gs0U2pj4kSYVcw==", + "license": "MIT" }, "node_modules/immutable-json-patch": { "version": "6.0.1", @@ -4950,9 +4954,9 @@ } }, "node_modules/marked": { - "version": "14.1.3", - "resolved": "https://registry.npmjs.org/marked/-/marked-14.1.3.tgz", - "integrity": "sha512-ZibJqTULGlt9g5k4VMARAktMAjXoVnnr+Y3aCqW1oDftcV4BA3UmrBifzXoZyenHRk75csiPu9iwsTj4VNBT0g==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-15.0.0.tgz", + "integrity": "sha512-0mouKmBROJv/WSHJBPZZyYofUgawMChnD5je/g+aOBXsHDjb/IsnTQj7mnhQZu+qPJmRQ0ecX3mLGEUm3BgwYA==", "license": "MIT", "bin": { "marked": "bin/marked.js" @@ -5047,14 +5051,14 @@ "license": "MIT" }, "node_modules/msw": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/msw/-/msw-2.6.0.tgz", - "integrity": "sha512-n3tx2w0MZ3H4pxY0ozrQ4sNPzK/dGtlr2cIIyuEsgq2Bhy4wvcW6ZH2w/gXM9+MEUY6HC1fWhqtcXDxVZr5Jxw==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/msw/-/msw-2.6.4.tgz", + "integrity": "sha512-Pm4LmWQeytDsNCR+A7gt39XAdtH6zQb6jnIKRig0FlvYOn8eksn3s1nXxUfz5KYUjbckof7Z4p2ewzgffPoCbg==", "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { - "@bundled-es-modules/cookie": "^2.0.0", + "@bundled-es-modules/cookie": "^2.0.1", "@bundled-es-modules/statuses": "^1.0.1", "@bundled-es-modules/tough-cookie": "^0.1.6", "@inquirer/confirm": "^5.0.0", @@ -5154,7 +5158,8 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "license": "MIT" + "license": "MIT", + "optional": true }, "node_modules/nopt": { "version": "6.0.0", @@ -5401,9 +5406,9 @@ } }, "node_modules/pinia": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.2.5.tgz", - "integrity": "sha512-T4PEQ4uFv2KIRC8A1Y3k1ceQGTDtxtd7nngYGu1IJUUSpuQoYfGq7w7rOc+f5YN1vx3mEs2NjjtN2IFbNS7jqA==", + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.2.6.tgz", + "integrity": "sha512-vIsR8JkDN5Ga2vAxqOE2cJj4VtsHnzpR1Fz30kClxlh0yCHfec6uoMeM3e/ddqmwFUejK3NlrcQa/shnpyT4hA==", "license": "MIT", "dependencies": { "@vue/devtools-api": "^6.6.3", @@ -5585,9 +5590,9 @@ } }, "node_modules/qrcode.vue": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-3.5.1.tgz", - "integrity": "sha512-Mek5hpUgYP2KsRW4mnyPMUttknuXSe37UorUzymYi3rr/74rV0aTvejl2gF2phrxwAEm6zhpSvkGzIxftxj5Tg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-3.6.0.tgz", + "integrity": "sha512-vQcl2fyHYHMjDO1GguCldJxepq2izQjBkDEEu9NENgfVKP6mv/e2SU62WbqYHGwTgWXLhxZ1NCD1dAZKHQq1fg==", "license": "MIT", "peerDependencies": { "vue": "^3.0.0" @@ -5786,14 +5791,13 @@ "dev": true }, "node_modules/sass": { - "version": "1.80.5", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.80.5.tgz", - "integrity": "sha512-TQd2aoQl/+zsxRMEDSxVdpPIqeq9UFc6pr7PzkugiTx3VYCFPUaa3P4RrBQsqok4PO200Vkz0vXQBNlg7W907g==", + "version": "1.80.7", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.80.7.tgz", + "integrity": "sha512-MVWvN0u5meytrSjsU7AWsbhoXi1sc58zADXFllfZzbsBT1GHjjar6JwBINYPRrkx/zqnQ6uqbQuHgE95O+C+eQ==", "license": "MIT", "dependencies": { - "@parcel/watcher": "^2.4.1", "chokidar": "^4.0.0", - "immutable": "^4.0.0", + "immutable": "^5.0.2", "source-map-js": ">=0.6.2 <2.0.0" }, "bin": { @@ -5801,6 +5805,9 @@ }, "engines": { "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" } }, "node_modules/sass/node_modules/chokidar": { @@ -6524,9 +6531,9 @@ } }, "node_modules/vite": { - "version": "5.4.10", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz", - "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==", + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", "dev": true, "license": "MIT", "dependencies": { diff --git a/services/tenant-ui/frontend/package.json b/services/tenant-ui/frontend/package.json index 94e799ca1..fe1d73264 100644 --- a/services/tenant-ui/frontend/package.json +++ b/services/tenant-ui/frontend/package.json @@ -23,15 +23,15 @@ "@vuelidate/validators": "^2.0.4", "axios": "^1.7.7", "date-fns": "^4.1.0", - "dompurify": "^3.1.7", + "dompurify": "^3.2.0", "json-editor-vue": "^0.17.3", - "marked": "^14.1.3", + "marked": "^15.0.0", "oidc-client-ts": "^3.1.0", - "pinia": "^2.2.5", + "pinia": "^2.2.6", "primeflex": "^3.3.1", "primeicons": "^7.0.0", "primevue": "^3.53.0", - "qrcode.vue": "^3.5.1", + "qrcode.vue": "^3.6.0", "vue": "^3.5.12", "vue-i18n": "^9.13.1", "vue-json-pretty": "^2.4.0", @@ -40,26 +40,26 @@ }, "devDependencies": { "@intlify/eslint-plugin-vue-i18n": "^3.0.0", - "@pinia/testing": "^0.1.6", + "@pinia/testing": "^0.1.7", "@types/dompurify": "^3.0.5", "@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/parser": "^7.18.0", - "@vitejs/plugin-vue": "^5.1.4", + "@vitejs/plugin-vue": "^5.1.5", "@vitest/coverage-v8": "^2.1.4", "@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-typescript": "^13.0.0", "@vue/test-utils": "^2.4.6", "eslint": "^8.57.0", "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-vue": "^9.30.0", + "eslint-plugin-vue": "^9.31.0", "flat": "^6.0.1", "glob": "^11.0.0", "jsdom": "^25.0.1", - "msw": "^2.6.0", + "msw": "^2.6.4", "prettier": "^3.3.3", - "sass": "^1.80.5", + "sass": "^1.80.7", "typescript": "^5.6.3", - "vite": "^5.4.10", + "vite": "^5.4.11", "vitest": "^2.1.4", "vue-tsc": "^2.1.10", "whatwg-fetch": "^3.6.20" diff --git a/services/tenant-ui/frontend/src/components/profile/SettingsForm.vue b/services/tenant-ui/frontend/src/components/profile/SettingsForm.vue index c38acc877..2ca2b0b51 100644 --- a/services/tenant-ui/frontend/src/components/profile/SettingsForm.vue +++ b/services/tenant-ui/frontend/src/components/profile/SettingsForm.vue @@ -371,7 +371,7 @@