1
1
"""
2
- SATOSA microservice that uses an identifier asserted by
2
+ SATOSA microservice that uses an identifier asserted by
3
3
the home organization SAML IdP as a key to search an LDAP
4
4
directory for a record and then consume attributes from
5
5
the record and assert them to the receiving SP.
@@ -41,7 +41,7 @@ def constructFilterValue(self, identifier, data):
41
41
value = ""
42
42
43
43
# If the identifier is a list of identifiers then loop over them
44
- # calling ourself recursively and concatenate the values from
44
+ # calling ourself recursively and concatenate the values from
45
45
# the identifiers together.
46
46
if isinstance (identifier , list ):
47
47
for i in identifier :
@@ -74,7 +74,7 @@ def process(self, context, data):
74
74
config = self .config
75
75
configClean = copy .deepcopy (config )
76
76
if 'bind_password' in configClean :
77
- configClean ['bind_password' ] = 'XXXXXXXX'
77
+ configClean ['bind_password' ] = 'XXXXXXXX'
78
78
79
79
satosa_logging (logger , logging .DEBUG , "{} Using default configuration {}" .format (logprefix , configClean ), context .state )
80
80
@@ -92,9 +92,9 @@ def process(self, context, data):
92
92
config = self .config [spEntityID ]
93
93
configClean = copy .deepcopy (config )
94
94
if 'bind_password' in configClean :
95
- configClean ['bind_password' ] = 'XXXXXXXX'
95
+ configClean ['bind_password' ] = 'XXXXXXXX'
96
96
satosa_logging (logger , logging .DEBUG , "{} For SP {} using configuration {}" .format (logprefix , spEntityID , configClean ), context .state )
97
-
97
+
98
98
# Obtain configuration details from the per-SP configuration or the default configuration
99
99
try :
100
100
if 'ldap_url' in config :
@@ -189,7 +189,7 @@ def process(self, context, data):
189
189
satosa_logging (logger , logging .WARN , "{} LDAP server returned {} records using IdP asserted attribute {}" .format (logprefix , len (responses ), identifier ), context .state )
190
190
record = responses [0 ]
191
191
break
192
-
192
+
193
193
except Exception as err :
194
194
satosa_logging (logger , logging .ERROR , "{} Caught exception: {0}" .format (logprefix , err ), None )
195
195
return super ().process (context , data )
@@ -239,8 +239,8 @@ def process(self, context, data):
239
239
if not userId :
240
240
satosa_logging (logger , logging .WARNING , "{} Input for NameID is empty so not overriding default" .format (logprefix ), context .state )
241
241
else :
242
- data .subject_id = userId
243
- satosa_logging (logger , logging .DEBUG , "{} Input for NameID is {}" .format (logprefix , data .subject_id ), context .state )
242
+ data .user_id = userId
243
+ satosa_logging (logger , logging .DEBUG , "{} Input for NameID is {}" .format (logprefix , data .user_id ), context .state )
244
244
245
245
else :
246
246
satosa_logging (logger , logging .WARN , "{} No record found in LDAP so no attributes will be added" .format (logprefix ), context .state )
0 commit comments