Class PolicySecurityController


  • public class PolicySecurityController
    extends SecurityController
    A security controller relying on Java Policy in effect. When you use this security controller, your securityDomain objects must be instances of CodeSource representing the location from where you load your scripts. Any Java policy "grant" statements matching the URL and certificate in code sources will apply to the scripts. If you specify any certificates within your CodeSource objects, it is your responsibility to verify (or not) that the script source files are signed in whatever implementation-specific way you're using.
    • Constructor Detail

      • PolicySecurityController

        public PolicySecurityController()
    • Method Detail

      • createClassLoader

        public GeneratedClassLoader createClassLoader​(java.lang.ClassLoader parent,
                                                      java.lang.Object securityDomain)
        Description copied from class: SecurityController
        Get class loader-like object that can be used to define classes with the given security context.
        Specified by:
        createClassLoader in class SecurityController
        Parameters:
        parent - parent class loader to delegate search for classes not defined by the class loader itself
        securityDomain - some object specifying the security context of the code that is defined by the returned class loader.
      • getDynamicSecurityDomain

        public java.lang.Object getDynamicSecurityDomain​(java.lang.Object securityDomain)
        Description copied from class: SecurityController
        Get dynamic security domain that allows an action only if it is allowed by the current Java stack and securityDomain. If securityDomain is null, return domain representing permissions allowed by the current stack.
        Specified by:
        getDynamicSecurityDomain in class SecurityController