[KARAF-5527]the karaf.secured.command.compulsory.roles should only affect command ACL rules
@@ -86,7 +86,7 @@ public class ACLConfigurationParser {
public static Specificity getRolesForInvocation(String methodName, Object[] params, String[] signature,
Dictionary<String, Object> config, List<String> addToRoles) {
Dictionary<String, Object> properties = trimKeys(config);
-
+ String pid = (String)properties.get("service.pid");
Specificity s = getRolesBasedOnSignature(methodName, params, signature, properties, addToRoles);
if (s != Specificity.NO_MATCH) {
return s;
@@ -101,7 +101,7 @@ public class ACLConfigurationParser {
if (roles != null) {
addToRoles.addAll(roles);
return Specificity.WILDCARD_MATCH;
- } else if (compulsoryRoles != null){
+ } else if (compulsoryRoles != null && !pid.contains("jmx.acl")){
addToRoles.addAll(ACLConfigurationParser.parseRoles(compulsoryRoles));
return Specificity.NAME_MATCH;
} else {
