com.ibm.websphere.security.auth.callback

Class WSCcacheCallBackHandlerImpl

  • java.lang.Object
    • com.ibm.websphere.security.auth.callback.WSCcacheCallBackHandlerImpl
  • All Implemented Interfaces:
    javax.security.auth.callback.CallbackHandler


    public class WSCcacheCallBackHandlerImpl
    extends java.lang.Object
    implements javax.security.auth.callback.CallbackHandler

    The WSCcacheCallBackHandlerImpl gathers the authentication data from the contructor and push them throughs to the login module. These data includes Kerberos principal name, Kerberos realm name, Kerberos credential cache file name and use the default Kerberos credential cache.

    Supported Callbacks:

    • javax.security.auth.callback.NameCallback
    • com.ibm.websphere.security.auth.callback.WSRealmNameCallbackImpl
    • javax.security.auth.callback.TextInputCallback. The text to be used as the Kerberos credential cache fully qualified file name.
    • javax.security.auth.callback.TextInputCallback. The text to be used as the use default Kerberos credential cache.

    NOTE: In order to use the Kerberos credential cache, You must set all options to false in the WSKRB5Login module entry in the wsjaas_client.conf file.

    Since:
    1.0
    Version:
    1.0
    See Also:
    NameCallback, PasswordCallback, TextInputCallback
    • Constructor Summary

      Constructors 
      Constructor and Description
      WSCcacheCallBackHandlerImpl()
      Constructor with no parameters.
      WSCcacheCallBackHandlerImpl(java.lang.String userid, java.lang.String realmName, java.lang.String ccacheFile, java.lang.String defaultCcache)
      Constructs a WSCcacheCallBackHandlerImpl using userid, realmName, ccacheFile and defaultCcache parameters.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void handle(javax.security.auth.callback.Callback[] callbacks)
      This implementation of WSCcacheCallBackHandlerImpl collects the Kerberos principal name, Kerberos realm name, Kerberos credential cache file name, and use default Kerberos credential cache data supplied via the constructor and pushes them to the login module.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WSCcacheCallBackHandlerImpl

        public WSCcacheCallBackHandlerImpl()
        Constructor with no parameters.
      • WSCcacheCallBackHandlerImpl

        public WSCcacheCallBackHandlerImpl(java.lang.String userid,
                                   java.lang.String realmName,
                                   java.lang.String ccacheFile,
                                   java.lang.String defaultCcache)
        Constructs a WSCcacheCallBackHandlerImpl using userid, realmName, ccacheFile and defaultCcache parameters.
        Parameters:
        userid - The Kerberos user name.
        realmName - The Kerberos realm name.
        ccacheFile - The Kerberos credential cache file name. The value is an URL, FILE:<user specific directory and file name>. For example: 'FILE:/utle/krb5cc_utle'. If you want to use the default Kerberos credential cache, then this parameter can be null.
        defaultCcache - The default Kerberos credential cache. It's a string value of either 'true' or 'false'. If defaultCcache is 'true', the default Kerberos credential cache will be used. The default cache is located in the following order:
        1. <user.home>/krb5cc_<user.name>, where <user.home> and <user.name > are the Java user.home and user.name properties respectively.
        2. <user.home>/krb5cc (if <user.name> cannot be obtained from the JVM).

        NOTE: If defaultCcache is 'true' while the default Kerberos credential cache is invalid/missing/expired, or userid=null, the WSKrb5Login will attempt to use Microsoft native credentials if the running platform is Windows.

    • Method Detail

      • handle

        public void handle(javax.security.auth.callback.Callback[] callbacks)
                    throws java.io.IOException,
                           javax.security.auth.callback.UnsupportedCallbackException
        This implementation of WSCcacheCallBackHandlerImpl collects the Kerberos principal name, Kerberos realm name, Kerberos credential cache file name, and use default Kerberos credential cache data supplied via the constructor and pushes them to the login module. If the realm name can not determined or null, a "<default>" realm name will be displayed.
        Specified by:
        handle in interface javax.security.auth.callback.CallbackHandler
        Parameters:
        callbacks - An array of Callback objects provided by the underlying security service which contains the information requested to be retrieved or displayed.
        Throws:
        java.io.IOException - If an input or output error occurs.
        javax.security.auth.callback.UnsupportedCallbackException - If the implementation of this method does not support one or more of the Callbacks specified in the callbacks parameter.
IBM WebSphere Application ServerTM
Release 8.5