[ 
https://issues.apache.org/jira/browse/SOLR-14100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16997617#comment-16997617
 ] 

Robert Muir commented on SOLR-14100:
------------------------------------

I'm trying it out anyway locally, to see at least how bad the damage is. And 
the first bad guy is log4j. So that would need to be avoided or fixed to make 
progress.

{noformat}
   [junit4]   2> Unable to access system properties.
   [junit4]   2> java.security.AccessControlException: access denied 
("java.util.PropertyPermission" "*" "read,write")
   [junit4]   2>        at 
java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
   [junit4]   2>        at 
java.base/java.security.AccessController.checkPermission(AccessController.java:1036)
   [junit4]   2>        at 
java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:408)
   [junit4]   2>        at 
java.base/java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1120)
   [junit4]   2>        at 
java.base/java.lang.System.getProperties(System.java:752)
   [junit4]   2>        at 
org.apache.logging.log4j.util.PropertiesUtil.getSystemProperties(PropertiesUtil.java:280)
   [junit4]   2>        at 
org.apache.logging.log4j.core.appender.ConsoleAppender$Target.getCharset(ConsoleAppender.java:88)
   [junit4]   2>        at 
org.apache.logging.log4j.core.appender.ConsoleAppender$Target$2.getDefaultCharset(ConsoleAppender.java:81)
   [junit4]   2>        at 
org.apache.logging.log4j.core.appender.ConsoleAppender$Builder.build(ConsoleAppender.java:222)
   [junit4]   2>        at 
org.apache.logging.log4j.core.appender.ConsoleAppender$Builder.build(ConsoleAppender.java:189)
   [junit4]   2>        at 
org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
   [junit4]   2>        at 
org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:964)
   [junit4]   2>        at 
org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:904)
   [junit4]   2>        at 
org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:896)
   [junit4]   2>        at 
org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
   [junit4]   2>        at 
org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
   [junit4]   2>        at 
org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
   [junit4]   2>        at 
org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:548)
   [junit4]   2>        at 
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:620)
   [junit4]   2>        at 
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:637)
   [junit4]   2>        at 
org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231)
   [junit4]   2>        at 
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
   [junit4]   2>        at 
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
   [junit4]   2>        at 
org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
   [junit4]   2>        at 
org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121)
   [junit4]   2>        at 
org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
   [junit4]   2>        at 
org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)
   [junit4]   2>        at 
org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
   [junit4]   2>        at 
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
   [junit4]   2>        at 
org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
   [junit4]   2>        at 
org.apache.solr.SolrTestCase.<clinit>(SolrTestCase.java:46)
{noformat}

> System properties cross test suite boundary
> -------------------------------------------
>
>                 Key: SOLR-14100
>                 URL: https://issues.apache.org/jira/browse/SOLR-14100
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Dawid Weiss
>            Assignee: Dawid Weiss
>            Priority: Major
>
> At some point in time all system properties were saved/ restored in the top 
> test class. When security manager was added (a long time ago) as the default 
> this has been turned off (because the rule couldn't read all properties then) 
> and replaced with just a selected subset of properties to be checked (in 
> LuceneTestCase). Sadly, Solr's security policy allows all properties to be 
> written and I bet this also leads to complex interactions between tests.
> We can allow read access to all properties at first but all writeable/ 
> modifiable properties should be identified and added to a top-level restore 
> rule, along with security manager policy that selectively enables them (so 
> that we know they're saved and restored after each test).
> This is going to be a tedious task.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to