org.csapi.jr.se.fw.fw_access.trust_and_security
Interface APILevelAuthentication

All Superinterfaces:
Authentication, CsapiInterface, java.io.Serializable

public interface APILevelAuthentication
extends Authentication

The API Level Authentication Framework interface is used by the client to authenticate the Framework. It is also used to initiate the authentication process. If the IpAPILevelAuthentication interface is implemented by a Framework, then selectAuthenticationMechanism(), challenge(), abortAuthentication() and authenticationSucceeded () shall be implemented. IpAPILevelAuthentication inherits the requirements of IpAuthentication, therefore requestAccess() shall be implemented.


Method Summary
 void abortAuthentication()
          The client uses this method to abort the authentication process where the framework is authenticating the client.
 void authenticationSucceeded()
          The client uses this method to inform the framework of the success of the authentication attempt.
 byte[] challenge(byte[] challenge)
          This method is used by the client to authenticate the framework.
 java.lang.String selectAuthenticationMechanism(java.lang.String authMechanismList)
          The client uses this method to inform the Framework of the different authentication mechanisms it supports as part of API level Authentication.
 
Methods inherited from interface org.csapi.jr.se.fw.fw_access.trust_and_security.Authentication
requestAccess
 

Method Detail

abortAuthentication

public void abortAuthentication()
                         throws CommonException,
                                AccessDeniedException,
                                PlatformException
The client uses this method to abort the authentication process where the framework is authenticating the client. This method is invoked if the client no longer wishes to continue the authentication process, (unless the framework responded incorrectly to a challenge in which case no further communication with the framework should occur.) If this method has been invoked before the client has been authenticated by the Framework, calls to the requestAccess operation on IpAPILevelAuthentication will return an error code (P_ACCESS_DENIED), until the client has been properly authenticated. If this method is invoked after the client has been authenticated by the Framework, it shall not result in the immediate removal of the client's authentication. (The Framework may wish to authenticate the client again, however).

Throws:
CommonException - Defines the structure of the exception class which is applicable to all methods.
AccessDeniedException - The client is not currently authenticated with the framework
PlatformException - The implementation detected an internal (for example, communication) error

authenticationSucceeded

public void authenticationSucceeded()
                             throws CommonException,
                                    AccessDeniedException,
                                    PlatformException
The client uses this method to inform the framework of the success of the authentication attempt. Calls to this method have no impact on the client's rights to call requestAccess(), which depend exclusively on the framework's successful authentication of the client.

Throws:
CommonException - Defines the structure of the exception class which is applicable to all methods.
AccessDeniedException - The client is not currently authenticated with the framework
PlatformException - The implementation detected an internal (for example, communication) error

selectAuthenticationMechanism

public java.lang.String selectAuthenticationMechanism(java.lang.String authMechanismList)
                                               throws CommonException,
                                                      AccessDeniedException,
                                                      NoAcceptableAuthenticationMechanismException,
                                                      PlatformException
The client uses this method to inform the Framework of the different authentication mechanisms it supports as part of API level Authentication. The Framework will select one of the suggested authentication mechanisms and that mechanism shall be used for authentication by both Framework and Client. The authentication mechanism chosen as a result of the response to this method remains valid for an instance of IpAPILevelAuthentication and until this method is re-invoked by the client. If a mechanism that is acceptable to the framework within the capability of the client cannot be found, the framework throws the P_NO_ACCEPTABLE_AUTHENTICATION_MECHANISM exception.

Parameters:
authMechanismList - The list of authentication mechanisms supported by the client.
Returns:
selectedMechanism. This is the authentication mechanism chosen by the Framework. The chosen mechanism shall be taken from the list of mechanisms proposed by the Client.
Throws:
CommonException - Defines the structure of the exception class which is applicable to all methods.
AccessDeniedException - The client is not currently authenticated with the framework
NoAcceptableAuthenticationMechanismException - No authentication mechanism, which is acceptable to the framework, is supported by the client
PlatformException - The implementation detected an internal (for example, communication) error

challenge

public byte[] challenge(byte[] challenge)
                 throws CommonException,
                        AccessDeniedException,
                        PlatformException
This method is used by the client to authenticate the framework. The framework must respond with the correct responses to the challenges presented by the client. The domainID received in the initiateAuthenticationWithVersion() can be used by the framework to reference the correct public key for the client (the key management system is currently outside of the scope of the OSA APIs). The number of exchanges is dependent on the policies of each side. The authentication of the framework is deemed successful when the authenticationSucceeded method is invoked by the client. The invocation of this method may be interleaved with challenge() calls by the framework on the client's APILevelAuthentication interface.

Parameters:
challenge - The challenge presented by the client to be responded to by the framework. The challenge format used will be in accordance with the IETF PPP Authentication Protocols - Challenge Handshake Authentication Protocol (RFC 1994). The challenge octet set must be formatted as a CHAP Challenge packet as defined in section 4.1 of RFC 1994. A complete and properly formatted CHAP Challenge packet must be used. The Name field of the CHAP Challenge packet must be present and contain a valid value in order for the CHAP Response to be valid. However, the Name field is not used in the authentication process. Steps for constructing the challenge octet set 1. Create a random challenge value (octet set). Per RFC 1994, this value must between 1 and 255 octets in length. 2. Construct a CHAP Challenge packet based on 4.1 of RFC 1994 with the octet set from the previous step passed in the Value field within the CHAP Challenge.
Returns:
response This is the response of the framework to the challenge of the client in the current sequence. The formatting and construction of this parameter shall be according to section 4.1 of RFC 1994. A complete CHAP Response packet shall be used to carry the response octet set. That octet set will be the result of applying the designated hashing algorithm, which is indicated via the client's invocation of selectAuthenticationMechanism(), to an octet set consisting of the concatenation of the CHAP Identifier, the shared "secret", and the supplied challenge value. The Name field of the CHAP Response packet must be present and contain a valid value in order for the CHAP Response to be valid. However, the Name field is not used in the authentication process. Steps for constructing the response octet set 1. Extract the Identifier and Value fields from the CHAP Challenge packet passed in the challenge() method's challenge parameter 2. Build an octet set consisting of the concatenation of the Identifier, the "shared secret", and the Value from the CHAP Challenge 3. Compute the hash of the octet set resulting from the previous step using the designated hashing algorithm 4. Construct a complete CHAP Response packet with the resulting octet set from previous step as the CHAP Value Steps for validating the response octet set 1. Verify that the Identifier sent in the original CHAP Challenge matches the Identifier received in the CHAP Response. If it does not, authentication fails. 2. Build an octet set consisting of the concatenation of the original Identifier, the "shared secret", and the original challenge value 3. Compute the hash of the resulting octet set from the previous step using the designated hashing algorithm 4. Verify the octet set resulting from the previous step matches the octet set contained in the Value field of the CHAP Response. A match indicates successful authentication.
Throws:
CommonException - Defines the structure of the exception class which is applicable to all methods.
AccessDeniedException - The client is not currently authenticated with the framework
PlatformException - The implementation detected an internal (for example, communication) error