From d6b77227c3a6b777f9a782f3b5dfa9885a2be645 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Aug 31 2015 17:54:01 +0000 Subject: Add city to info plugin, fetch correct attrs in SSSD Add missing variable in the info plugins common list for city. Fix the mapping in the infosssd plugin where locality was being passed in as state. It is now set as city and st as state. Care needs to be taken with LDAP attributes as Ipsilon doesn't currently handle attribute aliases. https://fedorahosted.org/ipsilon/ticket/161 Signed-off-by: Rob Crittenden Reviewed-by: Patrick Uiterwijk --- diff --git a/ipsilon/info/common.py b/ipsilon/info/common.py index 4cd6663..6d2ea80 100644 --- a/ipsilon/info/common.py +++ b/ipsilon/info/common.py @@ -30,6 +30,7 @@ class InfoMapping(Log): 'gender': 'Gender', 'postcode': 'Postal Code', 'street': 'Street Address', + 'city': 'City', 'state': 'State or Province', 'country': 'Country', 'phone': 'Telephone Number', diff --git a/ipsilon/info/infosssd.py b/ipsilon/info/infosssd.py index cb097ad..6b75965 100644 --- a/ipsilon/info/infosssd.py +++ b/ipsilon/info/infosssd.py @@ -21,6 +21,7 @@ SSSD_CONF = '/etc/sssd/sssd.conf' SSSD_ATTRS = ['mail', 'street', 'locality', + 'st', 'postalCode', 'telephoneNumber', 'givenname', @@ -35,6 +36,7 @@ sssd_mapping = [ ['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 @@ LoadModule lookup_identity_module modules/mod_lookup_identity.so 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