Skip to content
Prev Previous commit
Next Next commit
Improve configuration readability of the primary-identifier plugin
Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
  • Loading branch information
c00kiemon5ter authored and rohe committed Aug 18, 2023
commit 066c0452f6b532dfd0de11f7e5286cd7ab7863c2
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,24 @@ config:
- attribute_names: [eppn]
- attribute_names: [name_id]
name_id_format: urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
# The line below addes the IdP entityID to the value for the SAML2
# The line below adds the IdP entityID to the value for the SAML2
# Persistent NameID to ensure the value is fully scoped.
add_scope: issuer_entityid
- attribute_names: [edupersontargetedid]
add_scope: issuer_entityid

# The internal SATOSA attribute into which to place the primary
# identifier value once found from the above configured ordered
# candidates.
primary_identifier: uid

# Whether or not to clear the input attributes after setting the
# primary identifier value.
clear_input_attributes: no

# Whether to replace subject_id with the constructed primary identifier
replace_subject_id: no

# If defined redirect to this page if no primary identifier can
# be found.
on_error: https://my.org/errors/no_primary_identifier
Expand Down
1 change: 0 additions & 1 deletion src/satosa/micro_services/primary_identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def constructPrimaryIdentifier(self, data, ordered_identifier_candidates):
# name_id_format add the value for the NameID of that format if it was asserted by the IdP
# or else add the value None.
if 'name_id' in candidate['attribute_names']:
candidate_nameid_value = None
candidate_nameid_value = None
candidate_name_id_format = candidate.get('name_id_format')
name_id_value = data.subject_id
Expand Down