mapped_users=[user_map[user]foruserinusersifuserinuser_map]# email list of referenced users
mapped_users=[user_map[user]foruserinusersifuserinuser_map]# email list of referenced users
unmappable_users=[userforuserinusersifusernotinuser_map]# list of references for which no account was found
unmappable_users=[userforuserinusersifusernotinuser_map]# list of references for which no account was found
forunmappable_userinunmappable_users:
forunmappable_userinunmappable_users:
# Note: Usually Keycloak should return DN references to user accounts. For PI's, someone had the
logger.warning("Could not match Keycloak user reference '%s' to a known user."%unmappable_user)
# great idea to allow to specify a freeform string instead, to refer to people who may or may not
ifnotunmappable_user.startswith('cn='):
# have an account. Even if the person has a user account, there is no way to replicate the exact
logger.warning("LOFAR allowed to reference a person by a freeform string instead of a user account. '%s' seems to be such a legacy reference. This needs to be fixed in the identity management."%unmappable_user)
# string 'representation' Keycloak returns, since the string may contain typos, or info that is not
# stored in the user accounts (like titles).
# The following unsafe hack tries to determine whether there is a user account that matches the
# name given in the string (ignore titles since they are not part of the user account):
logger.warning("Could not match Keycloak user reference '%s' to a known user."%unmappable_user)
ifnotunmappable_user.startswith('cn='):
logger.warning("LOFAR allowed to reference a person by a freeform string instead of a user account. '%s' seems to be such a legacy reference. This needs to be fixed in the identity management."%unmappable_user)