You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ni...@apache.org on 2021/04/06 13:16:41 UTC

[ranger] branch ranger-2.2 updated: RANGER-3157 : Improvements for audit details page part-2

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

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


The following commit(s) were added to refs/heads/ranger-2.2 by this push:
     new 686d614  RANGER-3157 : Improvements for audit details page part-2
686d614 is described below

commit 686d6144eefe5470232a9704729d5fbef299f7dd
Author: Nitin Galave <ni...@apache.org>
AuthorDate: Thu Apr 1 18:53:22 2021 +0530

    RANGER-3157 : Improvements for audit details page part-2
---
 security-admin/src/main/webapp/index.html          |   2 +-
 .../main/webapp/scripts/controllers/Controller.js  |   8 +
 .../main/webapp/scripts/controllers/NController.js |   8 +
 .../views/reports/AuditAccessLogDetailView.js      |  47 +-
 security-admin/src/main/webapp/styles/xa.css       |   8 +
 .../templates/policies/RangerPolicyRO_tmpl.html    | 553 +++++++++++----------
 .../reports/AuditAccessLogDetail_tmpl.html         |  10 +-
 7 files changed, 362 insertions(+), 274 deletions(-)

diff --git a/security-admin/src/main/webapp/index.html b/security-admin/src/main/webapp/index.html
index 6ac8605..b871a14 100644
--- a/security-admin/src/main/webapp/index.html
+++ b/security-admin/src/main/webapp/index.html
@@ -102,7 +102,7 @@
 
             <!-- Page footer
             ================================================== -->
-            <footer id="r_footer">
+            <footer class="clearBoth" id="r_footer">
 
             </footer>
             <!-- / Page footer -->
diff --git a/security-admin/src/main/webapp/scripts/controllers/Controller.js b/security-admin/src/main/webapp/scripts/controllers/Controller.js
index 21eb963..6b7bad9 100755
--- a/security-admin/src/main/webapp/scripts/controllers/Controller.js
+++ b/security-admin/src/main/webapp/scripts/controllers/Controller.js
@@ -118,6 +118,13 @@ define(function(require) {
             });
             var view = require('views/reports/AuditAccessLogDetailView');
             var VXAccessAuditList = require('collections/VXAccessAuditList');
+            var RangerServiceDefList = require('collections/RangerServiceDefList');
+            var serviceDefList = new RangerServiceDefList();
+            serviceDefList.fetch({
+                cache : false,
+                async:false,
+                data :{'pageSource':'Audit'}
+            });
             var auditList = new VXAccessAuditList();
             auditList.url = 'service/assets/accessAudit?eventId='+eventID
             auditList.fetch({
@@ -127,6 +134,7 @@ define(function(require) {
                 App.rContent.show(new view({
                     auditaccessDetail : auditList.models[0].attributes,
                     auditAccessView : true,
+                    serviceDefList : serviceDefList
                 }));
             })
         },
diff --git a/security-admin/src/main/webapp/scripts/controllers/NController.js b/security-admin/src/main/webapp/scripts/controllers/NController.js
index 13ee4c6..7492956 100644
--- a/security-admin/src/main/webapp/scripts/controllers/NController.js
+++ b/security-admin/src/main/webapp/scripts/controllers/NController.js
@@ -120,6 +120,13 @@ define(function(require) {
             });
             var view = require('views/reports/AuditAccessLogDetailView');
             var VXAccessAuditList = require('collections/VXAccessAuditList');
+            var RangerServiceDefList = require('collections/RangerServiceDefList');
+            var serviceDefList = new RangerServiceDefList();
+            serviceDefList.fetch({
+                cache : false,
+                async:false,
+                data :{'pageSource':'Audit'}
+            });
             var auditList = new VXAccessAuditList();
             auditList.url = 'service/assets/accessAudit?eventId='+eventID
             auditList.fetch({
@@ -129,6 +136,7 @@ define(function(require) {
                 App.rContent.show(new view({
                     auditaccessDetail : auditList.models[0].attributes,
                     auditAccessView : true,
+                    serviceDefList : serviceDefList
                 }));
             })
         },
diff --git a/security-admin/src/main/webapp/scripts/views/reports/AuditAccessLogDetailView.js b/security-admin/src/main/webapp/scripts/views/reports/AuditAccessLogDetailView.js
index 57ffaea..16e9ef8 100644
--- a/security-admin/src/main/webapp/scripts/views/reports/AuditAccessLogDetailView.js
+++ b/security-admin/src/main/webapp/scripts/views/reports/AuditAccessLogDetailView.js
@@ -27,6 +27,8 @@ define(function(require) {
         var XAGlobals = require('utils/XAGlobals');
         var localization = require('utils/XALangSupport');
         var XAUtils = require('utils/XAUtils');
+        var RangerPolicy = require('models/RangerPolicy');
+        var RangerPolicyRO = require('views/policies/RangerPolicyRO');
 
         var AuditAccessLogDetailTmpl = require('hbs!tmpl/reports/AuditAccessLogDetail_tmpl');
 
@@ -40,6 +42,11 @@ define(function(require) {
                 return 'Audit Access Log Detail'
             },
 
+            /** Layout sub regions */
+            regions: {
+                'policyDetailsView' :'div[data-id="PolicyDetaissInfo"]'
+            },
+
             templateHelpers: function() {
                 var that = this, result;
                 result = _.filter(XAEnums.AccessResult, function(e){ return e.value === that.auditaccessDetail.accessResult });
@@ -52,17 +59,20 @@ define(function(require) {
 
                     tag : this.tags ? this.tags.join() : undefined,
                     auditAccessView : this.auditAccessView,
+                    policyDetailsView : (this.auditAccessView && this.auditaccessDetail.policyId !== -1) ? true : false,
                 }
             },
 
             ui: {
                 copyQuery : '[data-name="copyQuery"]',
+                policyDetails : '[data-js="policyDetails"]',
             },
 
             /** ui events hash */
             events : function() {
                 var events = {};
                 events['click ' + this.ui.copyQuery] = 'copyQuery';
+                events['click ' + this.ui.policyDetails] = 'policyDetails';
                 return events
             },
             /**
@@ -71,7 +81,7 @@ define(function(require) {
              */
             initialize: function(options) {
                 console.log("Initialized a Ranger Audit Access Log Details");
-                _.extend(this, _.pick(options, 'auditaccessDetail', 'auditAccessView'));
+                _.extend(this, _.pick(options, 'auditaccessDetail', 'auditAccessView', 'serviceDefList'));
                 if(_.isUndefined(this.auditAccessView)) {
                     this.auditAccessView = false
                 }
@@ -81,12 +91,47 @@ define(function(require) {
                         return m.type
                     });
                 }
+                if(this.auditAccessView && this.auditaccessDetail.policyId !== -1) {
+                    this.policyDetails();
+                }
             },
 
             copyQuery: function(e) {
                 XAUtils.copyToClipboard(e , this.auditaccessDetail.requestData);
             },
 
+            policyDetails : function() {
+                var that = this
+                if(this.auditaccessDetail.repoType){
+                    var repoType =  this.auditaccessDetail.repoType;
+                }
+                var policyId = this.auditaccessDetail.policyId;
+                if(policyId == -1){
+                        return;
+                }
+                var eventTime = this.auditaccessDetail.eventTime;
+                var policyVersion = this.auditaccessDetail.policyVersion;
+                var application = this.auditaccessDetail.agentId;
+                var policy = new RangerPolicy({
+                        id: policyId,
+                        version:policyVersion
+                });
+                var policyVersionList = policy.fetchVersions();
+                this.policyDetailsTbl = new RangerPolicyRO({
+                    policy: policy,
+                    policyVersionList : policyVersionList,
+                    serviceDefList: that.serviceDefList,
+                    eventTime : eventTime,
+                    repoType : repoType
+                });
+            },
+
+            /** on render callback */
+            onRender: function() {
+                if(this.auditAccessView && this.auditaccessDetail.policyId !== -1) {
+                    this.policyDetailsView.show(this.policyDetailsTbl);
+                }
+            },
             /** on close */
             onClose: function() {}
     });
diff --git a/security-admin/src/main/webapp/styles/xa.css b/security-admin/src/main/webapp/styles/xa.css
index ec57be1..afc848a 100644
--- a/security-admin/src/main/webapp/styles/xa.css
+++ b/security-admin/src/main/webapp/styles/xa.css
@@ -4560,6 +4560,10 @@ input.textFiledInputPadding:disabled {
   background-color: white;
 }
 
+#policyDetails {
+    background-color: white;
+}
+
 .report-table .subgrid-custom-cell{
   display: table-cell!important;
 }
@@ -4663,4 +4667,8 @@ input.textFiledInputPadding:disabled {
   .zoneResources-form [fieldclass="resorces-css"] .recursive-toggle-2 {
     left:0px;
   }
+}
+
+.clearBoth {
+  clear: both;
 }
\ No newline at end of file
diff --git a/security-admin/src/main/webapp/templates/policies/RangerPolicyRO_tmpl.html b/security-admin/src/main/webapp/templates/policies/RangerPolicyRO_tmpl.html
index 8eab654..83bd607 100644
--- a/security-admin/src/main/webapp/templates/policies/RangerPolicyRO_tmpl.html
+++ b/security-admin/src/main/webapp/templates/policies/RangerPolicyRO_tmpl.html
@@ -15,289 +15,302 @@
   limitations under the License.
 --}}
 <div class="serviceInfo">
-  <div class="">
-    <p>
-      <strong>{{tt 'lbl.serviceName'}} :</strong> {{PolicyDetails.service}}
-    </p>
-  </div>
-  <div class="">
-    <p>
-      <strong>{{tt 'lbl.serviceType'}} :</strong> {{PolicyDetails.serviceType}}
-    </p>
-  </div>
+    <div>
+        <p>
+            <strong>{{tt 'lbl.serviceName'}} :</strong> {{PolicyDetails.service}}
+        </p>
+    </div>
+    <div>
+        <p>
+            <strong>{{tt 'lbl.serviceType'}} :</strong> {{PolicyDetails.serviceType}}
+        </p>
+    </div>
 </div>
-<div id="policyDetails" class="">
-  <p class="formHeader">
-    {{tt 'h.policyDetails'}} : 
-  </p>
-  <table class="table table-bordered table-condensed">
-    <tbody>
-      <tr>
-        <td>
-          {{tt 'lbl.policyType'}}
-        </td>
-        <td>
-          <div class="controls"><label class="badge badge-ranger" style="cursor: auto;">{{policyType}}</label></div>
-        </td>
-      </tr>
-      <tr>
-        <td>
-          {{tt 'lbl.policyId'}}
-        </td>
-        <td>
-          <div class="controls"><label class="badge badge-ranger" style="cursor: auto;">{{PolicyDetails.id}}</label></div>
-        </td>
-      </tr>
-      <tr>
-          <td>
-              {{tt 'lbl.version'}}
-          </td>
-          <td>
-              <div class="controls"><label class="badge badge-ranger" style="cursor: auto;">{{PolicyDetails.version}}</label></div>
-          </td>
-      </tr>
-      <tr>
-      <tr>
-        <td>
-          {{tt 'lbl.policyName'}}
-        </td>
-        <td>
-          <span class="badge badge-dark pull-right">{{PolicyDetails.policyPriority}}</span>
-          <span class="badge badge-dark pull-right m-r-xs">{{PolicyDetails.isEnabled}}</span>
-          {{PolicyDetails.name}}
-        </td>
-      </tr>
-      <tr>
-        <td>
-          {{tt 'lbl.policyLabels'}}
-        </td>
-        <td>
-        {{#ifCond PolicyDetails.policyLabels.length '==' "0"}}
-          --
-        {{else}}
-          {{#each PolicyDetails.policyLabels}}
-            <span class="badge badge-dark ">{{this}}</span>
-          {{/each}}
-        {{/ifCond}}
-        </td>
-      </tr>
-      {{#each PolicyDetails.resources}}
-      <tr>
-        <td>
-          {{this.label}}
-        </td>
-        <td>
-          {{#each this.values}}
-            <span class="badge badge-info">{{this}}</span>
-          {{/each}}
-          <span class="badge badge-dark pull-right m-l-sm">{{this.Rec_Recursive}}</span>
-          <span class="badge badge-dark pull-right">{{this.Rec_Exc}}</span>
-        </td>
-      </tr>
-      {{/each}}
-      <tr>
-        <td>
-          {{tt 'lbl.description'}}
-        </td>
-        {{#ifCond PolicyDetails.description '==' ""}}
-          <td>
-            --
-          </td>
-        {{else}}
-          <td>
-            {{PolicyDetails.description}}
-          </td>
-        {{/ifCond}}
-      </tr>
-      <tr>
-        <td>
-          {{tt 'lbl.auditLogging'}}
-        </td>
-        <td>
-          <span class="badge badge-info">{{PolicyDetails.isAuditEnabled}}</span>
-        </td>
-      </tr>
-        <tr>
-            {{#if PolicyDetails.zoneName}}
-                <td>{{tt 'lbl.zoneName'}}</td>
-                <td>
-                    {{#if PolicyDetails.zoneName}}
-                        <span class="badge badge-dark">{{PolicyDetails.zoneName}}</span>
+<div id="policyDetails">
+    <p class="formHeader">
+        {{tt 'h.policyDetails'}} :
+    </p>
+    <div class="table-responsive">
+        <table class="table table-bordered table-condensed">
+            <tbody>
+                <tr>
+                    <td>
+                        {{tt 'lbl.policyType'}}
+                    </td>
+                    <td>
+                        <div class="controls"><label class="badge badge-ranger" style="cursor: auto;">{{policyType}}</label></div>
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        {{tt 'lbl.policyId'}}
+                    </td>
+                    <td>
+                        <div class="controls"><label class="badge badge-ranger" style="cursor: auto;">{{PolicyDetails.id}}</label></div>
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        {{tt 'lbl.version'}}
+                    </td>
+                    <td>
+                        <div class="controls"><label class="badge badge-ranger" style="cursor: auto;">{{PolicyDetails.version}}</label></div>
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        {{tt 'lbl.policyName'}}
+                    </td>
+                    <td>
+                        <span class="badge badge-dark pull-right">{{PolicyDetails.policyPriority}}</span>
+                        <span class="badge badge-dark pull-right m-r-xs">{{PolicyDetails.isEnabled}}</span>
+                        {{PolicyDetails.name}}
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        {{tt 'lbl.policyLabels'}}
+                    </td>
+                    <td>
+                        {{#ifCond PolicyDetails.policyLabels.length '==' "0"}}
+                            --
+                        {{else}}
+                            {{#each PolicyDetails.policyLabels}}
+                                <span class="badge badge-dark ">{{this}}</span>
+                            {{/each}}
+                        {{/ifCond}}
+                    </td>
+                </tr>
+                {{#each PolicyDetails.resources}}
+                    <tr>
+                        <td>
+                            {{this.label}}
+                        </td>
+                        <td>
+                            {{#each this.values}}
+                                <span class="badge badge-info">{{this}}</span>
+                            {{/each}}
+                            <span class="badge badge-dark pull-right m-l-sm">{{this.Rec_Recursive}}</span>
+                            <span class="badge badge-dark pull-right">{{this.Rec_Exc}}</span>
+                        </td>
+                    </tr>
+                {{/each}}
+                <tr>
+                    <td>
+                        {{tt 'lbl.description'}}
+                    </td>
+                    {{#ifCond PolicyDetails.description '==' ""}}
+                        <td>
+                            --
+                        </td>
                     {{else}}
-                        <span>--</span>
+                        <td>
+                            {{PolicyDetails.description}}
+                        </td>
+                    {{/ifCond}}
+                </tr>
+                <tr>
+                    <td>
+                        {{tt 'lbl.auditLogging'}}
+                    </td>
+                    <td>
+                        <span class="badge badge-info">{{PolicyDetails.isAuditEnabled}}</span>
+                    </td>
+                </tr>
+                <tr>
+                    {{#if PolicyDetails.zoneName}}
+                        <td>{{tt 'lbl.zoneName'}}</td>
+                        <td>
+                            {{#if PolicyDetails.zoneName}}
+                                <span class="badge badge-dark">{{PolicyDetails.zoneName}}</span>
+                            {{else}}
+                                <span>--</span>
+                            {{/if}}
+                        </td>
                     {{/if}}
-                </td>
-            {{/if}}
-        </tr>
-    </tbody>
-  </table>
+                </tr>
+            </tbody>
+        </table>
+    </div>
 </div>
 {{#if PolicyDetails.validitySchedules}}
-<div id="policyItems" class="">
+    <div id="policyItems" class="">
         <p class="formHeader">Validity Period :<i class="fa-fw fa fa-time fa-fw fa fa-large pull-right"></i></p>
-
-        <table class="table table-permission table-condensed table-read-only"
-                style="width: 100%">
+        <div class="table-responsive">
+            <table class="table table-permission table-condensed table-read-only" style="width: 100%">
                 <thead>
-                        <tr>
-                                <th>Start Time</th>
-                                <th>End Time</th>
-                                <th>Time zone</th>
-                        </tr>
+                    <tr>
+                        <th>Start Time</th>
+                        <th>End Time</th>
+                        <th>Time zone</th>
+                    </tr>
                 </thead>
                 <tbody>
-                        {{#each PolicyDetails.validitySchedules}}
-                                <tr>
-                        <th>{{blankCheck this.startTime}}</th>
-                                        <th>{{blankCheck this.endTime}}</th>
-                                        <th>{{#if this.timeZone}}
-                                                        <span class="badge badge-info">{{this.timeZone}}</span>
-                                                {{else}} --
-                                                {{/if}}
-                                                </th>
-                                </tr>
-            {{/each}}
+                    {{#each PolicyDetails.validitySchedules}}
+                        <tr>
+                            <th>{{blankCheck this.startTime}}</th>
+                                <th>{{blankCheck this.endTime}}</th>
+                                <th>
+                                    {{#if this.timeZone}}
+                                        <span class="badge badge-info">{{this.timeZone}}</span>
+                                    {{else}}
+                                        --
+                                    {{/if}}
+                                </th>
+                        </tr>
+                    {{/each}}
                 </tbody>
-        </table>
-</div>
+            </table>
+        </div>
+    </div>
 {{/if}}
 {{#if PolicyDetails.conditions}}
-  <div class="">
-    <p class="formHeader">Policy Conditions :</p>
-    <table class="table table-bordered condition-group-table" style="width: 100%">
-      <tbody>
-        {{#each PolicyDetails.conditions}}
-          <tr colspan="2">
-            <td width="40%">{{this.name}}</td>
-            <td width="60%">{{this.values}}</td>
-          </tr>
-        {{/each}}
-      </tbody>
-    </table>
-  </div>
+    <div class="">
+        <p class="formHeader">Policy Conditions :</p>
+        <div class="table-responsive">
+            <table class="table table-bordered condition-group-table" style="width: 100%">
+                <tbody>
+                    {{#each PolicyDetails.conditions}}
+                        <tr colspan="2">
+                            <td width="40%">{{this.name}}</td>
+                            <td width="60%">{{this.values}}</td>
+                        </tr>
+                    {{/each}}
+                </tbody>
+            </table>
+        </div>
+    </div>
 {{/if}}
 {{#each PolicyDetails.policyItemsCond}}
-	<div id="policyItems" class="">
-	  <p class="formHeader">
-	    {{this.title}}  :
-	  </p>
-	  <table class="table table-permission table-condensed table-read-only" style="width:100%">
-	    <thead>
-	      <tr>
-	        {{#each this.headers}}
-	        	<th>{{this}}</th>
-	        {{/each}}
-	      </tr>
-	    </thead>
-	    <tbody>
-	      {{#each this.policyItems}}
-	      <tr>
-          <td>
-            {{#if this.roles}}
-              {{#each this.roles}}
-               <span class="badge badge-info">{{this}}</span>
-              {{/each}}
-            {{else}}
-                 --
-            {{/if}}
-          </td>
-          <td>
-            {{#if this.groups}}
-              {{#each this.groups}}
-               <span class="badge badge-info">{{this}}</span>
-              {{/each}}
-            {{else}}
-                 --
-            {{/if}}
-          </td>
-          <td>
-            {{#if this.users}}
-              {{#each this.users}}
-               <span class="badge badge-info">{{this}}</span>
-              {{/each}}
-            {{else}}
-              --
-            {{/if}}
-          </td>
-	        {{#if ../../PolicyDetails.policyCondition}}
-	 			<td>
-	 	  		{{#if this.conditions}}	
-	    	  		{{#each this.conditions}}
-	       				<span class="badge badge-info">
-		         			{{this.type}} :
-		         			{{#each this.values}}
-		           				{{this}}
-		         			{{/each}}
-	       				</span>
-	       			{{/each}}
-	    		{{else}}
-	     			--  
-	     		{{/if}}
-	       	</td>
-	       {{/if}}
-	        <td>{{#each this.accesses}}
-	          <span class="badge badge-info">{{#if this.isAllowed}}{{this.type}}{{/if}}</span>
-	          {{/each}}</td>
-            {{#if this.dataMaskInfo}}
-              {{#ifCond this.dataMaskInfo.dataMaskType '==' "CUSTOM"}}
-                <td>
-                  <span class="badge badge-info ">{{this.dataMaskInfo.label}}  :  {{this.dataMaskInfo.valueExpr}} </span>
-                </td>
-              {{else}}
-                <td>
-                <span class="badge badge-info">{{this.dataMaskInfo.label}}</span>
-                </td>
-             {{/ifCond}}
-          {{/if}}
-          {{#if this.rowFilterInfo}}
-            <td>
-              {{#if this.rowFilterInfo.filterExpr}}
-                <span class="badge badge-info">{{this.rowFilterInfo.filterExpr}}</span>
-              {{else}}
-                --
-              {{/if}}
-            </td>
-          {{/if}}
-          {{#if ../../isDelegatAdmin}}
-            <td>
-                   <input type="checkbox" {{#if this.delegateAdmin}}checked{{/if}} disabled="disabled">
-                  </td>
-          {{/if}}
-	      </tr>
-	      {{/each}}
-	    </tbody>
-	  </table>
-	</div>
-  {{#compare "Exclude from Allow Conditions" "eq" this.title}}
-    {{#if ../isDenyAllElse}}
-      <div class="deny-all-else">
-        <tr>
-          <td>
-            <b>{{tt 'lbl.isDenyAllElse'}} : </b>
-          </td>
-          <td>
-            <span class="badge badge-dark">{{ ../PolicyDetails.isDenyAllElse}}</span>
-          </td>
-        </tr>
-      </div>
-    {{/if}}
-  {{/compare}}
+    <div id="policyItems" class="">
+        <p class="formHeader">
+            {{this.title}}  :
+        </p>
+        <div class="table-responsive">
+            <table class="table table-permission table-condensed table-read-only" style="width:100%">
+                <thead>
+                    <tr>
+                        {{#each this.headers}}
+                            <th>{{this}}</th>
+                        {{/each}}
+                    </tr>
+                </thead>
+                <tbody>
+                    {{#ifCond this.policyItems.length '==' "0"}}
+                        <td class="emptySet text-muted" colspan='{{this.headers.length}}'>No Data Found !!</td>
+                    {{else}}
+                        {{#each this.policyItems}}
+                            <tr>
+                                <td>
+                                    {{#if this.roles}}
+                                        {{#each this.roles}}
+                                            <span class="badge badge-info">{{this}}</span>
+                                        {{/each}}
+                                    {{else}}
+                                        --
+                                    {{/if}}
+                                </td>
+                                <td>
+                                    {{#if this.groups}}
+                                        {{#each this.groups}}
+                                            <span class="badge badge-info">{{this}}</span>
+                                        {{/each}}
+                                    {{else}}
+                                        --
+                                    {{/if}}
+                                </td>
+                                <td>
+                                    {{#if this.users}}
+                                        {{#each this.users}}
+                                            <span class="badge badge-info">{{this}}</span>
+                                        {{/each}}
+                                    {{else}}
+                                        --
+                                    {{/if}}
+                                </td>
+                                {{#if ../../PolicyDetails.policyCondition}}
+                                    <td>
+                                        {{#if this.conditions}}	
+                                            {{#each this.conditions}}
+                                                <span class="badge badge-info">
+                                                    {{this.type}} :
+                                                        {{#each this.values}}
+                                                            {{this}}
+                                                        {{/each}}
+                                                </span>
+                                            {{/each}}
+                                        {{else}}
+                                            --  
+                                        {{/if}}
+                                    </td>
+                                {{/if}}
+                                <td>
+                                    {{#each this.accesses}}
+                                        <span class="badge badge-info">{{#if this.isAllowed}}{{this.type}}{{/if}}</span>
+                                    {{/each}}
+                                </td>
+                                {{#if this.dataMaskInfo}}
+                                    {{#ifCond this.dataMaskInfo.dataMaskType '==' "CUSTOM"}}
+                                        <td>
+                                            <span class="badge badge-info ">{{this.dataMaskInfo.label}}  :  {{this.dataMaskInfo.valueExpr}} </span>
+                                        </td>
+                                    {{else}}
+                                        <td>
+                                            <span class="badge badge-info">{{this.dataMaskInfo.label}}</span>
+                                        </td>
+                                    {{/ifCond}}
+                                {{/if}}
+                                {{#if this.rowFilterInfo}}
+                                    <td>
+                                        {{#if this.rowFilterInfo.filterExpr}}
+                                            <span class="badge badge-info">{{this.rowFilterInfo.filterExpr}}</span>
+                                        {{else}}
+                                            --
+                                        {{/if}}
+                                    </td>
+                                {{/if}}
+                                {{#if ../../isDelegatAdmin}}
+                                    <td>
+                                        <input type="checkbox" {{#if this.delegateAdmin}}checked{{/if}} disabled="disabled">
+                                    </td>
+                                {{/if}}
+                            </tr>
+                        {{/each}}
+                    {{/ifCond}}
+                </tbody>
+            </table>
+        </div>
+    </div>
+    {{#compare "Exclude from Allow Conditions" "eq" this.title}}
+        {{#if ../isDenyAllElse}}
+            <div class="deny-all-else">
+                <tr>
+                    <td>
+                        <b>{{tt 'lbl.isDenyAllElse'}} : </b>
+                    </td>
+                    <td>
+                        <span class="badge badge-dark">{{ ../PolicyDetails.isDenyAllElse}}</span>
+                    </td>
+                </tr>
+            </div>
+        {{/if}}
+    {{/compare}}
 {{/each}}
 <div class="updateInfo">
-  <div class="pull-left">
-    <p>
-      <strong>{{tt 'lbl.updatedBy'}} :</strong> {{PolicyDetails.updatedBy}}
-    </p>
-    <p>
-      <strong>{{tt 'lbl.updatedOn'}} :</strong> {{PolicyDetails.updateTime}}
-    </p>
-  </div>
-  <div class="pull-right">
-    <p>
-      <strong>{{tt 'lbl.createdBy'}} :</strong> {{PolicyDetails.createdBy}}
-    </p>
-    <p>
-      <strong>{{tt 'lbl.createdOn'}} :</strong> {{PolicyDetails.createTime}}
-    </p>
-  </div>
-</div>
+    <div class="pull-left">
+        <p>
+            <strong>{{tt 'lbl.updatedBy'}} :</strong> {{PolicyDetails.updatedBy}}
+        </p>
+        <p>
+            <strong>{{tt 'lbl.updatedOn'}} :</strong> {{PolicyDetails.updateTime}}
+        </p>
+    </div>
+    <div class="pull-right">
+        <p>
+            <strong>{{tt 'lbl.createdBy'}} :</strong> {{PolicyDetails.createdBy}}
+        </p>
+        <p>
+            <strong>{{tt 'lbl.createdOn'}} :</strong> {{PolicyDetails.createTime}}
+        </p>
+    </div>
+</div>
\ No newline at end of file
diff --git a/security-admin/src/main/webapp/templates/reports/AuditAccessLogDetail_tmpl.html b/security-admin/src/main/webapp/templates/reports/AuditAccessLogDetail_tmpl.html
index b3e2c66..f962b57 100644
--- a/security-admin/src/main/webapp/templates/reports/AuditAccessLogDetail_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/AuditAccessLogDetail_tmpl.html
@@ -14,7 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 --}}
-<div id="serviceDetails" class="row">
+<div id="serviceDetails">
     <table class="table table-bordered table-condensed">
         {{#if auditAccessView}}
             <thead>
@@ -237,4 +237,10 @@
             </tr>
         </tbody>
     </table>
-</div>
\ No newline at end of file
+</div>
+{{#if policyDetailsView}}
+    <div>
+         <div><h4>Policy Details</h4><span class="policyVersionHistory"></span></div>
+        <div id="policyDetails" data-id="PolicyDetaissInfo"></div>
+    </div>
+{{/if}}
\ No newline at end of file