notifications.py (keystone-19.0.0) | : | notifications.py (keystone-19.0.1) | ||
---|---|---|---|---|
skipping to change at line 568 | skipping to change at line 568 | |||
result = f(wrapped_self, user_id, *args, **kwargs) | result = f(wrapped_self, user_id, *args, **kwargs) | |||
except (exception.AccountLocked, | except (exception.AccountLocked, | |||
exception.PasswordExpired) as ex: | exception.PasswordExpired) as ex: | |||
# Send a CADF event with a reason for PCI-DSS related | # Send a CADF event with a reason for PCI-DSS related | |||
# authentication failures | # authentication failures | |||
audit_reason = reason.Reason(str(ex), str(ex.code)) | audit_reason = reason.Reason(str(ex), str(ex.code)) | |||
_send_audit_notification(self.action, initiator, | _send_audit_notification(self.action, initiator, | |||
taxonomy.OUTCOME_FAILURE, | taxonomy.OUTCOME_FAILURE, | |||
target, self.event_type, | target, self.event_type, | |||
reason=audit_reason) | reason=audit_reason) | |||
if isinstance(ex, exception.AccountLocked): | ||||
raise exception.Unauthorized | ||||
raise | raise | |||
except Exception: | except Exception: | |||
# For authentication failure send a CADF event as well | # For authentication failure send a CADF event as well | |||
_send_audit_notification(self.action, initiator, | _send_audit_notification(self.action, initiator, | |||
taxonomy.OUTCOME_FAILURE, | taxonomy.OUTCOME_FAILURE, | |||
target, self.event_type) | target, self.event_type) | |||
raise | raise | |||
else: | else: | |||
_send_audit_notification(self.action, initiator, | _send_audit_notification(self.action, initiator, | |||
taxonomy.OUTCOME_SUCCESS, | taxonomy.OUTCOME_SUCCESS, | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added |