Class JaasAuthenticationHandler

All Implemented Interfaces:
org.apereo.cas.authentication.AuthenticationHandler, org.apereo.cas.authentication.PrePostAuthenticationHandler, org.apereo.cas.util.NamedObject, org.springframework.core.Ordered

public class JaasAuthenticationHandler extends AbstractUsernamePasswordAuthenticationHandler
JAAS Authentication Handler for CAS. This is a simple bridge from CAS' authentication to JAAS.

Using the JAAS Authentication Handler requires you to configure the appropriate JAAS modules. You can specify the location of a jass.conf file using the following VM parameter: <pre> -Djava.security.auth.login.config=$PATH_TO_JAAS_CONF/jaas.conf </pre>

This example jaas.conf would try Kerberos based authentication, then try LDAP authentication: <pre> CAS { com.sun.security.auth.module.Krb5LoginModule sufficient client=TRUE debug=FALSE useTicketCache=FALSE; edu.uconn.netid.jaas.LDAPLoginModule sufficient java.naming.provider.url="ldap://ldapserver.my.edu:389/dc=my,dc=edu" java.naming.security.principal="uid=jaasauth,dc=my,dc=edu" java.naming.security.credentials="password" Attribute="uid" startTLS="true"; }; </pre>

Since:
3.0.0
See Also:
  • Constructor Details

    • JaasAuthenticationHandler

      public JaasAuthenticationHandler(String name, org.apereo.cas.services.ServicesManager servicesManager, org.apereo.cas.authentication.principal.PrincipalFactory principalFactory, Integer order)
      Instantiates a new Jaas authentication handler, and attempts to load/verify the configuration.
      Parameters:
      name - the name
      servicesManager - the services manager
      principalFactory - the principal factory
      order - the order
  • Method Details

    • setRealm

      public void setRealm(String realm)
      The realm that contains the login module information.
    • setKerberosRealmSystemProperty

      public void setKerberosRealmSystemProperty(String kerberosRealmSystemProperty)
      System property value to overwrite the realm in krb5 config.
    • setKerberosKdcSystemProperty

      public void setKerberosKdcSystemProperty(String kerberosKdcSystemProperty)
      System property value to overwrite the kdc in krb5 config.
    • setLoginConfigType

      public void setLoginConfigType(String loginConfigType)
    • setLoginConfigurationFile

      public void setLoginConfigurationFile(File loginConfigurationFile)