Skip to content
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

Closed
firebird-automations opened this issue May 20, 2012 · 9 comments

Comments

@firebird-automations
Copy link

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

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

assignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

I will need to Investigate if this can occur in other situations with a restricted policy.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 2.3 [ 10440 ]

@firebird-automations
Copy link
Author

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.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

priority: Major [ 3 ] => Minor [ 4 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Component: JDBC driver [ 10053 ]

@firebird-automations
Copy link
Author

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.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants