@Override
    public void install() {

        // ensure that a config file is always defined, for compatibility with
        // ZK and Kafka which check for the system property and existence of the file
        priorConfigFile = System.getProperty(JAVA_SECURITY_AUTH_LOGIN_CONFIG, null);
        if (priorConfigFile == null) {
            File configFile = generateDefaultConfigFile(workingDir);
            System.setProperty(JAVA_SECURITY_AUTH_LOGIN_CONFIG, configFile.getAbsolutePath());
            LOG.info("Jaas file will be created as {}.", configFile);
        }

        // read the JAAS configuration file
        priorConfig = javax.security.auth.login.Configuration.getConfiguration();

        // construct a dynamic JAAS configuration
        currentConfig = new DynamicConfiguration(priorConfig);

        // wire up the configured JAAS login contexts to use the krb5 entries
        AppConfigurationEntry[] krb5Entries = getAppConfigurationEntries(securityConfig);
        if (krb5Entries != null) {
            for (String app : securityConfig.getLoginContextNames()) {
                currentConfig.addAppConfigurationEntry(app, krb5Entries);
            }
        }

        javax.security.auth.login.Configuration.setConfiguration(currentConfig);
    }
@Test
    public void testCreateJaasModuleFileInTemporary() throws IOException {
        Configuration configuration = new Configuration();
        SecurityConfiguration sc = new SecurityConfiguration(configuration);
        JaasModule module = new JaasModule(sc);

        module.install();

        assertJaasFileLocateInRightDirectory(CoreOptions.TMP_DIRS.defaultValue());
    }