Problem/Motivation

In #2863114-6: Message field should be splitted into message and variables there was suggested to include the hostname in the audit_log table. Quoting @shawn_smiley:

I disagree about not including the hostname in the audit_log table. That is a critical piece of information for any kind of security audit that is reviewing the logs.

Proposed resolution

  • Support the use of hostname.
  • Instead of adding this only to the audit log table, lets make part of the AuditLogMessage info so it can be saved by other backends than the audit_log table.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dagmar created an issue. See original summary.

shawn_smiley’s picture

Assigned: Unassigned » shawn_smiley
shawn_smiley’s picture

Changes made in this patch:

  • Added the hostname property to AuditLogEventInterface and AuditLogEvent.
  • Modified AuditLogLogger->Log() to set the hostname on the AuditLogEvent object.
  • Updated the unit tests for the new Event property.
  • Modified the install file to add the hostname field to the DB table. (NOTE: In the future, we may want to move this table into a submodule)
  • Modified Database.php to write the hostname field.
shawn_smiley’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: audit_log-hostname-2863535-3.patch, failed testing.