From 2fe305da80f33a02c6dd6d2471695c187ac55802 Mon Sep 17 00:00:00 2001 From: iPipelineMK Date: Wed, 12 Jul 2017 09:47:00 -0400 Subject: [PATCH 1/4] updated function 'buildSamlResponse' when calling the 'computeSignature' method to pass location object containing action & reference properties to enable different Response signature locations --- lib/samlp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/samlp.js b/lib/samlp.js index 3814408..5cd5802 100644 --- a/lib/samlp.js +++ b/lib/samlp.js @@ -48,7 +48,7 @@ function buildSamlResponse(options) { } }; - sig.computeSignature(cannonicalized, { prefix: options.signatureNamespacePrefix }); + sig.computeSignature(cannonicalized, { prefix: options.signatureNamespacePrefix, location: options.location }); SAMLResponse = sig.getSignedXml(); } From 295f5395cf3b299ebc581f70e8e67ffe04ada5f4 Mon Sep 17 00:00:00 2001 From: Michael Kocher Date: Thu, 20 Jul 2017 14:03:59 -0400 Subject: [PATCH 2/4] Update package.json need exact version of 'saml' package not 0.12.2 introduced a breaking change to this fork of 'samlp' --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0307be8..0a6c418 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "ejs": "2.5.5", "flowstate": "^0.4.0", "querystring": "^0.2.0", - "saml": "^0.12.1", + "saml": "0.12.1", "thumbprint": "0.0.1", "xml-crypto": "^0.10.1", "xmldom": "https://github.com/auth0/xmldom/tarball/master", From 90e7fbb709a2c966c7a6fc247c90ee97287b6fd5 Mon Sep 17 00:00:00 2001 From: Michael Kocher Date: Mon, 24 Jul 2017 15:07:27 -0400 Subject: [PATCH 3/4] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0a6c418..ab565b1 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "samlp", + "name": "ipmk-samlp", "version": "3.3.1", "description": "SAML Protocol server middleware", "main": "lib/index.js", @@ -10,7 +10,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/auth0/node-samlp.git" + "url": "https://github.com/iPipelineMK/node-samlp.git" }, "keywords": [ "saml", From 10fdde324b3246f4d556145717dfdfcfe61154bc Mon Sep 17 00:00:00 2001 From: iPipelineMK Date: Tue, 5 Sep 2017 09:50:07 -0400 Subject: [PATCH 4/4] added some logging to track bad responses --- lib/samlp.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/samlp.js b/lib/samlp.js index 5cd5802..f1f211d 100644 --- a/lib/samlp.js +++ b/lib/samlp.js @@ -142,6 +142,10 @@ module.exports.auth = function(options) { opts.postUrl = postUrl; getSamlResponse(opts, user, function (err, SAMLResponse) { + if (err) { + console.warn('Here is the error: ' + err) + console.warn('Here is the SAMLResponse: ' + SAMLResponse) + } if (err) return next(err); var response = new Buffer(SAMLResponse);