-
Type: Bug
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 10.10
-
Fix Version/s: HOTFIX_10.10, 11.x
-
Component/s: Audit
The addon nuxeo-audit-storage-directory allows to persist the audit log entries in a dedicated storage (a directory).
However the Audit.Restore operation does not restore all entries, only the first one.
Steps to reproduce:
- install the addon nuxeo-audit-storage-directory
- start Nuxeo
- make some changes in the application
- observe that events are stored in the AuditStorage directory
- drop the nuxeo-audit index in Elasticsearch
- call the method to restore the audit
curl -X POST 'http://localhost:8080/nuxeo/site/automation/Audit.Restore' -H 'Nuxeo-Transaction-Timeout: 3' -H 'X-NXproperties: *' -H 'X-NXRepository: default' -H 'X-NXVoidOperation: false' -H 'content-type: application/json' -d '{"params":{"auditStorage":"DirectoryAuditStorage"},"context":{}}' -u Administrator:Administrator
- observe that the audit contains only 1 old entries (it may contains the new entries after Nuxeo was restarted after dropping the ES index)
Expected behavior: all old entries are restored to ES