Class KerberosSecurityTestcase

java.lang.Object
org.springframework.security.kerberos.test.KerberosSecurityTestcase

public class KerberosSecurityTestcase extends Object
KerberosSecurityTestcase provides a base class for using MiniKdc with other testcases. KerberosSecurityTestcase starts the MiniKdc (@Before) before running tests, and stop the MiniKdc (@After) after the testcases, using default settings (working dir and kdc configurations).

Users can directly inherit this class and implement their own test functions using the default settings, or override functions getTestDir() and createMiniKdcConf() to provide new settings.

  • Constructor Details

    • KerberosSecurityTestcase

      public KerberosSecurityTestcase()
  • Method Details

    • startMiniKdc

      @BeforeEach public void startMiniKdc() throws Exception
      Throws:
      Exception
    • createTestDir

      public void createTestDir()
      Create a working directory, it should be the build directory. Under this directory an ApacheDS working directory will be created, this directory will be deleted when the MiniKdc stops.
    • createMiniKdcConf

      public void createMiniKdcConf()
      Create a Kdc configuration
    • stopMiniKdc

      @AfterEach public void stopMiniKdc()
    • getKdc

      public MiniKdc getKdc()
    • getWorkDir

      public File getWorkDir()
    • getConf

      public Properties getConf()