#26 Add city as info attribute, fix SSSD mapping
Merged 4 years ago by puiterwijk. Opened 4 years ago by rcritten.
rcritten/ipsilon sssdattrs  into  master

file modified
+1

@@ -30,6 +30,7 @@ 

              'gender': 'Gender',

              'postcode': 'Postal Code',

              'street': 'Street Address',

+             'city': 'City',

              'state': 'State or Province',

              'country': 'Country',

              'phone': 'Telephone Number',

file modified
+4 -1

@@ -21,6 +21,7 @@ 

  SSSD_ATTRS = ['mail',

                'street',

                'locality',

+               'st',

                'postalCode',

                'telephoneNumber',

                'givenname',

@@ -35,6 +36,7 @@ 

      ['REMOTE_USER_LASTNAME', 'surname'],

      ['REMOTE_USER_STREET', 'street'],

      ['REMOTE_USER_STATE', 'state'],

+     ['REMOTE_USER_CITY', 'city'],

      ['REMOTE_USER_POSTALCODE', 'postcode'],

      ['REMOTE_USER_TELEPHONENUMBER', 'phone'],

  ]

@@ -104,7 +106,8 @@ 

  

  <Location /${instance}>

    LookupUserAttr sn REMOTE_USER_LASTNAME

-   LookupUserAttr locality REMOTE_USER_STATE

+   LookupUserAttr st REMOTE_USER_STATE

+   LookupUserAttr locality REMOTE_USER_CITY

    LookupUserAttr street REMOTE_USER_STREET

    LookupUserAttr telephoneNumber REMOTE_USER_TELEPHONENUMBER

    LookupUserAttr givenname REMOTE_USER_FIRSTNAME

no initial comment

Just curious: is there maybe a way to tell mod_lookup_identity to just map every single attribute? This mainly because we do not update the apache config on already deployed instances, so if we can avoid having to ask people to change it if we add more fields, that would be useful.

I understand that this means we'd have things like REMOTE_USER_LOCALITY and REMOTE_USER_ST and need to map those in the code, but I think that that beats the alternative of having to ask users to update their apache config every time we add more attributes.

On the patch itself: looks good to me. I will wait for merging on an answer to my last question.

There is no documented way to automatically add all attributes found.

Would it be an idea to add that upstream?

(Will merge the patch now for the time being)