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

dhavalshah9131 pushed a commit to branch RANGER-5199
in repository https://gitbox.apache.org/repos/asf/ranger.git

commit fef0b625f3498042b59732e04d84cabbcf65d448
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)
---
 .../src/views/AuditEvent/AccessLogs.jsx            | 33 +++++++++++++++++++++-
 .../src/views/AuditEvent/AccessLogsTable.jsx       |  5 ++++
 .../users_details/UserListing.jsx                  |  3 +-
 3 files changed, 39 insertions(+), 2 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 9af635448..b5cae7a59 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) => (
@@ -1003,6 +1021,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 753a23df9..b3a73c9f0 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
@@ -52,6 +52,7 @@ export const AccessLogsTable = ({ data = {} }) => {
     zoneName,
     requestData,
     tags,
+    userSource,
     datasets,
     projects
   } = data;
@@ -92,6 +93,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