Interface OncRpcServerAuth

All Known Implementing Classes:
OncRpcServerAuthNone, OncRpcServerAuthShort, OncRpcServerAuthUnix

public interface OncRpcServerAuth
This interface connects incoming ONC/RPC - calls to an ONC/RPC server with authentication handling allowing or refusing a call.

Therefore, implementations of this interface can be seen as authentication handlers coming with specific authentication schemes. They are invoked before dispatching a call to the implementation of the ONC/RPC server stub. In detail, if an authentication handler refuses credentials or verifiers, an ONC/RPC server will not dispatch the call, but reply an appropriate authentication error to the client.

Authentication handlers are responsible for decoding the authentication part of an ONC/RPC call message. The decoded authentication information shall be verified and shall lead to an appropriate authentication error, if verification of the authentication information fails.

If authentication succeeded and the call has been dispatched and processed by the ONC/RPC server stub implementation, an authentication handler will be asked to encode an verifier. It depends on the authentication scheme, whether an verifier will be provided or the verifier just gets auth-none as type with no further data.

Author:
Harald Albrecht
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the authentication type (flavor) identifying the authentication scheme this handler belongs to.
    void
    Decodes -- that is: deserializes -- an ONC/RPC authentication object (credential & verifier) on the server side.
    void
    Encodes -- that is: serializes -- an ONC/RPC authentication object (its verifier) on the server side.
  • Method Details

    • getAuthenticationType

      int getAuthenticationType()
      Returns the authentication type (flavor) identifying the authentication scheme this handler belongs to.

      This may either be one of the standard types as defined in OncRpcAuthType or the number of a custom authentication scheme.

      Returns:
      Authentication type implemented by this authentication handler.
    • xdrDecodeCredVerf

      void xdrDecodeCredVerf(XdrDecodingStream xdr) throws OncRpcException, IOException
      Decodes -- that is: deserializes -- an ONC/RPC authentication object (credential & verifier) on the server side.
      Parameters:
      xdr - An XDR decoding stream
      Throws:
      OncRpcException - if an ONC/RPC error occurs.
      IOException - if an I/O error occurs.
    • xdrEncodeVerf

      void xdrEncodeVerf(XdrEncodingStream xdr) throws OncRpcException, IOException
      Encodes -- that is: serializes -- an ONC/RPC authentication object (its verifier) on the server side.
      Parameters:
      xdr - An XDR encoding stream
      Throws:
      OncRpcException - if an ONC/RPC error occurs.
      IOException - if an I/O error occurs.