Class SecurePackageResourceGuard

  • All Implemented Interfaces:
    IPackageResourceGuard

    public class SecurePackageResourceGuard
    extends PackageResourceGuard
    This is a resource guard which by default denies access to all resources and thus is more secure.

    All pattern are executed in the order they were provided. All pattern are executed to determine if access can be granted or not.

    Note that access to the config data such as get/setPattern() and acceptXXX() is not synchronized. It is assumed that configuration has finished before the first request gets executed.

    The rules are fairly simple. Each pattern must start with either "+" (include) or "-" (exclude). "*" is a placeholder for zero, one or more characters within a file or directory name. "**" is a placeholder for zero, one or more sub-directories.

    Examples:

    Examples
    +*.gif All gif files in all directories
    +test*.* All files in all directories starting with "test"
    +mydir/*/*.gif All gif files two levels below the mydir directory. E.g. mydir/dir2/test.gif
    +mydir/**/*.gif All gif files in all directories below mydir. E.g. mydir/test.gif or mydir/dir2/dir3/test.gif
    Author:
    Juergen Donnerstag
    See Also:
    IPackageResourceGuard, ResourceSettings.getPackageResourceGuard(), PackageResourceGuard