Added SAML disableRequestedAuthnContext

Ylian Saint-Hilaire committed May 28, 2020 at 17:03 UTC c4a580a211ffc3075e756e23c1997877c08cad9c
3 files changed +4 -1
sample-config-advanced.json
+1
@@ -209,6 +209,7 @@
209 },
210 "saml": {
211 "_callbackurl": "https://server/auth-saml-callback",
212 + "_disableRequestedAuthnContext": true,
213 "newAccounts": true,
214 "_newAccountsUserGroups": [ "ugrp//xxxxxxxxxxxxxxxxx" ],
215 "entityid": "meshcentral",
translate/translate.json
+1 -1
@@ -31268,4 +31268,4 @@
31268 ]
31269 }
31270 ]
31271 -}
31271 +}
\ No newline at end of file
webserver.js
+2
@@ -4541,6 +4541,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
4541 path: (typeof domain.authstrategies.saml.callbackurl == 'string') ? domain.authstrategies.saml.callbackurl : (url + 'auth-saml-callback'),
4542 entryPoint: domain.authstrategies.saml.idpurl, issuer: 'meshcentral'
4543 };
4544 + if (domain.authstrategies.saml.disablerequestedauthncontext != null) { options.disableRequestedAuthnContext = domain.authstrategies.saml.disablerequestedauthncontext; }
4545 parent.debug('web', 'Adding SAML SSO with options: ' + JSON.stringify(options));
4546 if (typeof domain.authstrategies.saml.entityid == 'string') { options.issuer = domain.authstrategies.saml.entityid; }
4547 options.cert = cert.toString().split('-----BEGIN CERTIFICATE-----').join('').split('-----END CERTIFICATE-----').join('');
@@ -4582,6 +4583,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
4583 path: (typeof domain.authstrategies.intel.callbackurl == 'string') ? domain.authstrategies.intel.callbackurl : (url + 'auth-intel-callback'),
4584 entryPoint: domain.authstrategies.intel.idpurl, issuer: 'meshcentral'
4585 };
4586 + if (domain.authstrategies.saml.disablerequestedauthncontext != null) { options.disableRequestedAuthnContext = domain.authstrategies.saml.disablerequestedauthncontext; }
4587 parent.debug('web', 'Adding Intel SSO with options: ' + JSON.stringify(options));
4588 if (typeof domain.authstrategies.intel.entityid == 'string') { options.issuer = domain.authstrategies.intel.entityid; }
4589 options.cert = cert.toString().split('-----BEGIN CERTIFICATE-----').join('').split('-----END CERTIFICATE-----').join('');