Class Krb5LoginConfiguration

java.lang.Object
javax.security.auth.login.Configuration
org.jboss.as.test.integration.security.common.Krb5LoginConfiguration

public class Krb5LoginConfiguration extends Configuration
Simple Krb5LoginModule configuration.
Author:
Josef Cacek
  • Constructor Details

    • Krb5LoginConfiguration

      public Krb5LoginConfiguration(Configuration wrapped) throws MalformedURLException
      Create a new Krb5LoginConfiguration. Neither principal nor keytab are not filled and JGSS credential type is initiator.
      Throws:
      MalformedURLException
    • Krb5LoginConfiguration

      public Krb5LoginConfiguration(String principal, File keyTab, boolean acceptor, Configuration wrapped) throws MalformedURLException
      Create a new Krb5LoginConfiguration with given principal name, keytab and credential type.
      Parameters:
      principal - principal name, may be null
      keyTab - keytab file, may be null
      acceptor - flag for setting credential type. Set to true, if the authenticated subject should be acceptor (i.e. credsType=acceptor for IBM JDK, and storeKey=true for Oracle JDK)
      wrapped - wrapped configuration (you can receive it for instance by calling Configuration#getConfiguration()
      Throws:
      MalformedURLException
  • Method Details

    • getOptions

      public static Map<String,String> getOptions(String principal, File keyTab, boolean acceptor)
      Returns Map with Krb5LoginModule options. The result depends on currently running JVM.
      Parameters:
      principal - principal name, may be null
      keyTab - keytab file, may be null
      acceptor - flag for setting credential type. Set to true, if the authenticated subject should be acceptor (i.e. credsType=acceptor for IBM JDK, and storeKey=true for Oracle JDK)
      Returns:
      HashMap with Krb5LoginModule options.
    • getLoginModule

      public static String getLoginModule()
      Returns Krb5LoginModule class name. The returned name depends on the currently running JVM.
      Returns:
      class name
    • getName

      public String getName()
      Returns this login configuration name.
      Returns:
    • getWrapped

      protected Configuration getWrapped()
      Returns the wrapped configuration.
      Returns:
    • getAppConfigurationEntry

      public AppConfigurationEntry[] getAppConfigurationEntry(String applicationName)
      Interface method requiring us to return all the LoginModules we know about.
      Specified by:
      getAppConfigurationEntry in class Configuration
      Parameters:
      applicationName - the application name
      Returns:
      the configuration entry
    • resetConfiguration

      public Configuration resetConfiguration()
      Resets configuration to the wrapped one and returns it.
      Returns:
      login configuration to which it was reseted