New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AccessControlException in LoggerFactory can cause driver load to fail in restricted environment [JDBC254] #301
Comments
Modified by: @mrotteveelassignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ] |
Commented by: @mrotteveel I will need to Investigate if this can occur in other situations with a restricted policy. |
Modified by: @mrotteveelFix Version: Jaybird 2.3 [ 10440 ] |
Commented by: @mrotteveel Made all access to system properties a privileged action (which by itself won't solve this issue). Will delve into it deeper at a later time. |
Modified by: @mrotteveelpriority: Major [ 3 ] => Minor [ 4 ] |
Modified by: @mrotteveelComponent: JDBC driver [ 10053 ] |
Commented by: @mrotteveel I have decided that I will only delve into this further when specific issues are reported with a reproducible example (and policy) that is not an applet. |
Modified by: @mrotteveelstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @mrotteveel
See http://stackoverflow.com/q/10673119/466862
The loading of FBDriver can fail in a restricted environment as the LoggerFactory tries to retrieve the system property FBLog4j; if this fails (as described in above stackoverflow post in an unsigned applet, but other restricted scenarios are possible as well) with an AccessControlException, then the driver load will fail with a java.lang.NoClassDefFoundError: Could not initialize class org.firebirdsql.jdbc.FBDriver
and:
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission FBLog4j read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at org.firebirdsql.logging.LoggerFactory.getLogger(LoggerFactory.java:36)
at org.firebirdsql.logging.LoggerFactory.getLogger(LoggerFactory.java:72)
at org.firebirdsql.jdbc.FBDriver.<clinit>(FBDriver.java:63)
... 12 more
Commits: 722edb9 772e233
The text was updated successfully, but these errors were encountered: