org.web3d.vrtp.security
Class MicrosoftSecurityStrategy

java.lang.Object
  |
  +--org.web3d.vrtp.security.SecurityStrategy
        |
        +--org.web3d.vrtp.security.MicrosoftSecurityStrategy

public class MicrosoftSecurityStrategy
extends SecurityStrategy

MicrosoftSecurityStrategy

MicrosoftSecurityStrategy extends the SecurityStrategy, which encapsulates the security functions specific to Microsoft.

See security pages at Microsoft, http://www.microsoft.com/java/sdk/32/packages/ref_security_package_o.htm and http://www.microsoft.com/java/sdk/32/pg/pg_secty_javasec_2.htm. Essentially, a switch on of a security property enables access. Subsequent calls that require access crawl up the stack frames, checking to see if the property has been switched on. The major properties we worry about here are FILEIO, NETIO, PROPERTY and REFLECTION, which switch on file system access, network access, access to the java properties database, and access to reflection APIs, respectively.

This has to be compiled against the Microsoft classes, if you're using the Sun JDK compiler. The compilation process can be slightly involved; see the HTML files security and compiling.

Top-level Microsoft SDK documentation is available at http://www.microsoft.com/java/sdk/32/start.htm.

Author:
Don McGregor mcgredo@nps.navy.mil, Don Brutzman brutzman@nps.navy.mil
See Also:
SecurityStrategy, PropertiesBadge, NetworkCommBadge

Fields inherited from class org.web3d.vrtp.security.SecurityStrategy
firstTime
 
Constructor Summary
MicrosoftSecurityStrategy()
           
 
Method Summary
 void invokePrivilege(AllPermissionsBadge pAllPermissionsBadge, java.lang.String pMethodCallbackName)
          Enables access to Java properties, such as home directory, user name, Java VM specifications, etc.
 void invokePrivilege(AllPermissionsBadge pAllPermissionsBadge, java.lang.String pMethodCallbackName, java.lang.Object[] pCallbackArgs)
          Enables access to Java properties, such as home directory, user name, Java VM specifications, etc.
 void invokePrivilege(FileAccessBadge pFileAccessBadge, java.lang.String pMethodCallbackName)
          Enables file access to anything on the hard drive the user has access to.
 void invokePrivilege(FileAccessBadge pFileAccessBadge, java.lang.String pMethodCallbackName, java.lang.Object[] pCallbackArgs)
          Enables file access to anything on the hard drive the user has access to.
 void invokePrivilege(NetworkCommBadge pCommBadge, java.lang.String pMethodCallbackName)
          Enables communication across the network, including multicast.
 void invokePrivilege(NetworkCommBadge pCommBadge, java.lang.String pMethodCallbackName, java.lang.Object[] pCallbackArgs)
          Enables communication across the network, including multicast.
 void invokePrivilege(PropertiesBadge pPropertiesBadge, java.lang.String pMethodCallbackName)
          Enables access to Java properties, such as home directory, user name, Java VM specifications, etc.
 void invokePrivilege(PropertiesBadge pPropertiesBadge, java.lang.String pMethodCallbackName, java.lang.Object[] pCallbackArgs)
          Enables access to Java properties, such as home directory, user name, Java VM specifications, etc.
(package private)  void printSecurityProperties()
          Prints out the property list for the JVM
(package private)  void printSecurityPropertiesOnce()
          Flag to only print property list once, to prevent java console overload.
 
Methods inherited from class org.web3d.vrtp.security.SecurityStrategy
classesForInstances, debug, getSecurityStrategy, setDebug, trace
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MicrosoftSecurityStrategy

public MicrosoftSecurityStrategy()
Method Detail

invokePrivilege

public void invokePrivilege(NetworkCommBadge pCommBadge,
                            java.lang.String pMethodCallbackName)
Enables communication across the network, including multicast. The object that implements the NetworkCommBadge marker interface is passed in; we call it back after implementing any security calls required. The callback is required in some security schemes because they walk the stack looking for security issues.
Overrides:
invokePrivilege in class SecurityStrategy
Parameters:
pCommBadge - the instance requesting priviliges
pMethodCallbackName - the method to call in that instance

printSecurityProperties

void printSecurityProperties()
Prints out the property list for the JVM

printSecurityPropertiesOnce

void printSecurityPropertiesOnce()
Flag to only print property list once, to prevent java console overload.

invokePrivilege

public void invokePrivilege(NetworkCommBadge pCommBadge,
                            java.lang.String pMethodCallbackName,
                            java.lang.Object[] pCallbackArgs)
Enables communication across the network, including multicast. The object that implements the NetworkCommBadge marker interface is passed in; we call it back after implementing any security calls required. The callback is required in some security schemes because they walk the stack looking for security issues. The method arguments are passed in an an array.
Overrides:
invokePrivilege in class SecurityStrategy
Parameters:
pCommBadge - the instance requesting priviliges
pMethodCallbackName - the method to call in that instance
pCallbackArgs[] - array of method arguments for the method to be called back

invokePrivilege

public void invokePrivilege(PropertiesBadge pPropertiesBadge,
                            java.lang.String pMethodCallbackName)
Enables access to Java properties, such as home directory, user name, Java VM specifications, etc.
Overrides:
invokePrivilege in class SecurityStrategy
Parameters:
pPropertiesBadge - instance requesting getProperties priviliges
pMethodCallbackName - method that needs to do priviliged things

invokePrivilege

public void invokePrivilege(PropertiesBadge pPropertiesBadge,
                            java.lang.String pMethodCallbackName,
                            java.lang.Object[] pCallbackArgs)
Enables access to Java properties, such as home directory, user name, Java VM specifications, etc.

Overrides:
invokePrivilege in class SecurityStrategy
Parameters:
pPropertiesBadge - instance requesting getProperties priviliges
pMethodCallbackName - method that needs to do priviliged things
pCalbackArgs - arguments to the method that is called back

invokePrivilege

public void invokePrivilege(FileAccessBadge pFileAccessBadge,
                            java.lang.String pMethodCallbackName)
Enables file access to anything on the hard drive the user has access to. This is read, write, delete.
Overrides:
invokePrivilege in class SecurityStrategy
Parameters:
pFileAccessBadge - object requesting file access
pmethodCallbackName - The method to call in that instance

invokePrivilege

public void invokePrivilege(FileAccessBadge pFileAccessBadge,
                            java.lang.String pMethodCallbackName,
                            java.lang.Object[] pCallbackArgs)
Enables file access to anything on the hard drive the user has access to. This is read, write, delete.
Overrides:
invokePrivilege in class SecurityStrategy
Parameters:
pFileAccessBadge - object requesting file access
pmethodCallbackName - The method to call in that instance
pCallbackArgs - arguments to the method that is called back

invokePrivilege

public void invokePrivilege(AllPermissionsBadge pAllPermissionsBadge,
                            java.lang.String pMethodCallbackName)
Enables access to Java properties, such as home directory, user name, Java VM specifications, etc.
Overrides:
invokePrivilege in class SecurityStrategy
Parameters:
pPropertiesBadge - instance requesting getProperties priviliges
pMethodCallbackName - method that needs to do priviliged things

invokePrivilege

public void invokePrivilege(AllPermissionsBadge pAllPermissionsBadge,
                            java.lang.String pMethodCallbackName,
                            java.lang.Object[] pCallbackArgs)
Enables access to Java properties, such as home directory, user name, Java VM specifications, etc.

Overrides:
invokePrivilege in class SecurityStrategy
Parameters:
pPropertiesBadge - instance requesting getProperties priviliges
pMethodCallbackName - method that needs to do priviliged things
pCalbackArgs - arguments to the method that is called back