public class SMGlobalPolicyUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SMGlobalPolicyUtil.CommponentType
Java EE Component type supporting the use of declared permissions
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENT_TYPE_CODESOURCE
Code source URL representing App client type
|
protected static String |
domainCfgFolder |
static String |
EAR_CLASS_LOADER |
static String |
EAR_TYPE_CODESOURCE
Code source URL representing Ear type
|
static String |
EE_GRANT_FILE
This is the file storing the default permissions granted to each component type
|
static String |
EE_RESTRICTED_FILE
This is the file storing the restricted permissions for each component type;
Any permissions declared in this list can not be used by the application
|
static String |
EJB_TYPE_CODESOURCE
Code source URL representing Ejb type
|
static String |
RAR_TYPE_CODESOURCE
Code source URL representing Rar type
|
static String |
SERVER_ALLOWED_FILE
This is the file storing the allowed permissions for each component type
A permission listed in this file may not be used but the application,
but any application declared permission must exist in this list;
|
protected static String |
SYS_PROP_JAVA_SEC_POLICY |
static String |
WEB_TYPE_CODESOURCE
Code source URL representing Web type
|
| Constructor and Description |
|---|
SMGlobalPolicyUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkRestriction(PermissionCollection declaredPC,
PermissionCollection restrictedPC)
Checks a permissions set against a restriction set
|
static void |
checkRestriction(SMGlobalPolicyUtil.CommponentType type,
PermissionCollection declaredPC) |
static void |
checkRestrictionOfComponentType(PermissionCollection declaredPC,
SMGlobalPolicyUtil.CommponentType type)
Check a permission set against a restriction of a component type
|
static void |
checkRestrictionOfEar(PermissionCollection declaredPC) |
static SMGlobalPolicyUtil.CommponentType |
convertComponentType(String type) |
static PermissionCollection |
getCompRestrictedPerms(SMGlobalPolicyUtil.CommponentType type)
Get the restricted permission set of a specified component type on the server
|
static PermissionCollection |
getCompRestrictedPerms(String type) |
static PermissionCollection |
getEECompGrantededPerms(SMGlobalPolicyUtil.CommponentType type)
Get the default granted permissions of a specified component type
|
static PermissionCollection |
getEECompGrantededPerms(String type)
Get the default granted permissions of a specified component type
|
public static final String EE_GRANT_FILE
public static final String EE_RESTRICTED_FILE
public static final String SERVER_ALLOWED_FILE
protected static final String SYS_PROP_JAVA_SEC_POLICY
public static final String EJB_TYPE_CODESOURCE
public static final String WEB_TYPE_CODESOURCE
public static final String RAR_TYPE_CODESOURCE
public static final String CLIENT_TYPE_CODESOURCE
public static final String EAR_TYPE_CODESOURCE
public static final String EAR_CLASS_LOADER
protected static final String domainCfgFolder
public static SMGlobalPolicyUtil.CommponentType convertComponentType(String type)
public static PermissionCollection getEECompGrantededPerms(SMGlobalPolicyUtil.CommponentType type)
type - Java EE component typepublic static PermissionCollection getEECompGrantededPerms(String type)
type - Java EE component type such as ejb, war, rar, car, earpublic static PermissionCollection getCompRestrictedPerms(SMGlobalPolicyUtil.CommponentType type)
type - Java EE component typepublic static PermissionCollection getCompRestrictedPerms(String type)
public static void checkRestriction(SMGlobalPolicyUtil.CommponentType type, PermissionCollection declaredPC) throws SecurityException
SecurityExceptionpublic static void checkRestriction(PermissionCollection declaredPC, PermissionCollection restrictedPC) throws SecurityException
declaredPC - restrictedPC - SecurityException - is thrown if violation detectedpublic static void checkRestrictionOfComponentType(PermissionCollection declaredPC, SMGlobalPolicyUtil.CommponentType type) throws SecurityException
declaredPC - type - SecurityExceptionpublic static void checkRestrictionOfEar(PermissionCollection declaredPC) throws SecurityException
SecurityExceptionCopyright © 2017. All rights reserved.