Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat(pam): add web launcher for browser-based terminal access to PostgreSQL accounts (echo mode) (#5399)

Saif Ur Rahmanb8e3085e9847
diff --git a/backend/package-lock.json b/backend/package-lock.json
index afbb018e28..587a29bc2b 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -31,6 +31,7 @@
"@fastify/static": "^7.0.4",
"@fastify/swagger": "^8.14.0",
"@fastify/swagger-ui": "^3.1.0",
+ "@fastify/websocket": "^10.0.1",
"@gitbeaker/rest": "^42.5.0",
"@google-cloud/kms": "^4.5.0",
"@infisical/pg-view-generator": "^1.1.0",
@@ -661,6 +662,7 @@
"resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.637.0.tgz",
"integrity": "sha512-xUi7x4qDubtA8QREtlblPuAcn91GS/09YVEY/RwU7xCY0aqGuFwgszAANlha4OUIqva8oVj2WO4gJuG+iaSnhw==",
"license": "Apache-2.0",
+ "peer": true,
"dependencies": {
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
@@ -4442,6 +4444,7 @@
"version": "3.632.0",
"resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.632.0.tgz",
"integrity": "sha512-Oh1fIWaoZluihOCb/zDEpRTi+6an82fgJz7fyRBugyLhEtDjmvpCQ3oKjzaOhoN+4EvXAm1ZS/ZgpvXBlIRTgw==",
+ "peer": true,
"dependencies": {
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
@@ -4518,6 +4521,7 @@
"version": "3.632.0",
"resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.632.0.tgz",
"integrity": "sha512-Ss5cBH09icpTvT+jtGGuQlRdwtO7RyE9BF4ZV/CEPATdd9whtJt4Qxdya8BUnkWR7h5HHTrQHqai3YVYjku41A==",
+ "peer": true,
"dependencies": {
"@aws-crypto/sha256-browser": "5.2.0",
"@aws-crypto/sha256-js": "5.2.0",
@@ -8808,6 +8812,7 @@
"integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.26.2",
@@ -10838,6 +10843,7 @@
"url": "https://opencollective.com/csstools"
}
],
+ "peer": true,
"engines": {
"node": ">=18"
},
@@ -10859,6 +10865,7 @@
"url": "https://opencollective.com/csstools"
}
],
+ "peer": true,
"engines": {
"node": ">=18"
}
@@ -11860,6 +11867,17 @@
"yaml": "^2.2.2"
}
},
+ "node_modules/@fastify/websocket": {
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/@fastify/websocket/-/websocket-10.0.1.tgz",
+ "integrity": "sha512-8/pQIxTPRD8U94aILTeJ+2O3el/r19+Ej5z1O1mXlqplsUH7KzCjAI0sgd5DM/NoPjAi5qLFNIjgM5+9/rGSNw==",
+ "license": "MIT",
+ "dependencies": {
+ "duplexify": "^4.1.2",
+ "fastify-plugin": "^4.0.0",
+ "ws": "^8.0.0"
+ }
+ },
"node_modules/@gitbeaker/core": {
"version": "42.5.0",
"resolved": "https://registry.npmjs.org/@gitbeaker/core/-/core-42.5.0.tgz",
@@ -12776,6 +12794,9 @@
"win32"
]
},
+ "node_modules/@infisical/quic/node_modules/@infisical/quic-linux-arm": {
+ "optional": true
+ },
"node_modules/@ioredis/commands": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz",
@@ -13488,6 +13509,7 @@
"resolved": "https://registry.npmjs.org/zod/-/zod-4.1.13.tgz",
"integrity": "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==",
"license": "MIT",
+ "peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
@@ -14194,6 +14216,7 @@
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.1.tgz",
"integrity": "sha512-dKYCMuPO1bmrpuogcjQ8z7ICCH3FP6WmxpwC03yjzGfZhj9fTJg6+bS1+UAplekbN2C+M61UNllGOOoAfGCrdQ==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@octokit/auth-token": "^4.0.0",
"@octokit/graphql": "^7.1.0",
@@ -14637,6 +14660,7 @@
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
"integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==",
+ "peer": true,
"engines": {
"node": ">=8.0.0"
}
@@ -15291,6 +15315,7 @@
"resolved": "https://registry.npmjs.org/@react-email/body/-/body-0.2.0.tgz",
"integrity": "sha512-9GCWmVmKUAoRfloboCd+RKm6X17xn7eGL7HnpAZUnjBXBilWCxsKnLMTC/ixSHDKS/A/057M1Tx6ZUXd89sVBw==",
"license": "MIT",
+ "peer": true,
"peerDependencies": {
"react": "^18.0 || ^19.0 || ^19.0.0-rc"
}
@@ -15300,6 +15325,7 @@
"resolved": "https://registry.npmjs.org/@react-email/button/-/button-0.2.0.tgz",
"integrity": "sha512-8i+v6cMxr2emz4ihCrRiYJPp2/sdYsNNsBzXStlcA+/B9Umpm5Jj3WJKYpgTPM+aeyiqlG/MMI1AucnBm4f1oQ==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18.0.0"
},
@@ -15312,6 +15338,7 @@
"resolved": "https://registry.npmjs.org/@react-email/code-block/-/code-block-0.2.0.tgz",
"integrity": "sha512-eIrPW9PIFgDopQU0e/OPpwCW2QWQDtNZDSsiN4sJO8KdMnWWnXJicnRfzrit5rHwFo+Y98i+w/Y5ScnBAFr1dQ==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"prismjs": "^1.30.0"
},
@@ -15327,6 +15354,7 @@
"resolved": "https://registry.npmjs.org/@react-email/code-inline/-/code-inline-0.0.5.tgz",
"integrity": "sha512-MmAsOzdJpzsnY2cZoPHFPk6uDO/Ncpb4Kh1hAt9UZc1xOW3fIzpe1Pi9y9p6wwUmpaeeDalJxAxH6/fnTquinA==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18.0.0"
},
@@ -15402,6 +15430,7 @@
"resolved": "https://registry.npmjs.org/@react-email/container/-/container-0.0.15.tgz",
"integrity": "sha512-Qo2IQo0ru2kZq47REmHW3iXjAQaKu4tpeq/M8m1zHIVwKduL2vYOBQWbC2oDnMtWPmkBjej6XxgtZByxM6cCFg==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18.0.0"
},
@@ -15435,6 +15464,7 @@
"resolved": "https://registry.npmjs.org/@react-email/heading/-/heading-0.0.15.tgz",
"integrity": "sha512-xF2GqsvBrp/HbRHWEfOgSfRFX+Q8I5KBEIG5+Lv3Vb2R/NYr0s8A5JhHHGf2pWBMJdbP4B2WHgj/VUrhy8dkIg==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18.0.0"
},
@@ -15447,6 +15477,7 @@
"resolved": "https://registry.npmjs.org/@react-email/hr/-/hr-0.0.11.tgz",
"integrity": "sha512-S1gZHVhwOsd1Iad5IFhpfICwNPMGPJidG/Uysy1AwmspyoAP5a4Iw3OWEpINFdgh9MHladbxcLKO2AJO+cA9Lw==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18.0.0"
},
@@ -15471,6 +15502,7 @@
"resolved": "https://registry.npmjs.org/@react-email/img/-/img-0.0.11.tgz",
"integrity": "sha512-aGc8Y6U5C3igoMaqAJKsCpkbm1XjguQ09Acd+YcTKwjnC2+0w3yGUJkjWB2vTx4tN8dCqQCXO8FmdJpMfOA9EQ==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18.0.0"
},
@@ -15483,6 +15515,7 @@
"resolved": "https://registry.npmjs.org/@react-email/link/-/link-0.0.12.tgz",
"integrity": "sha512-vF+xxQk2fGS1CN7UPQDbzvcBGfffr+GjTPNiWM38fhBfsLv6A/YUfaqxWlmL7zLzVmo0K2cvvV9wxlSyNba1aQ==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18.0.0"
},
@@ -15510,6 +15543,7 @@
"resolved": "https://registry.npmjs.org/@react-email/preview/-/preview-0.0.13.tgz",
"integrity": "sha512-F7j9FJ0JN/A4d7yr+aw28p4uX7VLWs7hTHtLo7WRyw4G+Lit6Zucq4UWKRxJC8lpsUdzVmG7aBJnKOT+urqs/w==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18.0.0"
},
@@ -15614,6 +15648,7 @@
"resolved": "https://registry.npmjs.org/@react-email/text/-/text-0.1.5.tgz",
"integrity": "sha512-o5PNHFSE085VMXayxH+SJ1LSOtGsTv+RpNKnTiJDrJUwoBu77G3PlKOsZZQHCNyD28WsQpl9v2WcJLbQudqwPg==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18.0.0"
},
@@ -17721,6 +17756,7 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.23.tgz",
"integrity": "sha512-yIdlVVVHXpmqRhtyovZAcSy0MiPcYWGkoO4CGe/+jpP0hmNuihm4XhHbADpK++MsiLHP5MVlv+bcgdF99kSiFQ==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"undici-types": "~6.21.0"
}
@@ -18211,6 +18247,7 @@
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.20.0.tgz",
"integrity": "sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w==",
"dev": true,
+ "peer": true,
"dependencies": {
"@typescript-eslint/scope-manager": "6.20.0",
"@typescript-eslint/types": "6.20.0",
@@ -18669,6 +18706,7 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"license": "MIT",
+ "peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -19155,6 +19193,7 @@
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
"integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"bn.js": "^4.0.0",
"inherits": "^2.0.1",
@@ -19371,6 +19410,7 @@
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz",
"integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.4",
@@ -19968,6 +20008,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.8.9",
"caniuse-lite": "^1.0.30001746",
@@ -21380,6 +21421,7 @@
"version": "16.4.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz",
"integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==",
+ "peer": true,
"engines": {
"node": ">=12"
},
@@ -21765,6 +21807,7 @@
"dev": true,
"hasInstallScript": true,
"license": "MIT",
+ "peer": true,
"bin": {
"esbuild": "bin/esbuild"
},
@@ -21847,6 +21890,7 @@
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz",
"integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==",
"dev": true,
+ "peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
@@ -21945,6 +21989,7 @@
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
"integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
"dev": true,
+ "peer": true,
"bin": {
"eslint-config-prettier": "bin/cli.js"
},
@@ -22033,6 +22078,7 @@
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",
"integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==",
"dev": true,
+ "peer": true,
"dependencies": {
"array-includes": "^3.1.7",
"array.prototype.findlastindex": "^1.2.3",
@@ -22444,6 +22490,7 @@
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
"integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"accepts": "~1.3.8",
"array-flatten": "1.1.1",
@@ -22505,7 +22552,6 @@
"resolved": "https://registry.npmjs.org/express-session/-/express-session-1.18.1.tgz",
"integrity": "sha512-a5mtTqEaZvBCL9A9aqkrtfz+3SMDhOVUnjafjo+s7A9Txkq+SVX2DLvSp1Zrv4uCXa3lMSK3viWnh9Gg07PBUA==",
"license": "MIT",
- "peer": true,
"dependencies": {
"cookie": "0.7.2",
"cookie-signature": "1.0.7",
@@ -22523,14 +22569,12 @@
"node_modules/express-session/node_modules/cookie-signature": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz",
- "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==",
- "peer": true
+ "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA=="
},
"node_modules/express-session/node_modules/debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "peer": true,
"dependencies": {
"ms": "2.0.0"
}
@@ -22538,8 +22582,7 @@
"node_modules/express-session/node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
- "peer": true
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
},
"node_modules/express/node_modules/cookie": {
"version": "0.7.1",
@@ -23383,7 +23426,6 @@
"integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==",
"license": "Apache-2.0",
"optional": true,
- "peer": true,
"dependencies": {
"gaxios": "^5.0.0",
"json-bigint": "^1.0.0"
@@ -23398,7 +23440,6 @@
"integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==",
"license": "Apache-2.0",
"optional": true,
- "peer": true,
"dependencies": {
"extend": "^3.0.2",
"https-proxy-agent": "^5.0.0",
@@ -28987,7 +29028,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
"integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
- "peer": true,
"engines": {
"node": ">= 0.8"
}
@@ -29670,6 +29710,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.1.tgz",
"integrity": "sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==",
+ "peer": true,
"engines": {
"node": ">=10"
},
@@ -30012,6 +30053,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"nanoid": "^3.3.11",
"picocolors": "^1.1.1",
@@ -30101,6 +30143,7 @@
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz",
"integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==",
"license": "MIT",
+ "peer": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
@@ -30535,7 +30578,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
"integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==",
- "peer": true,
"engines": {
"node": ">= 0.8"
}
@@ -30607,6 +30649,7 @@
"resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz",
"integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=0.10.0"
}
@@ -30616,6 +30659,7 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz",
"integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"scheduler": "^0.26.0"
},
@@ -33392,6 +33436,7 @@
"resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz",
"integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"ip-address": "^9.0.5",
"smart-buffer": "^4.2.0"
@@ -34678,6 +34723,7 @@
"integrity": "sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"esbuild": "~0.25.0",
"get-tsconfig": "^4.7.5"
@@ -34844,6 +34890,7 @@
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz",
"integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==",
+ "peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -34884,7 +34931,6 @@
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
"integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==",
- "peer": true,
"dependencies": {
"random-bytes": "~1.0.0"
},
@@ -35472,6 +35518,7 @@
"integrity": "sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.5.0",
@@ -36081,6 +36128,7 @@
"resolved": "https://registry.npmjs.org/zod/-/zod-3.24.3.tgz",
"integrity": "sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==",
"license": "MIT",
+ "peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
diff --git a/backend/package.json b/backend/package.json
index 1c8bc04522..191da90cbd 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -65,7 +65,7 @@
"react-email": {
"glob": "^11.1.0"
},
- "ts-node":{
+ "ts-node": {
"diff": "^4.0.4"
}
},
@@ -144,6 +144,7 @@
"@fastify/static": "^7.0.4",
"@fastify/swagger": "^8.14.0",
"@fastify/swagger-ui": "^3.1.0",
+ "@fastify/websocket": "^10.0.1",
"@gitbeaker/rest": "^42.5.0",
"@google-cloud/kms": "^4.5.0",
"@infisical/pg-view-generator": "^1.1.0",
@@ -246,12 +247,12 @@
"snowflake-sdk": "^2.0.4",
"ssh2": "^1.17.0",
"tedious": "^18.2.1",
+ "ts-node": "^10.9.2",
+ "tsconfig-paths": "^4.2.0",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.15.1",
"uuid": "^9.0.1",
"zod": "^3.22.4",
- "zod-to-json-schema": "^3.24.5",
- "ts-node": "^10.9.2",
- "tsconfig-paths": "^4.2.0"
+ "zod-to-json-schema": "^3.24.5"
}
}
diff --git a/backend/src/@types/fastify.d.ts b/backend/src/@types/fastify.d.ts
index 3aae4632c9..0f60384b39 100644
--- a/backend/src/@types/fastify.d.ts
+++ b/backend/src/@types/fastify.d.ts
@@ -32,6 +32,7 @@ import { TPamAccountServiceFactory } from "@app/ee/services/pam-account/pam-acco
import { TPamFolderServiceFactory } from "@app/ee/services/pam-folder/pam-folder-service";
import { TPamResourceServiceFactory } from "@app/ee/services/pam-resource/pam-resource-service";
import { TPamSessionServiceFactory } from "@app/ee/services/pam-session/pam-session-service";
+import { TPamWebAccessServiceFactory } from "@app/ee/services/pam-web-access/pam-web-access-service";
import { TPermissionServiceFactory } from "@app/ee/services/permission/permission-service-types";
import { TPitServiceFactory } from "@app/ee/services/pit/pit-service";
import { TPkiAcmeServiceFactory } from "@app/ee/services/pki-acme/pki-acme-types";
@@ -362,6 +363,7 @@ declare module "fastify" {
pamResource: TPamResourceServiceFactory;
pamAccount: TPamAccountServiceFactory;
pamSession: TPamSessionServiceFactory;
+ pamWebAccess: TPamWebAccessServiceFactory;
mfaSession: TMfaSessionServiceFactory;
upgradePath: TUpgradePathService;
diff --git a/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts b/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts
index 680e464208..1ade2cfc68 100644
--- a/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts
+++ b/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts
@@ -1,6 +1,7 @@
+import type WebSocket from "ws";
import { z } from "zod";
-import { EventType } from "@app/ee/services/audit-log/audit-log-types";
+import { AuditLogInfo, EventType } from "@app/ee/services/audit-log/audit-log-types";
import { PamAccountOrderBy, PamAccountView } from "@app/ee/services/pam-account/pam-account-enums";
import { SanitizedAwsIamAccountWithResourceSchema } from "@app/ee/services/pam-resource/aws-iam/aws-iam-resource-schemas";
import { SanitizedKubernetesAccountWithResourceSchema } from "@app/ee/services/pam-resource/kubernetes/kubernetes-resource-schemas";
@@ -12,11 +13,13 @@ import { SanitizedRedisAccountWithResourceSchema } from "@app/ee/services/pam-re
import { SanitizedSSHAccountWithResourceSchema } from "@app/ee/services/pam-resource/ssh/ssh-resource-schemas";
import { SanitizedWindowsAccountWithResourceSchema } from "@app/ee/services/pam-resource/windows-server/windows-server-resource-schemas";
import { BadRequestError } from "@app/lib/errors";
+import { logger } from "@app/lib/logger";
import { ms } from "@app/lib/ms";
import { OrderByDirection } from "@app/lib/types";
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
+import { TokenType } from "@app/services/auth-token/auth-token-types";
const SanitizedAccountSchema = z.discriminatedUnion("resourceType", [
SanitizedKubernetesAccountWithResourceSchema,
@@ -230,4 +233,122 @@ export const registerPamAccountRouter = async (server: FastifyZodProvider) => {
return response;
}
});
+
+ // Web access ticket endpoint
+ server.route({
+ method: "POST",
+ url: "/:accountId/web-access-ticket",
+ config: {
+ rateLimit: writeLimit
+ },
+ schema: {
+ description: "Issue a one-time ticket for WebSocket web access",
+ params: z.object({
+ accountId: z.string().uuid()
+ }),
+ body: z.object({
+ projectId: z.string().uuid()
+ }),
+ response: {
+ 200: z.object({ ticket: z.string() })
+ }
+ },
+ onRequest: verifyAuth([AuthMode.JWT]),
+ handler: async (req) => {
+ const { ticket } = await server.services.pamWebAccess.issueWebSocketTicket({
+ accountId: req.params.accountId,
+ projectId: req.body.projectId,
+ orgId: req.permission.orgId,
+ actor: req.permission,
+ auditLogInfo: req.auditLogInfo
+ });
+
+ return { ticket };
+ }
+ });
+
+ // WebSocket endpoint for web access (ticket-based auth)
+ server.route({
+ method: "GET",
+ url: "/:accountId/web-access",
+ config: {
+ rateLimit: readLimit
+ },
+ schema: {
+ description: "WebSocket endpoint for browser-based web access to PAM accounts",
+ params: z.object({
+ accountId: z.string().uuid()
+ }),
+ querystring: z.object({
+ ticket: z.string()
+ }),
+ response: {
+ 200: z.object({ message: z.string() })
+ }
+ },
+ wsHandler: async (connection: WebSocket, req) => {
+ try {
+ const ticketValue = req.query.ticket;
+ const separatorIndex = ticketValue.indexOf(":");
+ if (separatorIndex === -1) {
+ connection.close(4001, "Invalid or expired ticket");
+ return;
+ }
+
+ const userId = ticketValue.slice(0, separatorIndex);
+ const tokenCode = ticketValue.slice(separatorIndex + 1);
+
+ const tokenRecord = await server.services.authToken.validateTokenForUser({
+ type: TokenType.TOKEN_PAM_WS_TICKET,
+ userId,
+ code: tokenCode
+ });
+
+ if (!tokenRecord?.payload) {
+ connection.close(4001, "Invalid or expired ticket");
+ return;
+ }
+
+ const payload = z
+ .object({
+ accountId: z.string(),
+ projectId: z.string(),
+ orgId: z.string(),
+ resourceName: z.string(),
+ accountName: z.string(),
+ auditLogInfo: z.object({
+ ipAddress: z.string().optional(),
+ userAgent: z.string().optional(),
+ userAgentType: z.string().optional(),
+ actor: z.object({
+ type: z.string(),
+ metadata: z.record(z.unknown())
+ })
+ })
+ })
+ .parse(JSON.parse(tokenRecord.payload));
+
+ if (payload.accountId !== req.params.accountId) {
+ connection.close(4001, "Invalid or expired ticket");
+ return;
+ }
+
+ await server.services.pamWebAccess.handleWebSocketConnection({
+ socket: connection,
+ accountId: payload.accountId,
+ projectId: payload.projectId,
+ orgId: payload.orgId,
+ resourceName: payload.resourceName,
+ accountName: payload.accountName,
+ auditLogInfo: payload.auditLogInfo as AuditLogInfo
+ });
+ } catch (err) {
+ logger.error(err, "WebSocket ticket validation failed");
+ connection.close(4001, "Invalid or expired ticket");
+ }
+ },
+ handler: async () => {
+ return { message: "WebSocket upgrade required" };
+ }
+ });
};
diff --git a/backend/src/ee/services/audit-log/audit-log-types.ts b/backend/src/ee/services/audit-log/audit-log-types.ts
index 4ad4600f09..6d6b9ed146 100644
--- a/backend/src/ee/services/audit-log/audit-log-types.ts
+++ b/backend/src/ee/services/audit-log/audit-log-types.ts
@@ -567,6 +567,7 @@ export enum EventType {
PAM_ACCOUNT_DELETE = "pam-account-delete",
PAM_ACCOUNT_CREDENTIAL_ROTATION = "pam-account-credential-rotation",
PAM_ACCOUNT_CREDENTIAL_ROTATION_FAILED = "pam-account-credential-rotation-failed",
+ PAM_WEB_ACCESS_SESSION_TICKET_CREATED = "pam-web-access-session-ticket-created",
PAM_RESOURCE_LIST = "pam-resource-list",
PAM_RESOURCE_GET = "pam-resource-get",
PAM_RESOURCE_CREATE = "pam-resource-create",
@@ -4259,6 +4260,15 @@ interface PamAccountAccessEvent {
};
}
+interface PamWebAccessSessionTicketCreatedEvent {
+ type: EventType.PAM_WEB_ACCESS_SESSION_TICKET_CREATED;
+ metadata: {
+ accountId: string;
+ resourceName: string;
+ accountName: string;
+ };
+}
+
interface PamAccountCreateEvent {
type: EventType.PAM_ACCOUNT_CREATE;
metadata: {
@@ -5326,6 +5336,7 @@ export type Event =
| PamAccountListEvent
| PamAccountGetEvent
| PamAccountAccessEvent
+ | PamWebAccessSessionTicketCreatedEvent
| PamAccountCreateEvent
| PamAccountUpdateEvent
| PamAccountDeleteEvent
diff --git a/backend/src/ee/services/pam-web-access/pam-web-access-service.ts b/backend/src/ee/services/pam-web-access/pam-web-access-service.ts
new file mode 100644
index 0000000000..33678e346d
--- /dev/null
+++ b/backend/src/ee/services/pam-web-access/pam-web-access-service.ts
@@ -0,0 +1,294 @@
+import { ForbiddenError, subject } from "@casl/ability";
+import type WebSocket from "ws";
+
+import { ActionProjectType } from "@app/db/schemas";
+import { AuditLogInfo, EventType, TAuditLogServiceFactory } from "@app/ee/services/audit-log/audit-log-types";
+import { PamResource } from "@app/ee/services/pam-resource/pam-resource-enums";
+import { TPermissionServiceFactory } from "@app/ee/services/permission/permission-service-types";
+import {
+ ProjectPermissionPamAccountActions,
+ ProjectPermissionSub
+} from "@app/ee/services/permission/project-permission";
+import { BadRequestError, NotFoundError } from "@app/lib/errors";
+import { logger } from "@app/lib/logger";
+import { TAuthTokenServiceFactory } from "@app/services/auth-token/auth-token-service";
+import { TokenType } from "@app/services/auth-token/auth-token-types";
+
+import { TPamAccountDALFactory } from "../pam-account/pam-account-dal";
+import { TPamResourceDALFactory } from "../pam-resource/pam-resource-dal";
+import {
+ PAM_WEB_ACCESS_PROMPT,
+ TIssueWebSocketTicketDTO,
+ TWebSocketClientMessage,
+ TWebSocketServerMessage,
+ WebSocketClientMessageSchema,
+ WsMessageType
+} from "./pam-web-access-types";
+
+type TPamWebAccessServiceFactoryDep = {
+ pamAccountDAL: Pick<TPamAccountDALFactory, "findById">;
+ pamResourceDAL: Pick<TPamResourceDALFactory, "findById">;
+ permissionService: Pick<TPermissionServiceFactory, "getProjectPermission">;
+ auditLogService: Pick<TAuditLogServiceFactory, "createAuditLog">;
+ tokenService: Pick<TAuthTokenServiceFactory, "createTokenForUser">;
+};
+
+export type TPamWebAccessServiceFactory = ReturnType<typeof pamWebAccessServiceFactory>;
+
+type THandleWebSocketConnectionDTO = {
+ socket: WebSocket;
+ accountId: string;
+ projectId: string;
+ orgId: string;
+ resourceName: string;
+ accountName: string;
+ auditLogInfo: AuditLogInfo;
+};
+
+export const pamWebAccessServiceFactory = ({
+ pamAccountDAL,
+ pamResourceDAL,
+ permissionService,
+ auditLogService,
+ tokenService
+}: TPamWebAccessServiceFactoryDep) => {
+ const sendMessage = (socket: WebSocket, message: TWebSocketServerMessage): void => {
+ try {
+ if (socket.readyState === socket.OPEN) {
+ socket.send(JSON.stringify(message));
+ }
+ } catch (err) {
+ logger.error(err, "Failed to send WebSocket message");
+ }
+ };
+
+ const issueWebSocketTicket = async ({
+ accountId,
+ projectId,
+ orgId,
+ actor,
+ auditLogInfo
+ }: TIssueWebSocketTicketDTO) => {
+ const account = await pamAccountDAL.findById(accountId);
+
+ if (!account) {
+ throw new NotFoundError({ message: `Account with ID '${accountId}' not found` });
+ }
+
+ if (account.projectId !== projectId) {
+ throw new NotFoundError({ message: `Account with ID '${accountId}' not found` });
+ }
+
+ const resource = await pamResourceDAL.findById(account.resourceId);
+
+ if (!resource) {
+ throw new NotFoundError({ message: `Resource with ID '${account.resourceId}' not found` });
+ }
+
+ if (resource.resourceType !== PamResource.Postgres) {
+ throw new BadRequestError({
+ message: "Web access is currently only supported for PostgreSQL accounts"
+ });
+ }
+
+ const { permission } = await permissionService.getProjectPermission({
+ actor: actor.type,
+ actorId: actor.id,
+ actorAuthMethod: actor.authMethod,
+ actorOrgId: actor.orgId,
+ projectId: account.projectId,
+ actionProjectType: ActionProjectType.PAM
+ });
+
+ ForbiddenError.from(permission).throwUnlessCan(
+ ProjectPermissionPamAccountActions.Access,
+ subject(ProjectPermissionSub.PamAccounts, {
+ resourceName: resource.name,
+ accountName: account.name
+ })
+ );
+
+ const token = await tokenService.createTokenForUser({
+ type: TokenType.TOKEN_PAM_WS_TICKET,
+ userId: actor.id,
+ payload: JSON.stringify({
+ accountId,
+ projectId,
+ orgId,
+ resourceName: resource.name,
+ accountName: account.name,
+ auditLogInfo
+ })
+ });
+
+ await auditLogService.createAuditLog({
+ ...auditLogInfo,
+ orgId,
+ projectId,
+ event: {
+ type: EventType.PAM_WEB_ACCESS_SESSION_TICKET_CREATED,
+ metadata: {
+ accountId,
+ resourceName: resource.name,
+ accountName: account.name
+ }
+ }
+ });
+
+ return { ticket: `${actor.id}:${token}` };
+ };
+
+ const handleWebSocketConnection = async ({
+ socket,
+ accountId,
+ projectId,
+ orgId,
+ resourceName,
+ accountName,
+ auditLogInfo
+ }: THandleWebSocketConnectionDTO): Promise<void> => {
+ try {
+ const account = await pamAccountDAL.findById(accountId);
+
+ if (!account || account.projectId !== projectId) {
+ throw new BadRequestError({ message: "Invalid account or project" });
+ }
+
+ sendMessage(socket, {
+ type: WsMessageType.Ready,
+ data: "Connected (echo mode)...\n",
+ prompt: PAM_WEB_ACCESS_PROMPT
+ });
+
+ logger.info({ accountId }, "Web access session established (echo mode)");
+
+ await auditLogService.createAuditLog({
+ ...auditLogInfo,
+ orgId,
+ projectId,
+ event: {
+ type: EventType.PAM_ACCOUNT_ACCESS,
+ metadata: {
+ accountId,
+ resourceName,
+ accountName,
+ duration: new Date(Date.now() + 60 * 60 * 1000).toISOString()
+ }
+ }
+ });
+
+ socket.on("message", (rawData: Buffer | ArrayBuffer | Buffer[]) => {
+ const handleMessage = async () => {
+ try {
+ let data: string;
+ if (Buffer.isBuffer(rawData)) {
+ data = rawData.toString();
+ } else if (Array.isArray(rawData)) {
+ data = Buffer.concat(rawData).toString();
+ } else {
+ data = Buffer.from(rawData).toString();
+ }
+ const parsed: unknown = JSON.parse(data);
+
+ const result = WebSocketClientMessageSchema.safeParse(parsed);
+ if (!result.success) {
+ sendMessage(socket, {
+ type: WsMessageType.Output,
+ data: "Invalid message format\n",
+ prompt: PAM_WEB_ACCESS_PROMPT
+ });
+ return;
+ }
+
+ const message: TWebSocketClientMessage = result.data;
+
+ // Programmatic disconnect sent by the frontend's disconnect button
+ if (message.type === WsMessageType.Control) {
+ if (message.data === "quit") {
+ sendMessage(socket, {
+ type: WsMessageType.Output,
+ data: "Session ended\n",
+ prompt: ""
+ });
+ socket.close();
+ return;
+ }
+ }
+
+ // User-typed input
+ if (message.type === WsMessageType.Input) {
+ const input = message.data.trim();
+
+ // Empty input — just re-prompt
+ if (input.length === 0) {
+ sendMessage(socket, {
+ type: WsMessageType.Output,
+ data: "",
+ prompt: PAM_WEB_ACCESS_PROMPT
+ });
+ return;
+ }
+
+ if (input === "\\q" || input === "quit" || input === "exit") {
+ sendMessage(socket, {
+ type: WsMessageType.Output,
+ data: "Goodbye!\n",
+ prompt: ""
+ });
+ socket.close();
+ return;
+ }
+
+ // Echo mode: split on newlines, combine output, single prompt at end
+ const echoLines = input
+ .split("\n")
+ .map((l) => l.trim())
+ .filter((l) => l.length > 0)
+ .map((l) => `[echo] ${l}\n`)
+ .join("");
+
+ sendMessage(socket, {
+ type: WsMessageType.Output,
+ data: echoLines,
+ prompt: PAM_WEB_ACCESS_PROMPT
+ });
+ }
+ } catch (err) {
+ logger.error(err, "Error processing WebSocket message");
+ sendMessage(socket, {
+ type: WsMessageType.Output,
+ data: "Failed to process message\n",
+ prompt: PAM_WEB_ACCESS_PROMPT
+ });
+ }
+ };
+
+ void handleMessage();
+ });
+
+ socket.on("close", () => {
+ logger.info({ accountId }, "WebSocket connection closed");
+ });
+
+ socket.on("error", (err: Error) => {
+ logger.error(err, "WebSocket error");
+ });
+ } catch (err) {
+ logger.error(err, "Failed to establish web access session");
+
+ // TODO: always provide generic message to users when database/gateway errors occur
+ const errorMessage = err instanceof Error ? err.message : "Failed to establish web access session";
+ sendMessage(socket, {
+ type: WsMessageType.Output,
+ data: `${errorMessage}\n`,
+ prompt: ""
+ });
+ socket.close();
+ }
+ };
+
+ return {
+ issueWebSocketTicket,
+ handleWebSocketConnection
+ };
+};
diff --git a/backend/src/ee/services/pam-web-access/pam-web-access-types.ts b/backend/src/ee/services/pam-web-access/pam-web-access-types.ts
new file mode 100644
index 0000000000..e9887400ee
--- /dev/null
+++ b/backend/src/ee/services/pam-web-access/pam-web-access-types.ts
@@ -0,0 +1,36 @@
+import { z } from "zod";
+
+import { AuditLogInfo } from "@app/ee/services/audit-log/audit-log-types";
+import { ProjectServiceActor } from "@app/lib/types";
+
+export const PAM_WEB_ACCESS_PROMPT = "=> ";
+
+export enum WsMessageType {
+ Ready = "ready",
+ Output = "output",
+ Input = "input",
+ Control = "control"
+}
+
+export const WebSocketServerMessageSchema = z.object({
+ type: z.enum([WsMessageType.Ready, WsMessageType.Output]),
+ data: z.string(),
+ prompt: z.string()
+});
+
+export type TWebSocketServerMessage = z.infer<typeof WebSocketServerMessageSchema>;
+
+export const WebSocketClientMessageSchema = z.object({
+ type: z.enum([WsMessageType.Input, WsMessageType.Control]),
+ data: z.string()
+});
+
+export type TWebSocketClientMessage = z.infer<typeof WebSocketClientMessageSchema>;
+
+export type TIssueWebSocketTicketDTO = {
+ accountId: string;
+ projectId: string;
+ orgId: string;
+ actor: ProjectServiceActor;
+ auditLogInfo: AuditLogInfo;
+};
diff --git a/backend/src/server/app.ts b/backend/src/server/app.ts
index a127337caa..30e485d39d 100644
--- a/backend/src/server/app.ts
+++ b/backend/src/server/app.ts
@@ -11,6 +11,7 @@ import helmet from "@fastify/helmet";
import type { FastifyRateLimitOptions } from "@fastify/rate-limit";
import ratelimiter from "@fastify/rate-limit";
import { fastifyRequestContext } from "@fastify/request-context";
+import websocket from "@fastify/websocket";
import fastify, { FastifyInstance, FastifyRequest } from "fastify";
import { Cluster, Redis } from "ioredis";
import { Knex } from "knex";
@@ -145,6 +146,9 @@ export const main = async ({
await server.register(fastifySwagger);
await server.register(fastifyFormBody);
+ await server.register(websocket, {
+ options: { maxPayload: 64 * 1024 } // 64 KB
+ });
await server.register(fastifyErrHandler);
// Rate limiters and security headers
diff --git a/backend/src/server/routes/index.ts b/backend/src/server/routes/index.ts
index 423e225b14..9b9117b0e9 100644
--- a/backend/src/server/routes/index.ts
+++ b/backend/src/server/routes/index.ts
@@ -87,6 +87,7 @@ import { pamResourceDALFactory } from "@app/ee/services/pam-resource/pam-resourc
import { pamResourceServiceFactory } from "@app/ee/services/pam-resource/pam-resource-service";
import { pamSessionDALFactory } from "@app/ee/services/pam-session/pam-session-dal";
import { pamSessionServiceFactory } from "@app/ee/services/pam-session/pam-session-service";
+import { pamWebAccessServiceFactory } from "@app/ee/services/pam-web-access/pam-web-access-service";
import { permissionDALFactory } from "@app/ee/services/permission/permission-dal";
import { permissionServiceFactory } from "@app/ee/services/permission/permission-service";
import { pitServiceFactory } from "@app/ee/services/pit/pit-service";
@@ -2603,6 +2604,14 @@ export const registerRoutes = async (
kmsService
});
+ const pamWebAccessService = pamWebAccessServiceFactory({
+ pamAccountDAL,
+ pamResourceDAL,
+ permissionService,
+ auditLogService,
+ tokenService
+ });
+
const aiMcpServerService = aiMcpServerServiceFactory({
aiMcpServerDAL,
aiMcpServerToolDAL,
@@ -2821,6 +2830,7 @@ export const registerRoutes = async (
pamResource: pamResourceService,
pamAccount: pamAccountService,
pamSession: pamSessionService,
+ pamWebAccess: pamWebAccessService,
mfaSession: mfaSessionService,
upgradePath: upgradePathService,
diff --git a/backend/src/services/auth-token/auth-token-service.ts b/backend/src/services/auth-token/auth-token-service.ts
index 0dbfc4d4d6..0dfff7e2cb 100644
--- a/backend/src/services/auth-token/auth-token-service.ts
+++ b/backend/src/services/auth-token/auth-token-service.ts
@@ -81,6 +81,12 @@ export const getTokenConfig = (tokenType: TokenType) => {
const expiresAt = new Date(new Date().getTime() + 60000); // 60 seconds
return { token, triesLeft, expiresAt };
}
+ case TokenType.TOKEN_PAM_WS_TICKET: {
+ const token = crypto.randomBytes(32).toString("hex");
+ const triesLeft = 1;
+ const expiresAt = new Date(new Date().getTime() + 30000); // 30 seconds
+ return { token, triesLeft, expiresAt };
+ }
default: {
const token = crypto.randomBytes(16).toString("hex");
const expiresAt = new Date();
diff --git a/backend/src/services/auth-token/auth-token-types.ts b/backend/src/services/auth-token/auth-token-types.ts
index 0c1d715f84..75c3e8c98c 100644
--- a/backend/src/services/auth-token/auth-token-types.ts
+++ b/backend/src/services/auth-token/auth-token-types.ts
@@ -9,7 +9,8 @@ export enum TokenType {
TOKEN_EMAIL_PASSWORD_RESET = "passwordReset",
TOKEN_EMAIL_PASSWORD_SETUP = "passwordSetup",
TOKEN_USER_UNLOCK = "userUnlock",
- TOKEN_WEBAUTHN_SESSION = "webauthnSession"
+ TOKEN_WEBAUTHN_SESSION = "webauthnSession",
+ TOKEN_PAM_WS_TICKET = "pamWsTicket"
}
export type TCreateTokenForUserDTO = {
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index e5b798a9fb..d0ece1fe03 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -57,6 +57,8 @@
"@types/dagre": "^0.7.52",
"@types/nprogress": "^0.2.3",
"@ucast/mongo2js": "^1.3.4",
+ "@xterm/addon-fit": "^0.10.0",
+ "@xterm/xterm": "^5.5.0",
"@xyflow/react": "^12.4.4",
"argon2-browser": "^1.18.0",
"axios": "^1.12.0",
@@ -157,8 +159,7 @@
"resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.4.tgz",
"integrity": "sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg==",
"dev": true,
- "license": "MIT",
- "peer": true
+ "license": "MIT"
},
"node_modules/@alloc/quick-lru": {
"version": "5.2.0",
@@ -203,6 +204,7 @@
"integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.28.3",
@@ -495,6 +497,7 @@
"resolved": "https://registry.npmjs.org/@casl/ability/-/ability-6.7.2.tgz",
"integrity": "sha512-KjKXlcjKbUz8dKw7PY56F7qlfOFgxTU6tnlJ8YrbDyWkJMIlHa6VRWzCD8RU20zbJUC1hExhOFggZjm6tf1mUw==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@ucast/mongo2js": "^1.3.0"
},
@@ -553,6 +556,7 @@
"resolved": "https://registry.npmjs.org/@dnd-kit/core/-/core-6.3.1.tgz",
"integrity": "sha512-xkGBRQQab4RLwgXxoqETICr6S5JlogafbhNsidmrkVv2YRs5MLwpjoF2qpiGjQt8S9AoxtIV603s0GIUpY5eYQ==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@dnd-kit/accessibility": "^3.1.1",
"@dnd-kit/utilities": "^3.2.2",
@@ -1330,6 +1334,7 @@
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.7.1.tgz",
"integrity": "sha512-8dBIHbfsKlCk2jHQ9PoRBg2Z+4TwyE3vZICSnoDlnsHA6SiMlTwfmW6yX0lHsRmWJugkeb92sA0hZdkXJhuz+g==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@fortawesome/fontawesome-common-types": "6.7.1"
},
@@ -2020,6 +2025,7 @@
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz",
"integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@octokit/auth-token": "^5.0.0",
"@octokit/graphql": "^8.0.0",
@@ -4533,6 +4539,7 @@
"integrity": "sha512-RnO1SaiCFHn666wNz2QfZEFxvmiNRqhzaMXHXxXXKt+MEP7aajlPxUSMIQpKAaJfverpovEYqjBOXDq6dDcaOQ==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@typescript-eslint/utils": "^8.13.0",
"eslint-visitor-keys": "^4.2.0",
@@ -5158,6 +5165,7 @@
"resolved": "https://registry.npmjs.org/@tanstack/react-router/-/react-router-1.95.1.tgz",
"integrity": "sha512-P5x4yNhcdkYsCEoYeGZP8Q9Jlxf0WXJa4G/xvbmM905seZc9FqJqvCSRvX3dWTPOXRABhl4g+8DHqfft0c/AvQ==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@tanstack/history": "1.95.0",
"@tanstack/react-store": "^0.7.0",
@@ -5369,7 +5377,6 @@
"integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@babel/code-frame": "^7.10.4",
"@babel/runtime": "^7.12.5",
@@ -5390,7 +5397,6 @@
"integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
"dev": true,
"license": "Apache-2.0",
- "peer": true,
"dependencies": {
"dequal": "^2.0.3"
}
@@ -5401,7 +5407,6 @@
"integrity": "sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@adobe/css-tools": "^4.4.0",
"aria-query": "^5.0.0",
@@ -5421,8 +5426,7 @@
"resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz",
"integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==",
"dev": true,
- "license": "MIT",
- "peer": true
+ "license": "MIT"
},
"node_modules/@testing-library/user-event": {
"version": "14.6.1",
@@ -5430,7 +5434,6 @@
"integrity": "sha512-vq7fv0rnt+QTXgPxr5Hjc210p6YKq2kmdziLgnsZGgLJ9e6VAShx1pACLuRjd/AS/sr7phAR58OIIpf0LlmQNw==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=12",
"npm": ">=6"
@@ -5451,8 +5454,7 @@
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
"integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==",
"dev": true,
- "license": "MIT",
- "peer": true
+ "license": "MIT"
},
"node_modules/@types/babel__core": {
"version": "7.20.5",
@@ -5505,7 +5507,6 @@
"integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@types/deep-eql": "*",
"assertion-error": "^2.0.1"
@@ -5579,8 +5580,7 @@
"resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz",
"integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==",
"dev": true,
- "license": "MIT",
- "peer": true
+ "license": "MIT"
},
"node_modules/@types/doctrine": {
"version": "0.0.9",
@@ -5716,6 +5716,7 @@
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.16.tgz",
"integrity": "sha512-oh8AMIC4Y2ciKufU8hnKgs+ufgbA/dhPTACaZPM86AbwX9QwnFtSoPWEeRUj8fge+v6kFt78BXcDhAU1SrrAsw==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"@types/prop-types": "*",
"csstype": "^3.0.2"
@@ -5727,6 +5728,7 @@
"integrity": "sha512-P4t6saawp+b/dFrUr2cvkVsfvPguwsxtH6dNIYRllMsefqFzkZk5UIjzyDOv5g1dXIPdG4Sp1yCR4Z6RCUsG/Q==",
"devOptional": true,
"license": "MIT",
+ "peer": true,
"peerDependencies": {
"@types/react": "^18.0.0"
}
@@ -5774,6 +5776,7 @@
"integrity": "sha512-QXwAlHlbcAwNlEEMKQS2RCgJsgXrTJdjXT08xEgbPFa2yYQgVjBymxP5DrfrE7X7iodSzd9qBUHUycdyVJTW1w==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.34.0",
@@ -5814,6 +5817,7 @@
"integrity": "sha512-vxXJV1hVFx3IXz/oy2sICsJukaBrtDEQSBiV48/YIV5KWjX1dO+bcIr/kCPrW6weKXvsaGKFNlwH0v2eYdRRbA==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@typescript-eslint/scope-manager": "8.34.0",
"@typescript-eslint/types": "8.34.0",
@@ -6085,7 +6089,6 @@
"integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@types/chai": "^5.2.2",
"@vitest/spy": "3.2.4",
@@ -6103,7 +6106,6 @@
"integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@vitest/spy": "3.2.4",
"estree-walker": "^3.0.3",
@@ -6131,7 +6133,6 @@
"integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@types/estree": "^1.0.0"
}
@@ -6142,7 +6143,6 @@
"integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"tinyrainbow": "^2.0.0"
},
@@ -6156,7 +6156,6 @@
"integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"tinyspy": "^4.0.3"
},
@@ -6170,7 +6169,6 @@
"integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@vitest/pretty-format": "3.2.4",
"loupe": "^3.1.4",
@@ -6180,6 +6178,22 @@
"url": "https://opencollective.com/vitest"
}
},
+ "node_modules/@xterm/addon-fit": {
+ "version": "0.10.0",
+ "resolved": "https://registry.npmjs.org/@xterm/addon-fit/-/addon-fit-0.10.0.tgz",
+ "integrity": "sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@xterm/xterm": "^5.0.0"
+ }
+ },
+ "node_modules/@xterm/xterm": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.5.0.tgz",
+ "integrity": "sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==",
+ "license": "MIT",
+ "peer": true
+ },
"node_modules/@xyflow/react": {
"version": "12.4.4",
"resolved": "https://registry.npmjs.org/@xyflow/react/-/react-12.4.4.tgz",
@@ -6244,6 +6258,7 @@
"integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
"dev": true,
"license": "MIT",
+ "peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -6360,7 +6375,6 @@
"integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==",
"dev": true,
"license": "Apache-2.0",
- "peer": true,
"engines": {
"node": ">= 0.4"
}
@@ -6409,7 +6423,6 @@
"integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
@@ -6490,7 +6503,6 @@
"integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
@@ -6578,7 +6590,6 @@
"integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=12"
}
@@ -6589,7 +6600,6 @@
"integrity": "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"tslib": "^2.0.1"
},
@@ -6602,8 +6612,7 @@
"resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz",
"integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==",
"dev": true,
- "license": "MIT",
- "peer": true
+ "license": "MIT"
},
"node_modules/asynckit": {
"version": "0.4.0",
@@ -6653,7 +6662,6 @@
"integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==",
"dev": true,
"license": "Apache-2.0",
- "peer": true,
"engines": {
"node": ">= 0.4"
}
@@ -6755,7 +6763,6 @@
"integrity": "sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"open": "^8.0.4"
},
@@ -6992,6 +6999,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.8.9",
"caniuse-lite": "^1.0.30001746",
@@ -7173,7 +7181,6 @@
"integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"assertion-error": "^2.0.1",
"check-error": "^2.1.1",
@@ -7244,7 +7251,6 @@
"integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">= 16"
}
@@ -8076,8 +8082,7 @@
"resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz",
"integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==",
"dev": true,
- "license": "MIT",
- "peer": true
+ "license": "MIT"
},
"node_modules/cssesc": {
"version": "3.0.0",
@@ -8096,7 +8101,8 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
- "license": "MIT"
+ "license": "MIT",
+ "peer": true
},
"node_modules/cva": {
"name": "class-variance-authority",
@@ -8168,6 +8174,7 @@
"resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz",
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
"license": "ISC",
+ "peer": true,
"engines": {
"node": ">=12"
}
@@ -8221,8 +8228,7 @@
"resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz",
"integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==",
"dev": true,
- "license": "BSD-2-Clause",
- "peer": true
+ "license": "BSD-2-Clause"
},
"node_modules/data-view-buffer": {
"version": "1.0.1",
@@ -8338,7 +8344,6 @@
"integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=6"
}
@@ -8373,7 +8378,6 @@
"integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=8"
}
@@ -8504,8 +8508,7 @@
"resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",
"integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==",
"dev": true,
- "license": "MIT",
- "peer": true
+ "license": "MIT"
},
"node_modules/dom-helpers": {
"version": "5.2.1",
@@ -8715,7 +8718,6 @@
"integrity": "sha512-tpxqxncxnpw3c93u8n3VOzACmRFoVmWJqbWXvX/JfKbkhBw1oslgPrUfeSt2psuqyEJFD6N/9lg5i7bsKpoq+Q==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
@@ -8799,6 +8801,7 @@
"dev": true,
"hasInstallScript": true,
"license": "MIT",
+ "peer": true,
"bin": {
"esbuild": "bin/esbuild"
},
@@ -8840,7 +8843,6 @@
"integrity": "sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"debug": "^4.3.4"
},
@@ -8877,6 +8879,7 @@
"deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
@@ -8933,6 +8936,7 @@
"integrity": "sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"eslint-config-airbnb-base": "^15.0.0",
"object.assign": "^4.1.2",
@@ -8955,6 +8959,7 @@
"integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"confusing-browser-globals": "^1.0.10",
"object.assign": "^4.1.2",
@@ -8985,6 +8990,7 @@
"integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
"dev": true,
"license": "MIT",
+ "peer": true,
"bin": {
"eslint-config-prettier": "bin/cli.js"
},
@@ -9084,6 +9090,7 @@
"integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@rtsao/scc": "^1.1.0",
"array-includes": "^3.1.8",
@@ -9213,7 +9220,6 @@
"integrity": "sha512-EsTAnj9fLVr/GZleBLFbj/sSuXeWmp1eXIN60ceYnZveqEaUCyW4X+Vh4WTdUhCkW4xutXYqTXCUSyqD4rB75w==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"array-includes": "^3.1.8",
"array.prototype.findlast": "^1.2.5",
@@ -9247,6 +9253,7 @@
"integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==",
"dev": true,
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=10"
},
@@ -9270,7 +9277,6 @@
"integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
"dev": true,
"license": "Apache-2.0",
- "peer": true,
"dependencies": {
"esutils": "^2.0.2"
},
@@ -9284,7 +9290,6 @@
"integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"is-core-module": "^2.13.0",
"path-parse": "^1.0.7",
@@ -9303,7 +9308,6 @@
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true,
"license": "ISC",
- "peer": true,
"bin": {
"semver": "bin/semver.js"
}
@@ -9465,7 +9469,6 @@
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"dev": true,
"license": "BSD-2-Clause",
- "peer": true,
"bin": {
"esparse": "bin/esparse.js",
"esvalidate": "bin/esvalidate.js"
@@ -10496,6 +10499,7 @@
}
],
"license": "MIT",
+ "peer": true,
"dependencies": {
"@babel/runtime": "^7.23.2"
},
@@ -10589,7 +10593,6 @@
"integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=8"
}
@@ -10857,7 +10860,6 @@
"integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"bin": {
"is-docker": "cli.js"
},
@@ -11179,7 +11181,6 @@
"integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"is-docker": "^2.0.0"
},
@@ -11215,7 +11216,6 @@
"resolved": "https://registry.npmjs.org/isomorphic.js/-/isomorphic.js-0.2.5.tgz",
"integrity": "sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw==",
"license": "MIT",
- "peer": true,
"funding": {
"type": "GitHub Sponsors ❤",
"url": "https://github.com/sponsors/dmonad"
@@ -11227,7 +11227,6 @@
"integrity": "sha512-x4WH0BWmrMmg4oHHl+duwubhrvczGlyuGAZu3nvrf0UXOfPu8IhZObFEr7DE/iv01YgVZrsOiRcqw2srkKEDIA==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"define-data-property": "^1.1.4",
"es-object-atoms": "^1.0.0",
@@ -11377,7 +11376,6 @@
"integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"array-includes": "^3.1.6",
"array.prototype.flat": "^1.3.1",
@@ -11412,8 +11410,7 @@
"resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz",
"integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==",
"dev": true,
- "license": "CC0-1.0",
- "peer": true
+ "license": "CC0-1.0"
},
"node_modules/language-tags": {
"version": "1.0.9",
@@ -11421,7 +11418,6 @@
"integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"language-subtag-registry": "^0.3.20"
},
@@ -11454,7 +11450,6 @@
"resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.102.tgz",
"integrity": "sha512-g70kydI0I1sZU0ChO8mBbhw0oUW/8U0GHzygpvEIx8k+jgOpqnTSb/E+70toYVqHxBhrERD21TwD5QcZJQ40ZQ==",
"license": "MIT",
- "peer": true,
"dependencies": {
"isomorphic.js": "^0.2.4"
},
@@ -11779,8 +11774,7 @@
"resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz",
"integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==",
"dev": true,
- "license": "MIT",
- "peer": true
+ "license": "MIT"
},
"node_modules/lru-cache": {
"version": "5.1.1",
@@ -11807,7 +11801,6 @@
"integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"bin": {
"lz-string": "bin/bin.js"
}
@@ -12499,7 +12492,6 @@
"integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=4"
}
@@ -12848,7 +12840,6 @@
"integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"define-lazy-prop": "^2.0.0",
"is-docker": "^2.1.1",
@@ -13118,7 +13109,6 @@
"integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">= 14.16"
}
@@ -13270,6 +13260,7 @@
"integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==",
"dev": true,
"license": "MIT",
+ "peer": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
@@ -13386,7 +13377,6 @@
"integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"ansi-regex": "^5.0.1",
"ansi-styles": "^5.0.0",
@@ -13402,7 +13392,6 @@
"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=10"
},
@@ -13415,8 +13404,7 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
"dev": true,
- "license": "MIT",
- "peer": true
+ "license": "MIT"
},
"node_modules/prismjs": {
"version": "1.30.0",
@@ -13617,6 +13605,7 @@
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"loose-envify": "^1.1.0"
},
@@ -13644,6 +13633,7 @@
"resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz",
"integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
@@ -13748,6 +13738,7 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
"license": "MIT",
+ "peer": true,
"dependencies": {
"loose-envify": "^1.1.0",
"scheduler": "^0.23.2"
@@ -13798,6 +13789,7 @@
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.56.3.tgz",
"integrity": "sha512-IK18V6GVbab4TAo1/cz3kqajxbDPGofdF0w7VHdCo0Nt8PrPlOZcuuDq9YYIV1BtjcX78x0XsldbQRQnQXWXmw==",
"license": "MIT",
+ "peer": true,
"engines": {
"node": ">=18.0.0"
},
@@ -14047,7 +14039,6 @@
"integrity": "sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"ast-types": "^0.16.1",
"esprima": "~4.0.0",
@@ -14065,7 +14056,6 @@
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"license": "BSD-3-Clause",
- "peer": true,
"engines": {
"node": ">=0.10.0"
}
@@ -14082,7 +14072,6 @@
"integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"indent-string": "^4.0.0",
"strip-indent": "^3.0.0"
@@ -14097,7 +14086,6 @@
"integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"min-indent": "^1.0.0"
},
@@ -14312,6 +14300,7 @@
"integrity": "sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"@types/estree": "1.0.8"
},
@@ -14832,7 +14821,6 @@
"integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
@@ -14848,7 +14836,6 @@
"integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
@@ -14876,7 +14863,6 @@
"integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.5"
@@ -15097,7 +15083,8 @@
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.14.tgz",
"integrity": "sha512-b7pCxjGO98LnxVkKjaZSDeNuljC4ueKUddjENJOADtubtdo8llTaJy7HwBMeLNSSo2N5QIAgklslK1+Ir8r6CA==",
"dev": true,
- "license": "MIT"
+ "license": "MIT",
+ "peer": true
},
"node_modules/tapable": {
"version": "2.2.1",
@@ -15201,7 +15188,6 @@
"integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=14.0.0"
}
@@ -15212,7 +15198,6 @@
"integrity": "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=14.0.0"
}
@@ -15507,6 +15492,7 @@
"integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
"devOptional": true,
"license": "Apache-2.0",
+ "peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -15892,6 +15878,7 @@
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
"dev": true,
"license": "MIT",
+ "peer": true,
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.4.4",
@@ -16309,7 +16296,6 @@
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=10.0.0"
},
@@ -16354,6 +16340,7 @@
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz",
"integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==",
"license": "ISC",
+ "peer": true,
"bin": {
"yaml": "bin.mjs"
},
@@ -16504,6 +16491,7 @@
"resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz",
"integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==",
"license": "MIT",
+ "peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
diff --git a/frontend/package.json b/frontend/package.json
index 549a87a0ff..cf6f156632 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -66,6 +66,8 @@
"@types/dagre": "^0.7.52",
"@types/nprogress": "^0.2.3",
"@ucast/mongo2js": "^1.3.4",
+ "@xterm/addon-fit": "^0.10.0",
+ "@xterm/xterm": "^5.5.0",
"@xyflow/react": "^12.4.4",
"argon2-browser": "^1.18.0",
"axios": "^1.12.0",
diff --git a/frontend/src/hooks/api/auditLogs/constants.tsx b/frontend/src/hooks/api/auditLogs/constants.tsx
index 96cd11f99e..54df6cdff6 100644
--- a/frontend/src/hooks/api/auditLogs/constants.tsx
+++ b/frontend/src/hooks/api/auditLogs/constants.tsx
@@ -277,6 +277,7 @@ export const eventToNameMap: { [K in EventType]: string } = {
[EventType.PAM_ACCOUNT_CREATE]: "Create PAM Account",
[EventType.PAM_ACCOUNT_UPDATE]: "Update PAM Account",
[EventType.PAM_ACCOUNT_DELETE]: "Delete PAM Account",
+ [EventType.PAM_WEB_ACCESS_SESSION_TICKET_CREATED]: "Create PAM Web Access Session Ticket",
[EventType.PAM_RESOURCE_LIST]: "List PAM Resources",
[EventType.PAM_RESOURCE_GET]: "Get PAM Resource",
[EventType.PAM_RESOURCE_CREATE]: "Create PAM Resource",
@@ -397,6 +398,7 @@ export const projectToEventsMap: Partial<Record<ProjectType, EventType[]>> = {
EventType.PAM_ACCOUNT_CREATE,
EventType.PAM_ACCOUNT_UPDATE,
EventType.PAM_ACCOUNT_DELETE,
+ EventType.PAM_WEB_ACCESS_SESSION_TICKET_CREATED,
EventType.PAM_RESOURCE_LIST,
EventType.PAM_RESOURCE_GET,
EventType.PAM_RESOURCE_CREATE,
diff --git a/frontend/src/hooks/api/auditLogs/enums.tsx b/frontend/src/hooks/api/auditLogs/enums.tsx
index 9c2d4badc3..36e1082fbb 100644
--- a/frontend/src/hooks/api/auditLogs/enums.tsx
+++ b/frontend/src/hooks/api/auditLogs/enums.tsx
@@ -272,6 +272,7 @@ export enum EventType {
PAM_ACCOUNT_CREATE = "pam-account-create",
PAM_ACCOUNT_UPDATE = "pam-account-update",
PAM_ACCOUNT_DELETE = "pam-account-delete",
+ PAM_WEB_ACCESS_SESSION_TICKET_CREATED = "pam-web-access-session-ticket-created",
PAM_RESOURCE_LIST = "pam-resource-list",
PAM_RESOURCE_GET = "pam-resource-get",
PAM_RESOURCE_CREATE = "pam-resource-create",
diff --git a/frontend/src/hooks/api/pam/mutations.tsx b/frontend/src/hooks/api/pam/mutations.tsx
index 9223050d01..ed9f69a93a 100644
--- a/frontend/src/hooks/api/pam/mutations.tsx
+++ b/frontend/src/hooks/api/pam/mutations.tsx
@@ -167,6 +167,19 @@ export const useAccessPamAccount = () => {
});
};
+// Web Access
+export const useCreatePamWebAccessTicket = () => {
+ return useMutation({
+ mutationFn: async ({ accountId, projectId }: { accountId: string; projectId: string }) => {
+ const { data } = await apiRequest.post<{ ticket: string }>(
+ `/api/v1/pam/accounts/${accountId}/web-access-ticket`,
+ { projectId }
+ );
+ return data.ticket;
+ }
+ });
+};
+
// Folders
export const useCreatePamFolder = () => {
const queryClient = useQueryClient();
diff --git a/frontend/src/pages/pam/PamAccountByIDPage/PamAccountByIDPage.tsx b/frontend/src/pages/pam/PamAccountByIDPage/PamAccountByIDPage.tsx
index e920d34298..839ff35e18 100644
--- a/frontend/src/pages/pam/PamAccountByIDPage/PamAccountByIDPage.tsx
+++ b/frontend/src/pages/pam/PamAccountByIDPage/PamAccountByIDPage.tsx
@@ -28,6 +28,7 @@ import { PamAccessAccountModal } from "../PamAccountsPage/components/PamAccessAc
import { PamDeleteAccountModal } from "../PamAccountsPage/components/PamDeleteAccountModal";
import { PamRequestAccountAccessModal } from "../PamAccountsPage/components/PamRequestAccountAccessModal";
import { PamUpdateAccountModal } from "../PamAccountsPage/components/PamUpdateAccountModal";
+import { PamWebAccessModal } from "../PamAccountsPage/components/PamWebAccess";
import { useAccessAwsIamAccount } from "../PamAccountsPage/components/useAccessAwsIamAccount";
import {
PamAccountCredentialsSection,
@@ -54,6 +55,7 @@ const PageContent = () => {
const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp([
"accessAccount",
+ "webAccess",
"requestAccount",
"deleteAccount"
] as const);
@@ -232,6 +234,16 @@ const PageContent = () => {
onOpenChange={(isOpen) => handlePopUpToggle("accessAccount", isOpen)}
account={popUp.accessAccount.data?.account}
projectId={projectId!}
+ onOpenWebAccess={() => {
+ handlePopUpOpen("webAccess", { account: popUp.accessAccount.data?.account });
+ }}
+ />
+
+ <PamWebAccessModal
+ isOpen={popUp.webAccess.isOpen}
+ onOpenChange={(isOpen) => handlePopUpToggle("webAccess", isOpen)}
+ account={popUp.webAccess.data?.account}
+ projectId={projectId!}
/>
<PamRequestAccountAccessModal
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
index e217970778..9c84950585 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccessAccountModal.tsx
@@ -1,21 +1,31 @@
import { useMemo, useState } from "react";
import { faCopy } from "@fortawesome/free-regular-svg-icons";
-import { faUpRightFromSquare } from "@fortawesome/free-solid-svg-icons";
+import { faTerminal, faUpRightFromSquare } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import ms from "ms";
import { createNotification } from "@app/components/notifications";
-import { FormLabel, IconButton, Input, Modal, ModalContent } from "@app/components/v2";
+import { Button, FormLabel, IconButton, Input, Modal, ModalContent } from "@app/components/v2";
import { PamResourceType, TPamAccount } from "@app/hooks/api/pam";
+// Feature flag — set to false to hide the browser web access option while it's in development
+const ENABLE_WEB_ACCESS = false;
+
type Props = {
account?: TPamAccount;
isOpen: boolean;
onOpenChange: (isOpen: boolean) => void;
+ onOpenWebAccess?: () => void;
projectId: string;
};
-export const PamAccessAccountModal = ({ isOpen, onOpenChange, account, projectId }: Props) => {
+export const PamAccessAccountModal = ({
+ isOpen,
+ onOpenChange,
+ onOpenWebAccess,
+ account,
+ projectId
+}: Props) => {
const [duration, setDuration] = useState("4h");
const { protocol, hostname, port } = window.location;
@@ -83,13 +93,19 @@ export const PamAccessAccountModal = ({ isOpen, onOpenChange, account, projectId
if (!account) return null;
+ const showWebAccess =
+ ENABLE_WEB_ACCESS &&
+ account.resource.resourceType === PamResourceType.Postgres &&
+ onOpenWebAccess;
+
return (
<Modal isOpen={isOpen} onOpenChange={onOpenChange}>
<ModalContent
className="max-w-2xl pb-2"
title="Access Account"
- subTitle={`Access ${account.name} using a CLI command.`}
+ subTitle={`Connect to ${account.name}`}
>
+ <p className="mb-2 text-sm text-mineshaft-300">Connect using the Infisical CLI</p>
<FormLabel
label="Duration"
tooltipText="The maximum duration of your session. Ex: 1h, 3w, 30d"
@@ -131,6 +147,23 @@ export const PamAccessAccountModal = ({ isOpen, onOpenChange, account, projectId
<span>Install the Infisical CLI</span>
<FontAwesomeIcon icon={faUpRightFromSquare} className="size-3" />
</a>
+ {showWebAccess && (
+ <>
+ <div className="my-4 border-t border-mineshaft-600" />
+ <p className="mb-2 text-sm text-mineshaft-300">Connect directly from your browser</p>
+ <Button
+ onClick={() => {
+ onOpenChange(false);
+ onOpenWebAccess();
+ }}
+ leftIcon={<FontAwesomeIcon icon={faTerminal} />}
+ className="w-full"
+ colorSchema="primary"
+ >
+ Connect in Browser
+ </Button>
+ </>
+ )}
</ModalContent>
</Modal>
);
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/PamWebAccessModal.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/PamWebAccessModal.tsx
new file mode 100644
index 0000000000..acb2730de3
--- /dev/null
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/PamWebAccessModal.tsx
@@ -0,0 +1,78 @@
+import { useEffect } from "react";
+
+import { Button, Modal, ModalContent } from "@app/components/v2";
+import { TPamAccount } from "@app/hooks/api/pam";
+
+import { usePamWebAccessSession } from "./usePamWebAccessSession";
+
+type Props = {
+ isOpen: boolean;
+ onOpenChange: (isOpen: boolean) => void;
+ account?: TPamAccount;
+ projectId: string;
+};
+
+export const PamWebAccessModal = ({ isOpen, onOpenChange, account, projectId }: Props) => {
+ const { containerRef, isConnected, disconnect } = usePamWebAccessSession({
+ accountId: account?.id || "",
+ projectId
+ });
+
+ useEffect(() => {
+ if (!isConnected) return undefined;
+
+ const handler = (e: BeforeUnloadEvent) => {
+ e.preventDefault();
+ };
+
+ window.addEventListener("beforeunload", handler);
+ return () => window.removeEventListener("beforeunload", handler);
+ }, [isConnected]);
+
+ // Disconnect when modal closes
+ useEffect(() => {
+ if (!isOpen) {
+ disconnect();
+ }
+ }, [isOpen, disconnect]);
+
+ const handleDisconnect = () => {
+ disconnect();
+ onOpenChange(false);
+ };
+
+ if (!account) return null;
+
+ return (
+ <Modal isOpen={isOpen} onOpenChange={onOpenChange}>
+ <ModalContent
+ className="max-w-[90vw]"
+ title="Web Launcher"
+ subTitle={`${account.name} (${account.resource.name})`}
+ >
+ <div className="flex flex-col gap-4">
+ <div className="h-[70vh] overflow-hidden rounded-md border border-mineshaft-600">
+ <div
+ className="h-full w-full overflow-hidden rounded-md bg-[#0d1117] p-2 [&_.xterm-viewport]:thin-scrollbar"
+ style={{ minHeight: "300px" }}
+ >
+ <div ref={containerRef} className="h-full w-full" />
+ </div>
+ </div>
+
+ <div className="flex justify-end">
+ {isConnected ? (
+ <Button onClick={handleDisconnect} variant="outline_bg">
+ Disconnect
+ </Button>
+ ) : (
+ <Button onClick={() => onOpenChange(false)} variant="outline_bg">
+ Close
+ </Button>
+ )}
+ </div>
+ </div>
+ </ModalContent>
+ </Modal>
+ );
+};
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/index.ts b/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/index.ts
new file mode 100644
index 0000000000..07b1b1419d
--- /dev/null
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/index.ts
@@ -0,0 +1 @@
+export { PamWebAccessModal } from "./PamWebAccessModal";
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/pam-web-access-types.ts b/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/pam-web-access-types.ts
new file mode 100644
index 0000000000..a84612d8ec
--- /dev/null
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/pam-web-access-types.ts
@@ -0,0 +1,14 @@
+import { z } from "zod";
+
+export enum WsMessageType {
+ Ready = "ready",
+ Output = "output",
+ Input = "input",
+ Control = "control"
+}
+
+export const WebSocketServerMessageSchema = z.object({
+ type: z.enum([WsMessageType.Ready, WsMessageType.Output]),
+ data: z.string(),
+ prompt: z.string()
+});
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/usePamWebAccessSession.ts b/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/usePamWebAccessSession.ts
new file mode 100644
index 0000000000..a8c4fbb941
--- /dev/null
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamWebAccess/usePamWebAccessSession.ts
@@ -0,0 +1,221 @@
+import { useCallback, useEffect, useRef, useState } from "react";
+import { FitAddon } from "@xterm/addon-fit";
+import { Terminal } from "@xterm/xterm";
+
+import { useCreatePamWebAccessTicket } from "@app/hooks/api/pam";
+
+import { WebSocketServerMessageSchema, WsMessageType } from "./pam-web-access-types";
+
+import "@xterm/xterm/css/xterm.css";
+
+type UsePamWebAccessSessionOptions = {
+ accountId: string;
+ projectId: string;
+ onSessionStart?: () => void;
+ onSessionEnd?: () => void;
+};
+
+export const usePamWebAccessSession = ({
+ accountId,
+ projectId,
+ onSessionStart,
+ onSessionEnd
+}: UsePamWebAccessSessionOptions) => {
+ const [containerEl, setContainerEl] = useState<HTMLDivElement | null>(null);
+ const [isConnected, setIsConnected] = useState(false);
+ const wsRef = useRef<WebSocket | null>(null);
+ const createTicket = useCreatePamWebAccessTicket();
+
+ const onSessionStartRef = useRef(onSessionStart);
+ const onSessionEndRef = useRef(onSessionEnd);
+ const createTicketRef = useRef(createTicket);
+
+ useEffect(() => {
+ onSessionStartRef.current = onSessionStart;
+ onSessionEndRef.current = onSessionEnd;
+ createTicketRef.current = createTicket;
+ }, [onSessionStart, onSessionEnd, createTicket]);
+
+ // Main lifecycle effect — fires when containerEl becomes non-null
+ useEffect(() => {
+ if (!containerEl || !accountId) return undefined;
+
+ let disposed = false;
+ let focusTimeout: ReturnType<typeof setTimeout> | null = null;
+ const inputBuffer = { current: "" };
+ const currentPrompt = { current: "" };
+
+ // 1. Create terminal
+ const terminal = new Terminal({
+ cursorBlink: true,
+ fontSize: 14,
+ fontFamily: '"JetBrains Mono", "Fira Code", Menlo, Monaco, "Courier New", monospace',
+ theme: {
+ background: "#0d1117",
+ foreground: "#c9d1d9",
+ cursor: "#58a6ff",
+ cursorAccent: "#0d1117",
+ selectionBackground: "#264f78",
+ black: "#0d1117",
+ red: "#ff7b72",
+ green: "#3fb950",
+ yellow: "#d29922",
+ blue: "#58a6ff",
+ magenta: "#bc8cff",
+ cyan: "#76e3ea",
+ white: "#c9d1d9",
+ brightBlack: "#484f58",
+ brightRed: "#ffa198",
+ brightGreen: "#56d364",
+ brightYellow: "#e3b341",
+ brightBlue: "#79c0ff",
+ brightMagenta: "#d2a8ff",
+ brightCyan: "#b3f0ff",
+ brightWhite: "#f0f6fc"
+ },
+ scrollback: 10000,
+ allowProposedApi: true
+ });
+
+ const fitAddon = new FitAddon();
+ terminal.loadAddon(fitAddon);
+ terminal.open(containerEl);
+ fitAddon.fit();
+
+ // 2. Wire terminal keyboard input
+ terminal.onData((data) => {
+ // Enter — submit the current input buffer
+ if (data === "\r") {
+ terminal.write("\r\n");
+ if (wsRef.current?.readyState === WebSocket.OPEN) {
+ wsRef.current.send(
+ JSON.stringify({ type: WsMessageType.Input, data: inputBuffer.current })
+ );
+ }
+ inputBuffer.current = "";
+ // Backspace — erase the last character
+ } else if (data === "\x7f") {
+ if (inputBuffer.current.length > 0) {
+ inputBuffer.current = inputBuffer.current.slice(0, -1);
+ terminal.write("\b \b");
+ }
+ // Ctrl+C — cancel the current input
+ } else if (data === "\x03") {
+ terminal.write("^C\r\n");
+ inputBuffer.current = "";
+ terminal.write(currentPrompt.current);
+ // Printable characters and tab — append to input buffer
+ } else if (data >= " " || data === "\t") {
+ // Normalize embedded newlines from paste
+ const normalized = data.replace(/\r\n|\r/g, "\n");
+ inputBuffer.current += normalized;
+ terminal.write(normalized.replace(/\n/g, "\r\n"));
+ }
+ });
+
+ // 3. Resize handling
+ const handleResize = () => fitAddon.fit();
+ const resizeObserver = new ResizeObserver(handleResize);
+ resizeObserver.observe(containerEl);
+ window.addEventListener("resize", handleResize);
+
+ // 4. Create ticket and open WebSocket
+ const startSession = async () => {
+ try {
+ if (disposed) return;
+ const ticket = await createTicketRef.current.mutateAsync({ accountId, projectId });
+ if (disposed) return;
+
+ const { protocol, host } = window.location;
+ const wsProtocol = protocol === "https:" ? "wss:" : "ws:";
+ const wsUrl = `${wsProtocol}//${host}/api/v1/pam/accounts/${accountId}/web-access?ticket=${encodeURIComponent(ticket)}`;
+ const ws = new WebSocket(wsUrl);
+ wsRef.current = ws;
+
+ ws.onmessage = (event) => {
+ if (disposed) return;
+ let raw: unknown;
+ try {
+ raw = JSON.parse(event.data as string);
+ } catch {
+ return;
+ }
+ const parsed = WebSocketServerMessageSchema.safeParse(raw);
+ if (!parsed.success) return;
+ const msg = parsed.data;
+
+ if (msg.type === WsMessageType.Ready) {
+ setIsConnected(true);
+ onSessionStartRef.current?.();
+ focusTimeout = setTimeout(() => terminal.focus(), 100);
+ }
+
+ // Write directly to terminal — no indirection
+ if (msg.data) {
+ // xterm requires \r\n; bare \n moves the cursor down without returning to column 0
+ terminal.write(msg.data.replace(/\r?\n/g, "\r\n"));
+ }
+ if (msg.prompt) {
+ currentPrompt.current = msg.prompt;
+ terminal.write(msg.prompt);
+ }
+ };
+
+ ws.onclose = () => {
+ if (disposed) return;
+ wsRef.current = null;
+ setIsConnected(false);
+ onSessionEndRef.current?.();
+ };
+
+ ws.onerror = () => {
+ // no-op: onclose always fires after onerror
+ };
+ } catch {
+ if (!disposed) {
+ terminal.write("\r\nFailed to connect. Please close and try again.\r\n");
+ }
+ }
+ };
+
+ startSession();
+
+ // 5. Cleanup
+ return () => {
+ disposed = true;
+ if (focusTimeout) clearTimeout(focusTimeout);
+ window.removeEventListener("resize", handleResize);
+ resizeObserver.disconnect();
+
+ const ws = wsRef.current;
+ if (ws) {
+ if (ws.readyState === WebSocket.OPEN) {
+ ws.send(JSON.stringify({ type: WsMessageType.Control, data: "quit" }));
+ }
+ ws.close();
+ wsRef.current = null;
+ }
+
+ terminal.dispose();
+ setIsConnected(false);
+ };
+ }, [containerEl, accountId, projectId]);
+
+ const disconnect = useCallback(() => {
+ const ws = wsRef.current;
+ wsRef.current = null;
+
+ if (ws) {
+ if (ws.readyState === WebSocket.OPEN) {
+ ws.send(JSON.stringify({ type: WsMessageType.Control, data: "quit" }));
+ }
+ ws.close();
+ }
+ }, []);
+
+ const containerRef = useCallback((node: HTMLDivElement | null) => {
+ setContainerEl(node);
+ }, []);
+
+ return { containerRef, isConnected, disconnect };
+};
diff --git a/frontend/src/pages/pam/PamResourceByIDPage/components/PamResourceAccountsSection.tsx b/frontend/src/pages/pam/PamResourceByIDPage/components/PamResourceAccountsSection.tsx
index 35b06ca1f6..c938d4e145 100644
--- a/frontend/src/pages/pam/PamResourceByIDPage/components/PamResourceAccountsSection.tsx
+++ b/frontend/src/pages/pam/PamResourceByIDPage/components/PamResourceAccountsSection.tsx
@@ -46,6 +46,7 @@ import { PamAddAccountModal } from "../../PamAccountsPage/components/PamAddAccou
import { PamDeleteAccountModal } from "../../PamAccountsPage/components/PamDeleteAccountModal";
import { PamRequestAccountAccessModal } from "../../PamAccountsPage/components/PamRequestAccountAccessModal";
import { PamUpdateAccountModal } from "../../PamAccountsPage/components/PamUpdateAccountModal";
+import { PamWebAccessModal } from "../../PamAccountsPage/components/PamWebAccess";
import { useAccessAwsIamAccount } from "../../PamAccountsPage/components/useAccessAwsIamAccount";
type Props = {
@@ -64,6 +65,7 @@ export const PamResourceAccountsSection = ({ resource }: Props) => {
const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp([
"addAccount",
"accessAccount",
+ "webAccess",
"requestAccount",
"updateAccount",
"deleteAccount"
@@ -361,6 +363,16 @@ export const PamResourceAccountsSection = ({ resource }: Props) => {
onOpenChange={(isOpen) => handlePopUpToggle("accessAccount", isOpen)}
account={popUp.accessAccount.data?.account}
projectId={projectId!}
+ onOpenWebAccess={() => {
+ handlePopUpOpen("webAccess", { account: popUp.accessAccount.data?.account });
+ }}
+ />
+
+ <PamWebAccessModal
+ isOpen={popUp.webAccess.isOpen}
+ onOpenChange={(isOpen) => handlePopUpToggle("webAccess", isOpen)}
+ account={popUp.webAccess.data?.account}
+ projectId={projectId!}
/>
<PamRequestAccountAccessModal
diff --git a/nginx/default.conf b/nginx/default.conf
index 4348fe3d9f..0234ac7a5e 100644
--- a/nginx/default.conf
+++ b/nginx/default.conf
@@ -1,6 +1,33 @@
server {
listen 80;
+ # WebSocket endpoint for PAM web access
+ location ~ ^/api/v1/pam/accounts/[^/]+/web-access$ {
+ proxy_set_header X-Real-RIP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+
+ proxy_set_header Host $http_host;
+ proxy_set_header X-NginX-Proxy true;
+
+ # WebSocket support
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+
+ # Disable buffering for real-time communication
+ proxy_buffering off;
+ proxy_cache off;
+
+ # Increase timeouts for long-lived connections
+ proxy_read_timeout 4200s;
+ proxy_send_timeout 4200s;
+
+ proxy_pass http://backend:4000;
+ proxy_redirect off;
+
+ proxy_cookie_path / "/; HttpOnly; SameSite=strict";
+ }
+
location ~ ^/(api|secret-scanning/webhooks) {
proxy_set_header X-Real-RIP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
diff --git a/nginx/default.dev.conf b/nginx/default.dev.conf
index 01f4a259db..0adc8a5f00 100644
--- a/nginx/default.dev.conf
+++ b/nginx/default.dev.conf
@@ -8,6 +8,33 @@ server {
large_client_header_buffers 8 128k;
client_header_buffer_size 128k;
+ # WebSocket endpoint for PAM web access
+ location ~ ^/api/v1/pam/accounts/[^/]+/web-access$ {
+ proxy_set_header X-Real-RIP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+
+ proxy_set_header Host $http_host;
+ proxy_set_header X-NginX-Proxy true;
+
+ # WebSocket support
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+
+ # Disable buffering for real-time communication
+ proxy_buffering off;
+ proxy_cache off;
+
+ # Increase timeouts for long-lived connections
+ proxy_read_timeout 4200s;
+ proxy_send_timeout 4200s;
+
+ proxy_pass http://api;
+ proxy_redirect off;
+
+ proxy_cookie_path / "/; SameSite=strict";
+ }
+
location ~ ^/(api|secret-scanning/webhooks) {
proxy_set_header X-Real-RIP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;