[jboss-jira] [JBoss JIRA] (WFLY-6700) MBeanServer.isRegistered() fails when the security manager is enabled

Brian Stansberry (JIRA) issues at jboss.org
Wed Sep 28 13:37:00 EDT 2016


     [ https://issues.jboss.org/browse/WFLY-6700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry resolved WFLY-6700.
------------------------------------
    Resolution: Rejected


RunAsRolePermission does not use *.

If this does not work, please re-open.

{code}
<permission>
<class-name>org.jboss.as.controller.access.rbac.RunAsRolePermission</class-name>
<name>SUPERUSER</name>
</permission>
{code}

> MBeanServer.isRegistered() fails when the security manager is enabled
> ---------------------------------------------------------------------
>
>                 Key: WFLY-6700
>                 URL: https://issues.jboss.org/browse/WFLY-6700
>             Project: WildFly
>          Issue Type: Bug
>    Affects Versions: 10.0.0.Final
>            Reporter: Derek Horton
>            Assignee: Brian Stansberry
>
> Calling MBeanServer.isRegistered() in a servlet fails with the following error when the security manager is enabled:
> :WFSM000001: Permission check failed (permission "("org.jboss.as.controller.access.rbac.RunAsRolePermission" "org.jboss.as.controller.access.rbac.RunAsRolePermission.SUPERUSER")" in code source "(vfs:/content/SimpleWar.war/WEB-INF/classes <no signer certificates>)" of "null")
> The code looks like the following:
>        final MBeanServer server = ManagementFactory.getPlatformMBeanServer();
>        final ObjectName mbeanName = new ObjectName("ima.test:type=imaTest");
>        System.out.println("*** calling MBeanServer.isRegistered() - "+server.isRegistered(mbeanName));
> The META-INF/jboss-permissions.xml looks like the following:
> <?xml version="1.0" encoding="UTF-8"?>
> <permissions xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="7">
>   <permission>
>     <class-name>javax.management.MBeanServerPermission</class-name>
>     <name>createMBeanServer</name>
>   </permission>
>   <permission>
>     <class-name>org.jboss.as.controller.access.rbac.RunAsRolePermission</class-name>
>     <name>*</name>
>   </permission>
> </permissions>



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list