ajanta.agent
Class SecureAgent

java.lang.Object
  |
  +--ajanta.agent.Agent
        |
        +--ajanta.agent.SecureAgent
All Implemented Interfaces:
java.rmi.Remote, SecureServices, java.io.Serializable

public abstract class SecureAgent
extends Agent
implements java.io.Serializable, SecureServices

The SecureAgent class is the secure mobile agent. It provides facilites for secure communication between agents and agents/agent-servers. If the user's don't want to use any secure communication for remote method invocation, etc, then they can extend the base Agent class, rather than extending the SecureAgent class.

See Also:
Credentials, AgentStatus, Serialized Form

Field Summary
protected  ajanta.util.InterAgentTicketing iatkt
           
 
Fields inherited from class ajanta.agent.Agent
creatorSignature, cred, host, myRef, name, ownerSignature, status
 
Constructor Summary
SecureAgent(ajanta.agent.Credentials cred, ajanta.server.AgentEnv host, java.security.cert.X509Certificate userCert, java.lang.String policyFile)
           
SecureAgent(ajanta.agent.Credentials cred, java.security.cert.X509Certificate userCert, java.lang.String policyFile)
          It assigns host, ownerSignature and creatorSignature as null.
 
Method Summary
 ajanta.util.AgentTicket authenticateAgent(ajanta.util.AgentTicket at)
           
 ajanta.util.AgentTicket authenticateAgentServer(ajanta.util.AgentServerTicket agentServerTicket)
           
static java.util.Hashtable constructPolicyModule(java.lang.String policyFile)
           
 void createInterAgentTicketing()
           
protected  ajanta.util.Tuple getIncomingTuple(ajanta.util.AgentTicket at)
           
protected  ajanta.util.Tuple getIncomingTuple(ajanta.util.CompleteTicket ct)
           
protected  boolean hasPermission(ajanta.util.MethodSignature msig, ajanta.util.Tuple incomingTuple)
           
 boolean needAuthentication(java.lang.String methodName)
           
protected  java.lang.String sanitizeX500Name(java.lang.String x500Name)
           
 boolean saySecureHello(java.lang.String string, ajanta.util.CompleteTicket ct)
           
 
Methods inherited from class ajanta.agent.Agent
agentEntry, agentExit, arrive, colocate, colocate, depart, meet, recallCommand, run, signCreator, signOwner, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iatkt

protected ajanta.util.InterAgentTicketing iatkt
Constructor Detail

SecureAgent

public SecureAgent(ajanta.agent.Credentials cred,
                   java.security.cert.X509Certificate userCert,
                   java.lang.String policyFile)
It assigns host, ownerSignature and creatorSignature as null. cred is assigned to the Credentials passed as argument.


SecureAgent

public SecureAgent(ajanta.agent.Credentials cred,
                   ajanta.server.AgentEnv host,
                   java.security.cert.X509Certificate userCert,
                   java.lang.String policyFile)
Method Detail

authenticateAgent

public ajanta.util.AgentTicket authenticateAgent(ajanta.util.AgentTicket at)
                                          throws java.rmi.RemoteException
java.rmi.RemoteException

authenticateAgentServer

public ajanta.util.AgentTicket authenticateAgentServer(ajanta.util.AgentServerTicket agentServerTicket)

needAuthentication

public boolean needAuthentication(java.lang.String methodName)

saySecureHello

public boolean saySecureHello(java.lang.String string,
                              ajanta.util.CompleteTicket ct)

createInterAgentTicketing

public void createInterAgentTicketing()

hasPermission

protected boolean hasPermission(ajanta.util.MethodSignature msig,
                                ajanta.util.Tuple incomingTuple)

constructPolicyModule

public static java.util.Hashtable constructPolicyModule(java.lang.String policyFile)

sanitizeX500Name

protected java.lang.String sanitizeX500Name(java.lang.String x500Name)

getIncomingTuple

protected ajanta.util.Tuple getIncomingTuple(ajanta.util.AgentTicket at)

getIncomingTuple

protected ajanta.util.Tuple getIncomingTuple(ajanta.util.CompleteTicket ct)
                                      throws java.rmi.RemoteException
java.rmi.RemoteException