All-Permissions not working properly with sun.plugin2.applet.FXAppletSecurityManager
Scott Palmer
swpalmer at gmail.com
Mon Apr 14 20:07:36 UTC 2014
Can someone confirm that all-permissions is working for JavaFX apps
that are launched via Web Start with Java 8.0 and use daemon threads
in a Service?
I have a JNLP file that has:
<security>
<all-permissions/>
</security>
and the manifest of my app's jar has the following instruction in my
Gradle script:
jar {
manifest {
attributes('Permissions': 'all-permissions',
'Codebase': '*')
}
}
I'm using the javafx gradle plugin and signing the jars...
e.g. I see this for every dependency and the main jar:
...
Signing (BLOB) C:\Users\scott\.m2\caches\path\to\some.jar
Signed as C:\Users\scott\dev\MyProject\build\libs\some.jar
...
I even tried System.setSecurityManager(null); in my start() method
(and it lets me do it).
However, daemon threads started by my Service are unable to use
reflection. (It is working in the main FX application thread.) I see
the following stack trace in the Java console:
Caused by: java.security.AccessControlException: access denied
("java.lang.reflect.ReflectPermission" "suppressAccessChecks")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at sun.plugin2.applet.FXAppletSecurityManager.checkPermission(Unknown Source)
at java.lang.reflect.AccessibleObject.setAccessible(Unknown Source)
Caused by: java.security.AccessControlException: access denied
("java.lang.RuntimePermission" "accessDeclaredMembers")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at sun.plugin2.applet.FXAppletSecurityManager.checkPermission(Unknown Source)
at java.lang.Class.checkMemberAccess(Unknown Source)
at java.lang.Class.getDeclaredMethod(Unknown Source)
at ma.glasnost.orika.property.PropertyResolver.resolvePropertyType(PropertyResolver.java:304)
at ma.glasnost.orika.property.PropertyResolver.processProperty(PropertyResolver.java:240)
at ma.glasnost.orika.property.IntrospectorPropertyResolver.collectProperties(IntrospectorPropertyResolver.java:83)
... 33 more
I bring it up here because FXAppletSecurityManager is involved and
this smells like a possible bug in plugin2
Regards,
Scott
More information about the openjfx-dev
mailing list