|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--com.ls.lars.communication.CommunicationTemplate | +--com.ls.lars.server.AgentTemplate | +--com.ls.lars.server.AgentSynchronization | +--com.ls.lars.server.AgentPlatformSecurity
The lars platform synchronization process allows the inter-connection of
lars platforms in order to enable cross-platform messaging. Lars platforms
can be configured to 'know' remote platforms and to connect to them at
runtime.
For instance, 141.168.1.1-lars1
could be configured to connect
to 141.168.1.1-lars3
, which enables the agents on both platforms
to inter-communicate with each other.
Platform synchronization also can establish connections dynamically: a lars
platform, which connects to a remote platform, gets automatically informed
on other platforms that are currently connected to that remote platform.
This information process depends on the kind of connection type that exist
between the various platforms.
There are 3 kinds of connection types:
This agent takes care what information is being sent to a connecting platform.
The information always contains the connection parameters of the local
platform, additional connection parameters being sent are depending on the
connection type as explained above.
In addition this agent manages the security settings regarding the
client-to-lars- and inter-lars-communication. The agent provides possibilities
to define trusted and untrustedparties - on the basis of the
following settings (to be configured within the config file):
Please note:
By default your local lars platform is absolutely locked.
This means no agent may connect from outside to your lars platform
This behavior forces you to think about security and to configure
at least a minimum set of trusted agents, platforms or IP addresses.
----------------------------------------------------------------------- agent_connected (internal use only!) ----------------------------------------------------------------------- Function: Notifies the current agent that a defined other agent is available on the local platform. Parameters: agent's name (String) The string message containing the agent's name Responses: none Note: This message is for lars internal use only, thus it can be sent only from the platform'sAgentMessageRouter
. Any message from any other originator will be ignored. ----------------------------------------------------------------------- set_trusted_agent (config file only!) ----------------------------------------------------------------------- Function: Adds agent name(s) to the list of all trusted agents. Parameters: Map with key 'agent' and with a String or Collection denoting the trusted agent name(s) as value(s). Responses: none ----------------------------------------------------------------------- set_untrusted_agent (config file only!) ----------------------------------------------------------------------- Function: Adds agent name(s) to the list of all untrusted agents. Parameters: Map with key 'agent' and with a String or Collection denoting the untrusted agent name(s) as value(s). Responses: none ----------------------------------------------------------------------- set_trusted_platform (config file only!) ----------------------------------------------------------------------- Function: Adds platform name(s) to the list of all trusted platforms. Parameters: Map with key 'platform' and with a String or Collection denoting the trusted platform name(s) as value(s). Responses: none ----------------------------------------------------------------------- set_untrusted_platform (config file only!) ----------------------------------------------------------------------- Function: Adds platform name(s) to the list of all untrusted platforms. Parameters: Map with key 'platform' and with a String or Collection denoting the untrusted platform name(s) as value(s). Responses: none ----------------------------------------------------------------------- set_trusted_ip (config file only!) ----------------------------------------------------------------------- Function: Adds IP address(es) to the list of all trusted IP addresses. Parameters: Map with key 'ipAddress' and with a String or Collection denoting the trusted IP address(es) as value(s). Responses: none ----------------------------------------------------------------------- set_untrusted_ip (config file only!) ----------------------------------------------------------------------- Function: Adds IP address(es) to the list of all untrusted IP addresses. Parameters: Map with key 'ipAddress' and with a String or Collection denoting the untrusted IP address(es) as value(s). Responses: none ----------------------------------------------------------------------- response_for_connection_parameters ----------------------------------------------------------------------- Function: This message is being sent from the local listener agents, when being ask for their connectionParameters. Parameters: Map with key 'port' and with a String denoting the port the sender of this message (a listener) is listening on. Responses: none ----------------------------------------------------------------------- register_platforms (internal use only!) ----------------------------------------------------------------------- Function: Registers the platforms given by this message to the local lars platform. Parameters: List containing one or moreAgentSynchronization.LarsPlatformRepresentation
entries. Responses: none Note: This message is used for the platform synchronization process only, thus it can be sent only from this platform'sAgentSynchronizeSupervisor
orAgentSynchronizeConnectionHandler
. Messages being sent from any other originator will be ignored. ----------------------------------------------------------------------- unregister_platforms (internal use only!) ----------------------------------------------------------------------- Function: Unregisters the platforms given by this message to the local lars platform. Parameters: List containing one or moreAgentSynchronization.LarsPlatformRepresentation
entries. Responses: none Note: This message is used for the platform synchronization process only, thus it can be sent only from this platform'sAgentSynchronizeSupervisor
orAgentSynchronizeConnectionHandler
. Messages being sent from any other originator will be ignored. ----------------------------------------------------------------------- inform_remote_platforms (internal use only!) ----------------------------------------------------------------------- Function: The message orders this agent to inform every platform as given in this message's content on the connection settings of every other connected platform - according on the type of connection. Parameters: List containing one or moreAgentSynchronization.LarsPlatformRepresentation
entries. Responses: none Note: This message is used for the platform synchronization process only, thus it can be sent only from this platform'sAgentSynchronizeSupervisor
orAgentSynchronizeConnectionHandler
. Messages being sent from any other originator will be ignored. ----------------------------------------------------------------------- Note: When specifying trusted and untrusted agents, platforms and/or IP addresses, you can specifying the connectionType, the setting is thought for. If you specify aconnectionType
of:
connectionType
, the default is '*'!
Inner classes inherited from class com.ls.lars.server.AgentSynchronization |
AgentSynchronization.LarsPlatformRepresentation |
Field Summary | |
protected static String |
HIDDEN_ACCESS
Constant representing a string constant for access |
protected static String |
PRIVATE_ACCESS
Constant representing a string constant for access |
protected static String |
PUBLIC_ACCESS
Constant representing a string constant for access |
protected String |
revisionInformation
revision information string, managed by our version control system. |
Fields inherited from class com.ls.lars.communication.CommunicationTemplate |
agentName, homePlatform, iPKIHandler, logger, STATUS_CONNECTED, STATUS_NOT_CONNECTED |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
AgentPlatformSecurity(String agentName,
String homePlatform,
List agentCfgFiles)
Constructor with the agentName, its homePlatform and the name of the configuration file of the new agent |
Method Summary | |
protected void |
initializeMessages()
Method which is called after the cfg-file has been read. |
protected boolean |
interpretAgentConnected(Message currentMessage)
Is the reply from AgentMessageRouter, when AgentSocketListener, AgentRMIListener, etc. is known by the AgentMessageRouter. |
protected boolean |
interpretInformRemotePlatforms(Message currentMessage)
Method, that decides according to the access parameter, which remote platform is to be informed and what information this remote platform gets. |
protected boolean |
interpretRegisterPlatforms(Message currentMessage)
New platforms are registered and stored in allKnownPlatforms. |
protected boolean |
interpretResponseForConnectionParameters(Message currentMessage)
Method is called by the AgentMessageRouter if one of the listeners (AgentSocketListener, AgentRMIListener, etc.) is known. |
protected boolean |
interpretSetTrustedAgent(Message currentMessage)
Adds agent names to the list of trusted agents. Note: For security reasons this message is accepted only if coming directly from a config file! |
protected boolean |
interpretSetTrustedIp(Message currentMessage)
Adds IP addresses to the list of trusted IP addresses. Note: For security reasons this message is accepted only if coming directly from a config file! |
protected boolean |
interpretSetTrustedPlatform(Message currentMessage)
Adds platform names to the list of trusted platforms. Note: For security reasons this message is accepted only if coming directly from a config file! |
protected boolean |
interpretSetUntrustedAgent(Message currentMessage)
Adds agent names to the list of untrusted agents. Note: For security reasons this message is accepted only if coming directly from a config file! |
protected boolean |
interpretSetUntrustedIp(Message currentMessage)
Adds IP addresses to the list of untrusted IP addresses. Note: For security reasons this message is accepted only if coming directly from a config file! |
protected boolean |
interpretSetUntrustedPlatform(Message currentMessage)
Adds platform names to the list of untrusted platforms. Note: For security reasons this message is accepted only if coming directly from a config file! |
protected boolean |
interpretUnregisterPlatforms(Message currentMessage)
Platforms are unregistered and deleted from allKnownPlatforms. |
Methods inherited from class com.ls.lars.server.AgentSynchronization |
addPlatformToVectorOfPlatforms, checkForEqualPlatformConnections, checkForEqualPlatforms, checkPlatformInVectorOfPlatforms, deletePlaformFromVectorOfPlatforms, interpretSetConstants, interpretSynchronizePlatforms, ownPlatform |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ls.lars.communication.IToLars |
start |
Field Detail |
protected String revisionInformation
protected static final String PUBLIC_ACCESS
protected static final String PRIVATE_ACCESS
protected static final String HIDDEN_ACCESS
Constructor Detail |
public AgentPlatformSecurity(String agentName, String homePlatform, List agentCfgFiles)
agentName
- name of the agenthomePlatform
- name of the lars platform (e.g 192.168.1.1-lars)agentCfgFiles
- name of the agent config file (e.g. AgentPlatformSecurity.cfg)Method Detail |
protected void initializeMessages()
initializeMessages
in class AgentSynchronization
protected boolean interpretAgentConnected(Message currentMessage)
interpretAgentConnected
in class AgentTemplate
currentMessage
- Incomming Message.protected boolean interpretSetTrustedAgent(Message currentMessage)
Note: For security reasons this message is accepted only if coming directly from a config file!
currentMessage
- a 'set_trusted_agent' messageprotected boolean interpretSetUntrustedAgent(Message currentMessage)
Note: For security reasons this message is accepted only if coming directly from a config file!
currentMessage
- a 'set_untrusted_agent' messageprotected boolean interpretSetTrustedPlatform(Message currentMessage)
Note: For security reasons this message is accepted only if coming directly from a config file!
currentMessage
- a 'set_trusted_platform' messageprotected boolean interpretSetUntrustedPlatform(Message currentMessage)
Note: For security reasons this message is accepted only if coming directly from a config file!
currentMessage
- a 'set_untrusted_platform' messageprotected boolean interpretSetTrustedIp(Message currentMessage)
Note: For security reasons this message is accepted only if coming directly from a config file!
currentMessage
- a 'set_trusted_ip' messageprotected boolean interpretSetUntrustedIp(Message currentMessage)
Note: For security reasons this message is accepted only if coming directly from a config file!
currentMessage
- a 'set_untrusted_ip' messageprotected boolean interpretResponseForConnectionParameters(Message currentMessage)
currentMessage
- Incomming Message.protected boolean interpretRegisterPlatforms(Message currentMessage)
currentMessage
- Incomming Message.protected boolean interpretUnregisterPlatforms(Message currentMessage)
currentMessage
- the current 'unregister_platforms' messageprotected boolean interpretInformRemotePlatforms(Message currentMessage)
currentMessage
- Incomming Message.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |