Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / February 2005

Tip: Looking for answers? Try searching our database.

java.policy question

Thread view: 
Neil Cherry - 14 Jan 2005 18:05 GMT
First let me say that I've used Google and come up with numerous
answers (too numerous!). I'm really looking for pointers more than the
direct answers as direct answer will most likely leave me with more
questions. I'm currently running Sun Java 1.5.0 and the initial work is
on Firefox 1.0. Later I'll work on IE.

I'm working on an applet which will eventually sit on a device where
it will be served from. But for now I need to run the applet from
another machine and, of course, it gets a security violation. To get
around this I search the web and found that I can change the local
.java.policy file for the user (that works well). It's currently set
to:

grant codeBase "http://host.uucp/device.jar" {
 permission java.security.AllPermission;
};

How can I set it so I can limit it to connecting to that host and
only port 80? What permission do I need explicitly permit?

Then the obvious question is for Java 1.5 how sign or setup my applet
so it can be used anywhere to get to one or more servers?

My apologies for keeping the questions simplistic but Applets and
security tend to get to be confusing. Especially when IE & Mozilla are
involved.

Thanks

Signature

Linux Home Automation         Neil Cherry       ncherry@comcast.net
http://home.comcast.net/~ncherry/               (Text only)
http://hcs.sourceforge.net/                     (HCS II)
http://linuxha.blogspot.com/                    My HA Blog

Chris - 06 Feb 2005 21:17 GMT
[snip]
> grant codeBase "http://host.uucp/device.jar" {
>   permission java.security.AllPermission;
> };
>
> How can I set it so I can limit it to connecting to that host and
> only port 80? What permission do I need explicitly permit?
[snip]

How about:

grant codeBase "http://host.uucp/device.jar" {
 permission java.net.SocketPermission "host.uucp:80", "connect";
};

Chris
Neil Cherry - 07 Feb 2005 14:38 GMT
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
[quoted text clipped - 13 lines]
>   permission java.net.SocketPermission "host.uucp:80", "connect";
> };

Thanks, that looks better.

Signature

Linux Home Automation         Neil Cherry       ncherry@comcast.net
http://home.comcast.net/~ncherry/               (Text only)
http://hcs.sourceforge.net/                     (HCS II)
http://linuxha.blogspot.com/                    My HA Blog



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.