Skip to content

Commit

Permalink
Update to passport-saml version 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
berzniz committed Jan 3, 2021
1 parent 8050407 commit ba3e54e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 29 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ Check the documentation of the repository for `options` documentation

## Versions

Version 1.3.5 - 1.3.8 uses `passport-saml@1.3.5`.
### passport-saml version

Hapi v18 support: use version from 1.0.0
| hapi-saml2 version | passport-saml version |
|----|-----
| 2.0.2 - latest | passport-saml@2.0.2 |
| 1.3.5 - 1.3.8 | passport-saml@1.3.5 |

Hapi v17 support: use versions up to 0.0.5
### @hapi/hapi supported versions

| hapi-saml2 version | hapi.js supported version |
|----|-----
| 1.0.0 - latest | v18 - v20 |
| 0.0.1 - 0.0.5 | v17 |

## Usage

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hapi-saml2",
"version": "1.3.8",
"version": "2.0.2",
"description": "SAML Auth for Hapi.js",
"main": "./lib/index.js",
"author": "Tal Bereznitskey <berzniz@gmail.com>",
Expand All @@ -9,7 +9,7 @@
"standard": "standard"
},
"dependencies": {
"passport-saml": "^1.3.5"
"passport-saml": "^2.0.2"
},
"peerDependencies": {
"@hapi/boom": ">=7.2.0",
Expand Down
40 changes: 16 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1049,17 +1049,16 @@ parse-json@^4.0.0:
error-ex "^1.3.1"
json-parse-better-errors "^1.0.1"

passport-saml@^1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/passport-saml/-/passport-saml-1.3.5.tgz#747f2c8bb8b9fed41e8cd14586df5aa83e8a8996"
integrity sha512-HFamiqgGiMRCbUBm3wx02WYWKb6ojke0WJHrg4QXI8tx35HrTmDiY8MksUXhouJtEkfcRwXjBL2cSEpRQ6+PgQ==
passport-saml@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/passport-saml/-/passport-saml-2.0.2.tgz#41c459f0f4c4cf0374b161bf3f9ab008fcacb8fe"
integrity sha512-e8rT/nWEY3YalktzZlGXvnj6mLDQD4R+atfStCF4nHCbqK5IUpip+Bj2Wzbm9v5F/KI497k57kNXkHCLfDSVjA==
dependencies:
debug "^3.1.0"
passport-strategy "*"
q "^1.5.0"
xml-crypto "^1.4.0"
xml-crypto "^2.0.0"
xml-encryption "1.2.1"
xml2js "0.4.x"
xml2js "^0.4.23"
xmlbuilder "^11.0.0"
xmldom "0.1.x"

Expand Down Expand Up @@ -1162,10 +1161,6 @@ punycode@^2.1.0:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==

q@^1.5.0:
version "1.5.1"
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"

react-is@^16.8.1:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16"
Expand Down Expand Up @@ -1491,10 +1486,10 @@ write@^0.2.1:
dependencies:
mkdirp "^0.5.1"

xml-crypto@^1.4.0:
version "1.5.3"
resolved "https://registry.yarnpkg.com/xml-crypto/-/xml-crypto-1.5.3.tgz#a8f500b90f0dfaf0efa3331c345ecb0fff993c34"
integrity sha512-uHkmpUtX15xExe5iimPmakAZN+6CqIvjmaJTy4FwqGzaTjrKRBNeqMh8zGEzVNgW0dk6beFYpyQSgqV/J6C5xA==
xml-crypto@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/xml-crypto/-/xml-crypto-2.0.0.tgz#54cd268ad9d31930afcf7092cbb664258ca9e826"
integrity sha512-/a04qr7RpONRZHOxROZ6iIHItdsQQjN3sj8lJkYDDss8tAkEaAs0VrFjb3tlhmS5snQru5lTs9/5ISSMdPDHlg==
dependencies:
xmldom "0.1.27"
xpath "0.0.27"
Expand All @@ -1509,22 +1504,19 @@ xml-encryption@1.2.1:
xmldom "~0.1.15"
xpath "0.0.27"

xml2js@0.4.x:
version "0.4.19"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7"
xml2js@^0.4.23:
version "0.4.23"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66"
integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==
dependencies:
sax ">=0.6.0"
xmlbuilder "~9.0.1"
xmlbuilder "~11.0.0"

xmlbuilder@^11.0.0:
xmlbuilder@^11.0.0, xmlbuilder@~11.0.0:
version "11.0.1"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3"
integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==

xmlbuilder@~9.0.1:
version "9.0.7"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"

xmldom@0.1.27, xmldom@0.1.x, xmldom@~0.1.15:
version "0.1.27"
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.27.tgz#d501f97b3bdb403af8ef9ecc20573187aadac0e9"
Expand Down

2 comments on commit ba3e54e

@ovallef
Copy link

@ovallef ovallef commented on ba3e54e Jan 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I am having this error:

Error: Cannot set uncompiled validation rules without configuring a validator

On registering hapi-saml2 with hapijs 20.0.3 (Have the same problem with 19.X version).

I found out that the problem is on the file:

lib/controller/handlers/logout.js

Since hapi 19.0.0 release. Hapi change the joi Schema Compiler:

image

Reference:

hapijs/hapi#4017

To solve the error I have to change the require for joi from @hapi/joi to joi and to wrap the query object in to a Joi.object:

image

That solve the issue and now is working fine.

Could you validate this? Maybe you have a better solution.

@berzniz
Copy link
Contributor Author

@berzniz berzniz commented on ba3e54e Jan 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ovallef - this makes sense.

I'm considering removing the Joi dependency altogether. The value we gain from it is small and we can validate it with one less dependency

Please sign in to comment.