Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Security in applets

 
Chuck Meduri
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I had an applet which was running fine with the security features in JDK 1.1. When running the same applet code in JDK 1.2 (I guess the java security 1.2 is implemented), I get the following exception:
java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup )
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.lang.RuntimeException(java.lang.String)
java.lang.SecurityException(java.lang.String)
java.security.AccessControlException(java.lang.String, java.security.Permission)
void java.security.AccessControlContext.checkPermission(java.security.Permission)
void java.security.AccessController.checkPermission(java.security.Permission)
void java.lang.SecurityManager.checkPermission(java.security.Permission)
void sun.applet.AppletSecurity.checkAccess(java.lang.ThreadGroup)
void java.lang.ThreadGroup.checkAccess()
void java.lang.Thread.init(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String)
java.lang.Thread()
Does anyone out there have any idea as to how to resolve this issue?
I read the security architecture and changed the java.policy file in the {$java.home}\jre\lib\security directory and ran the applet code. It still give the same error.
Can anyone help me? Any help would be appreciated.
Chuck
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chuck,
Not sure what you are trying to implement. But take a look at the following thread to see if it can help you.
http://www.javaranch.com/ubb/Forum2/HTML/003306.html
Regards,
Manfred.
 
Chuck Meduri
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manfred,
This applet was working fine in Visual Age for Java 3.0 version which uses JDK 1.1.7. Recently we are upgrading our VisualAge For Java, Web Application Server etc... The VisualAge For Java(VAJ) 4.0 uses JDK 1.2.2.
This meat of the applet is trying to attempt logging in any user. Inside the attemptLogin function in this applet class, it creates a new LoginThread(which extends thread), and shows the progress bar.
This was working perfectly in the old version. But in the newer version which uses the JDK 1.2.x, it throws the exception that I posted. The reason being it does not have the access to modify the thread. I created a new policy file granting permission to modifyThreadGroup at Runtime etc. But this has not helped either.
I am still at loss of ways to solve this problem.
Any help would be appreciated.
Regards,
Chuck
P.S: I am also looking at the thread you just me to see if I can implement something similar.

Originally posted by Manfred Leonhardt:
Hi Chuck,
Not sure what you are trying to implement. But take a look at the following thread to see if it can help you.
http://www.javaranch.com/ubb/Forum2/HTML/003306.html
Regards,
Manfred.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic