Can't get out of sandbox with MSIE 4.0!!

I am trying to write an applet that can read and write files on the user's local machine.  I cannot use any server-side tricks for this.  With MSIE 4.0, you are supposed to be able to sign your applet and request certain capabilities (which I am).  It appears possible (typically lousy Microsoft documentation) that you need to call the PolicyEngine.assertPermission(); function in the method if your applet when it's about to do the thing which you requested permission for (though I have tried both with & without this function).  I cannot find any way to convince MSIE to let me operate "outside the sandbox".
On the microsoft.public.java.security newsgroup, this is a common problem - either it simply doesn't work, or there is some little detail Microsoft forgot to mention!
ccooperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jhanceCommented:
The settings are buried down deep in the IE4.0 menus:

View>Internet Options>Security>Custom>Settings>Java Permissions>Custom>Java Custom Settings>Edit Permissions>Signed Content>Access to All Files>Enable


Whew!
0
ccooperAuthor Commented:
I don't think that's really the answer.  If I understand that dialog correctly, what you suggest would in effect tell MSIE that _all_ signed applets (from whichever 'zone' I'm editing) will have access to all files, whether they ask for it or not.  That's not what I wanted.  Plus, when this applet is "set loose" on the web, I really can't expect everyone to be dinking around with their security options.

As I played with it more, I think it is in fact an MSIE bug.  Turns out, if you specify the "useslibrary" param in the applet tag (so the applet is downloaded only once unless a new version becomes available), the applet forgets which privileges you asked for.  If you just use the "cabbase" tag, so it re-downloads each time, the privilege stuff seems to work (that is, the applet gets the privileges it requested, without changing the security options for MSIE itself).  I am still checking the details, but that seems to be true ...

Chris

0
jhanceCommented:
Before ANY applet will get the FILE read/write permission the user of IE must enable it.  There are 3 options for this permission: ENABLE, DISABLE, PROMPT.  If it's set to DISABLE (which is the installation default) no JAVA applet will get access to any local file.  You're correct, however, in your assertion that if you open it up to one signed applet you open it up to all.  That's the current state of Java sandbox "rules".
0
ccooperAuthor Commented:
Hum ... I have never entered that dialog before, so I assume the values are still at their defaults - and yet even when I load my applet from a remote web page (so I'm in the 'Internet zone'), I can get file read/write privileges simply by signing the CAB file and then doing the assertPermission.
Even if changing this value was required, it seems that setting it to 'Prompt' instead of 'Enable' would be safer!

0
jhanceCommented:
Well, prompt vs. enable is up to you, but disable is still the default for the "Internet Zone" in IE 4.0
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.