org.iaccess.TNProtocol
Class TSessionInfo

java.lang.Object
  extended by org.iaccess.TNProtocol.TSessionInfo

public class TSessionInfo
extends java.lang.Object

Keeps all (important) session information for a negotiation process. It also keeps relevant information loaded from the negotiation level configuration.

See Also:
TRequest

Field Summary
static long AccessDecisionTimeValidity
          In milliseconds.
static java.lang.String ActualFileSeparator
          Specifies the platofrm dependant file separator '\' or '/'.
static java.lang.String ConfigRootDir
          Specifies the system variable name that is instantiated in any configuration file.
static java.lang.String CredAnyValueTerm
          Defines a specific term used to identify any value in a field of a credential request Initialized in TSessionInfo.
static int Default_TCPportOut
          Defines the port of JBOSS TCP/IP Server for outcoming messages.
static java.lang.String DLVWrapperConfigurationFile
          Specifies full path to the config_dlv.xml file.
static long DynamicSessionTimeExtension
          In milliseconds.
 java.lang.String Identity
          Keeps the distinguished identity of a SessionInfo object.
static java.lang.String IPaddress
          Defines the IP address of the remote iAccess server.
static boolean IsServerAuthorizationMode
          Defines a specific mode for authorization handling.
static java.lang.String MinimalityCriterion
          Specifies MinimalityCriterion (ON/OFF).
static boolean MultiSessionSharedCreds
          Indicates if active credentials are to be shared in multi-session negotiations between same entities.
 long negStartTime
          Keeps the time when the SessionInfo is created, i.e.
static int OSType
          Specifies OS type.
static java.lang.String RootDir
          Specifies the root folder of the system.
 java.lang.String ServiceRequest
          Keeps information about the main (initial) service request.
static long SessionTimeLimit
          In milliseconds.
static int TCPportIn
          Defines the port of JBOSS TCP/IP Server for incoming messages.
 int TCPportOut
          Updated dynamically from the incoming requests.
 java.lang.ThreadGroup TNThreadGroup
          Keeps information about all theads serving the negotiation process.
 
Constructor Summary
TSessionInfo(TRequest Request)
          Creates a new instance of TSessionInfo.
 
Method Summary
 void DecreaseBlockCnegCounter()
          Decreases the counter when a new thread starts the trust negotiation protocol, or awaits for the result on the existing thread of same request.
 java.util.Vector GetCN()
          Returns the current set of declined credentials/certificates.
 java.util.Vector GetCP()
          Returns the current set of presented credentials/certificates.
 java.lang.String GetCredAnyValueTermOpponent()
          Gets the SetCredAnyValueTermOpponent.
 long GetValidNotAfter()
          Returns the time in milliseconds when a session expires.
 void IncreaseBlockCnegCounter()
          Increases the counter of the threads already been created but not started the trust negotiation protocol.
static void LoadSessionConfig(java.lang.String ConfigPath)
          Loads session information from config.xml file.
 void RemoveCneg()
          Removes current thread from the negotiation process, i.e.
 void SetCredAnyValueTermOpponent(java.lang.String CredAnyValueTermOpponent)
          Sets the SetCredAnyValueTermOpponent.
 void SetValidNotAfter(long ValidNotAfter)
          Sets the time in milliseconds when session should expire
 void UpdateCN(java.lang.String NewCN)
          Adds a new declined credential/certificate to the existing set of declined credentials.
 void UpdateCP(java.lang.String NewCP)
          Adds a new presented credential/certificate to the existing set of presented credentials.
 void UpdateCP(java.lang.String[] NewCP)
          Adds a set of presented credentials/certificates to the existing set of presented credentials.
 void UpdateCP(java.util.Vector NewCP)
          Adds a set of presented credentials/certificates to the existing set of presented credentials.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SessionTimeLimit

public static long SessionTimeLimit
In milliseconds. 40 seconds is the default value.


DynamicSessionTimeExtension

public static long DynamicSessionTimeExtension
In milliseconds. Takes the SessionTimeLimit by default.


AccessDecisionTimeValidity

public static long AccessDecisionTimeValidity
In milliseconds. The validity of the (SAML) Authorization statement.


TCPportIn

public static int TCPportIn
Defines the port of JBOSS TCP/IP Server for incoming messages. By default is 5555. Use different ports for incoming and outcoming messages if you are running TN Server and TN Client on one machine.


Default_TCPportOut

public static int Default_TCPportOut
Defines the port of JBOSS TCP/IP Server for outcoming messages. By default is 5555 Use different ports for incoming and outcoming messages if you are running TN Server and TN Client on one machine.


TCPportOut

public int TCPportOut
Updated dynamically from the incoming requests.


IPaddress

public static java.lang.String IPaddress
Defines the IP address of the remote iAccess server.


MinimalityCriterion

public static java.lang.String MinimalityCriterion
Specifies MinimalityCriterion (ON/OFF).


DLVWrapperConfigurationFile

public static java.lang.String DLVWrapperConfigurationFile
Specifies full path to the config_dlv.xml file.


RootDir

public static java.lang.String RootDir
Specifies the root folder of the system.


ConfigRootDir

public static java.lang.String ConfigRootDir
Specifies the system variable name that is instantiated in any configuration file.


ActualFileSeparator

public static java.lang.String ActualFileSeparator
Specifies the platofrm dependant file separator '\' or '/'. Default separator is the unix one '/'.


OSType

public static int OSType
Specifies OS type. 1-Linux; 2-Windows; 3-MacOSX PPC; 4-MacOSX Intel Default one is the Linux type


Identity

public java.lang.String Identity
Keeps the distinguished identity of a SessionInfo object. It is used to update CP and CN as a hashtable key. It is extratced from X.500 field of the X.509 certificate acompaning the private key used for the SSL channel.


TNThreadGroup

public java.lang.ThreadGroup TNThreadGroup
Keeps information about all theads serving the negotiation process.


negStartTime

public long negStartTime
Keeps the time when the SessionInfo is created, i.e. the initial time when the negotiation started. In milliseconds. Only for time mesuarment.


ServiceRequest

public java.lang.String ServiceRequest
Keeps information about the main (initial) service request.


MultiSessionSharedCreds

public static boolean MultiSessionSharedCreds
Indicates if active credentials are to be shared in multi-session negotiations between same entities.


CredAnyValueTerm

public static java.lang.String CredAnyValueTerm
Defines a specific term used to identify any value in a field of a credential request Initialized in TSessionInfo. Experimental field. Do not use if not sure why.


IsServerAuthorizationMode

public static boolean IsServerAuthorizationMode
Defines a specific mode for authorization handling. If false then the classical mode of intiating negotiation-based authorization with an opponent agent. If true then a server-based mode where the agent is awaiting on a specific call from a PEP to get an access decision.

Constructor Detail

TSessionInfo

public TSessionInfo(TRequest Request)
Creates a new instance of TSessionInfo.

Parameters:
Request - Must be invoked as a request for a service. It returns immediately if not.
Method Detail

UpdateCN

public void UpdateCN(java.lang.String NewCN)
Adds a new declined credential/certificate to the existing set of declined credentials. It call a synchronized method within the class which defines the set of declined credentials/certificates.

See Also:
TSessionInfo.TCN

UpdateCP

public void UpdateCP(java.lang.String NewCP)
Adds a new presented credential/certificate to the existing set of presented credentials. It calls a synchronized method within the class which defines the set of presented credentials/certificates.

See Also:
TSessionInfo.TCP

UpdateCP

public void UpdateCP(java.lang.String[] NewCP)
Adds a set of presented credentials/certificates to the existing set of presented credentials. It calls a synchronized method within the class which defines the set of presented credentials/certificates.

See Also:
TSessionInfo.TCP

UpdateCP

public void UpdateCP(java.util.Vector NewCP)
Adds a set of presented credentials/certificates to the existing set of presented credentials. It calls a synchronized method within the class which defines the set of presented credentials/certificates.

See Also:
TSessionInfo.TCP

GetCN

public java.util.Vector GetCN()
Returns the current set of declined credentials/certificates. It calls a synchronized method within the class which defines the set of declined credentials/certificates.

See Also:
TSessionInfo.TCN

GetCP

public java.util.Vector GetCP()
Returns the current set of presented credentials/certificates. It calls a synchronized method within the class which defines the set of presented credentials/certificates.

See Also:
TSessionInfo.TCP

GetValidNotAfter

public long GetValidNotAfter()
Returns the time in milliseconds when a session expires.


SetCredAnyValueTermOpponent

public void SetCredAnyValueTermOpponent(java.lang.String CredAnyValueTermOpponent)
Sets the SetCredAnyValueTermOpponent.


GetCredAnyValueTermOpponent

public java.lang.String GetCredAnyValueTermOpponent()
Gets the SetCredAnyValueTermOpponent.


SetValidNotAfter

public void SetValidNotAfter(long ValidNotAfter)
Sets the time in milliseconds when session should expire


IncreaseBlockCnegCounter

public void IncreaseBlockCnegCounter()
Increases the counter of the threads already been created but not started the trust negotiation protocol.


DecreaseBlockCnegCounter

public void DecreaseBlockCnegCounter()
Decreases the counter when a new thread starts the trust negotiation protocol, or awaits for the result on the existing thread of same request.


RemoveCneg

public void RemoveCneg()
Removes current thread from the negotiation process, i.e. every new thread with a same request will start a new Trust Negotiation Protocol. Each thread has 3 time states: So, we simply change the name of a current thread, what indicates its new state. Also we must asshure that there is no any initializing thread.


LoadSessionConfig

public static void LoadSessionConfig(java.lang.String ConfigPath)
                              throws java.lang.Exception
Loads session information from config.xml file.

Throws:
java.lang.Exception - File path is not valid, or format of Session Configuration info is not correct, or unrecognized OS type.