Class ServerPermission

  • All Implemented Interfaces:
    Serializable, Guard

    public class ServerPermission
    extends BasicPermission

    This class is for WildFly Server's permissions. A permission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

    The target name is the name of the permission. The following table lists all the possible permission target names, and for each provides a description of what the permission allows.

    Permission Target Name What the Permission Allows
    createDeploymentReflectionIndex Create a DeploymentReflectionIndex
    getCurrentServiceContainer Retrieve current ServiceContainer
    setCurrentServiceContainer Set current ServiceContainer
    useServiceRegistry Use SecuredServiceRegistry, i.e. invoke its methods

    The permission name may also be an asterisk, to signify a wildcard match.

    Author:
    Eduardo Martins
    See Also:
    Serialized Form
    • Field Detail

      • CREATE_DEPLOYMENT_REFLECTION_INDEX_NAME

        public static final String CREATE_DEPLOYMENT_REFLECTION_INDEX_NAME
        See Also:
        Constant Field Values
      • CREATE_DEPLOYMENT_REFLECTION_INDEX

        public static final ServerPermission CREATE_DEPLOYMENT_REFLECTION_INDEX
        The Server Permission named canAccessImmutableManagementResourceRegistration, which should be used to create a DeploymentReflectionIndex.
      • GET_CURRENT_SERVICE_CONTAINER

        public static final ServerPermission GET_CURRENT_SERVICE_CONTAINER
        The Server Permission named canAccessModelController, which should be used to retrieve current ServiceContainer.
      • SET_CURRENT_SERVICE_CONTAINER

        public static final ServerPermission SET_CURRENT_SERVICE_CONTAINER
        The Server Permission named createCaller, which should be used to set current ServiceContainer.
      • USE_SERVICE_REGISTRY

        public static final ServerPermission USE_SERVICE_REGISTRY
        The Server Permission named getCallerSubject, which should be used to use SecuredServiceRegistry, i.e. invoke its methods.
    • Constructor Detail

      • ServerPermission

        public ServerPermission​(String name)
        Creates a new permission with the specified name. The name is the symbolic name of the permission, such as "getCurrentServiceContainer".
        Parameters:
        name - the name of the permission.
        Throws:
        NullPointerException - if name is null.
        IllegalArgumentException - if name is not valid.
      • ServerPermission

        public ServerPermission​(String name,
                                String actions)
        Creates a new permission object with the specified name. The name is the symbolic name of the permission, and the actions String is currently unused and should be null.
        Parameters:
        name - the name of the permission.
        actions - should be null.
        Throws:
        NullPointerException - if name is null.
        IllegalArgumentException - if name and/or actions are not valid.