Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Modify Policy file to grant access ??

 
Sajee Joseph
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I have an applet which is hosted on a server in my local intranet.
I want to give this applet full persmission on my machine.
I know i can have this as a trusted applet or have a Certificate installed.
Instead i would like to know, can i modify the java.policy file in my 'C:\Program Files\JavaSoft\JRE\1.4\lib\security' directory to achieve this. For instance if i edit my Policy file to make the following changes:
grant codeBase {
permission java.security.AllPermission;
};
In this case all applets will have full persmisson on my machine (which i dont want).
Instead i want just one applet running at one address (eg: http://software.myserver.com/SendMsg/SendMsg.jsp) to be given full permission. How do i change the 'grant codebase' statement to accomodate this.
Please help me out.
Thanks & Regards,
Sajee
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
You can modify the policy file in c:\javasoft\lib\security\policyfile,well you can give rights to your applet ,by using policytool and in this policy tool you can give rights to applet as socket permission ,java.net.socket permission and java.net.netPermission so you make a sign applet and modify java policy file and you applet would work,Please do ak futher questions.
You can see the following links for refernces.
http://www.ryerson.ca/~dgrimsha/courses/cps530/securityIntor2.html
http://java.sun.com/products/jdk/1.2/docs/tooldocs/win32/policytool.html#Introduction
Please do see the above links.

Thanks
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
I forget to tell you this policytool is in jdk1.3\bin\ folder so you can easily use this utility to modify ur polcy file .
Thanks
 
Goutam Bhattacharjee
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put the following grant entry
grant codeBase "http://software.myserver.com/SendMsg/SendMsg.jsp" {
permission java.security.AllPermission;
};
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic