maybe problem in SECURITY_MODE in Shark.conf..?

[email protected]
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <OF89344A30.9F2072D5-ON85257028.004C605C-85257028.004EC279@intellicare.com>
Never mind my earlier message (I'm still looking into it..). After a 
night's sleep, here's what I find:

Problem 1. Shark.conf has notation for SecurityManagerClassName
.SECURITY_MODE (default set to "NORMAL_SECURITY").
However, StandardSecurityManager has in its configure method this check:
String sec_m=cus.getProperty("StandardSecurityManager
.SECURITY_MODE","NORMAL_SECURITY");
So no matter what you set SecurityManagerClassName.SECURITY_MODE to in 
Shark.conf, in StandardSecurityManager, security_mode will always be set 
to NORMAL_SECURITY (if you use shark's StandarSecurityManager)

Problem 2. In StandardSecurityManager, here's code for 
check_process_get_activities_in_state:

public void check_process_get_activities_in_state (SharkTransaction 
t,String procId,String userId,String procCreator) throws SecurityException 
{
      if (SECURITY_MODE==SECURITY_MODE_NUM_ADMIN_SECURITY) {
         if (!adminUsers.contains(userId)) {
            throw new SecurityException("StandardSecurityManager -> ADMIN 
SECURITY RESTRICTION: Only admin users are allowed to ask for process 
activities that are in certain state!");
         }
      }
   }

As you can see, the exception is never going to be thrown (since by 
Problem 1 above) SECURITY_MODE==SECURITY_MODE_NUM_ADMIN_SECURITY will 
always be false.

This seems like maybe it's a bug..?
Geeta
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.