ramackri opened a new pull request, #1115:
URL: https://github.com/apache/ranger/pull/1115

   ## Summary
   
   Fixes Access Audit UI failure when the **Users** filter contains multiple 
values on the **DB audit path** (`ranger.audit.source.type=db`).
   
   `AssetREST.getAccessLogs()` uses `extractStringList()` for `requestUser` 
(since RANGER-2394), but `XAccessAuditService` declared the field as 
`DATA_TYPE.STRING`. `SearchUtil.buildWhereClause()` then throws:
   
   ```
   ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
   ```
   
   Reported during 2.9.0 RC1 validation. Solr audit path already uses 
`STR_LIST` in `AccessAuditsService`; this aligns the DB path.
   
   **Change:** `requestUser` search field in `XAccessAuditService` → `STR_LIST` 
(one line).
   
   ## Test plan
   
   - [ ] Set `ranger.audit.source.type=db` in `ranger-admin-site.xml`
   - [ ] `GET 
/service/assets/accessAudit?requestUser=admin&requestUser=hive&startIndex=0&pageSize=25`
 → HTTP 200, no ClassCastException in catalina.out
   - [ ] Access Audit UI: Users filter with two values → search succeeds
   - [ ] Single-value `requestUser=admin` regression
   - [ ] Solr audit path regression (`audit_store=solr`)
   
   https://issues.apache.org/jira/browse/RANGER-5710
   
   Made with [Cursor](https://cursor.com)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to