Skip to content

Commit 6d611b7

Browse files
committed
Add SAML subject identifier attributes to saml2_uri attributemap
1 parent 0b397fc commit 6d611b7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/saml2/attributemaps/saml_uri.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
EIDAS_NATURALPERSON = 'http://eidas.europa.eu/attributes/naturalperson/'
2424
EIDAS_LEGALPERSON = 'http://eidas.europa.eu/attributes/legalperson/'
2525

26+
# SAML subject id specification
27+
# https://docs.oasis-open.org/security/saml-subject-id-attr/v1.0/cs01/saml-subject-id-attr-v1.0-cs01.html
28+
SAML_SUBJECT_ID = 'urn:oasis:names:tc:SAML:attribute:'
29+
2630
MAP = {
2731
'identifier': 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
2832
'fro': {
@@ -109,6 +113,8 @@
109113
OPENOSI_OID+'109': 'osiOtherHomePhone',
110114
OPENOSI_OID+'120': 'osiWorkURL',
111115
PKCS_9+'1': 'email',
116+
SAML_SUBJECT_ID+'subject-id': 'subject-id',
117+
SAML_SUBJECT_ID+'pairwise-id': 'pairwise-id',
112118
SCHAC+'1': 'schacMotherTongue',
113119
SCHAC+'2': 'schacGender',
114120
SCHAC+'3': 'schacDateOfBirth',
@@ -280,6 +286,7 @@
280286
'osiWorkURL': OPENOSI_OID+'120',
281287
'ou': X500ATTR_OID+'11',
282288
'owner': X500ATTR_OID+'32',
289+
'pairwise-id': SAML_SUBJECT_ID+'pairwise-id',
283290
'physicalDeliveryOfficeName': X500ATTR_OID+'19',
284291
'postOfficeBox': X500ATTR_OID+'18',
285292
'postalAddress': X500ATTR_OID+'16',
@@ -337,6 +344,7 @@
337344
'sn': X500ATTR_OID+'4',
338345
'st': X500ATTR_OID+'8',
339346
'street': X500ATTR_OID+'9',
347+
'subject-id': SAML_SUBJECT_ID+'subject-id',
340348
'supportedAlgorithms': X500ATTR_OID+'52',
341349
'supportedApplicationContext': X500ATTR_OID+'30',
342350
'telephoneNumber': X500ATTR_OID+'20',

0 commit comments

Comments
 (0)