This is an automated email from the ASF dual-hosted git repository.

madhan pushed a commit to branch ranger-2.7
in repository https://gitbox.apache.org/repos/asf/ranger.git

commit 23bada8b5ad2e6e51cf7cf8f42d1f559360827ce
Author: Dhaval Rajpara <[email protected]>
AuthorDate: Wed Apr 23 00:45:25 2025 +0530

    RANGER-5184 : Enhance Access audit to be filtered by Federated user (#560)
    
    (cherry picked from commit dfaba89d8aa6c00c936357b793b346ea527f86a5)
---
 .../src/views/AuditEvent/AccessLogs.jsx            | 33 +++++++++++++++++++++-
 .../src/views/AuditEvent/AccessLogsTable.jsx       |  7 ++++-
 .../users_details/UserListing.jsx                  |  3 +-
 3 files changed, 40 insertions(+), 3 deletions(-)

diff --git 
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogs.jsx
 
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogs.jsx
index 39d7bcf48..5fbf6575d 100644
--- 
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogs.jsx
+++ 
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogs.jsx
@@ -63,7 +63,8 @@ import {
 import { CustomTooltip, Loader } from "../../components/CommonComponents";
 import {
   ServiceRequestDataRangerAcl,
-  ServiceRequestDataHadoopAcl
+  ServiceRequestDataHadoopAcl,
+  UserTypes
 } from "../../utils/XAEnums";
 import { getServiceDef } from "../../utils/appState";
 
@@ -525,6 +526,23 @@ function Access() {
         disableResizing: true,
         getResizerProps: () => {}
       },
+      {
+        Header: "User Source",
+        accessor: "userSource",
+        Cell: (rawValue) => {
+          if (!isEmpty(rawValue?.value)) {
+            const userSourceVal = find(UserTypes, { value: rawValue.value });
+            return (
+              <h6 className="text-center">
+                <Badge bg={userSourceVal.variant}>{userSourceVal.label}</Badge>
+              </h6>
+            );
+          } else return "--";
+        },
+        width: 100,
+        disableResizing: true,
+        getResizerProps: () => {}
+      },
       {
         Header: "Service (Name / Type)",
         accessor: (s) => (
@@ -957,6 +975,19 @@ function Access() {
       addMultiple: true,
       type: "text"
     },
+    {
+      category: "userSource",
+      label: "User Source",
+      urlLabel: "userSource",
+      type: "textoptions",
+      options: () => {
+        return [
+          { value: "0", label: "Internal" },
+          { value: "1", label: "External" },
+          { value: "6", label: "Federated" }
+        ];
+      }
+    },
     {
       category: "zoneName",
       label: "Zone Name",
diff --git 
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogsTable.jsx
 
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogsTable.jsx
index af5f89ab1..91f39f972 100644
--- 
a/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogsTable.jsx
+++ 
b/security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AccessLogsTable.jsx
@@ -51,7 +51,8 @@ export const AccessLogsTable = ({ data = {} }) => {
     eventCount,
     zoneName,
     requestData,
-    tags
+    tags,
+    userSource
   } = data;
 
   const copyText = (val) => {
@@ -90,6 +91,10 @@ export const AccessLogsTable = ({ data = {} }) => {
           <td>User</td>
           <td>{!isEmpty(requestUser) ? requestUser : "--"}</td>
         </tr>
+        <tr>
+          <td>User Source</td>
+          <td>{!isEmpty(userSource) ? userSource : "--"}</td>
+        </tr>
         <tr>
           <td>Service Name </td>
           <td>{!isEmpty(repoName) ? repoName : "--"}</td>
diff --git 
a/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/users_details/UserListing.jsx
 
b/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/users_details/UserListing.jsx
index 8c2932598..77a3c1fe0 100644
--- 
a/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/users_details/UserListing.jsx
+++ 
b/security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/users_details/UserListing.jsx
@@ -553,7 +553,8 @@ function Users() {
       options: () => {
         return [
           { value: "0", label: "Internal" },
-          { value: "1", label: "External" }
+          { value: "1", label: "External" },
+          { value: "6", label: "Federated" }
         ];
       }
     },

Reply via email to