[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Problem with custom local permissions

Have you written (or installed) a bundle which reads the permissions.perm file, parses the text into PermissionInfos and calls either PermissionAdmin or ConditionalPermissionAdmin to set the permissions of the bundle?

permissions.perm files are not read by the framework. You need s security policy bundle installed (for example, as I describe above) to set bundle permissions. The framework is policy free.
--

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the
OSGi Alliance
hargrave@xxxxxxxxxx

office: +1 386 848 1781
mobile: +1 386 848 3788




From: "David Conde" <dconde@xxxxxxxx>
To: "'Equinox development mailing list'" <equinox-dev@xxxxxxxxxxx>
Date: 2009/09/04 07:59
Subject: [equinox-dev] Problem with custom local permissions
Sent by: equinox-dev-bounces@xxxxxxxxxxx





Hi,
 
I have the next scenario:
Bundle Service which has a method called addVALUE as  shown:
 
public boolean addValue(String key, Object value) {
 
            SecurityManager security = System.getSecurityManager();
          if (security != null) {
            security.checkPermission(new PlatformConfigurationPermission(
                    PlatformConfigurationPermission.WRITE_VALUE));    
          }
     
}
 
The problem is that other  bundle  called consumer which has the next permissions.perm file, tries to call this method getting the Security Exception shown below:
 
#TestPlatformConfiguration Permissions File
(java.io.FilePermission "C:\TestingLog3.log" "write")
(es.citic.osgi.system.platformConfiguration.PlatformConfigurationPermission "PlatformConfigurationPermission" "writeValue")
 
 
The Exception which was got is:
Java.security.AccessControlException: Access denied (es.citic.osgi.system.platformConfiguration.PlatoformConfigurationPermission PlatformConfigurationPermission writeValue)
 
 
My PlatformConfigurationPermission class extends from Permission.
 
What am I missing in this implementation?
 
It looks like as does not recognice what I am writing in the permission.perm file.
 
Any idea
 
Thank you in advance
 
David_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev