Exit with error if we don't have xmlsec1. This is a critical tool

This commit is contained in:
Sachi King 2017-04-29 20:04:32 +10:00
parent e6f1b232b0
commit 55cc3e43a4

View file

@ -304,6 +304,10 @@ NOSE_ARGS = [
'--cover-package=registrasion.controllers,registrasion.models',
]
xmlsec_binary = '/usr/bin/xmlsec1'
if not os.path.isfile(xmlsec_binary):
sys.exit('ERROR: xmlsec1 binary missing, EXITING')
SAML_ATTRIBUTE_MAPPING = {
'uid': ('username', ),
'mail': ('email', ),
@ -311,7 +315,7 @@ SAML_ATTRIBUTE_MAPPING = {
'sn': ('last_name', ),
}
SAML_CONFIG = {
'xmlsec_binary': '/usr/bin/xmlsec1',
'xmlsec_binary': xmlsec_binary,
'entityid': saml2_entityid,
'attribute_map_dir': os.path.join(PACKAGE_ROOT, 'saml2/attribute-maps'),
'service': {