Skip to content

Commit 2925519

Browse files
committed
Revert changes to ldap_attribute_store
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent 817f803 commit 2925519

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/satosa/micro_services/ldap_attribute_store.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
SATOSA microservice that uses an identifier asserted by
2+
SATOSA microservice that uses an identifier asserted by
33
the home organization SAML IdP as a key to search an LDAP
44
directory for a record and then consume attributes from
55
the record and assert them to the receiving SP.
@@ -41,7 +41,7 @@ def constructFilterValue(self, identifier, data):
4141
value = ""
4242

4343
# 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
4545
# the identifiers together.
4646
if isinstance(identifier, list):
4747
for i in identifier:
@@ -74,7 +74,7 @@ def process(self, context, data):
7474
config = self.config
7575
configClean = copy.deepcopy(config)
7676
if 'bind_password' in configClean:
77-
configClean['bind_password'] = 'XXXXXXXX'
77+
configClean['bind_password'] = 'XXXXXXXX'
7878

7979
satosa_logging(logger, logging.DEBUG, "{} Using default configuration {}".format(logprefix, configClean), context.state)
8080

@@ -92,9 +92,9 @@ def process(self, context, data):
9292
config = self.config[spEntityID]
9393
configClean = copy.deepcopy(config)
9494
if 'bind_password' in configClean:
95-
configClean['bind_password'] = 'XXXXXXXX'
95+
configClean['bind_password'] = 'XXXXXXXX'
9696
satosa_logging(logger, logging.DEBUG, "{} For SP {} using configuration {}".format(logprefix, spEntityID, configClean), context.state)
97-
97+
9898
# Obtain configuration details from the per-SP configuration or the default configuration
9999
try:
100100
if 'ldap_url' in config:
@@ -189,7 +189,7 @@ def process(self, context, data):
189189
satosa_logging(logger, logging.WARN, "{} LDAP server returned {} records using IdP asserted attribute {}".format(logprefix, len(responses), identifier), context.state)
190190
record = responses[0]
191191
break
192-
192+
193193
except Exception as err:
194194
satosa_logging(logger, logging.ERROR, "{} Caught exception: {0}".format(logprefix, err), None)
195195
return super().process(context, data)
@@ -239,8 +239,8 @@ def process(self, context, data):
239239
if not userId:
240240
satosa_logging(logger, logging.WARNING, "{} Input for NameID is empty so not overriding default".format(logprefix), context.state)
241241
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)
244244

245245
else:
246246
satosa_logging(logger, logging.WARN, "{} No record found in LDAP so no attributes will be added".format(logprefix), context.state)

0 commit comments

Comments
 (0)