/** * Get backend configuration * @param confDir configuration directory * @return backend configuration * @throws org.apache.kerby.kerberos.kerb.KrbException e. */ public static BackendConfig getBackendConfig(File confDir) throws KrbException { File backendConfigFile = new File(confDir, "backend.conf"); if (backendConfigFile.exists()) { BackendConfig backendConfig = new BackendConfig(); try { backendConfig.addIniConfig(backendConfigFile); } catch (IOException e) { throw new KrbException("Can not load the backend configuration file " + backendConfigFile.getAbsolutePath()); } return backendConfig; } return null; }
/** * Get backend configuration * @param confDir configuration directory * @return backend configuration * @throws org.apache.kerby.kerberos.kerb.KrbException e. */ public static BackendConfig getBackendConfig(File confDir) throws KrbException { File backendConfigFile = new File(confDir, "backend.conf"); if (backendConfigFile.exists()) { BackendConfig backendConfig = new BackendConfig(); try { backendConfig.addIniConfig(backendConfigFile); } catch (IOException e) { throw new KrbException("Can not load the backend configuration file " + backendConfigFile.getAbsolutePath()); } return backendConfig; } return null; }
/** * Get backend configuration * @param confDir configuration directory * @return backend configuration * @throws KrbException e. */ public static BackendConfig getBackendConfig(File confDir) throws KrbException { File backendConfigFile = new File(confDir, "backend.conf"); if (backendConfigFile.exists()) { BackendConfig backendConfig = new BackendConfig(); try { backendConfig.addIniConfig(backendConfigFile); } catch (IOException e) { throw new KrbException("Can not load the backend configuration file " + backendConfigFile.getAbsolutePath()); } return backendConfig; } return null; }
/** * Get backend configuration * @param confDir configuration directory * @return backend configuration * @throws KrbException e. */ public static BackendConfig getBackendConfig(File confDir) throws KrbException { File backendConfigFile = new File(confDir, "backend.conf"); if (backendConfigFile.exists()) { BackendConfig backendConfig = new BackendConfig(); try { backendConfig.addIniConfig(backendConfigFile); } catch (IOException e) { throw new KrbException("Can not load the backend configuration file " + backendConfigFile.getAbsolutePath()); } return backendConfig; } return null; }
/** * Default constructor. */ public KdcServer() { kdcConfig = new KdcConfig(); backendConfig = new BackendConfig(); startupOptions = new KOptions(); kdcSetting = new KdcSetting(startupOptions, kdcConfig, backendConfig); }
/** * Default constructor. */ public KdcServer() { kdcConfig = new KdcConfig(); backendConfig = new BackendConfig(); startupOptions = new KOptions(); kdcSetting = new KdcSetting(startupOptions, kdcConfig, backendConfig); }
/** * Default constructor. */ public AdminServer() { adminServerConfig = new AdminServerConfig(); backendConfig = new BackendConfig(); kdcConfig = new KdcConfig(); startupOptions = new KOptions(); adminServerSetting = new AdminServerSetting(startupOptions, adminServerConfig, kdcConfig, backendConfig); }
/** * Default constructor. */ public AdminServer() { adminServerConfig = new AdminServerConfig(); backendConfig = new BackendConfig(); kdcConfig = new KdcConfig(); startupOptions = new KOptions(); adminServerSetting = new AdminServerSetting(startupOptions, adminServerConfig, kdcConfig, backendConfig); }
/** * Construct with prepared conf dir. * * @param confDir The path of conf dir * @throws KrbException e */ public LocalKadminImpl(File confDir) throws KrbException { KdcConfig tmpKdcConfig = KdcUtil.getKdcConfig(confDir); if (tmpKdcConfig == null) { tmpKdcConfig = new KdcConfig(); } BackendConfig tmpBackendConfig = KdcUtil.getBackendConfig(confDir); if (tmpBackendConfig == null) { tmpBackendConfig = new BackendConfig(); } this.serverSetting = new KdcSetting(tmpKdcConfig, tmpBackendConfig); backend = KdcUtil.getBackend(tmpBackendConfig); }
/** * Construct with prepared conf dir. * * @param confDir The path of conf dir * @throws KrbException e */ public LocalKadminImpl(File confDir) throws KrbException { KdcConfig tmpKdcConfig = KdcUtil.getKdcConfig(confDir); if (tmpKdcConfig == null) { tmpKdcConfig = new KdcConfig(); } BackendConfig tmpBackendConfig = KdcUtil.getBackendConfig(confDir); if (tmpBackendConfig == null) { tmpBackendConfig = new BackendConfig(); } this.serverSetting = new KdcSetting(tmpKdcConfig, tmpBackendConfig); backend = KdcUtil.getBackend(tmpBackendConfig); }
/** * Construct with prepared conf dir. * * @param confDir The path of conf dir * @throws KrbException e */ public LocalHadmin(File confDir) throws KrbException { this.confDir = confDir; KdcConfig tmpKdcConfig = KdcUtil.getKdcConfig(confDir); if (tmpKdcConfig == null) { tmpKdcConfig = new KdcConfig(); } BackendConfig tmpBackendConfig = KdcUtil.getBackendConfig(confDir); if (tmpBackendConfig == null) { tmpBackendConfig = new BackendConfig(); } this.serverSetting = new KdcSetting(tmpKdcConfig, tmpBackendConfig); kadmin = new LocalKadminImpl(serverSetting); }
/** * Construct with prepared conf dir. * * @param confDir The path of conf dir * @throws KrbException e */ public LocalHadmin(File confDir) throws KrbException { this.confDir = confDir; KdcConfig tmpKdcConfig = KdcUtil.getKdcConfig(confDir); if (tmpKdcConfig == null) { tmpKdcConfig = new KdcConfig(); } BackendConfig tmpBackendConfig = KdcUtil.getBackendConfig(confDir); if (tmpBackendConfig == null) { tmpBackendConfig = new BackendConfig(); } this.serverSetting = new KdcSetting(tmpKdcConfig, tmpBackendConfig); kadmin = new LocalKadminImpl(serverSetting); }
/** * Constructor given confDir where 'kdc.conf' and 'backend.conf' should be * available. * kdc.conf, that contains kdc server related items. * backend.conf, that contains identity backend related items. * * @param confDir The conf dir * @throws KrbException e */ public KdcServer(File confDir) throws KrbException { KdcConfig tmpKdcConfig = KdcUtil.getKdcConfig(confDir); if (tmpKdcConfig == null) { tmpKdcConfig = new KdcConfig(); } this.kdcConfig = tmpKdcConfig; BackendConfig tmpBackendConfig = KdcUtil.getBackendConfig(confDir); if (tmpBackendConfig == null) { tmpBackendConfig = new BackendConfig(); } tmpBackendConfig.setConfDir(confDir); this.backendConfig = tmpBackendConfig; startupOptions = new KOptions(); kdcSetting = new KdcSetting(startupOptions, kdcConfig, backendConfig); }
/** * Constructor given confDir where 'kdc.conf' and 'backend.conf' should be * available. * kdc.conf, that contains kdc server related items. * backend.conf, that contains identity backend related items. * * @param confDir The conf dir * @throws KrbException e */ public KdcServer(File confDir) throws KrbException { KdcConfig tmpKdcConfig = KdcUtil.getKdcConfig(confDir); if (tmpKdcConfig == null) { tmpKdcConfig = new KdcConfig(); } this.kdcConfig = tmpKdcConfig; BackendConfig tmpBackendConfig = KdcUtil.getBackendConfig(confDir); if (tmpBackendConfig == null) { tmpBackendConfig = new BackendConfig(); } tmpBackendConfig.setConfDir(confDir); this.backendConfig = tmpBackendConfig; startupOptions = new KOptions(); kdcSetting = new KdcSetting(startupOptions, kdcConfig, backendConfig); }
@Override protected void setUpKdcServer() throws Exception { KdcConfig config = new KdcConfig(); config.setString(KdcConfigKey.PREAUTH_REQUIRED, "false"); SimpleKdcServer kdcServer = new TestKdcServer(allowTcp(), allowUdp(), config, new BackendConfig()); super.setKdcServer(kdcServer); configKdcSeverAndClient(); prepareKdc(); kdcServer.start(); }
@Override protected void setUpKdcServer() throws Exception { KdcConfig config = new KdcConfig(); config.setString(KdcConfigKey.ENCRYPTION_TYPES, "arcfour-hmac rc4-hmac"); SimpleKdcServer kdcServer = new TestKdcServer(allowTcp(), allowUdp(), config, new BackendConfig()); super.setKdcServer(kdcServer); configKdcSeverAndClient(); prepareKdc(); kdcServer.start(); }
tmpBackendConfig = new BackendConfig();
tmpBackendConfig = new BackendConfig();