Main Page | Class Hierarchy | Class List | File List | Class Members

DiameterEapServerStateMachine Class Reference

#include <diameter_eap_server_fsm.hxx>

Inheritance diagram for DiameterEapServerStateMachine:

DiameterEapServerSession List of all members.

Public Types

enum  {
  EvSgStart, EvRxEapRequest, EvRxEapSuccess, EvRxEapFailure,
  EvSgAuthorizationSuccess, EvSgAuthorizationFailure, EvRxDER, EvSgSessionTimeout,
  EvSgAuthLifetimeTimeout, EvSgAuthGracePeriodTimeout, EvSgTimeout, EvSgDisconnect,
  EvSgValidDER, EvSgInvalidDER
}

Public Member Functions

 DiameterEapServerStateMachine (DiameterEapServerSession &s, DiameterJobHandle &h)
 Constructor.

void Notify (AAA_Event ev) throw (int)
 Store an event and notify the session.

DiameterEapServerSessionSession ()
virtual void Abort ()=0
virtual void ForwardEapResponse (std::string &eapMsg)=0
void SignalContinue (std::string &eapMsg)
void SignalSuccess (std::string &eapMsg)
void SignalFailure (std::string &eapMsg)
void SendDEA ()
bool CheckDER ()
virtual bool Authorize ()
bool AuthorizationDone ()
 Check if authorization has been completed successfully.

AAA_JobData & JobData ()
template<class T> T & JobData (Type2Type< T >)
virtual bool AuthorizeOriginHost (const diameter_identity_t &originHost)
 An authorization function called from Authorize() function.

virtual bool AuthorizeOriginRealm (const diameter_identity_t &originRealm)
 An authorization function called from Authorize() function.

virtual bool AuthorizeMultiRoundTimeOut (AAA_ScholarAttribute< diameter_unsigned32_t > &multiRoundTimeout)
 An authorization function called from Authorize() function.

virtual bool AuthorizeServiceType (AAA_ScholarAttribute< diameter_enumerated_t > &serviceType)
 An authorization function called from Authorize() function.

virtual bool AuthorizeServiceType (const diameter_enumerated_t &serviceType1, AAA_ScholarAttribute< diameter_enumerated_t > &serviceType2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeClass (AAA_VectorAttribute< diameter_octetstring_t > &Class)
 An authorization function called from Authorize() function.

virtual bool AuthorizeClass (const std::vector< diameter_octetstring_t > &Class1, AAA_VectorAttribute< diameter_octetstring_t > &Class2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeConfigurationToken (AAA_VectorAttribute< diameter_octetstring_t > &configurationToken)
virtual bool AuthorizeAcctInterimInterval (AAA_ScholarAttribute< diameter_unsigned32_t > &acctInterimInterval)
 An authorization function called from Authorize() function.

virtual bool AuthorizeIdleTimeout (AAA_ScholarAttribute< diameter_unsigned32_t > &idleTimeout)
 An authorization function called from Authorize() function.

virtual bool AuthorizeAuthorizationLifetime (AAA_ScholarAttribute< diameter_unsigned32_t > &authorizationLifetime)
 An authorization function called from Authorize() function.

virtual bool AuthorizeAuthGracePeriod (AAA_ScholarAttribute< diameter_unsigned32_t > &authGracePeriod)
 An authorization function called from Authorize() function.

virtual bool AuthorizeAuthSessionState (AAA_ScholarAttribute< diameter_enumerated_t > &authSessionState)
 An authorization function called from Authorize() function.

virtual bool AuthorizeReAuthRequestType (AAA_ScholarAttribute< diameter_enumerated_t > &reAuthRequestType)
 An authorization function called from Authorize() function.

virtual bool AuthorizeSessionTimeout (AAA_ScholarAttribute< diameter_unsigned32_t > &sessionTimeout)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFilterId (AAA_VectorAttribute< diameter_utf8string_t > &filterId)
 An authorization function called from Authorize() function.

virtual bool AuthorizePortLimit (AAA_ScholarAttribute< diameter_unsigned32_t > &portLimit)
 An authorization function called from Authorize() function.

virtual bool AuthorizePortLimit (const diameter_unsigned32_t &portLimit1, AAA_ScholarAttribute< diameter_unsigned32_t > &portLimit2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeCallbackId (AAA_ScholarAttribute< diameter_utf8string_t > &callbackId)
 An authorization function called from Authorize() function.

virtual bool AuthorizeCallbackNumber (AAA_ScholarAttribute< diameter_utf8string_t > &callbackNumber)
 An authorization function called from Authorize() function.

virtual bool AuthorizeCallbackNumber (const diameter_utf8string_t &callbackNumber1, AAA_ScholarAttribute< diameter_utf8string_t > &callbackNumber2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedAppletalkLink (AAA_ScholarAttribute< diameter_unsigned32_t > &framedAppletalkLink)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedAppletalkZone (AAA_ScholarAttribute< diameter_octetstring_t > &framedAppletalkZone)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedAppletalkNetwork (AAA_VectorAttribute< diameter_unsigned32_t > &framedAppletalkNetwork)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedCompression (AAA_VectorAttribute< diameter_enumerated_t > &framedCompression)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedCompression (const AAA_VectorAttribute< diameter_enumerated_t > &framedCompression1, AAA_VectorAttribute< diameter_enumerated_t > &framedCompression2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedInterfaceId (AAA_ScholarAttribute< diameter_unsigned64_t > &framedInterfaceId)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedInterfaceId (const diameter_unsigned64_t &framedInterfaceId1, AAA_ScholarAttribute< diameter_unsigned64_t > &framedInterfaceId2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedIpAddress (AAA_ScholarAttribute< diameter_octetstring_t > &framedIpAddress)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedIpAddress (const diameter_octetstring_t &framedIpAddress1, AAA_ScholarAttribute< diameter_octetstring_t > &framedIpAddress2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedIpv6Prefix (AAA_VectorAttribute< diameter_octetstring_t > &framedIpv6Prefix)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedIpv6Prefix (const std::vector< diameter_octetstring_t > &framedIpv6Prefix1, AAA_VectorAttribute< diameter_octetstring_t > &framedIpv6Prefix2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedIpv6Pool (AAA_ScholarAttribute< diameter_octetstring_t > &framedIpv6Pool)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedPool (AAA_ScholarAttribute< diameter_octetstring_t > &framedPool)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedIpv6Route (AAA_VectorAttribute< diameter_utf8string_t > &framedIpv6Route)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedRoute (AAA_VectorAttribute< diameter_utf8string_t > &framedRoute)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedIpNetmask (AAA_ScholarAttribute< diameter_octetstring_t > &framedIpNetmask)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedIpNetmask (const diameter_octetstring_t &framedIpNetmask1, AAA_ScholarAttribute< diameter_octetstring_t > &framedIpNetmask2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedIpxNetwork (AAA_ScholarAttribute< diameter_utf8string_t > &framedIpxNetwork)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedMtu (AAA_ScholarAttribute< diameter_unsigned32_t > &framedMtu)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedMtu (const diameter_unsigned32_t &framedMtu1, AAA_ScholarAttribute< diameter_unsigned32_t > &framedMtu2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedProtocol (AAA_ScholarAttribute< diameter_enumerated_t > &framedProtocol)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedProtocol (const diameter_enumerated_t &framedProtocol1, AAA_ScholarAttribute< diameter_enumerated_t > &framedProtoco2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeFramedRouting (AAA_ScholarAttribute< diameter_enumerated_t > &framedRouting)
 An authorization function called from Authorize() function.

virtual bool AuthorizeNasFilterRule (AAA_VectorAttribute< diameter_ipfilter_rule_t > &nasFilterRule)
 An authorization function called from Authorize() function.

virtual bool AuthorizeTunneling (AAA_VectorAttribute< tunneling_t > &tunneling)
 An authorization function called from Authorize() function.

virtual bool AuthorizeTunneling (const std::vector< tunneling_t > &tunneling1, AAA_VectorAttribute< tunneling_t > &tunneling2)
 An authorization function called from Authorize() function.

virtual bool AuthorizeEapMasterSessionKey (AAA_ScholarAttribute< diameter_octetstring_t > &eapMasterSessionKey)
 An authorization function called from Authorize() function.

virtual bool AuthorizeAccountingEapAuthMethod (AAA_VectorAttribute< diameter_unsigned64_t > &accountingEapAuthMethod)
 An authorization function called from Authorize() function.

virtual void SetReplyMessage (AAA_VectorAttribute< diameter_utf8string_t > &replyMessage, const diameter_unsigned32_t &resultCode)
virtual void SetReissuedEapPayload (AAA_ScholarAttribute< diameter_octetstring_t > &reissuedEapPayload)
 Returns true when the contents of ReissuedEapPayload AVP is generated.

virtual bool ValidateUserName (const diameter_utf8string_t &userName)
 Validate User-Name AVP.

virtual bool ValidateState (const diameter_octetstring_t &stateInDER, const diameter_octetstring_t &stateInDEA)
virtual void SetState (AAA_ScholarAttribute< diameter_octetstring_t > &state)
 Used for setting State AVP in initial answer. Do nothing by default.

DER_DataDER ()
DEA_DataDEA ()

Friends

class DiameterJobMultiplexor

Detailed Description

State machine for Diameter EAP server. There are two types of procedures a Diameter EAP application server does: authentication and authorization. Authentication is an act to verify a client. Authorization is an act to grant a service to a client. In many cases authentication occurs before authorization, but the order can be reversed in some cases. This server implementation supports both orders.

Functions related to authentication (except for ForwardEapResponse() which is used for verifying EAP messages) have names starting "Validate" (e.g., ValidateUserName).

Authorization is performed in the form of either validation of a requested attribute value, assignment of an attribute value. The assignment of an attribute value may be performed as a modification to a requested attribute value or as a new assignment without a requested value. It has many member functions for authorization of attributes (i.e., AuthorizeXYZ). The authorization functions return a boolean value indicating whether the authorization of the particular attribute succeeded or not. Authorization functions for optionally set attributes MUST return true when the optional attributes are not set. When an attribute is specified as const, the application is not allowed to modify the attribute and expected to just judge on whether the given attribute value is accepted or not. When an attribute is not specified as const, the application is allowed to modify the attribute as well as judge on whether the given attribute value is accepted or not. Authorization functions with two arguments are used for attribute that can be included in both DER and DEA. DER and DEA attributes are contained in the first argument (which is const) and second argument, respectivily, where the former attribute contains a requested value and the latter contains an enforced value. The former attributes are not enveloped with AAA_ScholorAttribute or AAA_VectorAttributes since they are intended to be unmodified.


Member Function Documentation

virtual void DiameterEapServerStateMachine::Abort  )  [pure virtual]
 

This is used for aborting the state machine. Usually called when Notify() fails.

virtual bool DiameterEapServerStateMachine::Authorize  )  [virtual]
 

Authorization function. This function can be called from an EAP server (more specifically, from an EAP method in the EAP server) so that authorization can be performed before completing authentication. If this function is not called from an EAP method, the Diameter EAP server will call this function when it receives an EAP-Success message from the EAP server via an EAP API.

virtual bool DiameterEapServerStateMachine::AuthorizeConfigurationToken AAA_VectorAttribute< diameter_octetstring_t > &  configurationToken  )  [inline, virtual]
 

To be generated only by proxy servers. Derived class implementation must resize the vector if needed and fill the vector with appropriate set of vector elements when true is returned.

bool DiameterEapServerStateMachine::CheckDER  ) 
 

Check received DER message. It returns true when DER is valid. Otherwise, it returns false. When false is returned, it results in generating a DEA message with the Result-Code value set to DIAMETER_INVALID_AVP_VALUE.

virtual void DiameterEapServerStateMachine::ForwardEapResponse std::string &  eapMsg  )  [pure virtual]
 

This virtual function is called when an EAP-Response message is passed to the EAP backend authenticator.

void DiameterEapServerStateMachine::SendDEA  ) 
 

This is used for constructing and sending a Diameter-EAP-Request.

DiameterEapServerSession& DiameterEapServerStateMachine::Session  )  [inline]
 

This is used for obtaining the reference to the server session object.

virtual void DiameterEapServerStateMachine::SetReplyMessage AAA_VectorAttribute< diameter_utf8string_t > &  replyMessage,
const diameter_unsigned32_t &  resultCode
[inline, virtual]
 

The contents of the replyMessage should be generated depending on the value of the resultCode.

void DiameterEapServerStateMachine::SignalContinue std::string &  eapMsg  ) 
 

This virtual function is called when an EAP-Request message is passed from the EAP passthrough authenticator.

void DiameterEapServerStateMachine::SignalFailure std::string &  eapMsg  ) 
 

This virtual function is called when an AAA success is signaled from the EAP backend authenticator. An EAP-Failure message is contained in the argument if any.

void DiameterEapServerStateMachine::SignalSuccess std::string &  eapMsg  ) 
 

This virtual function is called when an AAA success is signaled from the EAP backend authenticator. An EAP-Success message is contained in the argument if any.

virtual bool DiameterEapServerStateMachine::ValidateState const diameter_octetstring_t &  stateInDER,
const diameter_octetstring_t &  stateInDEA
[inline, virtual]
 

Validate State AVP in DER against State AVP in DEA. The validation method is specific to application.


The documentation for this class was generated from the following file:
Generated on Fri Jun 25 19:14:22 2004 for Diameter EAP Application by doxygen 1.3.5