incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luca80 <luca.andrea...@eng.it>
Subject Re: JONAS - Policy problem
Date Thu, 31 Jul 2008 08:37:49 GMT

Hi Craig, 
I did what you suggested to me, but I'm stucked loading a resource, Am I
missing some other permission?

I granted all permission to all directories except that of my application.

The policy file look like this:

grant codeBase "file:/C:/tmp/JONAS_4_8_6/bin/-" { permission
java.security.AllPermission; };
... granting all to all other dirs ...
grant codeBase
"file:/C:/tmp/JONAS_4_8_6/work/webapps/jonas/single/jonasAdmin/-" {
permission java.security.AllPermission; };
grant codeBase
"file:/C:/tmp/JONAS_4_8_6/work/webapps/jonas/single/JSPWiki/-" { 
	permission java.util.PropertyPermission "*", "read, write"; 
	permission java.io.FilePermission "C:\\tmp\\JONAS_4_8_6\\-", "read, write,
delete"; 
};


But I get an exception from this code:
url = m_engine.getServletContext().getResource( "/WEB-INF/web.xml" );
which returns null instead of the URL of web.xml.

If I give all permission to all, this code work well. What kind of
permission I'm missing?

I tried also:
grant codeBase "file:/C:/Programmi/Java/-" { permission
java.security.AllPermission;};
because the ServletContext is a standard Java class, but it did't work.

Any idea?


Craig L Russell wrote:
> 
> ...
> For starters, you can grant Jonas all permissions by explicitly  
> putting the jonas jar file(s) into their own security domain, e.g.
> grant <jonas jar> { permission java.security.AllPermission;}
> 
> You will quickly find that simple stuff like your application reading  
> java properties will trigger a security exception. So you add stuff to  
> the general grant.
> ... 
> 

-- 
View this message in context: http://www.nabble.com/JONAS---Policy-problem-tp18713683p18750110.html
Sent from the JspWiki - User mailing list archive at Nabble.com.


Mime
View raw message