4.1.6. Example for a security policy does not work

classic Classic list List threaded Threaded
2 messages Options
oerkelchen oerkelchen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

4.1.6. Example for a security policy does not work

I tried the following example of the tutorial:
<restrict>
    <commands>
      <command>read</command>
      <command>list</command>
    </commands>

    <allow>
      <mbean>
        <name>java.lang:type=Memory</name>
        <operation>gc</operation>
      </mbean>
    </allow>
</restrict>

Reading Attributes is allowed, but access to operation gc is forbidden.

When I use this configuration, I can access operation gc - but not only gc, but every operaion is allowed on any mbean:
<restrict>
    <commands>
      <command>read</command>
      <command>list</command>
      <command>exec</command>
    </commands>

    <allow>
      <mbean>
        <name>java.lang:type=Memory</name>
        <operation>gc</operation>
      </mbean>
    </allow>
</restrict>
oerkelchen oerkelchen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: 4.1.6. Example for a security policy does not work

Ok, I found the mistake, documentation is wrong. Signature is required in Operation:
This works:
<operation>gc()</operation>
 
This doesn't work:
<operation>gc</operation>
Loading...