stack/apps/mock-saml-idp/package.json
Bilal Godil d4d25f6255 feat(mock-saml-idp): scaffold mock SAML 2.0 IdP for SAML SSO testing
Adds apps/mock-saml-idp, a multi-tenant SAML 2.0 Identity Provider mock
mirroring apps/mock-oauth-server. Each tenant has its own RSA keypair
and self-signed cert generated at startup, so one mock service can back
many SamlConnection rows in tests and exercise per-connection isolation.

Uses samlify deliberately because the upcoming backend SAML wrapper will
use @node-saml/node-saml. Different libraries on each side means a bug
in either library's signature canonicalization surfaces as a test
failure instead of being masked by both sides agreeing.

Endpoints:
- GET  /idp/:tenant/metadata        IdP metadata XML
- GET  /idp/:tenant/sso             AuthnRequest receiver, renders login form
- POST /idp/:tenant/login           builds and auto-POSTs signed assertion
- POST /idp/:tenant/test-controls   queues misbehaviors (bad-signature,
                                    expired, wrong-audience, replay, etc.)
- GET  /idp                         introspection

Also adds @node-saml/node-saml to apps/backend deps for the upcoming
backend SAML protocol wrapper.
2026-04-29 16:38:03 -07:00

27 lines
669 B
JSON

{
"name": "@stackframe/mock-saml-idp",
"version": "2.8.86",
"repository": "https://github.com/stack-auth/stack-auth",
"private": true,
"main": "index.js",
"scripts": {
"start": "tsx src/index.ts",
"dev": "tsx watch --clear-screen=false src/index.ts",
"typecheck": "tsc --noEmit",
"lint": "eslint .",
"clean": "rimraf dist && rimraf node_modules"
},
"dependencies": {
"@types/express": "^5.0.0",
"@types/node-forge": "^1.3.11",
"express": "^4.21.2",
"handlebars": "^4.7.8",
"node-forge": "^1.3.1",
"samlify": "^2.10.0"
},
"devDependencies": {
"tsx": "^4.16.2"
},
"packageManager": "pnpm@10.23.0"
}