Enhanced Auditing error when accessing Audit records: initialization vector does not match the block size for this algorithm

book

Article ID: 1000766275

calendar_today

Updated On:

Description

1. Following Alert is seen in the web UI:

An unexpected error has occurred. First please check if the audit server is up and running. Then, if the issue still persists, contact your system administrator.

2. Error Event ID 3 is logged in the Veritas Enhanced Auditing Event Logs on the Enhanced Auditing server:

Category: VeritasEnhancedAuditing.Infrastructure.Services.AuditWindowsEventLogService
EventId: 3
SpanId: d06e4fbf1848179b
TraceId: 616f139a6efc4ac9c0698b14ec7c9616
ParentId: 0000000000000000
RequestId: 800006d9-0005-fd00-b63f-84710c7967bb
RequestPath: /api/Audit/Search
ActionId: 471886fb-bdf8-43cd-965d-8c0b20c7514a
ActionName: VeritasEnhancedAuditing.AuditServer.Controllers.AuditController.Search (VeritasEnhancedAuditing.AuditServer)

Error occurred while searching in mainstore.

Exception: 
System.Security.Cryptography.CryptographicException: Specified initialization vector (IV) does not match the block size for this algorithm.
at System.Security.Cryptography.SymmetricAlgorithm.set_IV(Byte[] value)
at VeritasEnhancedAuditing.Security.Crypto.Decrypt(String cipherText, String key)
at VeritasEnhancedAuditing.Infrastructure.Services.CryptoService.DecryptData(String cipherText, String key, AuthKeyType type)
at VeritasEnhancedAuditing.Store.ElasticSearchV7.ElasticsearchMainStoreV7.DecryptPassword(String password)
at VeritasEnhancedAuditing.Store.ElasticSearchV7.ElasticsearchMainStoreV7.Search(ISearchQuery searchQuery)

V-437-3

Cause

Enhanced Auditing corresponds Auditing records to an Accelerator Customer via an AuditContextID. The errors are logged when Enhanced Auditing can not correspond the AuditContextID associated to the Accelerator Customer with a known entity. This is typically caused by uninstalling and reinstalling Enhanced Auditing after one or more Accelerator Customers have been configured to use Enhanced Auditing.

Resolution

As long as Enhanced Auditing is installed in the environment, the fix is to reset the connection between the Accelerator Customer and Enhanced Auditing. However, any previous Audit records from that Accelerator Customer will no longer be accessible. This is due to those Audit records being associated to the original AuditContextID which is no longer a known entity to Enhanced Auditing. If the uninstall of Enhanced Auditing also included an uninstall of its associated ElasticSearch engine, those records will have been removed; otherwise they will remain orphaned on disk and unreadable.

The fix requires the following steps:

1. Run the following queries against the Accelerator Customer database to clear the existing Enhanced Auditing registration information:

DELETE FROM tblTenantAuditServerConfiguration;
DELETE FROM tblAuditServerConfiguration;

2. Restart the Enterprise Vault Accelerator Manager Service on the Accelerator Server. When Enhanced Auditing is enabled for a Customer, restarting the service handles the Enhanced Auditing registration by checking the above tables and populating them if empty by calling the Enhanced Auditing server's registration API to provide an AuditContextId from the Enhanced Auditing server (specified under Configuration | Settings | Auditing | Audit Server URL) and then creating a fresh metadata entry with properly encrypted credentials in tblTenantAuditServerConfiguration.

Issue/Introduction

Attempting to access the Enhanced Auditing records fails and logs the errors below.

Additional Information

CFT-8294