This Essbase discussion board is provided as a free service and dedicated to all the Essbase professionals out there!
  << Previous Topic | Next Topic >>Return to Index  

udf.policy - Unable to Grant Read,Write to Specific File

September 22 2011 at 11:37 AM
No score for this post
 
from IP address 68.32.219.78

Essbase 9.3.1
Using a Java CDF that reads and writes to a file

I'm trying to grant permission to a specific file in the file system by granting permission in the udf.policy file.

When I uncomment the line permission java.security.AllPermission; the CDF works fine and interacts with the file correctly. This is just to prove that the CDF works, I need to tighten this up to a single file. I stop and start the app after each edit.(I've also tried bouncing the Essbase server too)

First of all, forgive my transgression in xposting this. I waited a few days for a response over there. My hope is that someone here who doesn't go there, might know how to address this:

When I use the following, I get an exception, shown below. Nothing of consequence is being written to the app or essbase logs

grant {
permission java.io.FilePermission "C:/test/essbase/CalcProfile.db", "write, read";
};

java.security.AccessControlException: access denied (java.io.FilePermission C:\esstest\Server\PlugIns\Essbase read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at com.hyperion.essbase.calculator.ESecurityManager.checkRead(ESecurityManager.java:80)
at java.io.File.exists(File.java:731)
at org.sqlite.Conn.open(Conn.java:98)
at org.sqlite.Conn.<init>(Conn.java:57)
at org.sqlite.JDBC.createConnection(JDBC.java:77)
at org.sqlite.JDBC.connect(JDBC.java:64)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at com.accelatis.essbase.calcprofile.cdf.CalcComment.calcComment(CalcComment.java:16)

I've tried creating the policy using PolicyTool, same result. However, I have no idea what or if I should put in the "CodeBase" field.
Has anyone had success creating read & write permissions to a single file using the udf.policy file? What is the magic syntax?



Regards,
Robb Salzmann

 
Scoring disabled. You must be logged in to score posts.Respond to this message   
AuthorReply
Ben White

206.216.34.251

Re: udf.policy - Unable to Grant Read,Write to Specific File

No score for this post
September 22 2011, 1:36 PM 

The error suggest it's trying to read C:\esstest\Server\PlugIns\Essbase, not C:/test/essbase/CalcProfile.db. If you grant a permission for that path, does the error change?

 
Scoring disabled. You must be logged in to score posts.Respond to this message   


68.32.219.78

Re: udf.policy - Unable to Grant Read,Write to Specific File

No score for this post
September 22 2011, 3:07 PM 

Thanks Ben.

Here's what I got to work:

grant{
&nbsp;&nbsp;&nbsp;permission java.security.AllPermission "C:\\test\\essbase\\CalcProfile.db", "read, write";
};

Regards,
Robb Salzmann

 
Scoring disabled. You must be logged in to score posts.Respond to this message   


68.32.219.78

Garbage removed here:

No score for this post
September 22 2011, 3:08 PM 

grant{
      permission java.security.AllPermission "C:\\test\\essbase\\CalcProfile.db", "read, write";
};

Regards,
Robb Salzmann

 
Scoring disabled. You must be logged in to score posts.Respond to this message   
Current Topic - udf.policy - Unable to Grant Read,Write to Specific File
  << Previous Topic | Next Topic >>Return to Index  

RSS feed for this forum - http://www.network54.com/Forum/58296?xml=rss. Please email hypess (at) gmail.com, if you have any questions/feedback/issues.