diff --git a/cli/src/main/java/org/onosproject/cli/security/ReviewCommand.java b/cli/src/main/java/org/onosproject/cli/security/ReviewCommand.java
index cf24e01..a110147 100644
--- a/cli/src/main/java/org/onosproject/cli/security/ReviewCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/security/ReviewCommand.java
@@ -109,13 +109,11 @@
                         print("\t[Other SERVICE] " + perm.getName() + "(" + perm.getActions() + ")");
                     }
                     break;
-                case 4:
-                    for (Permission perm: assortedMap.get(4)) {
-                        print("\t[Other] " + perm.getClass().getSimpleName() +
-                                " " + perm.getName() + " (" + perm.getActions() + ")");
-                    }
-                    break;
                 default:
+                    for (Permission perm: assortedMap.get(type)) {
+                        print("\t[Other] " + perm.getClass().getSimpleName() +
+                                      " " + perm.getName() + " (" + perm.getActions() + ")");
+                    }
                     break;
             }
         }
diff --git a/core/api/src/main/java/org/onosproject/security/AppPermission.java b/core/api/src/main/java/org/onosproject/security/AppPermission.java
index 4e4a3b0..474ce1e 100644
--- a/core/api/src/main/java/org/onosproject/security/AppPermission.java
+++ b/core/api/src/main/java/org/onosproject/security/AppPermission.java
@@ -82,7 +82,8 @@
         TUNNEL_WRITE,
         TUNNEL_EVENT,
         UI_READ,
-        UI_WRITE
+        UI_WRITE,
+        ADMIN
     }
 
     protected Type type;
diff --git a/core/security/src/main/java/org/onosproject/security/impl/DefaultPolicyBuilder.java b/core/security/src/main/java/org/onosproject/security/impl/DefaultPolicyBuilder.java
index 033952f..ccd4b9a 100644
--- a/core/security/src/main/java/org/onosproject/security/impl/DefaultPolicyBuilder.java
+++ b/core/security/src/main/java/org/onosproject/security/impl/DefaultPolicyBuilder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Open Networking Laboratory
+ * Copyright 2015-present Open Networking Laboratory
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
 
 
 import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import org.onosproject.cluster.ClusterAdminService;
 import org.onosproject.cluster.ClusterMetadataService;
@@ -33,8 +32,6 @@
 import org.onosproject.net.edge.EdgePortService;
 import org.onosproject.net.key.DeviceKeyAdminService;
 import org.onosproject.net.key.DeviceKeyService;
-import org.onosproject.net.newresource.ResourceAdminService;
-import org.onosproject.net.newresource.ResourceService;
 import org.onosproject.net.region.RegionAdminService;
 import org.onosproject.net.region.RegionService;
 import org.onosproject.net.statistic.FlowStatisticService;
@@ -73,7 +70,6 @@
 import org.onosproject.store.primitives.PartitionAdminService;
 import org.onosproject.store.primitives.PartitionService;
 import org.onosproject.store.service.LogicalClockService;
-import org.onosproject.store.service.MutexExecutionService;
 import org.onosproject.store.service.StorageAdminService;
 import org.onosproject.store.service.StorageService;
 import org.onosproject.ui.UiExtensionService;
@@ -84,6 +80,8 @@
 import org.osgi.framework.BundlePermission;
 import org.osgi.framework.PackagePermission;
 import org.osgi.service.cm.ConfigurationPermission;
+import org.osgi.service.condpermadmin.ConditionalPermissionAdmin;
+import org.osgi.service.permissionadmin.PermissionAdmin;
 
 import javax.net.ssl.SSLPermission;
 import javax.security.auth.AuthPermission;
@@ -97,10 +95,7 @@
 import java.net.SocketPermission;
 import java.security.Permissions;
 import java.sql.SQLPermission;
-import java.util.ArrayList;
 import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.List;
 import java.util.PropertyPermission;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -114,24 +109,39 @@
     protected static ConcurrentHashMap<AppPermission.Type,
             Set<String>> serviceDirectory = getServiceDirectory();
 
-    protected static List<Permission> defaultPermissions = getDefaultPerms();
-    protected static List<Permission> adminServicePermissions = getAdminDefaultPerms();
+    protected static Set<Permission> defaultPermissions = getDefaultPerms();
+    protected static Set<Permission> adminServicePermissions = getAdminDefaultPerms();
 
     private DefaultPolicyBuilder(){
     }
 
-    public static List<Permission> getUserApplicationPermissions(Set<org.onosproject.security.Permission> permissions) {
-        List<Permission> perms = Lists.newArrayList();
+    public static Set<Permission> getUserApplicationPermissions(Set<org.onosproject.security.Permission> permissions) {
+
+        Set<Permission> perms = Sets.newHashSet();
         perms.addAll(defaultPermissions);
         perms.addAll(convertToJavaPermissions(permissions));
+        for (Permission perm : perms) {
+            if (perm instanceof AppPermission && ((AppPermission) perm).getType() == ADMIN) {
+                perms.remove(perm);
+            } else if (perm instanceof ServicePermission) {
+                if (perm.getName().contains(SecurityAdminService.class.getName())) {
+                    perms.remove(perm);
+                } else if (perm.getName().contains(PermissionAdmin.class.getName())) {
+                    perms.remove(perm);
+                } else if (perm.getName().contains(ConditionalPermissionAdmin.class.getName())) {
+                    perms.remove(perm);
+                }
+            }
+        }
         return optimizePermissions(perms);
     }
 
-    public static List<Permission> getAdminApplicationPermissions(
+    public static Set<Permission> getAdminApplicationPermissions(
             Set<org.onosproject.security.Permission> permissions) {
-        List<Permission> perms = Lists.newArrayList();
+        Set<Permission> perms = Sets.newHashSet();
         perms.addAll(defaultPermissions);
         perms.addAll(adminServicePermissions);
+        perms.add(new AppPermission(ADMIN));
         for (AppPermission.Type perm : serviceDirectory.keySet()) {
             perms.add(new AppPermission(perm));
         }
@@ -139,8 +149,8 @@
         return optimizePermissions(perms);
     }
 
-    public static List<Permission> convertToJavaPermissions(Set<org.onosproject.security.Permission> permissions) {
-        List<Permission> result = Lists.newArrayList();
+    public static Set<Permission> convertToJavaPermissions(Set<org.onosproject.security.Permission> permissions) {
+        Set<Permission> result = Sets.newHashSet();
         for (org.onosproject.security.Permission perm : permissions) {
             Permission javaPerm = getPermission(perm);
             if (javaPerm != null) {
@@ -153,6 +163,9 @@
                                 result.add(new ServicePermission(service, ServicePermission.GET));
                             }
                         }
+                        if (ap.getType() == CONFIG_WRITE) {
+                            result.addAll(getConfigServicePerms());
+                        }
                     }
                 } else if (javaPerm instanceof ServicePermission) {
                     if (!javaPerm.getName().contains(SecurityAdminService.class.getName())) {
@@ -167,7 +180,7 @@
         return result;
     }
 
-    public static Set<org.onosproject.security.Permission> convertToOnosPermissions(List<Permission> permissions) {
+    public static Set<org.onosproject.security.Permission> convertToOnosPermissions(Set<Permission> permissions) {
         Set<org.onosproject.security.Permission> result = Sets.newHashSet();
         for (Permission perm : permissions) {
             org.onosproject.security.Permission onosPerm = getOnosPermission(perm);
@@ -178,18 +191,27 @@
         return result;
     }
 
-    public static List<Permission> getDefaultPerms() {
-        List<Permission> permSet = Lists.newArrayList();
+    public static Set<Permission> getDefaultPerms() {
+        Set<Permission> permSet = Sets.newHashSet();
+        // slf4j-logging requirement
+        permSet.add(
+                new AdaptPermission("(adaptClass=org.osgi.framework.wiring.BundleRevision)", AdaptPermission.ADAPT));
+        // package-permissions
         permSet.add(new PackagePermission("*", PackagePermission.EXPORTONLY));
         permSet.add(new PackagePermission("*", PackagePermission.IMPORT));
-        permSet.add(new AdaptPermission("*", AdaptPermission.ADAPT));
-        permSet.add(new ConfigurationPermission("*", ConfigurationPermission.CONFIGURE));
-        permSet.add(new AdminPermission("*", AdminPermission.METADATA));
         return permSet;
     }
 
-    private static List<Permission> getAdminDefaultPerms() {
-        List<Permission> permSet = Lists.newArrayList();
+
+    private static Set<Permission> getConfigServicePerms() {
+        Set<Permission> permSet = Sets.newHashSet();
+        permSet.add(new AdminPermission("(name=org.onosproject.onos-core-net)", AdminPermission.METADATA));
+        permSet.add(new ConfigurationPermission("*", ConfigurationPermission.CONFIGURE));
+        return permSet;
+    }
+
+    private static Set<Permission> getAdminDefaultPerms() {
+        Set<Permission> permSet = Sets.newHashSet();
         permSet.add(new ServicePermission(ApplicationAdminService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(ClusterAdminService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(LeadershipAdminService.class.getName(), ServicePermission.GET));
@@ -200,11 +222,9 @@
         permSet.add(new ServicePermission(HostAdminService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(DeviceKeyAdminService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(LinkAdminService.class.getName(), ServicePermission.GET));
-        permSet.add(new ServicePermission(ResourceAdminService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(RegionAdminService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(PartitionAdminService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(StorageAdminService.class.getName(), ServicePermission.GET));
-
         permSet.add(new ServicePermission(ApplicationService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(ComponentConfigService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(ClusterMetadataService.class.getName(), ServicePermission.GET));
@@ -233,7 +253,7 @@
         permSet.add(new ServicePermission(LinkService.class.getName(), ServicePermission.GET));
 //        permSet.add(new ServicePermission(MulticastRouteService.class.getName(), ServicePermission.GET));
 //        permSet.add(new ServicePermission(MeterService.class.getName(), ServicePermission.GET));
-        permSet.add(new ServicePermission(ResourceService.class.getName(), ServicePermission.GET));
+//        permSet.add(new ServicePermission(ResourceService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(PacketService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(ProxyArpService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(RegionService.class.getName(), ServicePermission.GET));
@@ -248,7 +268,7 @@
         permSet.add(new ServicePermission(MessagingService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(PartitionService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(LogicalClockService.class.getName(), ServicePermission.GET));
-        permSet.add(new ServicePermission(MutexExecutionService.class.getName(), ServicePermission.GET));
+//        permSet.add(new ServicePermission(MutexExecutionService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(StorageService.class.getName(), ServicePermission.GET));
         permSet.add(new ServicePermission(UiExtensionService.class.getName(), ServicePermission.GET));
 
@@ -256,13 +276,22 @@
     }
 
     public static Set<String> getNBServiceList() {
-        Set<String> permString = new HashSet<>();
+        Set<String> permString = Sets.newHashSet();
         for (Permission perm : getAdminDefaultPerms()) {
             permString.add(perm.getName());
         }
         return permString;
     }
 
+    public static Set<String> getCliServiceList() {
+        Set<String> permString = Sets.newHashSet();
+        permString.add("org.apache.felix.service.command.Function");
+        permString.add("org.apache.karaf.shell.console.CompletableFunction");
+        permString.add("org.apache.karaf.shell.commands.CommandWithAction");
+        permString.add("org.osgi.service.blueprint.container.BlueprintContainer");
+        return permString;
+    }
+
     private static ConcurrentHashMap<AppPermission.Type, Set<String>> getServiceDirectory() {
 
         ConcurrentHashMap<AppPermission.Type, Set<String>> serviceDirectory = new ConcurrentHashMap<>();
@@ -360,12 +389,12 @@
                 EventDeliveryService.class.getName()));
         serviceDirectory.put(EVENT_WRITE, ImmutableSet.of(
                 EventDeliveryService.class.getName()));
-        serviceDirectory.put(RESOURCE_READ, ImmutableSet.of(
-                ResourceService.class.getName()));
-        serviceDirectory.put(RESOURCE_WRITE, ImmutableSet.of(
-                ResourceService.class.getName()));
-        serviceDirectory.put(RESOURCE_EVENT, ImmutableSet.of(
-                ResourceService.class.getName()));
+//        serviceDirectory.put(RESOURCE_READ, ImmutableSet.of(
+//                ResourceService.class.getName()));
+//        serviceDirectory.put(RESOURCE_WRITE, ImmutableSet.of(
+//                ResourceService.class.getName()));
+//        serviceDirectory.put(RESOURCE_EVENT, ImmutableSet.of(
+//                ResourceService.class.getName()));
         serviceDirectory.put(REGION_READ, ImmutableSet.of(
                 RegionService.class.getName()));
         serviceDirectory.put(PERSISTENCE_WRITE, ImmutableSet.of(
@@ -376,8 +405,8 @@
                 PartitionService.class.getName()));
         serviceDirectory.put(CLOCK_WRITE, ImmutableSet.of(
                 LogicalClockService.class.getName()));
-        serviceDirectory.put(MUTEX_WRITE, ImmutableSet.of(
-                MutexExecutionService.class.getName()));
+//        serviceDirectory.put(MUTEX_WRITE, ImmutableSet.of(
+//                MutexExecutionService.class.getName()));
 
         return serviceDirectory;
     }
@@ -515,18 +544,16 @@
             return new ReflectPermission(name, actions);
         }
 
-        //AllPermission, SecurityPermission, UnresolvedPermission
-        //AWTPermission,  ReflectPermission not allowed
         return null;
 
     }
-    private static List<Permission> optimizePermissions(List<Permission> perms) {
+    private static Set<Permission> optimizePermissions(Set<Permission> perms) {
         Permissions permissions = listToPermissions(perms);
         return permissionsToList(permissions);
     }
 
-    private static List<Permission> permissionsToList(Permissions perms) {
-        List<Permission> permissions = new ArrayList<>();
+    private static Set<Permission> permissionsToList(Permissions perms) {
+        Set<Permission> permissions = Sets.newHashSet();
         Enumeration<Permission> e = perms.elements();
         while (e.hasMoreElements()) {
             permissions.add(e.nextElement());
@@ -534,7 +561,7 @@
         return permissions;
     }
 
-    private static Permissions listToPermissions(List<Permission> perms) {
+    private static Permissions listToPermissions(Set<Permission> perms) {
         Permissions permissions = new Permissions();
         for (Permission perm : perms) {
             permissions.add(perm);
diff --git a/core/security/src/main/java/org/onosproject/security/impl/SecurityModeManager.java b/core/security/src/main/java/org/onosproject/security/impl/SecurityModeManager.java
index f928dd6..8561125 100644
--- a/core/security/src/main/java/org/onosproject/security/impl/SecurityModeManager.java
+++ b/core/security/src/main/java/org/onosproject/security/impl/SecurityModeManager.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Open Networking Laboratory
+ * Copyright 2015-present Open Networking Laboratory
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -38,15 +38,18 @@
 import org.onosproject.security.store.SecurityModeStore;
 import org.onosproject.security.store.SecurityModeStoreDelegate;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkEvent;
 import org.osgi.framework.FrameworkUtil;
 import org.osgi.framework.ServicePermission;
-import org.osgi.service.log.LogEntry;
-import org.osgi.service.log.LogListener;
-import org.osgi.service.log.LogReaderService;
+import org.osgi.framework.FrameworkListener;
 import org.osgi.service.permissionadmin.PermissionInfo;
 
+import java.io.FilePermission;
+import java.lang.reflect.ReflectPermission;
+import java.net.SocketPermission;
 import java.security.AccessControlException;
 import java.security.Permission;
+import java.security.SecurityPermission;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -76,9 +79,6 @@
     protected ApplicationAdminService appAdminService;
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-    protected LogReaderService logReaderService;
-
-    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     protected EventDeliveryService eventDispatcher;
 
     private final Logger log = getLogger(getClass());
@@ -88,7 +88,7 @@
 
     private final SecurityModeStoreDelegate delegate = new InternalStoreDelegate();
 
-    private SecurityLogListener securityLogListener = new SecurityLogListener();
+    private SecurityEventListener securityEventListener = new SecurityEventListener();
 
     private PermissionAdmin permissionAdmin = getPermissionAdmin();
 
@@ -96,7 +96,7 @@
     public void activate() {
 
         eventDispatcher.addSink(SecurityModeEvent.class, listenerRegistry);
-        logReaderService.addLogListener(securityLogListener);
+        getBundleContext().addFrameworkListener(new SecurityEventListener());
 
         if (System.getSecurityManager() == null) {
             log.warn("J2EE security manager is disabled.");
@@ -116,7 +116,7 @@
     @Deactivate
     public void deactivate() {
         eventDispatcher.removeSink(SecurityModeEvent.class);
-        logReaderService.removeLogListener(securityLogListener);
+        getBundleContext().removeFrameworkListener(securityEventListener);
         store.unsetDelegate(delegate);
         log.info("Stopped");
 
@@ -169,27 +169,32 @@
                 DefaultPolicyBuilder.convertToJavaPermissions(store.getRequestedPermissions(appId)));
     }
 
-    private class SecurityLogListener implements LogListener {
+    private class SecurityEventListener implements FrameworkListener {
         @Override
-        public void logged(LogEntry entry) {
-            if (entry.getException() != null &&
-                    entry.getException() instanceof AccessControlException) {
-                String location = entry.getBundle().getLocation();
-                Permission javaPerm =
-                        ((AccessControlException) entry.getException()).getPermission();
-                org.onosproject.security.Permission permission = DefaultPolicyBuilder.getOnosPermission(javaPerm);
-                if (permission == null) {
-                    log.warn("Unsupported permission requested.");
-                    return;
-                }
-                store.getApplicationIds(location).stream().filter(
-                        appId -> store.isSecured(appId) &&
-                                appAdminService.getState(appId) == ApplicationState.ACTIVE).forEach(appId -> {
-                    store.requestPermission(appId, permission);
-                    print("[POLICY VIOLATION] APP: %s / Bundle: %s / Permission: %s ",
-                            appId.name(), location, permission.toString());
-                });
+        public void frameworkEvent(FrameworkEvent event) {
+            if (event.getType() != FrameworkEvent.ERROR) {
+                return;
             }
+            Throwable throwable = event.getThrowable();
+            if (throwable == null || !(throwable instanceof AccessControlException)) {
+                return;
+            }
+            String bundleLocation = event.getBundle().getLocation();
+            Permission nativePerm = ((AccessControlException) throwable).getPermission();
+            org.onosproject.security.Permission onosPerm = DefaultPolicyBuilder.getOnosPermission(nativePerm);
+
+            if (onosPerm == null) {
+                log.warn("Unsupported permission requested: " + nativePerm.toString());
+                return;
+            }
+
+            store.getApplicationIds(bundleLocation).stream().filter(
+                    appId -> store.isSecured(appId) &&
+                            appAdminService.getState(appId) == ApplicationState.ACTIVE).forEach(appId -> {
+                store.requestPermission(appId, onosPerm);
+                print("[POLICY VIOLATION] APP: %s / Bundle: %s / Permission: %s ",
+                        appId.name(), bundleLocation, onosPerm.toString());
+            });
         }
     }
 
@@ -213,32 +218,59 @@
      * 0 - APP_PERM
      * 1 - ADMIN SERVICE
      * 2 - NB_SERVICE
-     * 3 - ETC_SERVICE
-     * 4 - ETC
+     * 3 - SB_SERVICE
+     * 4 - CLI_SERVICE
+     * 5 - ETC_SERVICE
+     * 6 - CRITICAL PERMISSIONS
+     * 7 - ETC
      * @param perms
      */
-    private Map<Integer, List<Permission>> getPrintablePermissionMap(List<Permission> perms) {
+    private Map<Integer, List<Permission>> getPrintablePermissionMap(Set<Permission> perms) {
         ConcurrentHashMap<Integer, List<Permission>> sortedMap = new ConcurrentHashMap<>();
         sortedMap.put(0, new ArrayList());
         sortedMap.put(1, new ArrayList());
         sortedMap.put(2, new ArrayList());
         sortedMap.put(3, new ArrayList());
         sortedMap.put(4, new ArrayList());
+        sortedMap.put(5, new ArrayList());
+        sortedMap.put(6, new ArrayList());
+        sortedMap.put(7, new ArrayList());
+
         for (Permission perm : perms) {
-            if (perm instanceof ServicePermission) {
-                if (DefaultPolicyBuilder.getNBServiceList().contains(perm.getName())) {
-                    if (perm.getName().contains("Admin")) {
+            if (perm instanceof AppPermission) {
+                sortedMap.get(0).add(perm);
+            } else if (perm instanceof ServicePermission) {
+                String permName = perm.getName().trim();
+                if (DefaultPolicyBuilder.getNBServiceList().contains(permName)) { // ONOS NB SERVICES
+                    if (permName.contains("Admin")) {
                         sortedMap.get(1).add(perm);
                     } else {
                         sortedMap.get(2).add(perm);
                     }
-                } else {
+                } else if (permName.contains("org.onosproject") && permName.contains("Provider")) { //ONOS SB SERVICES
                     sortedMap.get(3).add(perm);
+                } else if (DefaultPolicyBuilder.getCliServiceList().contains(permName)) { //CLI SERVICES
+                    sortedMap.get(4).add(perm);
+                } else if (permName.contains("Security")) { //CRITICAL SERVICES
+                    sortedMap.get(6).add(perm);
+                } else {
+                    sortedMap.get(5).add(perm);
                 }
-            } else if (perm instanceof AppPermission) {
-                sortedMap.get(0).add(perm);
+            } else if (perm instanceof RuntimePermission || perm instanceof SocketPermission ||
+                    perm instanceof FilePermission || perm instanceof SecurityPermission ||
+                    perm instanceof ReflectPermission) { // CRITICAL PERMISSIONS
+                sortedMap.get(6).add(perm);
             } else {
-                sortedMap.get(4).add(perm);
+                boolean isDefault = false;
+                for (Permission dPerm : DefaultPolicyBuilder.getDefaultPerms()) {
+                    if (perm.implies(dPerm)) {
+                        isDefault = true;
+                        break;
+                    }
+                }
+                if (!isDefault) {
+                    sortedMap.get(7).add(perm);
+                }
             }
         }
         return sortedMap;
@@ -261,13 +293,13 @@
 
 
 
-    private List<Permission> getMaximumPermissions(ApplicationId appId) {
+    private Set<Permission> getMaximumPermissions(ApplicationId appId) {
         Application app = appAdminService.getApplication(appId);
         if (app == null) {
             print("Unknown application.");
             return null;
         }
-        List<Permission> appPerms;
+        Set<Permission> appPerms;
         switch (app.role()) {
             case ADMIN:
                 appPerms = DefaultPolicyBuilder.getAdminApplicationPermissions(app.permissions());
@@ -300,5 +332,4 @@
 
     }
 
-
 }
\ No newline at end of file
diff --git a/core/security/src/main/java/org/onosproject/security/store/DistributedSecurityModeStore.java b/core/security/src/main/java/org/onosproject/security/store/DistributedSecurityModeStore.java
index feda424..4977a54 100644
--- a/core/security/src/main/java/org/onosproject/security/store/DistributedSecurityModeStore.java
+++ b/core/security/src/main/java/org/onosproject/security/store/DistributedSecurityModeStore.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Open Networking Laboratory
+ * Copyright 2015-present Open Networking Laboratory
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -88,13 +88,10 @@
             .register(KryoNamespaces.API)
             .register(SecurityModeState.class)
             .register(SecurityInfo.class)
-            .register(Permission.class)
             .build());
 
     private static final KryoNamespace.Builder VIOLATION_SERIALIZER = KryoNamespace.newBuilder()
-            .register(KryoNamespaces.API)
-            .register(Permission.class);
-
+            .register(KryoNamespaces.API);
     @Activate
     public void activate() {
         states = storageService.<ApplicationId, SecurityInfo>consistentMapBuilder()
diff --git a/tools/build/onos-package b/tools/build/onos-package
index e54cff3..471d25c 100755
--- a/tools/build/onos-package
+++ b/tools/build/onos-package
@@ -110,7 +110,7 @@
 
     mkdir -p $ONOS_STAGE/$KARAF_DIST/system/org/apache/felix/org.apache.felix.configadmin/1.6.0
     cp $FELIX_CFG_ADMIN $ONOS_STAGE/$KARAF_DIST/system/org/apache/felix/org.apache.felix.configadmin/1.6.0
-    perl -pi.old -e "s|org.apache.felix.configadmin/1.8.0|org.apache.felix.configadmin/1.6.0|g" \
+    perl -pi.old -e "s|^(.*org.apache.felix.configadmin.*)|mvn\\\\:org.apache.felix/org.apache.felix.configadmin/1.6.0 = 10|" \
         $ONOS_STAGE/$KARAF_DIST/etc/startup.properties
 
     # SM-ONOS step 2: stage ONOS Felix framework security (this is already done by karaf assembly); end
diff --git a/tools/dev/bin/onos-setup-karaf b/tools/dev/bin/onos-setup-karaf
index 81168d4..84c79d2 100755
--- a/tools/dev/bin/onos-setup-karaf
+++ b/tools/dev/bin/onos-setup-karaf
@@ -105,7 +105,7 @@
 
     mkdir -p $KARAF_ROOT/system/org/apache/felix/org.apache.felix.configadmin/1.6.0
     cp $FELIX_CFG_ADMIN $KARAF_ROOT/system/org/apache/felix/org.apache.felix.configadmin/1.6.0
-    perl -pi.old -e "s|org.apache.felix.configadmin/1.8.0|org.apache.felix.configadmin/1.6.0|g" \
+    perl -pi.old -e "s|^(.*org.apache.felix.configadmin.*)|mvn\\\\:org.apache.felix/org.apache.felix.configadmin/1.6.0 = 10|" \
         $KARAF_ROOT/etc/startup.properties
 
     # SM-ONOS step 2: stage ONOS Felix framework security (will get downloaded on demand); end
