2 Replies Latest reply on May 8, 2017 11:27 PM by Girish Pathak

    Getting java.security. AccessControlException for MBeanPermission

    Girish Pathak Newbie

      Hi ,

      Can anyone help me here please , I am getting following error :

      ERROR Could not register mbeans java.security.

       

      AccessControlException: WFSM000001: Permission check failed (permission "("javax.management.MBeanPermission" "org.apache.logging.log4j.core.jmx.LoggerContextAdmin#-

      [org.apache.logging.log4j2:type=51634f]" "registerMBean")" in code source "(vfs:/C:/wildfly-10.0.0.Final/standalone/deployments/mySampleSecurityApp.war/WEB-INF/lib/log4j-core-2.5.

      jar <no signer certificates>)" of "null")

      and i have enabled SECMGR flag to true in standalone.conf.bat , my standalone.xml configuration is as below:

              

      <subsystem xmlns="urn:jboss:domain:security-manager:1.0">

        <deployment-permissions>

        <minimum-set>

        <permission class="java.util.PropertyPermission" name="*" actions="read"/>

        <permission class="java.lang.RuntimePermission" name="createClassLoader"/>

        <permission class="java.lang.RuntimePermission" name="getClassLoader"/>

        <permission class="java.lang.RuntimePermission" name="shutdownHooks"/>

        <permission class="javax.management.MBeanServerPermission" name="createMBeanServer"/>

        <permission class="java.lang.reflect.ReflectPermission" name="suppressAccessChecks"/>

        <permission class="javax.management.MBeanPermission" name="registerMBean"/>

        <permission class="javax.management.MBeanPermission" name="queryNames"/>

        </minimum-set>

        </deployment-permissions>

      </subsystem>

        • 1. Re: Getting java.security. AccessControlException for MBeanPermission
          Girish Pathak Newbie

          Hi,

          I got the solution for this error and added following highlighted xml code in standalone.xml , it got fixed . Now I am getting java.lang.SecurityException: Unable to create temporary file .

          Can anyone please tell me what is the syntax for adding permission for temporary file creation. As i have added one sample line in below xml with strike-through  , what can I give here ?

          <subsystem xmlns="urn:jboss:domain:security-manager:1.0">

                      <deployment-permissions>

                          <minimum-set>

                              <permission class="java.lang.RuntimePermission" name="getClassLoader" actions="read,write"/>

                              <permission class="java.lang.reflect.ReflectPermission" name="suppressAccessChecks" actions="read,write"/>

                              <permission class="java.util.PropertyPermission" name="*" actions="read"/>

                              <permission class="java.lang.RuntimePermission" name="accessClassInPackage.sun.reflect" actions="read,write"/>

                              <permission class="java.lang.RuntimePermission" name="accessDeclaredMembers" actions="read,write"/>

                              <permission class="java.lang.RuntimePermission" name="shutdownHooks"/>

                              <permission class="javax.management.MBeanPermission" name="*" actions="queryNames"/>

                              <permission class="javax.management.MBeanServerPermission" name="*"/>

                              <permission class="javax.management.MBeanPermission" name="*" actions="registerMBean"/>

                              <permission class="javax.management.MBeanTrustPermission" name="*"/>

                             <permission class="java.io.FilePermission" name="what can I give here for temporary file creation " actions="read,write"/>

                          </minimum-set>

                      </deployment-permissions>

                  </subsystem>