• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

How to Modify Policy file to grant access ??

 
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
 
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
 
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;
};
 
The only thing that kept the leeches off of me was this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic