[ 
https://issues.apache.org/jira/browse/DERBY-590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rick Hillegas updated DERBY-590:
--------------------------------

    Attachment: derby-590-01-ah-publicAccessToLuceneRoutines.diff

Attaching a revised version of the patch: 
derby-590-01-ah-publicAccessToLuceneRoutines.diff. This version wires in 
support for running the Lucene plugin under a Java SecurityManager. This 
version also adds the first set of tests for verifying the plugin's behavior 
when SQL Authorization is enabled and a SecurityManager is installed.

I think that I have figured out a reasonably small set of permissions needed to 
run the plugin under a SecurityManager. The process of discovering this set is 
documented on https://issues.apache.org/jira/browse/LUCENE-5471.

The following permissions must be granted to the Lucene core jar file...

{noformat}
// Permissions for the Lucene plugin
grant codeBase "${lucene.core.jar.url}"
{
  // permissions for file access, write access only to sandbox:
  permission java.io.FilePermission "${databaseDirectory}${/}lucene", 
"read,write,delete";
  permission java.io.FilePermission "${databaseDirectory}${/}lucene${/}-", 
"read,write,delete";
  
  // Basic permissions needed for Lucene to work:
  permission java.util.PropertyPermission "user.dir", "read";
  permission java.util.PropertyPermission "sun.arch.data.model", "read";
};
{noformat}

...and the following additional permissions must be granted to the Derby engine 
jar...

{noformat}
grant codeBase "${derby.jar}"
{
    ...

  // extra permissions needed for the Lucene plugin
  permission java.io.FilePermission "${lucene.core.jar.file}", "read";
  permission java.util.PropertyPermission "user.dir", "read";
};
{noformat}

For an example, see luceneSupport.policy.


Touches the following additional files:

A       
java/testing/org/apache/derbyTesting/functionTests/tests/lang/luceneSupport.policy
A       
java/testing/org/apache/derbyTesting/functionTests/tests/lang/LuceneSupportPermsTest.java
M       java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java


> How to integrate Derby with Lucene API?
> ---------------------------------------
>
>                 Key: DERBY-590
>                 URL: https://issues.apache.org/jira/browse/DERBY-590
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation, SQL
>            Reporter: Abhijeet Mahesh
>              Labels: derby_triage10_11
>         Attachments: derby-590-01-ag-publicAccessToLuceneRoutines.diff, 
> derby-590-01-ah-publicAccessToLuceneRoutines.diff, lucene_demo.diff, 
> lucene_demo_2.diff
>
>
> In order to use derby with lucene API what should be the steps to be taken? 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to