|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kaos.core.csi.policy.PolicyCheckingImpl
public class PolicyCheckingImpl
Defines the operations to check permissions, get obligations, analyze policies, etc.
Method Summary | |
---|---|
void |
checkPermission(java.security.Permission perm,
java.lang.Object context)
The method check if the given action is permitted according to the current set of policies |
void |
checkPermission(java.lang.String actorID,
java.lang.String attemptedActionName,
java.util.HashMap actionProperties)
The method check if the given action is permitted according to the current set of policies. |
java.util.Vector |
getAllowableValuesForActionProperties(ActionInstanceDescription actionDesc)
In this case, there are NO properties specified. |
java.util.Vector |
getAllowableValuesForActionProperties(java.util.Vector propertyNames,
ActionInstanceDescription actionDesc,
boolean tight)
This function is used when the agent/enforcer has only partial information about an action and would like to determine what range of properties can be allowed by the policy set. |
java.util.Set |
getAllowableValuesForActionProperty(java.lang.String origPropertyName,
ActionInstanceDescription origActionDesc,
java.util.Set allTargetValues,
boolean tight)
This function is used when the enforcer has only partial information about an action and needs to determine what range of a property can be allowed by the policy. |
static PolicyChecking |
getInstance()
Retrieve an instance of PolicyChecking. |
static PolicyChecking |
getInstance(java.lang.String transportName)
Retrieve an instance of PolicyChecking. |
java.util.Vector |
getObligationsForTriggerCondition(ActionInstanceDescription triggerAID)
Based on the specified trigger ActionInstanceDescription, select all matching control BasicActionDescriptions, which define the obligations for the trigger. |
java.util.List |
getPoliciesForActionType(java.lang.String actionType)
Get policies for the specified action type. |
protected void |
logMessage(java.lang.String msg,
java.lang.Exception e,
int logLevel)
|
protected void |
logMessage(java.lang.String msg,
int logLevel)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PolicyChecking getInstance(java.lang.String transportName) throws java.lang.Exception
transportName
- String specifying the name of the transport to use for communication with the KAoS Directory Service.
java.lang.Exception
public static PolicyChecking getInstance() throws java.lang.Exception
java.lang.Exception
public void checkPermission(java.security.Permission perm, java.lang.Object context) throws KAoSSecurityException, java.lang.NullPointerException, ServiceFailure
checkPermission
in interface AuthorizationPolicyDisclosure
perm
- Permission to be checked by the Guard in order to allow/disallow
an action.context
- An Object describing the context of the action.
KAoSSecurityException
- if the action is not allowed.
java.lang.NullPointerException
- if the Permission argument is null.
ServiceFailure
public void checkPermission(java.lang.String actorID, java.lang.String attemptedActionName, java.util.HashMap actionProperties) throws KAoSSecurityException, java.lang.NullPointerException, ServiceFailure
checkPermission
in interface PolicyChecking
actorID
- String containing the id of the policy actor.attemptedActionName
- String containing the ontological name of the attempted action.actionProperties
- HashMap containing the ontological names and their values of properties
of the attempted action.
KAoSSecurityException
- if the action is not allowed.
java.lang.NullPointerException
- if the Permission argument is null.
ServiceFailure
- if the policy service is not available.public java.util.List getPoliciesForActionType(java.lang.String actionType) throws ServiceFailure
getPoliciesForActionType
in interface AuthorizationPolicyDisclosure
actionType
- String specifying the action type for the requested policies.
ServiceFailure
public java.util.Vector getAllowableValuesForActionProperties(java.util.Vector propertyNames, ActionInstanceDescription actionDesc, boolean tight) throws ServiceFailure
getAllowableValuesForActionProperties
in interface AuthorizationPolicyDisclosure
propertyName
- Vector containing the properties for which
values are to be found.actionDesc
- ActionInstanceDescription object which will
be used to find applicable policies.tight
- boolean, if set to 'true', will result in returning
only these values for the missing specified property
which would satisfy some policy if used alone.
ServiceFailure
public java.util.Vector getAllowableValuesForActionProperties(ActionInstanceDescription actionDesc) throws ServiceFailure
getAllowableValuesForActionProperties
in interface AuthorizationPolicyDisclosure
actionDesc
- ActionInstanceDescription object which will
be used to find applicable policies.
ServiceFailure
public java.util.Set getAllowableValuesForActionProperty(java.lang.String origPropertyName, ActionInstanceDescription origActionDesc, java.util.Set allTargetValues, boolean tight) throws ServiceFailure
getAllowableValuesForActionProperty
in interface AuthorizationPolicyDisclosure
propertyName
- String specifying the property for which
values are to be found.actionDesc
- ActionInstanceDescription object which will
be used to find applicable policies.allTargetValues
- Set of possible property values - now it is a fake argument,
which should really be calculated by the directory service
and passed to the entity disclosing the policy (PolicyDisclosure).tight
- boolean, if set to 'true', will result in returning
only these values for the missing specified property
which would satisfy some policy if used alone.
ServiceFailure
public java.util.Vector getObligationsForTriggerCondition(ActionInstanceDescription triggerAID) throws ObligationViolationException, ServiceFailure
getObligationsForTriggerCondition
in interface ObligationPolicyDisclosure
triggerACD
- ActionInstanceDescription describes an instance of the trigger condition sent
by the trigger condition monitor.
ObligationViolationException
- when specified obligation constraints in a policy applicable
to the given trigger are not satisfied.
ServiceFailure
- if the policy service is not available.protected void logMessage(java.lang.String msg, int logLevel)
protected void logMessage(java.lang.String msg, java.lang.Exception e, int logLevel)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |