ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | oscar List | December 2005 Index

<--  Date Index     <--  Thread Index  -->

RE: [oscar] A problem about service access control


Sir, I have solved the problem after examining the source code!
The policy file is given statically, that is, example.policy, in the
program. While I prefer to another policy file name!
Anyway, thanks!

-----Original Message-----
From: Yang [mailto:rintec@xxxxxxxx] 
Sent: Wednesday, December 28, 2005 9:43 AM
To: 'Richard S. Hall'; oscar@xxxxxxxxxxxxx
Subject: RE: [oscar] A problem about service access control

Dear Sir:

I'm not sure where the problem lies in, and there is still the same problem
when doing what is told in the security.html web page.

I have grant "Service Register" the security permission, but it still told
me that it has AccessControllException, the same as what I have met with
when dealing with "Permission Admin Service"。

My environment is JDK 5.0 and under eclipse.

Thanks!

Best Regards
Yang

PS:
The error is listed as follows:

java.security.AccessControlException: access denied
(org.osgi.framework.ServicePermission
org.ungoverned.osgi.bundle.serviceregister.SimpleService register)
        at java.security.AccessControlContext.checkPermission(Unknown
Source)
        at java.security.AccessController.checkPermission(Unknown Source)
        at org.ungoverned.oscar.Oscar.registerService(Oscar.java:2676)
        at
org.ungoverned.oscar.BundleContextImpl.registerService(BundleContextImpl.jav
a:143)
        at
org.ungoverned.oscar.BundleContextImpl.registerService(BundleContextImpl.jav
a:137)
        at
org.ungoverned.osgi.bundle.serviceregister.ServiceRegisterModel.registerServ
ice(ServiceRegisterModel.java:81)
        at
org.ungoverned.osgi.bundle.serviceregister.ServiceRegisterFrame$2.actionPerf
ormed(ServiceRegisterFrame.java:145)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown
Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown
Source)
        at javax.swing.JToggleButton$ToggleButtonModel.setPressed(Unknown
Source)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

-----Original Message-----
From: Richard S. Hall [mailto:heavy@xxxxxxxxxxxxxx] 
Sent: Wednesday, December 28, 2005 5:48 AM
To: Yang; oscar@xxxxxxxxxxxxx
Subject: Re: [oscar] A problem about service access control

Hello,

I am not exactly sure what the question is here.

If you want access control, you need to enable the security manager for
Oscar...read the security.html web page for some more details. To
restrict access to services, you need to use ServicePermission to grant
access.

If you want to dynamically assign permissions, the PermissionAdmin
bundle could help you there, I believe.

-> richard

Yang wrote:
>
> Hi, Sir/Madam:
>
> I have met a problem about service access control, that is, I just
> want some bundles cannot access the services from other bundles which
> have already registered these services in the Oscar Service Registry
> while others can. Such access control may be temporary or permanent.
>
> Thanks!
>
> Best Regards
>
> Yang
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the oscar@xxxxxxxxxxxxx
mailing list.
> To unsubscribe: mailto:oscar-unsubscribe@xxxxxxxxxxxxx
> For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>   









<--  Date Index     <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.