Merge branch 'master' into dist/eole/2.6.2/master
This commit is contained in:
commit
faf2a361db
|
@ -32,35 +32,31 @@ def getSSOFilters():
|
||||||
"""
|
"""
|
||||||
import glob
|
import glob
|
||||||
from ConfigParser import ConfigParser
|
from ConfigParser import ConfigParser
|
||||||
import json
|
|
||||||
try:
|
try:
|
||||||
filters = {}
|
filters = { 'uid': "uid", "mail": "mail" }
|
||||||
filterDirectory = "/usr/share/sso/app_filters/"
|
filterDirectory = "/usr/share/sso/app_filters/"
|
||||||
filterExtention = ".ini"
|
filterExtention = ".ini"
|
||||||
filterSection = "utilisateur"
|
filterSection = "utilisateur"
|
||||||
filterFiles = glob.glob("{0}/*{1}".format(filterDirectory, filterExtention))
|
filterFiles = glob.glob("{0}/*{1}".format(filterDirectory, filterExtention))
|
||||||
toClean = ["uid","mail","cn","__name__"]
|
toClean = [ "__name__" ]
|
||||||
for fi in filterFiles:
|
if len(filterFiles) != 0:
|
||||||
# Don't parse "applications.ini"
|
for fi in filterFiles:
|
||||||
config = ConfigParser()
|
# Don't parse "applications.ini"
|
||||||
config.read(fi)
|
config = ConfigParser()
|
||||||
if filterSection in config._sections:
|
config.read(fi)
|
||||||
filters.update(config._sections[filterSection].items())
|
if filterSection in config._sections:
|
||||||
|
filters.update(config._sections[filterSection].items())
|
||||||
for key in toClean:
|
for key in toClean:
|
||||||
del(filters[key])
|
if key in filters.keys():
|
||||||
|
del(filters[key])
|
||||||
res = ""
|
res = ""
|
||||||
index=0
|
index=0
|
||||||
size=len(filters)
|
size=len(filters)
|
||||||
for k,v in filters.items():
|
for k,v in filters.items():
|
||||||
res += " \"{0}\": \"{1}\",".format(k,v)
|
res += " \"{0}\": \"{1}\"".format(k,v)
|
||||||
index += 1
|
index += 1
|
||||||
if index != size:
|
if index != size:
|
||||||
res += "\n"
|
res += ",\n"
|
||||||
|
|
||||||
return(res)
|
return(res)
|
||||||
|
|
||||||
except:
|
except:
|
||||||
return "Error Generating Filters"
|
return "Error Generating Filters"
|
||||||
|
|
||||||
|
|
|
@ -159,12 +159,10 @@
|
||||||
"ldapUsePasswordResetAttribute": 1,
|
"ldapUsePasswordResetAttribute": 1,
|
||||||
"ldapPpolicyControl": 0,
|
"ldapPpolicyControl": 0,
|
||||||
"casAttributes": {
|
"casAttributes": {
|
||||||
"uid":"uid",
|
|
||||||
%%getSSOFilters
|
|
||||||
%for att in %%casAttribute
|
%for att in %%casAttribute
|
||||||
"%%att": "%%att.casLDAPAttribute",
|
"%%att": "%%att.casLDAPAttribute",
|
||||||
%end for
|
%end for
|
||||||
"mail":"mail"
|
%%getSSOFilters
|
||||||
},
|
},
|
||||||
"issuerDBSAMLPath": "^/saml/",
|
"issuerDBSAMLPath": "^/saml/",
|
||||||
"samlAttributeAuthorityDescriptorAttributeServiceSOAP": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/AA/SOAP;",
|
"samlAttributeAuthorityDescriptorAttributeServiceSOAP": "urn:oasis:names:tc:SAML:2.0:bindings:SOAP;#PORTAL#/saml/AA/SOAP;",
|
||||||
|
|
Loading…
Reference in New Issue