DFS UCF connection applet
Hello,
I am attempting the DFS example outlined in the dfs developer guide and am having permission issues with my signed applet. The applet connects fine (makes UCF connection) when run in eclipse but when run from browser I get the following message:
...java.security.AccessControlException: access denied (java.util.PropertyPermission dot.net.is.invoker read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at com.emc.documentum.fs.rt.ucf.UcfIdRetrieverFactory.dotNetIsInvoker(UcfIdRetrieverFactory.java:34)
at com.emc.documentum.fs.rt.ucf.UcfIdRetrieverFactory.getRetriever(UcfIdRetrieverFactory.java:22)
at com.emc.documentum.fs.rt.ucf.UcfConnection.<init>(UcfConnection.java:150)
at org.csagroup.SampleApplet.<init>(SampleApplet.java:17)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(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)
basic: Applet loaded....
I have modified the java.policy and the catelina.policy by adding:
grant codeBase "file:${catalina.home}/webapps/dfsWebApp/com/documentum/ucf/client/install/installer/-" {
permission java.security.AllPermission;
};
Is there anything else I am missing or have I not modified the policy files correctly?
Thanks,
Trevor
Best Answer
-
Hi,
In your SampleApplet's init method modify some lines of code
// this code allows us to run the code with the Applet security privstry {Object retVal = AccessController.doPrivileged(new PrivilegedExceptionAction() {public Object run() {//check permissions, user.home property should be enoughAccessController.checkPermission(new PropertyPermission("user.home", "read"));yourPrivilegedMethod();}}); } catch (AccessControlException e) {//not enough permission: user denied it, or applet is not signedlog(e);} catch (PrivilegedActionException e) {log(e);}
So put your code which needs extra privilege in the "yourPrivilegedMethod" method.That should do if your applet is really signed. I think you don't need to modify the tomcat's policy files.
0
Answers
-
Hi,
In your SampleApplet's init method modify some lines of code
// this code allows us to run the code with the Applet security privstry {Object retVal = AccessController.doPrivileged(new PrivilegedExceptionAction() {public Object run() {//check permissions, user.home property should be enoughAccessController.checkPermission(new PropertyPermission("user.home", "read"));yourPrivilegedMethod();}}); } catch (AccessControlException e) {//not enough permission: user denied it, or applet is not signedlog(e);} catch (PrivilegedActionException e) {log(e);}
So put your code which needs extra privilege in the "yourPrivilegedMethod" method.That should do if your applet is really signed. I think you don't need to modify the tomcat's policy files.
0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 103 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax