Skip to content

Commit 15564c6

Browse files
committed
Fix #269 Add sha256 instead sha1 algorithm for sign/digest as recommended value on documentation and settings
1 parent 2e799ab commit 15564c6

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,14 +456,14 @@ In addition to the required settings data (idp, sp), extra settings can be defin
456456
// 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256'
457457
// 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha384'
458458
// 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha512'
459-
"signatureAlgorithm": "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
459+
"signatureAlgorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",
460460

461461
// Algorithm that the toolkit will use on digest process. Options:
462462
// 'http://www.w3.org/2000/09/xmldsig#sha1'
463463
// 'http://www.w3.org/2001/04/xmlenc#sha256'
464464
// 'http://www.w3.org/2001/04/xmldsig-more#sha384'
465465
// 'http://www.w3.org/2001/04/xmlenc#sha512'
466-
"digestAlgorithm": "http://www.w3.org/2000/09/xmldsig#sha1"
466+
"digestAlgorithm": "http://www.w3.org/2001/04/xmlenc#sha256"
467467
},
468468

469469
// Contact information template, it is recommended to supply
@@ -787,7 +787,7 @@ else:
787787

788788
security = self.__settings.get_security_data()
789789
if 'logoutResponseSigned' in security and security['logoutResponseSigned']:
790-
parameters['SigAlg'] = OneLogin_Saml2_Constants.RSA_SHA1
790+
parameters['SigAlg'] = OneLogin_Saml2_Constants.RSA_SHA256
791791
parameters['Signature'] = self.build_response_signature(logout_response, parameters.get('RelayState', None))
792792

793793
return self.redirect_to(self.get_slo_url(), parameters)

demo-bottle/saml/advanced_settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"wantNameId" : true,
1111
"wantNameIdEncrypted": false,
1212
"wantAssertionsEncrypted": false,
13-
"signatureAlgorithm": "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
14-
"digestAlgorithm": "http://www.w3.org/2000/09/xmldsig#sha1"
13+
"signatureAlgorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",
14+
"digestAlgorithm": "http://www.w3.org/2001/04/xmlenc#sha256"
1515
},
1616
"contactPerson": {
1717
"technical": {

demo-django/saml/advanced_settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"wantNameId" : true,
1111
"wantNameIdEncrypted": false,
1212
"wantAssertionsEncrypted": false,
13-
"signatureAlgorithm": "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
14-
"digestAlgorithm": "http://www.w3.org/2000/09/xmldsig#sha1"
13+
"signatureAlgorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",
14+
"digestAlgorithm": "http://www.w3.org/2001/04/xmlenc#sha256"
1515
},
1616
"contactPerson": {
1717
"technical": {

demo-flask/saml/advanced_settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"wantNameId" : true,
1111
"wantNameIdEncrypted": false,
1212
"wantAssertionsEncrypted": false,
13-
"signatureAlgorithm": "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
14-
"digestAlgorithm": "http://www.w3.org/2000/09/xmldsig#sha1"
13+
"signatureAlgorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",
14+
"digestAlgorithm": "http://www.w3.org/2001/04/xmlenc#sha256"
1515
},
1616
"contactPerson": {
1717
"technical": {

demo_pyramid/demo_pyramid/saml/advanced_settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"wantNameId" : true,
1111
"wantNameIdEncrypted": false,
1212
"wantAssertionsEncrypted": false,
13-
"signatureAlgorithm": "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
14-
"digestAlgorithm": "http://www.w3.org/2000/09/xmldsig#sha1"
13+
"signatureAlgorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",
14+
"digestAlgorithm": "http://www.w3.org/2001/04/xmlenc#sha256"
1515
},
1616
"contactPerson": {
1717
"technical": {

0 commit comments

Comments
 (0)