|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object kaos.policy.guard.KAoSGuard
public class KAoSGuard
Guard for KAoS policies enforcement. This class is still under construction...
Requires:
Modifications:
Field Summary | |
---|---|
protected java.lang.String |
_authModality
|
protected java.util.HashMap |
_enforcersOfType
|
static int |
_FULL_POLICY_MATCH_
_FULL_POLICY_MATCH_ is an integer that indicates that an action instance description fully matches a policy. |
protected DefaultKAoSGuardDescription |
_guardDescription
|
protected java.lang.String |
_id
|
protected KAoSAgentDirectoryServiceProxy |
_kaosDirectoryService
|
protected Locator |
_locator
|
protected MessageReceiver |
_messageReceiver
|
protected java.lang.String |
_nickName
|
static int |
_NO_POLICY_MATCH_
_NO_POLICY_MATCH_ is an integer that indicates that some property of an action is not consistent with a policy. |
static int |
_PARTIAL_POLICY_MATCH_
_PARTIAL_POLICY_MATCH_ is an integer that indicates that all the known properties of an action are consistent with the policy. |
protected MessageSender |
_sender
|
protected java.util.Hashtable |
_superActionsCache
|
static java.lang.String |
CONTAINER_ID_KEY
|
static java.lang.String |
GUARD_NAME_KEY
|
Constructor Summary | |
---|---|
KAoSGuard()
Constructor. |
Method Summary | |
---|---|
void |
addDomain(DomainDescription desc)
Add the specified DomainDescription to the collection of domains used to calculate authorization modalities for checking permissions. |
protected void |
addPolicy(PolicyMsg polMsg)
Policy Management Methods |
void |
addPolicyUpdateListener(PolicyDistributor listener)
|
void |
changeComponentEnabledStatus(java.lang.String repType,
java.lang.String associatedOntType,
java.lang.Boolean state)
|
protected void |
changePolicy(PolicyMsg policyMsg)
|
void |
checkDeepPermission(java.security.Permission perm,
java.lang.Object context)
The method checks if the given action is permitted according to the current set of policies. |
void |
checkPermission(java.security.Permission perm,
java.lang.Object context)
This method is stil evolving and will change when the KAoSGuard extends from the Java SecurityManager. |
static java.util.Hashtable |
createPolicyTypeTable(java.util.Collection policies)
|
void |
deleteAllLogs()
|
void |
deleteLogsforActionType(java.lang.String actionType)
|
void |
deleteLogsforActor(java.lang.String actorID)
|
void |
deleteSpecifiedLogs(java.lang.String actionType,
java.lang.String actorID,
java.lang.String startTime,
java.lang.String endTime,
java.lang.Boolean latest)
|
void |
deregisterTriggerConditionListener(TriggerConditionListener listenerRef)
Deregister the specified TriggerConditionListener from the registry. |
boolean |
equals(java.lang.Object obj)
|
java.util.Vector |
findPolicyDecision(java.security.Permission perm,
java.lang.Object context)
The method checks if the given action is permitted according to the current set of policies, or if the given action is a trigger for some obligation policy. |
java.util.List |
getActionSubclassesOfInterest()
This method returns all the subclasses of actions of all policies in this guard, along with the original action class name. |
java.util.Vector |
getAllKAoSExtensionComponents(java.lang.String repType)
|
java.util.Vector |
getAllLogs()
|
java.util.Vector |
getAllowableValuesForActionProperties(ActionInstanceDescription origActionDesc)
In this case, there are NO properties specified. |
java.util.Vector |
getAllowableValuesForActionProperties(java.util.Vector propertyNames,
ActionInstanceDescription actionDesc)
Commented out by JLOTT, this function does not work right, because it needs the allTargetValues parameter to properly add values for a positive authorization policy with a complemented property |
java.util.Vector |
getAllowableValuesForActionProperties(java.util.Vector origPropertyNames,
ActionInstanceDescription origActionDesc,
boolean tight)
This method finds allowable values for multiplt properties, by making use of the method findAllowedValuesRecursively(). |
java.util.Set |
getAllowableValuesForActionProperty(java.lang.String origPropertyName,
ActionInstanceDescription origActionDesc,
boolean tight)
This function finds out all such policies that are applicable to the given AID. |
java.util.Set |
getAllowableValuesForActionProperty(java.lang.String propertyName,
ActionInstanceDescription actionDesc,
java.util.Set allTargetValues)
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. |
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. |
java.util.Vector |
getAllowedActions()
|
java.util.Vector |
getAllPolicies()
kaos.policy.information.PolicyDBManager interface implementation - begin we have to implement these stubs here because directory service calls these methods on guard by reflection. |
java.util.Vector |
getAllRepositoryManagers()
Get all Repository Manager objects contained in this guard. |
protected java.util.List |
getBootPolicies(java.lang.String type)
|
java.util.List |
getClassRangesOfInterest()
This method returns all the classranges of properties of all policies in this guard. |
java.lang.Boolean |
getComponentEnabledStatus(java.lang.String repType,
java.lang.String associatedOntType)
|
java.lang.String |
getExpandedProperty(java.lang.String key)
|
java.util.Vector |
getForbiddenValuesForActionProperty(java.lang.String origPropertyName,
ActionInstanceDescription origActionDesc)
At the moment this method would work only for A- policies for 'moveTo' action, and for 'movingTo' property. |
HistoryMonitor |
getGuardLogManager()
Get the manager for the event log contained in the guard. |
GuardState |
getGuardStateFor()
this method returns the state of this guard |
java.lang.String |
getID()
Get guard's GUID. |
java.util.Set |
getInstancesOf(java.lang.String concept)
|
java.util.Vector |
getKAoSExtensionComponents(java.lang.String repType,
java.lang.String associatedOntType)
kaos.policy.guard.GuardRepositoryManager interface implementation - begin we have to implement these stubs here because directory service calls these methods on guard by reflection. |
java.util.Vector |
getLogsforActionType(java.lang.String actionType)
|
java.util.Vector |
getLogsforActor(java.lang.String actorID)
|
protected java.lang.String |
getNickName()
|
java.util.Vector |
getObligationsForTriggerCondition(ActionInstanceDescription origActionDesc)
Based on the specified trigger ActionInstanceDescription, select all matching control BasicActionDescriptions, which define the obligations for the trigger. |
java.util.Hashtable |
getOntologyInstances()
This method gets all the ontology instance defined in the directory service, converts them into KAoSInstances, and then creates and returns a Hashtable with instance names as keys and their corresponding KAoSInstance objects as the values. |
java.util.List |
getPoliciesForActionType(java.lang.String actionType)
Get policies for the specified action type. |
PolicyDBManager |
getPolicyDBManager()
Get the manager for the policy database contained in the guard. |
protected java.lang.String |
getPolicyForbiddingAction(ActionInstanceDescription actionDesc)
Find if any existing explicit policy firbides the given action. |
PolicyInformation |
getPolicyInformation(java.lang.String policyID)
|
java.lang.Integer |
getPolicyUpdateCount()
Returns count of the number of times the policy has been updated. |
java.lang.String |
getProperty(java.lang.String key)
|
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
|
java.util.List |
getPropretiesOfInterest()
This method returns all the properties and their subproperties of all policies contained in this guard. |
GuardRepositoryManager |
getRepositoryManager(java.lang.String repType)
Guard manager interface implementation begins |
java.util.Hashtable |
getRepositoryTableInformation(java.lang.String repType)
|
java.util.Vector |
getSpecifiedLogs(java.lang.String actionType,
java.lang.String actorID,
java.lang.String startTime,
java.lang.String endTime,
java.lang.Boolean latest)
|
java.util.Vector |
getTriggerConditions(BasicActionDescription triggerAD)
Find all trigger conditions that match the specified BasicActionDescription and return them to the caller. |
int |
hashCode()
|
protected boolean |
initExecEnvironment(java.util.Vector domainNames,
KAoSServiceRoot sr,
JasBean guardInitInfo,
EnforcerFactory enforcerFactory,
java.lang.Object infrastructureInfo,
InstanceClassifierFactory instClassifierFactory,
java.util.List controlledActorClasses,
java.util.List controlledActionClasses,
PersistenceManager persistMgr)
|
boolean |
initialize(java.util.Vector domainNames,
KAoSServiceRoot sr,
JasBean guardInitInfo,
EnforcerFactory enforcerFactory,
java.lang.Object infrastructureInfo,
InstanceClassifierFactory instClassifierFactory,
java.util.List controlledActorClasses)
Setup the basic JAS environment. |
boolean |
initialize(java.util.Vector domainNames,
KAoSServiceRoot sr,
JasBean guardInitInfo,
EnforcerFactory enforcerFactory,
java.lang.Object infrastructureInfo,
InstanceClassifierFactory instClassifierFactory,
java.util.List controlledActorClasses,
java.util.List controlledActionClasses,
PersistenceManager persistMgr)
Setup the basic JAS environment. |
protected boolean |
isActionAuthorized(ActionInstanceDescription actionDesc)
Check if the specified instance of an action is authorized. |
java.lang.Boolean |
isGuardLoggingActive(java.lang.Boolean logging)
|
void |
logActionStatus(ActionInstanceDescription status)
|
void |
logEvent(ActionInstanceDescription event)
|
protected boolean |
matchPolicy(ActionInstanceDescription actionDesc,
BasicActionDescription ps,
java.lang.String mod)
This function matches the properties of the given policy information object to those of the action description object. |
protected boolean |
matchPolicyHistory(PolicyInformation ps)
This method checks if the history action in the given policy has the # instances that the policy specifies, in the log of this guard. |
protected void |
monitorAuthorizationFailure(ActionInstanceDescription origActionDesc)
Monitoring and Response Policy Enforcement: Authorization Failure methods - begin |
void |
newAgent(KAoSAgentDescription agentDescription,
java.lang.Object initAgentContext)
Retrieve the ontological type of the agent and based on the associated action(s), obtain the appropriate enforcer(s) for the agent. |
void |
receiveMessage(TransportMessage msg)
|
void |
refreshAllPoliciesComplete()
|
void |
refreshAllPoliciesPartial(java.util.Vector properties)
|
void |
refreshPolicyComplete(java.lang.String policyID)
|
void |
refreshPolicyPartial(java.lang.String policyID,
java.util.Vector properties)
|
void |
refreshSpecifiedPoliciesComplete(java.util.Vector policyIDs)
|
void |
refreshSpecifiedPoliciesPartial(java.util.Vector policyIDs,
java.util.Vector properties)
|
protected void |
registerAgent(KAoSAgentDescription agentDescription)
Sends a message to the Domain Manager to register an agent If the node has not been registered yet, puts the message in a queue. |
boolean |
registerEnforcer(Enforcer enforcer,
java.lang.String actionType,
java.util.List subjectIDs)
Register Enforcer, which helps to enforce domain policies in this VM. |
void |
registerTriggerConditionListener(BasicActionDescription triggerAD,
TriggerConditionListener listenerRef)
Store the received TriggerConditionListener in the registry of listeners. |
protected void |
rehydratePolicies(java.util.List policies)
|
void |
reinstateObligationPolicy(java.lang.String policyID)
|
void |
removeAgent(KAoSAgentDescription agentDescription)
Remove agent from the KAoS Directory Service. |
void |
removeAllKAoSExtensionComponents(java.lang.String repType)
|
void |
removeAllPolicies()
remove all policy objects contained in this database. |
void |
removeAllRepositoryManagers()
Remove all Repository Manager objects contained in this guard. |
KAoSExtensionComponent |
removeKAoSExtensionComponent(java.lang.String repType,
java.lang.String associatedOntType)
|
protected void |
removePolicy(PolicyMsg polMsg)
|
void |
removePolicyUpdateListener(PolicyDistributor listener)
|
GuardRepositoryManager |
removeRepositoryManager(java.lang.String repType)
Remove from this guard the repository manager object for the given type of repository |
void |
resetGuardAppeal()
|
void |
restoreState(GuardPersistenceManager gpm,
KAoSServiceRoot sr,
JasBean guardInitInfo,
boolean connectToDS,
boolean connectToTransport)
|
void |
saveState(java.lang.String fileName)
this method saves the state of guard in a file. |
boolean |
setConceptMapping(java.lang.String mappingName,
java.lang.String fileNameLoc)
Set the mapping of ontology concept. |
void |
setGuardAppeal(java.util.Vector actions)
Authorization Methods |
void |
setGuardLoggingState(java.lang.Boolean logging)
kaos.policy.history.HistoryMonitor interface implementation - begin we have to implement these stubs here because directory service calls these methods on guard by reflection. |
void |
setKAoSExtensionComponent(java.lang.String repType,
java.lang.String associatedOntType,
KAoSExtensionComponent extComp)
|
void |
setPolicies(java.util.List policies)
Replace the current policy set with the given set |
void |
setPolicyBootstrapper(PolicyBootstrapper pb)
Sets the policy bootstrapper which gives the boot policies and default modality to use before the DirectoryService is contacted This should be called before any enforcers register, and before initialize() is called |
void |
setPropertyPopulator(java.lang.String mappingName,
PropertySpecializedPopulator populator)
Set the property populator for the given mapping. |
void |
setRepositoryManager(java.lang.String repType,
GuardRepositoryManager repManager)
Set the repository manager object for the given type of repository |
void |
setUsePolCert(boolean usePolCert)
|
void |
suspendObligationPolicy(java.lang.String policyID)
|
void |
updateActionSubclasses(java.lang.String className,
java.util.Collection subclasses)
to update the subclasses of an action class. |
void |
updateInstanceOfClass(java.lang.String className,
java.util.Collection instances)
update cached instances of the given class in concerned policies. |
void |
updatePolicies(java.util.List addedPolicies,
java.util.List changedPolicies,
java.util.List removedPolicies)
Add/change/remove policies to/from the PolicyInformationDatabase. |
protected void |
updatePolicies(java.util.List addedPolicies,
java.util.List changedPolicies,
java.util.List removedPolicies,
boolean setPolicies)
|
void |
updateSubpropertiesOfProperty(java.lang.String propName,
java.util.Collection subProps)
update cached subproperties of the given property in concerned policies. |
void |
updateTriggerCondition(BasicActionDescription triggerBasicAD)
This method is called by Guard upon receiving an obligation policy containing the specified triggerACD. |
protected void |
writePolicyUpdate(java.util.List addedPolicies,
java.util.List changedPolicies,
java.util.List removedPolicies,
boolean setPolicies)
This function actually updates the current policy set It allows subclasses to override it to provide persistence of policies It expects the write lock to already be aquired |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String GUARD_NAME_KEY
public static final java.lang.String CONTAINER_ID_KEY
protected java.lang.String _id
protected java.util.HashMap _enforcersOfType
protected DefaultKAoSGuardDescription _guardDescription
protected MessageSender _sender
protected Locator _locator
protected java.lang.String _nickName
protected java.lang.String _authModality
protected MessageReceiver _messageReceiver
protected KAoSAgentDirectoryServiceProxy _kaosDirectoryService
protected java.util.Hashtable _superActionsCache
public static final int _FULL_POLICY_MATCH_
public static final int _NO_POLICY_MATCH_
public static final int _PARTIAL_POLICY_MATCH_
Constructor Detail |
---|
public KAoSGuard()
Method Detail |
---|
public void receiveMessage(TransportMessage msg)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void addDomain(DomainDescription desc)
Guard
addDomain
in interface Guard
public java.lang.String getID()
getID
in interface Guard
public java.util.List getPoliciesForActionType(java.lang.String actionType)
getPoliciesForActionType
in interface AuthorizationPolicyDisclosure
actionType
- String specifying the action type for the requested policies.
public java.util.Set getAllowableValuesForActionProperty(java.lang.String propertyName, ActionInstanceDescription actionDesc, java.util.Set allTargetValues)
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).
public java.util.Set getAllowableValuesForActionProperty(java.lang.String origPropertyName, ActionInstanceDescription origActionDesc, java.util.Set allTargetValues, boolean tight)
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.
public java.util.Set getAllowableValuesForActionProperty(java.lang.String origPropertyName, ActionInstanceDescription origActionDesc, boolean tight) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.util.Vector getAllowableValuesForActionProperties(java.util.Vector propertyNames, ActionInstanceDescription actionDesc)
public java.util.Vector getAllowableValuesForActionProperties(java.util.Vector origPropertyNames, ActionInstanceDescription origActionDesc, boolean tight)
getAllowableValuesForActionProperties
in interface AuthorizationPolicyDisclosure
origActionDesc
- 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.
public java.util.Vector getAllowableValuesForActionProperties(ActionInstanceDescription origActionDesc)
AuthorizationPolicyDisclosure
getAllowableValuesForActionProperties
in interface AuthorizationPolicyDisclosure
origActionDesc
- ActionInstanceDescription object which will
be used to find applicable policies.
public java.util.Vector getForbiddenValuesForActionProperty(java.lang.String origPropertyName, ActionInstanceDescription origActionDesc)
origPropertyName
- the property for which to find those values.origActionDesc
- the AID for which to find the values.
public java.util.Hashtable getOntologyInstances()
public void removeAgent(KAoSAgentDescription agentDescription) throws NotRegisteredException, DirectoryFailure
removeAgent
in interface Guard
agentDescription
- KAoSAgentDescription to be used by the Guard to deregister the agent
from the KAoS Directory Service.
NotRegisteredException
- if the agent is
not registered in the KAoS Directory Service.
DirectoryFailure
- if the KAoS Directory Service is not available.public boolean initialize(java.util.Vector domainNames, KAoSServiceRoot sr, JasBean guardInitInfo, EnforcerFactory enforcerFactory, java.lang.Object infrastructureInfo, InstanceClassifierFactory instClassifierFactory, java.util.List controlledActorClasses)
initialize
in interface Guard
domainNames
- The Vector of names of domains the Guard will become a member of.serviceRoot
- The JAS ServiceRoot to establish connections to the JAS services:
Naming, Agent Directory and Transport.guardInitInfo
- The JasBean that encapsulates Guard's nickname and other transport
parameters, if needed by the MessageTransportService.
to satisfy Guard's requests for policy information.enforcerFactory
- The EnforcerFactory the Guard will use to obtain enforcers from.infrastructureInfo
- The Object that contains the agent's infrastructure information to pass on
to enforcers.instClassifierFactory
- The InstanceClassifierFactory to instantiate InstanceClassifiers for given property names.controlledActorClasses
- The List that contains the names of actor classes the Guard may receive policies for.
to enforcers.
public boolean initialize(java.util.Vector domainNames, KAoSServiceRoot sr, JasBean guardInitInfo, EnforcerFactory enforcerFactory, java.lang.Object infrastructureInfo, InstanceClassifierFactory instClassifierFactory, java.util.List controlledActorClasses, java.util.List controlledActionClasses, PersistenceManager persistMgr)
domainNames
- The Vector of names of domains the Guard will become a member of.serviceRoot
- The JAS ServiceRoot to establish connections to the JAS services:
Naming, Agent Directory and Transport.guardInitInfo
- The JasBean that encapsulates Guard's nickname and other transport
parameters, if needed by the MessageTransportService.
to satisfy Guard's requests for policy information.enforcerFactory
- The EnforcerFactory the Guard will use to obtain enforcers from.infrastructureInfo
- The Object that contains the agent's infrastructure information to pass on
to enforcers.instClassifierFactory
- The InstanceClassifierFactory to instantiate InstanceClassifiers for given property names.controlledActorClasses
- The List that contains the names of actor classes the Guard may receive policies for.controlledActionClasses
- The List that contains the names of action classes the Guard may receive policies for.
public void newAgent(KAoSAgentDescription agentDescription, java.lang.Object initAgentContext) throws AlreadyRegisteredException, DirectoryFailure, EnforcerInstantiationException, UnknownConceptException
newAgent
in interface Guard
agentDescription
- KAoSAgentDescription to be used by the Guard to obtain the appropriate
enforcer(s) for the guarded agent and to register the agent with the
KAoSDirectoryService.initAgentContext
- An Object describing the context of the new guarded agent.
AlreadyRegisteredException
- if the new agent is already registered in
the KAoSDirectoryService.
DirectoryFailure
- if the KAoSDirectoryService is not available.
EnforcerInstantiationException
- the process of instantiating an enforcer fails.
UnknownConceptException
- if any of used names is unknow for the ontology repository,
details will be provided in the return stringprotected void registerAgent(KAoSAgentDescription agentDescription)
agentDescription
- description of the agent
(null to only flush the buffer)public boolean setConceptMapping(java.lang.String mappingName, java.lang.String fileNameLoc)
setConceptMapping
in interface Guard
mappingName
- The String specifying the name of the mapping.fileNameLoc
- The String specifying the name and path of the file containing the mapping.
public void setPropertyPopulator(java.lang.String mappingName, PropertySpecializedPopulator populator)
setPropertyPopulator
in interface Guard
mappingName
- The String specifying the name of the mapping.PropertySpecializedPopulator
- The property populator for the given mapping.public java.util.Vector getObligationsForTriggerCondition(ActionInstanceDescription origActionDesc) throws ObligationViolationException
getObligationsForTriggerCondition
in interface ObligationPolicyDisclosure
origActionDesc
- ActionInstanceDescription describes an instance of the trigger condition sent
by the trigger condition monitor.
ObligationViolationException
public void updatePolicies(java.util.List addedPolicies, java.util.List changedPolicies, java.util.List removedPolicies)
updatePolicies
in interface PolicyDistributor
addedPolicies
- The List of policies to be added to the PolicyInformationDatabase.changedPolicies
- The List of policies to be changed in the PolicyInformationDatabase.removedPolicies
- The List of policies to be removed from the PolicyInformationDatabase.protected void updatePolicies(java.util.List addedPolicies, java.util.List changedPolicies, java.util.List removedPolicies, boolean setPolicies)
protected void writePolicyUpdate(java.util.List addedPolicies, java.util.List changedPolicies, java.util.List removedPolicies, boolean setPolicies)
public void addPolicyUpdateListener(PolicyDistributor listener)
addPolicyUpdateListener
in interface Guard
public void removePolicyUpdateListener(PolicyDistributor listener)
removePolicyUpdateListener
in interface Guard
public java.lang.Integer getPolicyUpdateCount()
getPolicyUpdateCount
in interface PolicyDisclosure
protected java.util.List getBootPolicies(java.lang.String type)
protected void rehydratePolicies(java.util.List policies)
public static java.util.Hashtable createPolicyTypeTable(java.util.Collection policies)
public void updateTriggerCondition(BasicActionDescription triggerBasicAD)
updateTriggerCondition
in interface TriggerConditionListener
triggerBasicAD
- BasicActionDescription describes the trigger condition the listener has registered for.public void deregisterTriggerConditionListener(TriggerConditionListener listenerRef) throws TriggerConditionListenerDeregistrationException
deregisterTriggerConditionListener
in interface TriggerConditionListenersRegistry
listenerRef
- TriggerConditionListener, an instance of a listener to be deregistered from the listeners registry.
TriggerConditionListenerDeregistrationException
- if the listener deregistration fails.public void registerTriggerConditionListener(BasicActionDescription triggerAD, TriggerConditionListener listenerRef) throws TriggerConditionListenerRegistrationException
registerTriggerConditionListener
in interface TriggerConditionListenersRegistry
triggerAD
- BasicActionDescription describes the trigger condition the listener is going to monitor.listenerRef
- TriggerConditionListener, an instance of a listener, which will be monitoring the described
trigger condition when an obligation policy, which contains the trigger BasicActionDescription,
is received by the Guard and passed to the listener.
TriggerConditionListenerRegistrationException
- if the listener registration fails.public java.util.Vector getTriggerConditions(BasicActionDescription triggerAD)
getTriggerConditions
in interface TriggerConditionListenersRegistry
triggerAD
- BasicActionDescription - describes the action to be used in matching against all BasicActionDescriptions
of trigger conditions stored in obligation policies.
public boolean registerEnforcer(Enforcer enforcer, java.lang.String actionType, java.util.List subjectIDs)
registerEnforcer
in interface EnforcerManager
enforcer
- the Enforcer that is being registered.actionType
- the type of action the registering enforcer will enforce.subjectIDs
- the List of subject IDs of agents associated with the enforced action.
public java.util.Vector getAllPolicies()
public void removeAllPolicies()
public PolicyInformation getPolicyInformation(java.lang.String policyID)
public void refreshPolicyComplete(java.lang.String policyID)
public void refreshPolicyPartial(java.lang.String policyID, java.util.Vector properties)
public void refreshAllPoliciesComplete()
public void refreshAllPoliciesPartial(java.util.Vector properties)
public void refreshSpecifiedPoliciesComplete(java.util.Vector policyIDs)
public void refreshSpecifiedPoliciesPartial(java.util.Vector policyIDs, java.util.Vector properties)
public java.util.List getPropretiesOfInterest()
public java.util.List getClassRangesOfInterest()
public java.util.List getActionSubclassesOfInterest()
public void updateSubpropertiesOfProperty(java.lang.String propName, java.util.Collection subProps)
propertyName
- the property whose subproperties are to be
updated.subProps
- the new subproperties.public void updateInstanceOfClass(java.lang.String className, java.util.Collection instances)
className
- the class whose instances are to be
updated.instances
- the new instances.public void updateActionSubclasses(java.lang.String className, java.util.Collection subclasses)
className
- the action class whose subclasses are updatedsubclasses
- the collection of updated subclassespublic void suspendObligationPolicy(java.lang.String policyID)
public void reinstateObligationPolicy(java.lang.String policyID)
public void setGuardLoggingState(java.lang.Boolean logging)
public java.lang.Boolean isGuardLoggingActive(java.lang.Boolean logging)
public void logEvent(ActionInstanceDescription event)
public java.util.Vector getAllLogs()
public void deleteAllLogs()
public java.util.Vector getLogsforActionType(java.lang.String actionType)
public void deleteLogsforActionType(java.lang.String actionType)
public java.util.Vector getLogsforActor(java.lang.String actorID)
public void deleteLogsforActor(java.lang.String actorID)
public java.util.Vector getSpecifiedLogs(java.lang.String actionType, java.lang.String actorID, java.lang.String startTime, java.lang.String endTime, java.lang.Boolean latest)
public void deleteSpecifiedLogs(java.lang.String actionType, java.lang.String actorID, java.lang.String startTime, java.lang.String endTime, java.lang.Boolean latest)
public java.util.Vector getKAoSExtensionComponents(java.lang.String repType, java.lang.String associatedOntType)
public KAoSExtensionComponent removeKAoSExtensionComponent(java.lang.String repType, java.lang.String associatedOntType)
public void setKAoSExtensionComponent(java.lang.String repType, java.lang.String associatedOntType, KAoSExtensionComponent extComp) throws ComponentAlreadyPresentException
ComponentAlreadyPresentException
public void changeComponentEnabledStatus(java.lang.String repType, java.lang.String associatedOntType, java.lang.Boolean state)
public java.lang.Boolean getComponentEnabledStatus(java.lang.String repType, java.lang.String associatedOntType)
public java.util.Vector getAllKAoSExtensionComponents(java.lang.String repType)
public void removeAllKAoSExtensionComponents(java.lang.String repType)
public java.util.Hashtable getRepositoryTableInformation(java.lang.String repType)
public void setGuardAppeal(java.util.Vector actions)
public void resetGuardAppeal()
public void checkPermission(java.security.Permission perm, java.lang.Object context) throws KAoSSecurityException, java.lang.NullPointerException
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.public void checkDeepPermission(java.security.Permission perm, java.lang.Object context) throws java.lang.NullPointerException, ServiceFailure, KAoSSecurityException
checkDeepPermission
in interface PolicyDisclosure
perm
- Permission to be checked by the Guard in order to allow/disallow
an action.context
- An Object describing the context of the action.
java.lang.NullPointerException
- if the Permission argument is null.
KAoSSecurityException
- containing the ids of
forbidding policies, if any.
ServiceFailure
public java.util.Vector findPolicyDecision(java.security.Permission perm, java.lang.Object context) throws ObligationViolationException, KAoSSecurityException, java.lang.NullPointerException, ServiceFailure
findPolicyDecision
in interface PolicyDisclosure
perm
- Permission to be checked by the Guard in order to allow/disallow
an action; or the trigger to be checked for obligation policies.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.
ObligationViolationException
ServiceFailure
protected boolean isActionAuthorized(ActionInstanceDescription actionDesc) throws UnknownConceptException, java.lang.InterruptedException
actionDesc
- ActionInstanceDescription providing detail description of the action
UnknownConceptException
- if any of used names is unknow for the ontology repository,
details will be provided in the return string.
java.lang.InterruptedException
- if the calling Thread is interrupted whiled waiting
to complete the execution of this method.protected boolean matchPolicyHistory(PolicyInformation ps)
protected java.lang.String getPolicyForbiddingAction(ActionInstanceDescription actionDesc) throws UnknownConceptException, java.lang.InterruptedException
actionDesc
- ActionInstanceDescription providing detail description of the action
UnknownConceptException
- if any of used names is unknow for the ontology repository,
details will be provided in the return string.
java.lang.InterruptedException
- if the calling Thread is interrupted whiled waiting
to complete the execution of this method.protected boolean matchPolicy(ActionInstanceDescription actionDesc, BasicActionDescription ps, java.lang.String mod)
public java.util.Vector getAllowedActions()
protected java.lang.String getNickName()
protected void addPolicy(PolicyMsg polMsg)
protected void removePolicy(PolicyMsg polMsg)
protected void changePolicy(PolicyMsg policyMsg)
public void setPolicyBootstrapper(PolicyBootstrapper pb)
protected boolean initExecEnvironment(java.util.Vector domainNames, KAoSServiceRoot sr, JasBean guardInitInfo, EnforcerFactory enforcerFactory, java.lang.Object infrastructureInfo, InstanceClassifierFactory instClassifierFactory, java.util.List controlledActorClasses, java.util.List controlledActionClasses, PersistenceManager persistMgr)
public void restoreState(GuardPersistenceManager gpm, KAoSServiceRoot sr, JasBean guardInitInfo, boolean connectToDS, boolean connectToTransport) throws GuardInstantiationException
GuardInstantiationException
public java.lang.String getExpandedProperty(java.lang.String key) throws java.lang.Exception
java.lang.Exception
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
public java.lang.String getProperty(java.lang.String key)
public void setUsePolCert(boolean usePolCert)
protected void monitorAuthorizationFailure(ActionInstanceDescription origActionDesc)
public GuardRepositoryManager getRepositoryManager(java.lang.String repType)
getRepositoryManager
in interface GuardManager
repType
- A String indicating the type of repository.
public GuardRepositoryManager removeRepositoryManager(java.lang.String repType)
GuardManager
removeRepositoryManager
in interface GuardManager
repType
- A String indicating the type of repository.
public void setRepositoryManager(java.lang.String repType, GuardRepositoryManager repManager)
GuardManager
setRepositoryManager
in interface GuardManager
repType
- A String indicating the type of repository.repManager
- The RepositoryManager object to be set for
the given type.public java.util.Vector getAllRepositoryManagers()
GuardManager
getAllRepositoryManagers
in interface GuardManager
public void removeAllRepositoryManagers()
GuardManager
removeAllRepositoryManagers
in interface GuardManager
public PolicyDBManager getPolicyDBManager()
GuardManager
getPolicyDBManager
in interface GuardManager
public HistoryMonitor getGuardLogManager()
GuardManager
getGuardLogManager
in interface GuardManager
public void setPolicies(java.util.List policies)
PolicyDistributor
setPolicies
in interface PolicyDistributor
public GuardState getGuardStateFor()
public void saveState(java.lang.String fileName)
fileName
- the name of file into which to save
state.public void logActionStatus(ActionInstanceDescription status)
public java.util.Set getInstancesOf(java.lang.String concept) throws UnknownConceptException, DirectoryFailure
UnknownConceptException
DirectoryFailure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |