auth_saml: log mapping errors during user creation (#48784)

This commit is contained in:
Benjamin Dauvergne 2021-02-03 20:39:39 +01:00
parent ab6ee43978
commit 1c8c8117ff
1 changed files with 1 additions and 0 deletions

View File

@ -74,6 +74,7 @@ class AuthenticAdapter(DefaultAdapter):
try:
self.provision_a2_attributes(user, idp, saml_attributes)
except MappingError as e:
logger.warning('auth_saml: failure during attribute provisionning %s', e)
raise UserCreationError('user creation failed on a mandatory mapping action: %s' % e)
if not user.ou:
user.ou = get_default_ou()