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 / General / May 2005

Tip: Looking for answers? Try searching our database.

Can I restrict permissions at runtime?

Thread view: 
mark@kitfox.com - 25 May 2005 05:49 GMT
I have an editor application that I've writen that needs to read and
write XML files to disk.  I'd like to extend this program by allowing
users to extend my editor by plugging in custom code they compile using
certain interfaces.  My editor will call their code to gain use of
their functions.

However, this plugin code is untrusted, and I don't want it to access
the filesystem or network.  Is there some way I can create a sandbox
within my program in which I can run this custom code and be sure that
it cannot do things like write to the filesystem?  Perhaps create a
separate thread with special restricted permissions?

Mark McKay
Andrew Thompson - 25 May 2005 05:57 GMT
> ..Is there some way I can create a sandbox
> within my program in which I can run this custom code and be sure that
> it cannot do things like write to the filesystem?

Apply a custom security manager.
<http://groups-beta.google.com/group/comp.lang.java.programmer/messages/fc77adad2
9a3fc08,d82a65929e3508d0,937569dfda76174b,948df8d8bf985386,0449635b4f6ec8af,2f2d
4beeb6564d32,58b9bcd4064efb85,efb23296a81d4223,f29ab45389d9f5f2?thread_id=6008bc
2e14d4e02e&mode=thread&noheader=1#doc_f29ab45389d9f5f2
>

HTH

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane



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.