[JBoss JIRA] (WFCORE-4374) security-manager minimum-set for MBeanServerPermission createMBeanServer not working but permissions.xml does
by Bartosz Spyrko-Śmietanko (Jira)
[ https://issues.jboss.org/browse/WFCORE-4374?page=com.atlassian.jira.plugi... ]
Bartosz Spyrko-Śmietanko commented on WFCORE-4374:
--------------------------------------------------
'javax.management.MBeanServerPermission' fails to load in LoadedPermissionFactory because the class is not available to the security-manager module.
Adding java.se module to the security-manager module will solve most of the cases, but there would still be some permissions not included. Maybe we should add a 'module' parameter on the permission element that would be used to resolve the Permission?
[~jmesnil] WDYT?
> security-manager minimum-set for MBeanServerPermission createMBeanServer not working but permissions.xml does
> -------------------------------------------------------------------------------------------------------------
>
> Key: WFCORE-4374
> URL: https://issues.jboss.org/browse/WFCORE-4374
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Reporter: Bartosz Spyrko-Śmietanko
> Assignee: Bartosz Spyrko-Śmietanko
> Priority: Major
>
> When configuring a jdbc driver deployment jar with permissions.xml it I was able to resolve all of the needed permissions. But then when I remove the permissions.xml from the deployment and define the same permissions in the security-manager, it fails saying it requires the javax.management.MBeanServerPermission createMBeanServer even though it is defined in the subsystem.
> {code}
> 23:41:13,007 ERROR [stderr] (ServerService Thread Pool -- 81) java.security.AccessControlException: WFSM000001: Permission check failed (permission "("javax.management.MBeanServerPermission" "createMBeanServer")" in code source "(vfs:/Users/bmaxwell/Downloads/02291781/jboss-eap-7.3/standalone/deployments/createMBeanServer.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment.createMBeanServer.jar" from Service Module Loader")
> {code}
> {code}
> <minimum-set>
> <permission class="javax.management.MBeanServerPermission" name="createMBeanServer"/>
> </minimum-set>
> {code}
> If you put a permissions.xml in the deployment's META-INF with this below then it works fine. The other permissions I used for the jdbc driver seemed to work fine, it is just this one that seems inconsistent for some reason.
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <permissions xmlns="http://xmlns.jcp.org/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
> http://xmlns.jcp.org/xml/ns/javaee/permissions_7.xsd"
> version="7">
> <permission>
> <class-name>javax.management.MBeanServerPermission</class-name>
> <name>createMBeanServer</name>
> </permission>
> </permissions>
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months
[JBoss JIRA] (WFCORE-4374) security-manager minimum-set for MBeanServerPermission createMBeanServer not working but permissions.xml does
by Bartosz Spyrko-Śmietanko (Jira)
[ https://issues.jboss.org/browse/WFCORE-4374?page=com.atlassian.jira.plugi... ]
Bartosz Spyrko-Śmietanko updated WFCORE-4374:
---------------------------------------------
Component/s: Security
> security-manager minimum-set for MBeanServerPermission createMBeanServer not working but permissions.xml does
> -------------------------------------------------------------------------------------------------------------
>
> Key: WFCORE-4374
> URL: https://issues.jboss.org/browse/WFCORE-4374
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Reporter: Bartosz Spyrko-Śmietanko
> Assignee: Bartosz Spyrko-Śmietanko
> Priority: Major
>
> When configuring a jdbc driver deployment jar with permissions.xml it I was able to resolve all of the needed permissions. But then when I remove the permissions.xml from the deployment and define the same permissions in the security-manager, it fails saying it requires the javax.management.MBeanServerPermission createMBeanServer even though it is defined in the subsystem.
> {code}
> 23:41:13,007 ERROR [stderr] (ServerService Thread Pool -- 81) java.security.AccessControlException: WFSM000001: Permission check failed (permission "("javax.management.MBeanServerPermission" "createMBeanServer")" in code source "(vfs:/Users/bmaxwell/Downloads/02291781/jboss-eap-7.3/standalone/deployments/createMBeanServer.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment.createMBeanServer.jar" from Service Module Loader")
> {code}
> {code}
> <minimum-set>
> <permission class="javax.management.MBeanServerPermission" name="createMBeanServer"/>
> </minimum-set>
> {code}
> If you put a permissions.xml in the deployment's META-INF with this below then it works fine. The other permissions I used for the jdbc driver seemed to work fine, it is just this one that seems inconsistent for some reason.
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <permissions xmlns="http://xmlns.jcp.org/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
> http://xmlns.jcp.org/xml/ns/javaee/permissions_7.xsd"
> version="7">
> <permission>
> <class-name>javax.management.MBeanServerPermission</class-name>
> <name>createMBeanServer</name>
> </permission>
> </permissions>
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months
[JBoss JIRA] (WFCORE-4374) security-manager minimum-set for MBeanServerPermission createMBeanServer not working but permissions.xml does
by Bartosz Spyrko-Śmietanko (Jira)
[ https://issues.jboss.org/browse/WFCORE-4374?page=com.atlassian.jira.plugi... ]
Bartosz Spyrko-Śmietanko moved JBEAP-16555 to WFCORE-4374:
----------------------------------------------------------
Project: WildFly Core (was: JBoss Enterprise Application Platform)
Key: WFCORE-4374 (was: JBEAP-16555)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: (was: Security Manager)
Affects Version/s: (was: 7.2.0.GA)
(was: 7.3.0.CD15)
Fix Version/s: (was: 7.2.2.GA)
> security-manager minimum-set for MBeanServerPermission createMBeanServer not working but permissions.xml does
> -------------------------------------------------------------------------------------------------------------
>
> Key: WFCORE-4374
> URL: https://issues.jboss.org/browse/WFCORE-4374
> Project: WildFly Core
> Issue Type: Bug
> Reporter: Bartosz Spyrko-Śmietanko
> Assignee: Bartosz Spyrko-Śmietanko
> Priority: Major
>
> When configuring a jdbc driver deployment jar with permissions.xml it I was able to resolve all of the needed permissions. But then when I remove the permissions.xml from the deployment and define the same permissions in the security-manager, it fails saying it requires the javax.management.MBeanServerPermission createMBeanServer even though it is defined in the subsystem.
> {code}
> 23:41:13,007 ERROR [stderr] (ServerService Thread Pool -- 81) java.security.AccessControlException: WFSM000001: Permission check failed (permission "("javax.management.MBeanServerPermission" "createMBeanServer")" in code source "(vfs:/Users/bmaxwell/Downloads/02291781/jboss-eap-7.3/standalone/deployments/createMBeanServer.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment.createMBeanServer.jar" from Service Module Loader")
> {code}
> {code}
> <minimum-set>
> <permission class="javax.management.MBeanServerPermission" name="createMBeanServer"/>
> </minimum-set>
> {code}
> If you put a permissions.xml in the deployment's META-INF with this below then it works fine. The other permissions I used for the jdbc driver seemed to work fine, it is just this one that seems inconsistent for some reason.
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <permissions xmlns="http://xmlns.jcp.org/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
> http://xmlns.jcp.org/xml/ns/javaee/permissions_7.xsd"
> version="7">
> <permission>
> <class-name>javax.management.MBeanServerPermission</class-name>
> <name>createMBeanServer</name>
> </permission>
> </permissions>
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months
[JBoss JIRA] (WFCORE-4373) org.jboss.logmanager module requires java.sql module
by Ilia Vassilev (Jira)
[ https://issues.jboss.org/browse/WFCORE-4373?page=com.atlassian.jira.plugi... ]
Ilia Vassilev moved JBEAP-16554 to WFCORE-4373:
-----------------------------------------------
Project: WildFly Core (was: JBoss Enterprise Application Platform)
Key: WFCORE-4373 (was: JBEAP-16554)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Modules
(was: Server)
Affects Version/s: 8.0.0.Final
(was: 7.2.0.GA)
Fix Version/s: (was: 7.2.2.GA)
> org.jboss.logmanager module requires java.sql module
> ----------------------------------------------------
>
> Key: WFCORE-4373
> URL: https://issues.jboss.org/browse/WFCORE-4373
> Project: WildFly Core
> Issue Type: Bug
> Components: Modules
> Affects Versions: 8.0.0.Final
> Reporter: Ilia Vassilev
> Assignee: Ilia Vassilev
> Priority: Major
>
> org.jboss.logmanager module requires java.sql module
> {code}
> Caused by: java.lang.ClassNotFoundException: java.sql.SQLException from [Module "org.jboss.log4j.logmanager" version 1.1.6.Final-redhat-00001 from local module loader @7d3a22a9 (finder: local module finder @1d082e88 (roots: /opt/jboss/modules,/opt/jboss/modules/system/layers/base))]
> {code}
> It looks like in EAP 6.4 java.* was visible to everything. In EAP 7.2 with JBoss Modules changes likely due to JDK 11 modular changes, it looks like java.* is no longer just visible and JBoss Modules has some internal modules such as java.sql which would be needed to see these classes.
> Tattletale says that logmanager jar has this class org.apache.log4j.jdbc.JDBCAppender which uses java.sql.* , so we should add a dependency on java.sql (javax.sql.api exports java.sql , but javax.sql.api module is marked deprecated)
> EAP 6.4
> {code}
> <module xmlns="urn:jboss:module:1.1" name="org.jboss.log4j.logmanager">
> <resources>
> <resource-root path="log4j-jboss-logmanager-1.1.4.Final-redhat-1.jar"/>
> <!-- Insert resources here -->
> </resources>
> <dependencies>
> <module name="javax.api"/>
> <module name="javax.mail.api" optional="true"/>
> <module name="javax.jms.api" optional="true"/>
> <module name="org.dom4j" optional="true"/>
> <module name="org.jboss.logmanager"/>
> <module name="org.jboss.modules"/>
> </dependencies>
> </module>
> {code}
> {code}
> grep -r java.sql `f module.xml`
> <nothing>
> {code}
> EAP 7.2:
> {code}
> <module name="org.jboss.log4j.logmanager" xmlns="urn:jboss:module:1.8">
> <properties>
> <property name="jboss.api" value="private"/>
> </properties>
> <resources>
> <resource-root path="log4j-jboss-logmanager-1.1.6.Final-redhat-00001.jar"/>
> </resources>
> <dependencies>
> <!-- for java.beans -->
> <module name="java.desktop"/>
> <module name="java.logging"/>
> <module name="java.xml"/>
> <module name="javax.mail.api" optional="true"/>
> <module name="javax.jms.api" optional="true"/>
> <module name="org.dom4j" optional="true"/>
> <module name="org.jboss.logmanager"/>
> <module name="org.jboss.modules"/>
> </dependencies>
> </module>
> {code}
> {code}
> grep -r java.sql `f module.xml`
> ./modules/system/layers/base/sun/jdk/main/module.xml: <!-- Internal to java.sql.rowset -->
> ./modules/system/layers/base/org/wildfly/extension/elytron/main/module.xml: <module name="java.sql"/>
> ./modules/system/layers/base/org/wildfly/security/elytron-private/main/module.xml: <module name="java.sql"/>
> ./modules/system/layers/base/io/undertow/core/main/module.xml: <module name="java.sql"/>
> ./modules/system/layers/base/javax/sql/api/main/module.xml: <module name="java.sql" export="true"/>
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 10 months