samlesa 2.18.3 → 2.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/extractor.js +18 -1
- package/build/src/flow.js +99 -21
- package/build/src/libsaml.js +1 -4
- package/package.json +77 -77
- package/types/src/extractor.d.ts.map +1 -1
- package/types/src/flow.d.ts.map +1 -1
- package/types/src/libsaml.d.ts +1 -1
- package/types/src/libsaml.d.ts.map +1 -1
- package/types/api.d.ts +0 -15
- package/types/api.d.ts.map +0 -1
- package/types/binding-post.d.ts +0 -48
- package/types/binding-post.d.ts.map +0 -1
- package/types/binding-redirect.d.ts +0 -54
- package/types/binding-redirect.d.ts.map +0 -1
- package/types/binding-simplesign.d.ts +0 -41
- package/types/binding-simplesign.d.ts.map +0 -1
- package/types/entity-idp.d.ts +0 -38
- package/types/entity-idp.d.ts.map +0 -1
- package/types/entity-sp.d.ts +0 -38
- package/types/entity-sp.d.ts.map +0 -1
- package/types/entity.d.ts +0 -100
- package/types/entity.d.ts.map +0 -1
- package/types/extractor.d.ts +0 -26
- package/types/extractor.d.ts.map +0 -1
- package/types/flow.d.ts +0 -7
- package/types/flow.d.ts.map +0 -1
- package/types/libsaml.d.ts +0 -208
- package/types/libsaml.d.ts.map +0 -1
- package/types/metadata-idp.d.ts +0 -25
- package/types/metadata-idp.d.ts.map +0 -1
- package/types/metadata-sp.d.ts +0 -37
- package/types/metadata-sp.d.ts.map +0 -1
- package/types/metadata.d.ts +0 -58
- package/types/metadata.d.ts.map +0 -1
- package/types/types.d.ts +0 -128
- package/types/types.d.ts.map +0 -1
- package/types/urn.d.ts +0 -195
- package/types/urn.d.ts.map +0 -1
- package/types/utility.d.ts +0 -133
- package/types/utility.d.ts.map +0 -1
- package/types/validator.d.ts +0 -4
- package/types/validator.d.ts.map +0 -1
package/build/src/extractor.js
CHANGED
|
@@ -173,7 +173,24 @@ export const loginResponseFields = assertion => [
|
|
|
173
173
|
attributePath: ['AttributeValue'],
|
|
174
174
|
attributes: [],
|
|
175
175
|
shortcut: assertion
|
|
176
|
-
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
key: 'subjectConfirmation',
|
|
179
|
+
localPath: ['Assertion', 'Subject', 'SubjectConfirmation', 'SubjectConfirmationData'],
|
|
180
|
+
attributes: ['Recipient', 'InResponseTo', 'NotOnOrAfter'],
|
|
181
|
+
shortcut: assertion
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
key: 'oneTimeUse',
|
|
185
|
+
localPath: ['Assertion', 'Conditions', 'OneTimeUse'],
|
|
186
|
+
attributes: [],
|
|
187
|
+
shortcut: assertion
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
key: 'status',
|
|
191
|
+
localPath: ['Response', 'Status', 'StatusCode'],
|
|
192
|
+
attributes: ['Value']
|
|
193
|
+
},
|
|
177
194
|
];
|
|
178
195
|
export const logoutRequestFields = [
|
|
179
196
|
{
|
package/build/src/flow.js
CHANGED
|
@@ -107,7 +107,7 @@ async function redirectFlow(options) {
|
|
|
107
107
|
if (parserType === 'SAMLResponse'
|
|
108
108
|
&& extractedProperties.conditions
|
|
109
109
|
&& !verifyTime(extractedProperties.conditions.notBefore, extractedProperties.conditions.notOnOrAfter, self.entitySetting.clockDrifts)) {
|
|
110
|
-
return Promise.reject('
|
|
110
|
+
return Promise.reject('ERR_CONDITION_UNCONFIRMED');
|
|
111
111
|
}
|
|
112
112
|
if (parserType === 'SAMLResponse') {
|
|
113
113
|
let destination = extractedProperties?.response?.destination;
|
|
@@ -153,8 +153,6 @@ async function postFlow(options) {
|
|
|
153
153
|
/**检查签名顺序 */
|
|
154
154
|
// 改进的postFlow函数中关于签名验证的部分
|
|
155
155
|
const verificationResult = await libsaml.verifySignature(samlContent, verificationOptions, self);
|
|
156
|
-
/* console.log(verificationResult)
|
|
157
|
-
console.log("解析对象")*/
|
|
158
156
|
let resultObject = {
|
|
159
157
|
isMessageSigned: true, //是否有外层的消息签名(Response或者Request 等最外层的签名)
|
|
160
158
|
MessageSignatureStatus: true, //外层的签名是否经过验证
|
|
@@ -227,30 +225,111 @@ async function postFlow(options) {
|
|
|
227
225
|
if (parserType === 'SAMLResponse'
|
|
228
226
|
&& extractedProperties.conditions
|
|
229
227
|
&& !verifyTime(extractedProperties.conditions.notBefore, extractedProperties.conditions.notOnOrAfter, self.entitySetting.clockDrifts)) {
|
|
228
|
+
return Promise.reject('ERR_CONDITION_SESSION');
|
|
229
|
+
}
|
|
230
|
+
// invalid subjectConfirmation time
|
|
231
|
+
// invalid time
|
|
232
|
+
// 2.4.1.2 https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf
|
|
233
|
+
if (parserType === 'SAMLResponse'
|
|
234
|
+
&& extractedProperties.subjectConfirmation
|
|
235
|
+
&& !verifyTime(undefined, extractedProperties.subjectConfirmation.notOnOrAfter, self.entitySetting.clockDrifts)) {
|
|
230
236
|
return Promise.reject('ERR_SUBJECT_UNCONFIRMED');
|
|
231
237
|
}
|
|
232
238
|
//valid destination
|
|
233
239
|
//There is no validation of the response here. The upper-layer application
|
|
234
240
|
// should verify the result by itself to see if the destination is equal to the SP acs and
|
|
235
241
|
// whether the response.id is used to prevent replay attacks.
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
let
|
|
239
|
-
|
|
240
|
-
})
|
|
241
|
-
if (isExit?.length === 0) {
|
|
242
|
-
return Promise.reject('ERR_Destination_URL');
|
|
243
|
-
}
|
|
244
|
-
if (parserType === 'SAMLResponse') {
|
|
245
|
-
let destination = extractedProperties?.response?.destination
|
|
246
|
-
let isExit = self.entitySetting?.assertionConsumerService?.filter((item: { Location: any; }) => {
|
|
242
|
+
console.log(extractedProperties);
|
|
243
|
+
console.log("牛逼属性");
|
|
244
|
+
/* let destination = extractedProperties?.response?.destination
|
|
245
|
+
let isExit = self.entitySetting?.assertionConsumerService?.filter((item) => {
|
|
247
246
|
return item?.Location === destination
|
|
248
247
|
})
|
|
249
248
|
if (isExit?.length === 0) {
|
|
250
249
|
return Promise.reject('ERR_Destination_URL');
|
|
251
250
|
}
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
if (parserType === 'SAMLResponse') {
|
|
252
|
+
let destination = extractedProperties?.response?.destination
|
|
253
|
+
let isExit = self.entitySetting?.assertionConsumerService?.filter((item: { Location: any; }) => {
|
|
254
|
+
return item?.Location === destination
|
|
255
|
+
})
|
|
256
|
+
if (isExit?.length === 0) {
|
|
257
|
+
return Promise.reject('ERR_Destination_URL');
|
|
258
|
+
}
|
|
259
|
+
}*/
|
|
260
|
+
// ============================
|
|
261
|
+
// VALIDATE Destination & Recipient
|
|
262
|
+
// ============================
|
|
263
|
+
const { type } = verificationResult;
|
|
264
|
+
const { response, subjectConfirmation } = extractedProperties || {};
|
|
265
|
+
// 获取 SP 配置的所有合法 ACS URLs(用于比对)
|
|
266
|
+
const validACSUrls = (self.entitySetting?.assertionConsumerService || [])
|
|
267
|
+
.map((item) => item.Location)
|
|
268
|
+
.filter(Boolean);
|
|
269
|
+
/**
|
|
270
|
+
* Helper: Check if a given URL is in the list of valid ACS endpoints
|
|
271
|
+
*/
|
|
272
|
+
function isValidACSEndpoint(url) {
|
|
273
|
+
return url != null && validACSUrls.includes(url);
|
|
274
|
+
}
|
|
275
|
+
// 根据消息类型执行不同的验证
|
|
276
|
+
switch (type) {
|
|
277
|
+
case 'Response': // SAML Response (Login)
|
|
278
|
+
{
|
|
279
|
+
// 1. 验证协议层 Destination(必须匹配 ACS)
|
|
280
|
+
const destination = response?.destination;
|
|
281
|
+
if (!isValidACSEndpoint(destination)) {
|
|
282
|
+
return Promise.reject('ERR_INVALID_DESTINATION');
|
|
283
|
+
}
|
|
284
|
+
// 2. 验证断言层 Recipient(必须匹配 ACS,且通常应等于 Destination)
|
|
285
|
+
const recipient = subjectConfirmation?.recipient;
|
|
286
|
+
if (!isValidACSEndpoint(recipient)) {
|
|
287
|
+
return Promise.reject('ERR_INVALID_RECIPIENT');
|
|
288
|
+
}
|
|
289
|
+
// 可选:强制 Destination === Recipient(推荐)
|
|
290
|
+
if (destination !== recipient) {
|
|
291
|
+
// 注意:某些 IdP 可能不严格一致,但安全起见建议开启
|
|
292
|
+
return Promise.reject('ERR_DESTINATION_RECIPIENT_MISMATCH');
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
break;
|
|
296
|
+
case 'LogoutRequest': // IdP 发起的单点登出
|
|
297
|
+
{
|
|
298
|
+
// LogoutRequest 是 IdP → SP,SP 是接收方
|
|
299
|
+
// 必须验证 Destination 是否为 SP 的 SLO endpoint(Single Logout Service)
|
|
300
|
+
const destination = response?.destination; // 注意:LogoutRequest 的 root 元素是 <samlp:LogoutRequest>
|
|
301
|
+
const validSLOUrls = (self.entitySetting?.singleLogoutService || [])
|
|
302
|
+
.map((item) => item.Location)
|
|
303
|
+
.filter(Boolean);
|
|
304
|
+
if (destination && !validSLOUrls.includes(destination)) {
|
|
305
|
+
return Promise.reject('ERR_INVALID_LOGOUT_DESTINATION');
|
|
306
|
+
}
|
|
307
|
+
// LogoutRequest 通常**不包含 Assertion**,所以无 Recipient
|
|
308
|
+
// 如果有嵌套断言(罕见),可额外处理,但一般不需要
|
|
309
|
+
}
|
|
310
|
+
break;
|
|
311
|
+
case 'LogoutResponse': // SP → IdP 的登出响应
|
|
312
|
+
{
|
|
313
|
+
// LogoutResponse 是 SP → IdP,IdP 是接收方
|
|
314
|
+
// 此时 SP 是发送方,**不应验证 Destination 是否属于自身**
|
|
315
|
+
// 而应由 IdP 验证。因此 SP 端通常**跳过 Destination 验证**
|
|
316
|
+
// 但如果你作为 SP 也要校验(比如防止发错),可对比 IdP 的 SLO URL
|
|
317
|
+
// —— 但你的 entityMeta 是 SP 自身,没有 IdP 的 SLO,所以一般不验
|
|
318
|
+
// ✅ 所以:LogoutResponse 在 SP 端通常**无需验证 Destination/Recipient**
|
|
319
|
+
}
|
|
320
|
+
break;
|
|
321
|
+
case 'AuthnRequest': // SP → IdP 的认证请求
|
|
322
|
+
{
|
|
323
|
+
// AuthnRequest 是 SP 发出的,不是接收的
|
|
324
|
+
// 此验证逻辑运行在 SP 接收响应时,**不会收到 AuthnRequest**
|
|
325
|
+
// 所以这个 case 实际不会触发,保留仅为完整性
|
|
326
|
+
}
|
|
327
|
+
break;
|
|
328
|
+
case 'Unknown':
|
|
329
|
+
default:
|
|
330
|
+
// 未知类型,保守拒绝
|
|
331
|
+
return Promise.reject('ERR_UNKNOWN_SAML_MESSAGE_TYPE');
|
|
332
|
+
}
|
|
254
333
|
return Promise.resolve({
|
|
255
334
|
...parseResult,
|
|
256
335
|
verificationResult: {
|
|
@@ -291,8 +370,6 @@ async function postArtifactFlow(options) {
|
|
|
291
370
|
/**检查签名顺序 */
|
|
292
371
|
// 改进的postFlow函数中关于签名验证的部分
|
|
293
372
|
const verificationResult = await libsaml.verifySignature(samlContent, verificationOptions, self);
|
|
294
|
-
console.log(verificationResult);
|
|
295
|
-
console.log("最终结果====");
|
|
296
373
|
// 检查验证结果
|
|
297
374
|
if (!verificationResult.status) {
|
|
298
375
|
// 如果验证失败,根据具体情况返回错误
|
|
@@ -346,7 +423,7 @@ async function postArtifactFlow(options) {
|
|
|
346
423
|
if (parserType === 'SAMLResponse'
|
|
347
424
|
&& extractedProperties.conditions
|
|
348
425
|
&& !verifyTime(extractedProperties.conditions.notBefore, extractedProperties.conditions.notOnOrAfter, self.entitySetting.clockDrifts)) {
|
|
349
|
-
return Promise.reject('
|
|
426
|
+
return Promise.reject('ERR_CONDITION_UNCONFIRMED');
|
|
350
427
|
}
|
|
351
428
|
//valid destination
|
|
352
429
|
//There is no validation of the response here. The upper-layer application
|
|
@@ -451,7 +528,7 @@ async function postSimpleSignFlow(options) {
|
|
|
451
528
|
if (parserType === 'SAMLResponse'
|
|
452
529
|
&& extractedProperties.conditions
|
|
453
530
|
&& !verifyTime(extractedProperties.conditions.notBefore, extractedProperties.conditions.notOnOrAfter, self.entitySetting.clockDrifts)) {
|
|
454
|
-
return Promise.reject('
|
|
531
|
+
return Promise.reject('ERR_CONDITION_UNCONFIRMED');
|
|
455
532
|
}
|
|
456
533
|
if (parserType === 'SAMLResponse') {
|
|
457
534
|
let destination = extractedProperties?.response?.destination;
|
|
@@ -486,7 +563,8 @@ export function checkStatus(content, parserType, soap) {
|
|
|
486
563
|
throw new Error('ERR_UNDEFINED_STATUS');
|
|
487
564
|
}
|
|
488
565
|
// returns a detailed error for two-tier error code
|
|
489
|
-
throw new Error(
|
|
566
|
+
throw new Error('ERR_UNDEFINED_STATUS');
|
|
567
|
+
/* throw new Error(`ERR_FAILED_STATUS with top tier code: ${top}, second tier code: ${second}`);*/
|
|
490
568
|
}
|
|
491
569
|
export function flow(options) {
|
|
492
570
|
const binding = options.binding;
|
package/build/src/libsaml.js
CHANGED
|
@@ -314,7 +314,7 @@ xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="{ID}"
|
|
|
314
314
|
* @desc Construct the XML signature for POST binding
|
|
315
315
|
* @param {string} rawSamlMessage request/response xml string
|
|
316
316
|
* @param {string} referenceTagXPath reference uri
|
|
317
|
-
* @param {string} privateKey declares the private key
|
|
317
|
+
* @param {string} privateKey declares the private key-
|
|
318
318
|
* @param {string} passphrase passphrase of the private key [optional]
|
|
319
319
|
* @param {string|buffer} signingCert signing certificate
|
|
320
320
|
* @param {string} signatureAlgorithm signature algorithm
|
|
@@ -465,8 +465,6 @@ xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="{ID}"
|
|
|
465
465
|
}
|
|
466
466
|
let hasUnsafeSignatureAlgorithm = false;
|
|
467
467
|
let unsafeSignatureAlgorithm = '';
|
|
468
|
-
console.log({ hasUnsafeSignatureAlgorithm, unsafeSignatureAlgorithm });
|
|
469
|
-
console.log("检查结果=====");
|
|
470
468
|
// 特殊情况:带未签名断言的未签名SAML响应,应该拒绝
|
|
471
469
|
if (!isMessageSigned && !isAssertionSigned && !encrypted) {
|
|
472
470
|
return {
|
|
@@ -612,7 +610,6 @@ xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ID="{ID}"
|
|
|
612
610
|
sig.publicCert = this.getKeyInfo(metadataCert[0]).getKey();
|
|
613
611
|
}
|
|
614
612
|
}
|
|
615
|
-
console.log(doc.toString());
|
|
616
613
|
sig.signatureAlgorithm = signatureAlgorithm.value;
|
|
617
614
|
// @ts-expect-error misssing Node properties are not needed
|
|
618
615
|
sig.loadSignature(signatureNode);
|
package/package.json
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "samlesa",
|
|
3
|
-
"version": "2.18.
|
|
4
|
-
"description": "High-level API for Single Sign On (SAML 2.0) baseed on samlify ",
|
|
5
|
-
"main": "build/index.js",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"nodejs",
|
|
8
|
-
"saml2",
|
|
9
|
-
"sso",
|
|
10
|
-
"slo",
|
|
11
|
-
"metadata"
|
|
12
|
-
],
|
|
13
|
-
"type": "module",
|
|
14
|
-
"typings": "types/index.d.ts",
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "tsc && copyfiles -u 1 src/schema/**/* build/src",
|
|
17
|
-
"docs": "docsify serve -o docs",
|
|
18
|
-
"lint": "tslint -p .",
|
|
19
|
-
"lint:fix": "tslint -p . --fix",
|
|
20
|
-
"test": "vitest",
|
|
21
|
-
"test:watch": "vitest --watch",
|
|
22
|
-
"test:coverage": "vitest run --coverage",
|
|
23
|
-
"hooks:postinstall": "mklink /J .git\\hooks\\pre-commit .pre-commit.sh || copy .pre-commit.sh .git\\hooks\\pre-commit"
|
|
24
|
-
},
|
|
25
|
-
"exports": {
|
|
26
|
-
".": {
|
|
27
|
-
"types": "./types/index.d.ts",
|
|
28
|
-
"import": "./build/index.js"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"files": [
|
|
32
|
-
"build",
|
|
33
|
-
"types"
|
|
34
|
-
],
|
|
35
|
-
"contributors": [
|
|
36
|
-
"Veclea <vemocle@gmail.com>"
|
|
37
|
-
],
|
|
38
|
-
"author": "Veclea",
|
|
39
|
-
"repository": {
|
|
40
|
-
"url": "https://github.com/Veclea/samlify.git",
|
|
41
|
-
"type": "git"
|
|
42
|
-
},
|
|
43
|
-
"license": "MIT",
|
|
44
|
-
"dependencies": {
|
|
45
|
-
"@xmldom/xmldom": "^0.9.8",
|
|
46
|
-
"axios": "^1.13.5",
|
|
47
|
-
"camelcase": "^9.0.0",
|
|
48
|
-
"cross-env": "^10.1.0",
|
|
49
|
-
"iconv-lite": "^0.7.2",
|
|
50
|
-
"node-rsa": "^1.1.1",
|
|
51
|
-
"pako": "^2.1.0",
|
|
52
|
-
"ts-node": "^10.9.2",
|
|
53
|
-
"uuid": "^13.0.0",
|
|
54
|
-
"vite-tsconfig-paths": "^6.1.1",
|
|
55
|
-
"xml": "^1.0.1",
|
|
56
|
-
"xml-crypto": "^6.1.2",
|
|
57
|
-
"xml-encryption": "^3.1.0",
|
|
58
|
-
"xml-escape": "^1.1.0",
|
|
59
|
-
"xml2js": "^0.6.2",
|
|
60
|
-
"xmllint-wasm": "^5.1.0",
|
|
61
|
-
"xpath": "^0.0.32"
|
|
62
|
-
},
|
|
63
|
-
"devDependencies": {
|
|
64
|
-
"@types/node": "^25.3.2",
|
|
65
|
-
"@types/pako": "2.0.4",
|
|
66
|
-
"@types/uuid": "11.0.0",
|
|
67
|
-
"@vitest/coverage-istanbul": "^4.0.18",
|
|
68
|
-
"@vitest/coverage-v8": "4.0.18",
|
|
69
|
-
"copyfiles": "^2.4.1",
|
|
70
|
-
"coveralls": "^3.1.1",
|
|
71
|
-
"esbuild": "^0.27.3",
|
|
72
|
-
"jsdom": "^28.1.0",
|
|
73
|
-
"timekeeper": "^2.3.1",
|
|
74
|
-
"typescript": "5.9.3",
|
|
75
|
-
"vitest": "^4.0.18"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "samlesa",
|
|
3
|
+
"version": "2.18.4",
|
|
4
|
+
"description": "High-level API for Single Sign On (SAML 2.0) baseed on samlify ",
|
|
5
|
+
"main": "build/index.js",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"nodejs",
|
|
8
|
+
"saml2",
|
|
9
|
+
"sso",
|
|
10
|
+
"slo",
|
|
11
|
+
"metadata"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"typings": "types/index.d.ts",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc && copyfiles -u 1 src/schema/**/* build/src",
|
|
17
|
+
"docs": "docsify serve -o docs",
|
|
18
|
+
"lint": "tslint -p .",
|
|
19
|
+
"lint:fix": "tslint -p . --fix",
|
|
20
|
+
"test": "vitest",
|
|
21
|
+
"test:watch": "vitest --watch",
|
|
22
|
+
"test:coverage": "vitest run --coverage",
|
|
23
|
+
"hooks:postinstall": "mklink /J .git\\hooks\\pre-commit .pre-commit.sh || copy .pre-commit.sh .git\\hooks\\pre-commit"
|
|
24
|
+
},
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./types/index.d.ts",
|
|
28
|
+
"import": "./build/index.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"build",
|
|
33
|
+
"types"
|
|
34
|
+
],
|
|
35
|
+
"contributors": [
|
|
36
|
+
"Veclea <vemocle@gmail.com>"
|
|
37
|
+
],
|
|
38
|
+
"author": "Veclea",
|
|
39
|
+
"repository": {
|
|
40
|
+
"url": "https://github.com/Veclea/samlify.git",
|
|
41
|
+
"type": "git"
|
|
42
|
+
},
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@xmldom/xmldom": "^0.9.8",
|
|
46
|
+
"axios": "^1.13.5",
|
|
47
|
+
"camelcase": "^9.0.0",
|
|
48
|
+
"cross-env": "^10.1.0",
|
|
49
|
+
"iconv-lite": "^0.7.2",
|
|
50
|
+
"node-rsa": "^1.1.1",
|
|
51
|
+
"pako": "^2.1.0",
|
|
52
|
+
"ts-node": "^10.9.2",
|
|
53
|
+
"uuid": "^13.0.0",
|
|
54
|
+
"vite-tsconfig-paths": "^6.1.1",
|
|
55
|
+
"xml": "^1.0.1",
|
|
56
|
+
"xml-crypto": "^6.1.2",
|
|
57
|
+
"xml-encryption": "^3.1.0",
|
|
58
|
+
"xml-escape": "^1.1.0",
|
|
59
|
+
"xml2js": "^0.6.2",
|
|
60
|
+
"xmllint-wasm": "^5.1.0",
|
|
61
|
+
"xpath": "^0.0.32"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@types/node": "^25.3.2",
|
|
65
|
+
"@types/pako": "2.0.4",
|
|
66
|
+
"@types/uuid": "11.0.0",
|
|
67
|
+
"@vitest/coverage-istanbul": "^4.0.18",
|
|
68
|
+
"@vitest/coverage-v8": "4.0.18",
|
|
69
|
+
"copyfiles": "^2.4.1",
|
|
70
|
+
"coveralls": "^3.1.1",
|
|
71
|
+
"esbuild": "^0.27.3",
|
|
72
|
+
"jsdom": "^28.1.0",
|
|
73
|
+
"timekeeper": "^2.3.1",
|
|
74
|
+
"typescript": "5.9.3",
|
|
75
|
+
"vitest": "^4.0.18"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../src/extractor.ts"],"names":[],"mappings":"AAKA,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC;IACjC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,eAAe,GAAG,cAAc,EAAE,CAAC;AA4B/C,eAAO,MAAM,kBAAkB,EAAE,eA2BhC,CAAC;AACF,eAAO,MAAM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flow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/flow.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,UAAU;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;
|
|
1
|
+
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/flow.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,UAAU;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,GAAG,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAitBD,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BhG;AAED,wBAAgB,IAAI,CAAC,OAAO,KAAA,GAAG,OAAO,CAAC,UAAU,CAAC,CA0BjD"}
|
package/types/src/libsaml.d.ts
CHANGED
|
@@ -160,7 +160,7 @@ declare const _default: {
|
|
|
160
160
|
* @desc Construct the XML signature for POST binding
|
|
161
161
|
* @param {string} rawSamlMessage request/response xml string
|
|
162
162
|
* @param {string} referenceTagXPath reference uri
|
|
163
|
-
* @param {string} privateKey declares the private key
|
|
163
|
+
* @param {string} privateKey declares the private key-
|
|
164
164
|
* @param {string} passphrase passphrase of the private key [optional]
|
|
165
165
|
* @param {string|buffer} signingCert signing certificate
|
|
166
166
|
* @param {string} signatureAlgorithm signature algorithm
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libsaml.d.ts","sourceRoot":"","sources":["../../src/libsaml.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAerD;;;;GAIG;AAGH,MAAM,WAAW,oBAAo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15 +0,0 @@
|
|
|
1
|
-
import { DOMParser as dom } from '@xmldom/xmldom';
|
|
2
|
-
import type { Options as DOMParserOptions } from '@xmldom/xmldom';
|
|
3
|
-
interface Context extends ValidatorContext, DOMParserContext {
|
|
4
|
-
}
|
|
5
|
-
interface ValidatorContext {
|
|
6
|
-
validate?: (xml: string) => Promise<any>;
|
|
7
|
-
}
|
|
8
|
-
interface DOMParserContext {
|
|
9
|
-
dom: dom;
|
|
10
|
-
}
|
|
11
|
-
export declare function getContext(): Context;
|
|
12
|
-
export declare function setSchemaValidator(params: ValidatorContext): void;
|
|
13
|
-
export declare function setDOMParserOptions(options?: DOMParserOptions): void;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=api.d.ts.map
|
package/types/api.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElE,UAAU,OAAQ,SAAQ,gBAAgB,EAAE,gBAAgB;CAAG;AAE/D,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAC1C;AAED,UAAU,gBAAgB;IACxB,GAAG,EAAE,GAAG,CAAC;CACV;AAOD,wBAAgB,UAAU,IAAG,OAAO,CAEnC;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,GAAE,IAAI,CAShE;AAED,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,gBAAqB,GAAE,IAAI,CAEvE"}
|
package/types/binding-post.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file binding-post.ts
|
|
3
|
-
* @author tngan
|
|
4
|
-
* @desc Binding-level API, declare the functions using POST binding
|
|
5
|
-
*/
|
|
6
|
-
import type { BindingContext } from './entity.js';
|
|
7
|
-
/**
|
|
8
|
-
* @desc Generate a base64 encoded login request
|
|
9
|
-
* @param {string} referenceTagXPath reference uri
|
|
10
|
-
* @param {object} entity object includes both idp and sp
|
|
11
|
-
* @param {function} customTagReplacement used when developers have their own login response template
|
|
12
|
-
*/
|
|
13
|
-
declare function base64LoginRequest(referenceTagXPath: string, entity: any, customTagReplacement?: (template: string) => BindingContext): BindingContext;
|
|
14
|
-
/**
|
|
15
|
-
* @desc Generate a base64 encoded login response
|
|
16
|
-
* @param {object} requestInfo corresponding request, used to obtain the id
|
|
17
|
-
* @param {object} entity object includes both idp and sp
|
|
18
|
-
* @param {object} user current logged user (e.g. req.user)
|
|
19
|
-
* @param {function} customTagReplacement used when developers have their own login response template
|
|
20
|
-
* @param {boolean} encryptThenSign whether or not to encrypt then sign first (if signing). Defaults to sign-then-encrypt
|
|
21
|
-
* @param AttributeStatement
|
|
22
|
-
*/
|
|
23
|
-
declare function base64LoginResponse(requestInfo: any | undefined, entity: any, user?: any, customTagReplacement?: (template: string) => BindingContext, encryptThenSign?: boolean, AttributeStatement?: never[]): Promise<BindingContext>;
|
|
24
|
-
/**
|
|
25
|
-
* @desc Generate a base64 encoded logout request
|
|
26
|
-
* @param {object} user current logged user (e.g. req.user)
|
|
27
|
-
* @param {string} referenceTagXPath reference uri
|
|
28
|
-
* @param {object} entity object includes both idp and sp
|
|
29
|
-
* @param {function} customTagReplacement used when developers have their own login response template
|
|
30
|
-
* @return {string} base64 encoded request
|
|
31
|
-
*/
|
|
32
|
-
declare function base64LogoutRequest(user: Record<string, unknown>, referenceTagXPath: string, entity: any, customTagReplacement?: (template: string) => BindingContext): BindingContext;
|
|
33
|
-
/**
|
|
34
|
-
* @desc Generate a base64 encoded logout response
|
|
35
|
-
* @param {object} requestInfo corresponding request, used to obtain the id
|
|
36
|
-
* @param {string} referenceTagXPath reference uri
|
|
37
|
-
* @param {object} entity object includes both idp and sp
|
|
38
|
-
* @param {function} customTagReplacement used when developers have their own login response template
|
|
39
|
-
*/
|
|
40
|
-
declare function base64LogoutResponse(requestInfo: any, entity: any, customTagReplacement: (template: string) => BindingContext): BindingContext;
|
|
41
|
-
declare const postBinding: {
|
|
42
|
-
base64LoginRequest: typeof base64LoginRequest;
|
|
43
|
-
base64LoginResponse: typeof base64LoginResponse;
|
|
44
|
-
base64LogoutRequest: typeof base64LogoutRequest;
|
|
45
|
-
base64LogoutResponse: typeof base64LogoutResponse;
|
|
46
|
-
};
|
|
47
|
-
export default postBinding;
|
|
48
|
-
//# sourceMappingURL=binding-post.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binding-post.d.ts","sourceRoot":"","sources":["../src/binding-post.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AAGF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlD;;;;;EAKE;AACF,iBAAS,kBAAkB,CAAC,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAqD/I;AACD;;;;;;;;GAQG;AACH,iBAAe,mBAAmB,CAAC,WAAW,EAAE,GAAG,YAAK,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAE,GAAQ,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,EAAE,eAAe,GAAE,OAAe,EAAG,kBAAkB,UAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAuIrO;AACD;;;;;;;EAOE;AACF,iBAAS,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAAC,MAAM,EAAE,MAAM,KAAA,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAkDzK;AACD;;;;;;EAME;AACF,iBAAS,oBAAoB,CAAC,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,cAAc,CAsDvI;AAED,QAAA,MAAM,WAAW;;;;;CAKhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { BindingContext } from './entity.js';
|
|
2
|
-
import { IdentityProvider as Idp } from './entity-idp.js';
|
|
3
|
-
import { ServiceProvider as Sp } from './entity-sp.js';
|
|
4
|
-
export interface BuildRedirectConfig {
|
|
5
|
-
baseUrl: string;
|
|
6
|
-
type: string;
|
|
7
|
-
isSigned: boolean;
|
|
8
|
-
context: string;
|
|
9
|
-
entitySetting: any;
|
|
10
|
-
relayState?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @desc Redirect URL for login request
|
|
14
|
-
* @param {object} entity object includes both idp and sp
|
|
15
|
-
* @param {function} customTagReplacement used when developers have their own login response template
|
|
16
|
-
* @return {string} redirect URL
|
|
17
|
-
*/
|
|
18
|
-
declare function loginRequestRedirectURL(entity: {
|
|
19
|
-
idp: Idp;
|
|
20
|
-
sp: Sp;
|
|
21
|
-
}, customTagReplacement?: (template: string) => BindingContext): BindingContext;
|
|
22
|
-
/**
|
|
23
|
-
* @desc Redirect URL for login response
|
|
24
|
-
* @param {object} requestInfo corresponding request, used to obtain the id
|
|
25
|
-
* @param {object} entity object includes both idp and sp
|
|
26
|
-
* @param {object} user current logged user (e.g. req.user)
|
|
27
|
-
* @param {String} relayState the relaystate sent by sp corresponding request
|
|
28
|
-
* @param {function} customTagReplacement used when developers have their own login response template
|
|
29
|
-
* @param AttributeStatement
|
|
30
|
-
*/
|
|
31
|
-
declare function loginResponseRedirectURL(requestInfo: any, entity: any, user?: any, relayState?: string, customTagReplacement?: (template: string) => BindingContext, AttributeStatement?: never[]): BindingContext;
|
|
32
|
-
/**
|
|
33
|
-
* @desc Redirect URL for logout request
|
|
34
|
-
* @param {object} user current logged user (e.g. req.user)
|
|
35
|
-
* @param {object} entity object includes both idp and sp
|
|
36
|
-
* @param {function} customTagReplacement used when developers have their own login response template
|
|
37
|
-
* @return {string} redirect URL
|
|
38
|
-
*/
|
|
39
|
-
declare function logoutRequestRedirectURL(user: any, entity: any, relayState?: string, customTagReplacement?: (template: string, tags: object) => BindingContext): BindingContext;
|
|
40
|
-
/**
|
|
41
|
-
* @desc Redirect URL for logout response
|
|
42
|
-
* @param {object} requescorresponding request, used to obtain the id
|
|
43
|
-
* @param {object} entity object includes both idp and sp
|
|
44
|
-
* @param {function} customTagReplacement used when developers have their own login response template
|
|
45
|
-
*/
|
|
46
|
-
declare function logoutResponseRedirectURL(requestInfo: any, entity: any, relayState?: string, customTagReplacement?: (template: string) => BindingContext): BindingContext;
|
|
47
|
-
declare const redirectBinding: {
|
|
48
|
-
loginRequestRedirectURL: typeof loginRequestRedirectURL;
|
|
49
|
-
loginResponseRedirectURL: typeof loginResponseRedirectURL;
|
|
50
|
-
logoutRequestRedirectURL: typeof logoutRequestRedirectURL;
|
|
51
|
-
logoutResponseRedirectURL: typeof logoutResponseRedirectURL;
|
|
52
|
-
};
|
|
53
|
-
export default redirectBinding;
|
|
54
|
-
//# sourceMappingURL=binding-redirect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binding-redirect.d.ts","sourceRoot":"","sources":["../src/binding-redirect.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,gBAAgB,IAAI,GAAG,EAAC,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAC,eAAe,IAAI,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAOrD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,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|
-
import type { BindingContext, SimpleSignComputedContext } from './entity.js';
|
|
7
|
-
export interface BuildSimpleSignConfig {
|
|
8
|
-
type: string;
|
|
9
|
-
context: string;
|
|
10
|
-
entitySetting: any;
|
|
11
|
-
relayState?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface BindingSimpleSignContext {
|
|
14
|
-
id: string;
|
|
15
|
-
context: string;
|
|
16
|
-
signature: any;
|
|
17
|
-
sigAlg: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* @desc Generate a base64 encoded login request
|
|
21
|
-
* @param {string} referenceTagXPath reference uri
|
|
22
|
-
* @param {object} entity object includes both idp and sp
|
|
23
|
-
* @param {function} customTagReplacement used when developers have their own login response template
|
|
24
|
-
*/
|
|
25
|
-
declare function base64LoginRequest(entity: any, customTagReplacement?: (template: string) => BindingContext): SimpleSignComputedContext;
|
|
26
|
-
/**
|
|
27
|
-
* @desc Generate a base64 encoded login response
|
|
28
|
-
* @param {object} requestInfo corresponding request, used to obtain the id
|
|
29
|
-
* @param {object} entity object includes both idp and sp
|
|
30
|
-
* @param {object} user current logged user (e.g. req.user)
|
|
31
|
-
* @param {string} relayState the relay state
|
|
32
|
-
* @param {function} customTagReplacement used when developers have their own login response template
|
|
33
|
-
* @param AttributeStatement
|
|
34
|
-
*/
|
|
35
|
-
declare function base64LoginResponse(requestInfo: any | undefined, entity: any, user?: any, relayState?: string, customTagReplacement?: (template: string) => BindingContext, AttributeStatement?: []): Promise<BindingSimpleSignContext>;
|
|
36
|
-
declare const simpleSignBinding: {
|
|
37
|
-
base64LoginRequest: typeof base64LoginRequest;
|
|
38
|
-
base64LoginResponse: typeof base64LoginResponse;
|
|
39
|
-
};
|
|
40
|
-
export default simpleSignBinding;
|
|
41
|
-
//# sourceMappingURL=binding-simplesign.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binding-simplesign.d.ts","sourceRoot":"","sources":["../src/binding-simplesign.ts"],"names":[],"mappings":"AAAA;;;;EAIE;AAGF,OAAQ,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAO9E,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AA6CD;;;;;EAKE;AACF,iBAAS,kBAAkB,CAAC,MAAM,EAAE,GAAG,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,GAAG,yBAAyB,CAkD/H;AACD;;;;;;;;GAQG;AACH,iBAAe,mBAAmB,CAAC,WAAW,EAAE,GAAG,YAAK,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAE,GAAQ,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,EAAE,kBAAkB,GAAC,EAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC,CA6FtO;AAED,QAAA,MAAM,iBAAiB;;;CAGpB,CAAC;AAEJ,eAAe,iBAAiB,CAAC"}
|