Class ManagedSecurityService

  • All Implemented Interfaces:
    org.apache.webbeans.spi.SecurityService

    public class ManagedSecurityService
    extends Object
    implements org.apache.webbeans.spi.SecurityService
    This version of the SecurityService uses the java.lang.SecurityManager to check low level access to the underlying functions via doPriviliged blocks. The most secure way is to just copy the source over to your own class and configure it in openwebbeans.properties. This way you can add whatever security features you like to use.
    • Constructor Detail

      • ManagedSecurityService

        public ManagedSecurityService()
    • Method Detail

      • getCurrentPrincipal

        public Principal getCurrentPrincipal()
        Specified by:
        getCurrentPrincipal in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedGetDeclaredConstructor

        public <T> Constructor<T> doPrivilegedGetDeclaredConstructor​(Class<T> clazz,
                                                                     Class<?>... parameterTypes)
        Specified by:
        doPrivilegedGetDeclaredConstructor in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedGetConstructor

        public <T> Constructor<T> doPrivilegedGetConstructor​(Class<T> clazz,
                                                             Class<?>... parameterTypes)
        Specified by:
        doPrivilegedGetConstructor in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedGetDeclaredConstructors

        public <T> Constructor<?>[] doPrivilegedGetDeclaredConstructors​(Class<T> clazz)
        Specified by:
        doPrivilegedGetDeclaredConstructors in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedGetDeclaredMethod

        public <T> Method doPrivilegedGetDeclaredMethod​(Class<T> clazz,
                                                        String name,
                                                        Class<?>... parameterTypes)
        Specified by:
        doPrivilegedGetDeclaredMethod in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedGetDeclaredMethods

        public <T> Method[] doPrivilegedGetDeclaredMethods​(Class<T> clazz)
        Specified by:
        doPrivilegedGetDeclaredMethods in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedGetDeclaredField

        public <T> Field doPrivilegedGetDeclaredField​(Class<T> clazz,
                                                      String name)
        Specified by:
        doPrivilegedGetDeclaredField in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedGetDeclaredFields

        public <T> Field[] doPrivilegedGetDeclaredFields​(Class<T> clazz)
        Specified by:
        doPrivilegedGetDeclaredFields in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedSetAccessible

        public void doPrivilegedSetAccessible​(AccessibleObject obj,
                                              boolean flag)
        Specified by:
        doPrivilegedSetAccessible in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedIsAccessible

        public boolean doPrivilegedIsAccessible​(AccessibleObject obj)
        Specified by:
        doPrivilegedIsAccessible in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedSetSystemProperty

        public void doPrivilegedSetSystemProperty​(String propertyName,
                                                  String value)
        Specified by:
        doPrivilegedSetSystemProperty in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedGetSystemProperty

        public String doPrivilegedGetSystemProperty​(String propertyName,
                                                    String defaultValue)
        Specified by:
        doPrivilegedGetSystemProperty in interface org.apache.webbeans.spi.SecurityService
      • doPrivilegedGetSystemProperties

        public Properties doPrivilegedGetSystemProperties()
        Specified by:
        doPrivilegedGetSystemProperties in interface org.apache.webbeans.spi.SecurityService