wood burning stoves 2.0*
The moose likes Applets and the fly likes Cerficate Vs Policy File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Cerficate Vs Policy File" Watch "Cerficate Vs Policy File" New topic
Author

Cerficate Vs Policy File

Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 247
Hello Friends
I have signed jar with a certificate exported. Now when another user from some other machine runs tries to invoke the html(which contains the applet) from my server they get a certificate request poping up asking whether you what the certificate to be downloaded?
They accept yes and the applet runs. so what about policy file which i created to give to the client to make him give access to my applet.
So how in real terms how will policy file gets distributed with the certicate?

Please help

Thanks
Farouk


SCJP, SCWCD, SCBCD, SCEA 5
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
Policies and certificates are two complimentary, but unrelated, ways to assign trust to an applet. If you use one, you don't need the other. Policies can be finer-grained (certificates are an all-or-nothing thing), but require the user to change obscure settings on their machine, while the certificate dialog is generally understood. Some more pointers can be found on this page.
[ January 27, 2006: Message edited by: Ulf Dittmer ]

Ping & DNS - updated with new look and Ping home screen widget
Mohamed Farouk
Ranch Hand

Joined: Jun 08, 2005
Posts: 247
Thanks Ulf
So basically what your saying is if you use policy files there is no need to use certificates and if you use certificates you cannot use policy files.
Usign certificates exposes the whole client environment to the applet. Using policy files grant requred access only.

So if my understanding right.
1. If i have to use policy file, I have to still sign the jar and provide a certificate with the jar where in the applet is present?
Please reply.
2. How will you distribute your policy file when you have to use security using policy files.

Regards
Farouk
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
if you use certificates you cannot use policy files

You can use both together. But there's no point in doing so.

If i have to use policy file, I have to still sign the jar and provide a certificate with the jar where in the applet is present?

No. Like I said, they're independent of each other.

How will you distribute your policy file when you have to use security using policy files

Maybe email instructions to your users with what to do? Or put those instructions on the web page that hosts the applet? You shouldn't distribute an actual file, because users might have one already, and you don't want them to replace that by yours.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cerficate Vs Policy File
 
Similar Threads
How do I make applet that uses system event queue work in the browsers?
Signed applets
trusted applet to perform file I/O on client m/c
Certificates trust accept window does not appear
how to deploy a Swing Applet that accesses the System Clipboard