directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject directory-kerby git commit: Remote kadmin. Clean up
Date Mon, 11 Jan 2016 01:18:20 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/kadmin-remote ea005f913 -> 18248bae8


Remote kadmin. Clean up


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/18248bae
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/18248bae
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/18248bae

Branch: refs/heads/kadmin-remote
Commit: 18248bae84c993d000a1711b9a5a4cb2a8cfa936
Parents: ea005f9
Author: Kai Zheng <kai.zheng@intel.com>
Authored: Mon Jan 11 09:18:04 2016 +0800
Committer: Kai Zheng <kai.zheng@intel.com>
Committed: Mon Jan 11 09:18:04 2016 +0800

----------------------------------------------------------------------
 .../kerberos/kerb/admin/server/AdminServer.java |  46 ++--
 .../kerb/admin/server/AdminServerConfig.java    | 135 ++---------
 .../kerb/admin/server/AdminServerConfigKey.java |  41 +---
 .../kerb/admin/server/AdminServerContext.java   |  22 +-
 .../kerb/admin/server/AdminServerHandler.java   |   2 +-
 .../kerb/admin/server/AdminServerOption.java    |  12 +-
 .../kerb/admin/server/AdminServerSetting.java   | 100 ++++----
 .../kerb/admin/server/AdminServerUtil.java      |   8 +-
 .../impl/AbstractInternalAdminServer.java       |   4 +-
 .../kerberos/kerb/admin/remote/AdminClient.java |  43 +++-
 .../kerberos/kerb/admin/remote/AdminConfig.java | 233 ++-----------------
 .../kerb/admin/remote/AdminConfigKey.java       |  45 +---
 .../kerberos/kerb/admin/remote/AdminOption.java |   8 +-
 .../kerb/admin/remote/AdminSetting.java         |  18 +-
 14 files changed, 197 insertions(+), 520 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServer.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServer.java b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServer.java
index 2d7fea0..77cdcd5 100644
--- a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServer.java
+++ b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServer.java
@@ -50,7 +50,8 @@ public class AdminServer {
         this.adminServerConfig = kdcConfig;
         this.backendConfig = backendConfig;
         startupOptions = new KOptions();
-        adminServerSetting = new AdminServerSetting(startupOptions, kdcConfig, backendConfig);
+        adminServerSetting = new AdminServerSetting(startupOptions,
+            kdcConfig, backendConfig);
     }
 
     /**
@@ -63,7 +64,8 @@ public class AdminServer {
      * @throws KrbException e
      */
     public AdminServer(File confDir) throws KrbException {
-        AdminServerConfig tmpAdminServerConfig = AdminServerUtil.getAdminServerConfig(confDir);
+        AdminServerConfig tmpAdminServerConfig =
+            AdminServerUtil.getAdminServerConfig(confDir);
         if (tmpAdminServerConfig == null) {
             tmpAdminServerConfig = new AdminServerConfig();
         }
@@ -93,35 +95,35 @@ public class AdminServer {
     }
 
     /**
-     * Set KDC realm for ticket request
+     * Set Admin realm for ticket request
      * @param realm The kdc realm
      */
     public void setAdminServerRealm(String realm) {
-        startupOptions.add(AdminServerOption.KDC_REALM, realm);
+        startupOptions.add(AdminServerOption.ADMIN_REALM, realm);
     }
 
     /**
-     * Set KDC host.
+     * Set Admin host.
      * @param kdcHost The kdc host
      */
-    public void setAdminServerHost(String kdcHost) {
-        startupOptions.add(AdminServerOption.KDC_HOST, kdcHost);
+    public void setAdminHost(String kdcHost) {
+        startupOptions.add(AdminServerOption.ADMIN_HOST, kdcHost);
     }
 
     /**
-     * Set KDC port.
+     * Set Admin port.
      * @param kdcPort The kdc port
      */
     public void setAdminServerPort(int kdcPort) {
-        startupOptions.add(AdminServerOption.KDC_PORT, kdcPort);
+        startupOptions.add(AdminServerOption.ADMIN_PORT, kdcPort);
     }
 
     /**
-     * Set KDC tcp port.
+     * Set Admin tcp port.
      * @param kdcTcpPort The kdc tcp port
      */
-    public void setAdminServerTcpPort(int kdcTcpPort) {
-        startupOptions.add(AdminServerOption.KDC_TCP_PORT, kdcTcpPort);
+    public void setAdminTcpPort(int kdcTcpPort) {
+        startupOptions.add(AdminServerOption.ADMIN_TCP_PORT, kdcTcpPort);
     }
 
     /**
@@ -140,11 +142,11 @@ public class AdminServer {
         startupOptions.add(AdminServerOption.ALLOW_TCP, allowTcp);
     }
     /**
-     * Set KDC udp port. Only makes sense when allowUdp is set.
+     * Set Admin udp port. Only makes sense when allowUdp is set.
      * @param kdcUdpPort The kdc udp port
      */
-    public void setAdminServerUdpPort(int kdcUdpPort) {
-        startupOptions.add(AdminServerOption.KDC_UDP_PORT, kdcUdpPort);
+    public void setAdminUdpPort(int kdcUdpPort) {
+        startupOptions.add(AdminServerOption.ADMIN_UDP_PORT, kdcUdpPort);
     }
 
     /**
@@ -168,11 +170,11 @@ public class AdminServer {
      * @param innerAdminServerImpl The inner kdc implementation
      */
     public void setInnerAdminServerImpl(InternalAdminServer innerAdminServerImpl) {
-        startupOptions.add(AdminServerOption.INNER_KDC_IMPL, innerAdminServerImpl);
+        startupOptions.add(AdminServerOption.INNER_ADMIN_IMPL, innerAdminServerImpl);
     }
 
     /**
-     * Get KDC setting from startup options and configs.
+     * Get Admin setting from startup options and configs.
      * @return setting
      */
     public AdminServerSetting getAdminServerSetting() {
@@ -180,7 +182,7 @@ public class AdminServer {
     }
 
     /**
-     * Get the KDC config.
+     * Get the Admin config.
      * @return AdminServerConfig
      */
     public AdminServerConfig getAdminServerConfig() {
@@ -213,9 +215,9 @@ public class AdminServer {
      * @throws org.apache.kerby.kerberos.kerb.KrbException e.
      */
     public void init() throws KrbException {
-        if (startupOptions.contains(AdminServerOption.INNER_KDC_IMPL)) {
+        if (startupOptions.contains(AdminServerOption.INNER_ADMIN_IMPL)) {
             innerAdminServer = (InternalAdminServer) startupOptions.getOptionValue(
-                AdminServerOption.INNER_KDC_IMPL);
+                AdminServerOption.INNER_ADMIN_IMPL);
         } else {
             innerAdminServer =
                 new DefaultInternalAdminServerImpl(adminServerSetting);
@@ -225,7 +227,7 @@ public class AdminServer {
     }
 
     /**
-     * Start the KDC server.
+     * Start the Admin server.
      *
      * @throws org.apache.kerby.kerberos.kerb.KrbException e.
      */
@@ -237,7 +239,7 @@ public class AdminServer {
     }
 
     /**
-     * Stop the KDC server.
+     * Stop the Admin server.
      *
      * @throws org.apache.kerby.kerberos.kerb.KrbException e.
      */

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerConfig.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerConfig.java b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerConfig.java
index 9e18a26..5d7d6a9 100644
--- a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerConfig.java
+++ b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerConfig.java
@@ -20,11 +20,6 @@
 package org.apache.kerby.kerberos.kerb.admin.server;
 
 import org.apache.kerby.kerberos.kerb.common.Krb5Conf;
-import org.apache.kerby.kerberos.kerb.server.KdcConfigKey;
-import org.apache.kerby.kerberos.kerb.type.base.EncryptionType;
-
-import java.util.Arrays;
-import java.util.List;
 
 /**
  * Kerb KDC side configuration API.
@@ -36,28 +31,28 @@ public class AdminServerConfig extends Krb5Conf {
         return getBoolean(AdminServerConfigKey.KRB_DEBUG, true, KDCDEFAULT);
     }
 
-    public String getKdcServiceName() {
-        return getString(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_SERVICE_NAME, true, KDCDEFAULT);
+    public String getAdminServiceName() {
+        return getString(AdminServerConfigKey.ADMIN_SERVICE_NAME, true, KDCDEFAULT);
     }
 
-    public String getKdcHost() {
-        return getString(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_HOST, true, KDCDEFAULT);
+    public String getAdminHost() {
+        return getString(AdminServerConfigKey.ADMIN_HOST, true, KDCDEFAULT);
     }
 
-    public int getKdcPort() {
-        Integer kdcPort = getInt(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_PORT, true, KDCDEFAULT);
+    public int getAdminPort() {
+        Integer kdcPort = getInt(AdminServerConfigKey.ADMIN_PORT, true, KDCDEFAULT);
         if (kdcPort != null && kdcPort > 0) {
             return kdcPort.intValue();
         }
         return -1;
     }
 
-    public int getKdcTcpPort() {
-        Integer kdcTcpPort = getInt(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_TCP_PORT, true, KDCDEFAULT);
+    public int getAdminTcpPort() {
+        Integer kdcTcpPort = getInt(AdminServerConfigKey.ADMIN_TCP_PORT, true, KDCDEFAULT);
         if (kdcTcpPort != null && kdcTcpPort > 0) {
             return kdcTcpPort.intValue();
         }
-        return getKdcPort();
+        return getAdminPort();
     }
 
     /**
@@ -65,9 +60,9 @@ public class AdminServerConfig extends Krb5Conf {
      * @return true to allow TCP, false otherwise
      */
     public Boolean allowTcp() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_ALLOW_TCP, true, KDCDEFAULT)
-                || getInt(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_TCP_PORT, true, KDCDEFAULT) != null
-            || getInt(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_PORT, false, KDCDEFAULT) != null;
+        return getBoolean(AdminServerConfigKey.ADMIN_ALLOW_TCP, true, KDCDEFAULT)
+                || getInt(AdminServerConfigKey.ADMIN_TCP_PORT, true, KDCDEFAULT) != null
+            || getInt(AdminServerConfigKey.ADMIN_PORT, false, KDCDEFAULT) != null;
     }
 
     /**
@@ -75,110 +70,24 @@ public class AdminServerConfig extends Krb5Conf {
      * @return true to allow UDP, false otherwise
      */
     public Boolean allowUdp() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_ALLOW_UDP, true, KDCDEFAULT)
-                || getInt(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_UDP_PORT, true, KDCDEFAULT) != null
-            || getInt(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_PORT, false, KDCDEFAULT) != null;
+        return getBoolean(AdminServerConfigKey.ADMIN_ALLOW_UDP, true, KDCDEFAULT)
+                || getInt(AdminServerConfigKey.ADMIN_UDP_PORT, true, KDCDEFAULT) != null
+            || getInt(AdminServerConfigKey.ADMIN_PORT, false, KDCDEFAULT) != null;
     }
 
-    public int getKdcUdpPort() {
-        Integer kdcUdpPort = getInt(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_UDP_PORT, true, KDCDEFAULT);
+    public int getAdminUdpPort() {
+        Integer kdcUdpPort = getInt(AdminServerConfigKey.ADMIN_UDP_PORT, true, KDCDEFAULT);
         if (kdcUdpPort != null && kdcUdpPort > 0) {
             return kdcUdpPort.intValue();
         }
-        return getKdcPort();
-    }
-
-    public String getKdcRealm() {
-        return getString(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_REALM, true, KDCDEFAULT);
-    }
-
-    public String getKdcDomain() {
-        return getString(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_DOMAIN, true, KDCDEFAULT);
-    }
-
-    public boolean isPreauthRequired() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.PREAUTH_REQUIRED, true, KDCDEFAULT);
-    }
-
-    public boolean isAllowTokenPreauth() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.ALLOW_TOKEN_PREAUTH, true, KDCDEFAULT);
-    }
-
-    public long getAllowableClockSkew() {
-        return getLong(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.ALLOWABLE_CLOCKSKEW, true, KDCDEFAULT);
-    }
-
-    public boolean isEmptyAddressesAllowed() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.EMPTY_ADDRESSES_ALLOWED, true, KDCDEFAULT);
-    }
-
-    public boolean isForwardableAllowed() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.FORWARDABLE_ALLOWED, true, KDCDEFAULT);
-    }
-
-    public boolean isPostdatedAllowed() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.POSTDATED_ALLOWED, true, KDCDEFAULT);
-    }
-
-    public boolean isProxiableAllowed() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.PROXIABLE_ALLOWED, true, KDCDEFAULT);
-    }
-
-    public boolean isRenewableAllowed() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.RENEWABLE_ALLOWED, true, KDCDEFAULT);
-    }
-
-    public long getMaximumRenewableLifetime() {
-        return getLong(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.MAXIMUM_RENEWABLE_LIFETIME, true, KDCDEFAULT);
-    }
-
-    public long getMaximumTicketLifetime() {
-        return getLong(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.MAXIMUM_TICKET_LIFETIME, true, KDCDEFAULT);
-    }
-
-    public long getMinimumTicketLifetime() {
-        return getLong(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.MINIMUM_TICKET_LIFETIME, true, KDCDEFAULT);
-    }
-
-    public List<EncryptionType> getEncryptionTypes() {
-        return getEncTypes(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.ENCRYPTION_TYPES, true, KDCDEFAULT);
-    }
-
-    public boolean isPaEncTimestampRequired() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.PA_ENC_TIMESTAMP_REQUIRED, true, KDCDEFAULT);
-    }
-
-    public boolean isBodyChecksumVerified() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.VERIFY_BODY_CHECKSUM, true, KDCDEFAULT);
-    }
-
-    public boolean isRestrictAnonymousToTgt() {
-        return getBoolean(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.RESTRICT_ANONYMOUS_TO_TGT, true, KDCDEFAULT);
-    }
-
-    public int getKdcMaxDgramReplySize() {
-        return getInt(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.KDC_MAX_DGRAM_REPLY_SIZE, true, KDCDEFAULT);
-    }
-
-    public String getVerifyKeyConfig() {
-        return getString(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.TOKEN_VERIFY_KEYS, true, KDCDEFAULT);
-    }
-
-    public String getDecryptionKeyConfig() {
-        return getString(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.TOKEN_DECRYPTION_KEYS, true, KDCDEFAULT);
-    }
-
-    public List<String> getIssuers() {
-        return Arrays.asList(getStringArray(org.apache.kerby.kerberos.kerb.server.KdcConfigKey.TOKEN_ISSUERS, true, KDCDEFAULT));
+        return getAdminPort();
     }
 
-    public List<String> getPkinitAnchors() {
-        return Arrays.asList(getString(
-                org.apache.kerby.kerberos.kerb.server.KdcConfigKey.PKINIT_ANCHORS, true, KDCDEFAULT));
+    public String getAdminRealm() {
+        return getString(AdminServerConfigKey.ADMIN_REALM, true, KDCDEFAULT);
     }
 
-    public String getPkinitIdentity() {
-        return getString(
-                KdcConfigKey.PKINIT_IDENTITY, true, KDCDEFAULT);
+    public String getAdminDomain() {
+        return getString(AdminServerConfigKey.ADMIN_DOMAIN, true, KDCDEFAULT);
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerConfigKey.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerConfigKey.java b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerConfigKey.java
index cda3136..d5351a0 100644
--- a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerConfigKey.java
+++ b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerConfigKey.java
@@ -23,37 +23,16 @@ import org.apache.kerby.config.ConfigKey;
 
 public enum AdminServerConfigKey implements ConfigKey {
     KRB_DEBUG(true),
-    KDC_SERVICE_NAME("Kadmin-Server"),
-    KDC_IDENTITY_BACKEND,
-    KDC_HOST("127.0.0.1"),
-    KDC_PORT,
-    KDC_ALLOW_TCP(true),
-    KDC_ALLOW_UDP(true),
-    KDC_UDP_PORT,
-    KDC_TCP_PORT,
-    KDC_DOMAIN("example.com"),
-    KDC_REALM("EXAMPLE.COM"),
-    PREAUTH_REQUIRED(true),
-    ALLOW_TOKEN_PREAUTH(true),
-    ALLOWABLE_CLOCKSKEW(5 * 60L),
-    EMPTY_ADDRESSES_ALLOWED(true),
-    PA_ENC_TIMESTAMP_REQUIRED(true),
-    MAXIMUM_TICKET_LIFETIME(24 * 3600L),
-    MINIMUM_TICKET_LIFETIME(1 * 3600L),
-    MAXIMUM_RENEWABLE_LIFETIME(48 * 3600L),
-    FORWARDABLE_ALLOWED(true),
-    POSTDATED_ALLOWED(true),
-    PROXIABLE_ALLOWED(true),
-    RENEWABLE_ALLOWED(true),
-    VERIFY_BODY_CHECKSUM(true),
-    ENCRYPTION_TYPES("aes128-cts-hmac-sha1-96 des3-cbc-sha1-kd"),
-    RESTRICT_ANONYMOUS_TO_TGT(false),
-    KDC_MAX_DGRAM_REPLY_SIZE(4096),
-    TOKEN_VERIFY_KEYS(),
-    TOKEN_DECRYPTION_KEYS(),
-    TOKEN_ISSUERS(),
-    PKINIT_IDENTITY(null),
-    PKINIT_ANCHORS(null);
+    ADMIN_SERVICE_NAME("Kadmin-Server"),
+    ADMIN_IDENTITY_BACKEND,
+    ADMIN_HOST("127.0.0.1"),
+    ADMIN_PORT,
+    ADMIN_ALLOW_TCP(true),
+    ADMIN_ALLOW_UDP(true),
+    ADMIN_UDP_PORT,
+    ADMIN_TCP_PORT,
+    ADMIN_DOMAIN("example.com"),
+    ADMIN_REALM("EXAMPLE.COM");
 
     private Object defaultValue;
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerContext.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerContext.java b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerContext.java
index 5d23491..fcf0d92 100644
--- a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerContext.java
+++ b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerContext.java
@@ -27,8 +27,6 @@ public class AdminServerContext {
     private final AdminServerSetting adminServerSetting;
 
     private IdentityService identityService;
-    private ReplayCheckService replayCache;
-    private PreauthHandler preauthHandler;
 
     public AdminServerContext(AdminServerSetting adminServerSetting) {
         this.adminServerSetting = adminServerSetting;
@@ -42,22 +40,6 @@ public class AdminServerContext {
         return adminServerSetting.getAdminServerConfig();
     }
 
-    public void setPreauthHandler(PreauthHandler preauthHandler) {
-        this.preauthHandler = preauthHandler;
-    }
-
-    public PreauthHandler getPreauthHandler() {
-        return this.preauthHandler;
-    }
-
-    public void setReplayCache(ReplayCheckService replayCache) {
-        this.replayCache = replayCache;
-    }
-
-    public ReplayCheckService getReplayCache() {
-        return replayCache;
-    }
-
     public void setIdentityService(IdentityService identityService) {
         this.identityService = identityService;
     }
@@ -66,7 +48,7 @@ public class AdminServerContext {
         return identityService;
     }
 
-    public String getKdcRealm() {
-        return adminServerSetting.getKdcRealm();
+    public String getAdminRealm() {
+        return adminServerSetting.getAdminRealm();
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerHandler.java b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerHandler.java
index 97df6b5..ecc7bc5 100644
--- a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerHandler.java
+++ b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerHandler.java
@@ -72,7 +72,7 @@ public class AdminServerHandler {
                 == KrbMessageType.AS_REQ) {
             KdcReq kdcReq = (KdcReq) krbRequest;
             String realm = getRequestRealm(kdcReq);
-            if (realm == null || !kdcContext.getKdcRealm().equals(realm)) {
+            if (realm == null || !kdcContext.getAdminRealm().equals(realm)) {
                 LOG.error("Invalid realm from kdc request: " + realm);
                 throw new KrbException("Invalid realm from kdc request: " + realm);
             }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerOption.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerOption.java b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerOption.java
index d2adeb3..d2c59d8 100644
--- a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerOption.java
+++ b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerOption.java
@@ -28,14 +28,14 @@ import org.apache.kerby.KOptionType;
  */
 public enum AdminServerOption implements KOption {
     NONE(null),
-    INNER_KDC_IMPL(new KOptionInfo("inner KDC impl", "inner KDC impl", KOptionType.OBJ)),
-    KDC_REALM(new KOptionInfo("kdc realm", "kdc realm", KOptionType.STR)),
-    KDC_HOST(new KOptionInfo("kdc host", "kdc host", KOptionType.STR)),
-    KDC_PORT(new KOptionInfo("kdc port", "kdc port", KOptionType.INT)),
+    INNER_ADMIN_IMPL(new KOptionInfo("inner KDC impl", "inner KDC impl", KOptionType.OBJ)),
+    ADMIN_REALM(new KOptionInfo("kdc realm", "kdc realm", KOptionType.STR)),
+    ADMIN_HOST(new KOptionInfo("kdc host", "kdc host", KOptionType.STR)),
+    ADMIN_PORT(new KOptionInfo("kdc port", "kdc port", KOptionType.INT)),
     ALLOW_TCP(new KOptionInfo("allow tcp", "allow tcp", KOptionType.BOOL)),
-    KDC_TCP_PORT(new KOptionInfo("kdc tcp port", "kdc tcp port", KOptionType.INT)),
+    ADMIN_TCP_PORT(new KOptionInfo("kdc tcp port", "kdc tcp port", KOptionType.INT)),
     ALLOW_UDP(new KOptionInfo("allow udp", "allow udp", KOptionType.BOOL)),
-    KDC_UDP_PORT(new KOptionInfo("kdc udp port", "kdc udp port", KOptionType.INT)),
+    ADMIN_UDP_PORT(new KOptionInfo("kdc udp port", "kdc udp port", KOptionType.INT)),
     WORK_DIR(new KOptionInfo("work dir", "work dir", KOptionType.DIR)),
     ENABLE_DEBUG(new KOptionInfo("enable debug", "enable debug", KOptionType.BOOL));
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerSetting.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerSetting.java b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerSetting.java
index 8450451..6d91973 100644
--- a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerSetting.java
+++ b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerSetting.java
@@ -24,7 +24,7 @@ import org.apache.kerby.kerberos.kerb.KrbException;
 import org.apache.kerby.kerberos.kerb.identity.backend.BackendConfig;
 
 /**
- * KDC setting that combines startup options and kdc config.
+ * Admin Server setting that combines startup options and admin config.
  */
 public class AdminServerSetting {
     private final KOptions startupOptions;
@@ -34,23 +34,25 @@ public class AdminServerSetting {
     /**
      * AdminServerSetting constructor
      * @param startupOptions startup options
-     * @param config kdc configuration
+     * @param config admin configuration
      * @param backendConfig backend configuration
      */
     public AdminServerSetting(KOptions startupOptions,
-                              AdminServerConfig config, BackendConfig backendConfig) {
+                              AdminServerConfig config, 
+                              BackendConfig backendConfig) {
         this.startupOptions = startupOptions;
         this.adminServerConfig = config;
         this.backendConfig = backendConfig;
     }
 
-    public AdminServerSetting(AdminServerConfig adminServerConfig, BackendConfig backendConfig) {
+    public AdminServerSetting(AdminServerConfig adminServerConfig, 
+                              BackendConfig backendConfig) {
         this(new KOptions(), adminServerConfig, backendConfig);
     }
 
     /**
-     * Get the KDC config.
-     * @return kdc configuration
+     * Get the Admin Server config.
+     * @return admin configuration
      */
     public AdminServerConfig getAdminServerConfig() {
         return adminServerConfig;
@@ -64,75 +66,75 @@ public class AdminServerSetting {
         return backendConfig;
     }
 
-    public String getKdcHost() {
-        String kdcHost = startupOptions.getStringOption(
-                AdminServerOption.KDC_HOST);
-        if (kdcHost == null) {
-            kdcHost = adminServerConfig.getKdcHost();
+    public String getAdminHost() {
+        String adminHost = startupOptions.getStringOption(
+                AdminServerOption.ADMIN_HOST);
+        if (adminHost == null) {
+            adminHost = adminServerConfig.getAdminHost();
         }
-        return kdcHost;
+        return adminHost;
     }
 
     /**
-     * Check kdc tcp setting and see if any bad.
+     * Check admin tcp setting and see if any bad.
      * @return valid tcp port or -1 if not allowTcp
      * @throws KrbException e
      */
-    public int checkGetKdcTcpPort() throws KrbException {
+    public int checkGetAdminTcpPort() throws KrbException {
         if (allowTcp()) {
-            int kdcPort = getKdcTcpPort();
-            if (kdcPort < 1) {
-                throw new KrbException("KDC tcp port isn't set or configured");
+            int adminPort = getAdminTcpPort();
+            if (adminPort < 1) {
+                throw new KrbException("Admin Server tcp port isn't set or configured");
             }
-            return kdcPort;
+            return adminPort;
         }
         return -1;
     }
 
     /**
-     * Check kdc udp setting and see if any bad.
+     * Check admin udp setting and see if any bad.
      * @return valid udp port or -1 if not allowUdp
      * @throws KrbException e
      */
-    public int checkGetKdcUdpPort() throws KrbException {
+    public int checkGetAdminUdpPort() throws KrbException {
         if (allowUdp()) {
-            int kdcPort = getKdcUdpPort();
-            if (kdcPort < 1) {
-                throw new KrbException("KDC udp port isn't set or configured");
+            int adminPort = getAdminUdpPort();
+            if (adminPort < 1) {
+                throw new KrbException("Admin Server udp port isn't set or configured");
             }
-            return kdcPort;
+            return adminPort;
         }
         return -1;
     }
 
     /**
-     * Get kdc tcp port
+     * Get admin tcp port
      *
-     * @return kdc tcp port
+     * @return admin tcp port
      */
-    public int getKdcTcpPort() {
-        int tcpPort = startupOptions.getIntegerOption(AdminServerOption.KDC_TCP_PORT);
+    public int getAdminTcpPort() {
+        int tcpPort = startupOptions.getIntegerOption(AdminServerOption.ADMIN_TCP_PORT);
         if (tcpPort < 1) {
-            tcpPort = adminServerConfig.getKdcTcpPort();
+            tcpPort = adminServerConfig.getAdminTcpPort();
         }
         if (tcpPort < 1) {
-            tcpPort = getKdcPort();
+            tcpPort = getAdminPort();
         }
 
         return tcpPort;
     }
 
     /**
-     * Get kdc port
+     * Get admin port
      *
-     * @return kdc port
+     * @return admin port
      */
-    public int getKdcPort() {
-        int kdcPort = startupOptions.getIntegerOption(AdminServerOption.KDC_PORT);
-        if (kdcPort < 1) {
-            kdcPort = adminServerConfig.getKdcPort();
+    public int getAdminPort() {
+        int adminPort = startupOptions.getIntegerOption(AdminServerOption.ADMIN_PORT);
+        if (adminPort < 1) {
+            adminPort = adminServerConfig.getAdminPort();
         }
-        return kdcPort;
+        return adminPort;
     }
 
     /**
@@ -156,31 +158,31 @@ public class AdminServerSetting {
     }
 
     /**
-     * Get kdc udp port
+     * Get admin udp port
      *
      * @return udp port
      */
-    public int getKdcUdpPort() {
-        int udpPort = startupOptions.getIntegerOption(AdminServerOption.KDC_UDP_PORT);
+    public int getAdminUdpPort() {
+        int udpPort = startupOptions.getIntegerOption(AdminServerOption.ADMIN_UDP_PORT);
         if (udpPort < 1) {
-            udpPort = adminServerConfig.getKdcUdpPort();
+            udpPort = adminServerConfig.getAdminUdpPort();
         }
         if (udpPort < 1) {
-            udpPort = getKdcPort();
+            udpPort = getAdminPort();
         }
 
         return udpPort;
     }
 
     /**
-     * Get KDC realm.
-     * @return KDC realm
+     * Get Admin Server realm.
+     * @return Admin Server realm
      */
-    public String getKdcRealm() {
-        String kdcRealm = startupOptions.getStringOption(AdminServerOption.KDC_REALM);
-        if (kdcRealm == null || kdcRealm.isEmpty()) {
-            kdcRealm = adminServerConfig.getKdcRealm();
+    public String getAdminRealm() {
+        String adminRealm = startupOptions.getStringOption(AdminServerOption.ADMIN_REALM);
+        if (adminRealm == null || adminRealm.isEmpty()) {
+            adminRealm = adminServerConfig.getAdminRealm();
         }
-        return kdcRealm;
+        return adminRealm;
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerUtil.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerUtil.java b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerUtil.java
index cf44fb7..1afd365 100644
--- a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerUtil.java
+++ b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/AdminServerUtil.java
@@ -127,15 +127,15 @@ public final class AdminServerUtil {
             AdminServerSetting setting) throws KrbException {
         TransportPair result = new TransportPair();
 
-        int tcpPort = setting.checkGetKdcTcpPort();
+        int tcpPort = setting.checkGetAdminTcpPort();
         if (tcpPort > 0) {
             result.tcpAddress = new InetSocketAddress(
-                    setting.getKdcHost(), tcpPort);
+                    setting.getAdminHost(), tcpPort);
         }
-        int udpPort = setting.checkGetKdcUdpPort();
+        int udpPort = setting.checkGetAdminUdpPort();
         if (udpPort > 0) {
             result.udpAddress = new InetSocketAddress(
-                    setting.getKdcHost(), udpPort);
+                    setting.getAdminHost(), udpPort);
         }
 
         return result;

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/impl/AbstractInternalAdminServer.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/impl/AbstractInternalAdminServer.java b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/impl/AbstractInternalAdminServer.java
index 466b4b4..ef09a45 100644
--- a/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/impl/AbstractInternalAdminServer.java
+++ b/kerby-kerb/kerb-admin-server/src/main/java/org/apache/kerby/kerberos/kerb/admin/server/impl/AbstractInternalAdminServer.java
@@ -27,8 +27,6 @@ import org.apache.kerby.kerberos.kerb.identity.IdentityService;
 import org.apache.kerby.kerberos.kerb.identity.backend.BackendConfig;
 import org.apache.kerby.kerberos.kerb.identity.backend.IdentityBackend;
 import org.apache.kerby.kerberos.kerb.identity.backend.MemoryIdentityBackend;
-import org.apache.kerby.kerberos.kerb.server.KdcConfig;
-import org.apache.kerby.kerberos.kerb.server.KdcSetting;
 import org.apache.kerby.kerberos.kerb.server.KdcUtil;
 
 /**
@@ -58,7 +56,7 @@ public class AbstractInternalAdminServer implements InternalAdminServer {
     }
 
     protected String getServiceName() {
-        return kdcConfig.getKdcServiceName();
+        return kdcConfig.getAdminServiceName();
     }
 
     protected IdentityService getIdentityService() {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminClient.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminClient.java b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminClient.java
index fe12764..9ca13af 100644
--- a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminClient.java
+++ b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminClient.java
@@ -86,27 +86,56 @@ public class AdminClient {
      * Set KDC realm for ticket request
      * @param realm The realm
      */
-    public void setKdcRealm(String realm) {
-        commonOptions.add(AdminOption.KDC_REALM, realm);
+    public void setAdminRealm(String realm) {
+        commonOptions.add(AdminOption.ADMIN_REALM, realm);
     }
 
     /**
-     * Set KDC host.
+     * Set Admin Server host.
      * @param kdcHost The kdc host
      */
     public void setKdcHost(String kdcHost) {
-        commonOptions.add(AdminOption.KDC_HOST, kdcHost);
+        commonOptions.add(AdminOption.ADMIN_HOST, kdcHost);
     }
 
     /**
-     * Set KDC tcp port.
+     * Set Admin Server tcp port.
      * @param kdcTcpPort The kdc tcp port
      */
-    public void setKdcTcpPort(int kdcTcpPort) {
+    public void setAdminTcpPort(int kdcTcpPort) {
         if (kdcTcpPort < 1) {
             throw new IllegalArgumentException("Invalid port");
         }
-        commonOptions.add(AdminOption.KDC_TCP_PORT, kdcTcpPort);
+        commonOptions.add(AdminOption.ADMIN_TCP_PORT, kdcTcpPort);
+        setAllowTcp(true);
+    }
+
+    /**
+     * Set to allow UDP or not.
+     * @param allowUdp true if allow udp
+     */
+    public void setAllowUdp(boolean allowUdp) {
+        commonOptions.add(AdminOption.ALLOW_UDP, allowUdp);
+    }
+
+    /**
+     * Set to allow TCP or not.
+     * @param allowTcp true if allow tcp
+     */
+    public void setAllowTcp(boolean allowTcp) {
+        commonOptions.add(AdminOption.ALLOW_TCP, allowTcp);
+    }
+
+    /**
+     * Set Admin Server udp port. Only makes sense when allowUdp is set.
+     * @param adminUdpPort The kdc udp port
+     */
+    public void setAdminUdpPort(int adminUdpPort) {
+        if (adminUdpPort < 1) {
+            throw new IllegalArgumentException("Invalid port");
+        }
+        commonOptions.add(AdminOption.ADMIN_UDP_PORT, adminUdpPort);
+        setAllowUdp(true);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminConfig.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminConfig.java b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminConfig.java
index ab41147..814f482 100644
--- a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminConfig.java
+++ b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminConfig.java
@@ -20,10 +20,6 @@
 package org.apache.kerby.kerberos.kerb.admin.remote;
 
 import org.apache.kerby.kerberos.kerb.common.Krb5Conf;
-import org.apache.kerby.kerberos.kerb.type.base.EncryptionType;
-
-import java.util.Arrays;
-import java.util.List;
 
 /**
  * Kerb client side configuration API.
@@ -40,9 +36,9 @@ public class AdminConfig extends Krb5Conf {
      *
      * @return The kdc host
      */
-    public String getKdcHost() {
+    public String getAdminHost() {
         return getString(
-            AdminConfigKey.KDC_HOST, true, LIBDEFAULT);
+            AdminConfigKey.ADMIN_HOST, true, LIBDEFAULT);
     }
 
     /**
@@ -50,8 +46,8 @@ public class AdminConfig extends Krb5Conf {
      *
      * @return The kdc host
      */
-    public int getKdcPort() {
-        Integer kdcPort = getInt(AdminConfigKey.KDC_PORT, true, LIBDEFAULT);
+    public int getAdminPort() {
+        Integer kdcPort = getInt(AdminConfigKey.ADMIN_PORT, true, LIBDEFAULT);
         if (kdcPort != null) {
             return kdcPort.intValue();
         }
@@ -63,12 +59,12 @@ public class AdminConfig extends Krb5Conf {
      *
      * @return The kdc tcp port
      */
-    public int getKdcTcpPort() {
-        Integer kdcPort = getInt(AdminConfigKey.KDC_TCP_PORT, true, LIBDEFAULT);
+    public int getAdminTcpPort() {
+        Integer kdcPort = getInt(AdminConfigKey.ADMIN_TCP_PORT, true, LIBDEFAULT);
         if (kdcPort != null && kdcPort > 0) {
             return kdcPort.intValue();
         }
-        return getKdcPort();
+        return getAdminPort();
     }
 
     /**
@@ -77,9 +73,9 @@ public class AdminConfig extends Krb5Conf {
      * @return true to allow UDP, false otherwise
      */
     public boolean allowUdp() {
-        return getBoolean(AdminConfigKey.KDC_ALLOW_UDP, true, LIBDEFAULT)
-                || getInt(AdminConfigKey.KDC_UDP_PORT, true, LIBDEFAULT) != null
-            || getInt(AdminConfigKey.KDC_PORT, false, LIBDEFAULT) != null;
+        return getBoolean(AdminConfigKey.ADMIN_ALLOW_UDP, true, LIBDEFAULT)
+                || getInt(AdminConfigKey.ADMIN_UDP_PORT, true, LIBDEFAULT) != null
+            || getInt(AdminConfigKey.ADMIN_PORT, false, LIBDEFAULT) != null;
     }
 
     /**
@@ -88,9 +84,9 @@ public class AdminConfig extends Krb5Conf {
      * @return true to allow TCP, false otherwise
      */
     public boolean allowTcp() {
-        return getBoolean(AdminConfigKey.KDC_ALLOW_TCP, true, LIBDEFAULT)
-                || getInt(AdminConfigKey.KDC_TCP_PORT, true, LIBDEFAULT) != null
-            || getInt(AdminConfigKey.KDC_PORT, false, LIBDEFAULT) != null;
+        return getBoolean(AdminConfigKey.ADMIN_ALLOW_TCP, true, LIBDEFAULT)
+                || getInt(AdminConfigKey.ADMIN_TCP_PORT, true, LIBDEFAULT) != null
+            || getInt(AdminConfigKey.ADMIN_PORT, false, LIBDEFAULT) != null;
     }
 
     /**
@@ -98,218 +94,27 @@ public class AdminConfig extends Krb5Conf {
      *
      * @return The kdc udp port
      */
-    public int getKdcUdpPort() {
-        Integer kdcPort = getInt(AdminConfigKey.KDC_UDP_PORT, true, LIBDEFAULT);
+    public int getAdminUdpPort() {
+        Integer kdcPort = getInt(AdminConfigKey.ADMIN_UDP_PORT, true, LIBDEFAULT);
         if (kdcPort != null && kdcPort > 0) {
             return kdcPort.intValue();
         }
-        return getKdcPort();
+        return getAdminPort();
     }
 
     /**
      * Get KDC realm.
      * @return The kdc realm
      */
-    public String getKdcRealm() {
-        String realm = getString(AdminConfigKey.KDC_REALM, false, LIBDEFAULT);
+    public String getAdminRealm() {
+        String realm = getString(AdminConfigKey.ADMIN_REALM, false, LIBDEFAULT);
         if (realm == null) {
             realm = getString(AdminConfigKey.DEFAULT_REALM, false, LIBDEFAULT);
             if (realm == null) {
-                realm = (String) AdminConfigKey.KDC_REALM.getDefaultValue();
+                realm = (String) AdminConfigKey.ADMIN_REALM.getDefaultValue();
             }
         }
 
         return realm;
     }
-
-    /**
-     * Get whether preatuh is required.
-     * @return true if preauth required
-     */
-    public boolean isPreauthRequired() {
-        return getBoolean(AdminConfigKey.PREAUTH_REQUIRED, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get tgs principal.
-     * @return The tgs principal
-     */
-    public String getTgsPrincipal() {
-        return getString(AdminConfigKey.TGS_PRINCIPAL, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get allowable clock skew.
-     * @return The allowable clock skew
-     */
-    public long getAllowableClockSkew() {
-        return getLong(AdminConfigKey.CLOCKSKEW, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get whether empty addresses allowed.
-     * @return true if empty address is allowed
-     */
-    public boolean isEmptyAddressesAllowed() {
-        return getBoolean(AdminConfigKey.EMPTY_ADDRESSES_ALLOWED, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get whether forward is allowed.
-     * @return true if forward is allowed
-     */
-    public boolean isForwardableAllowed() {
-        return getBoolean(AdminConfigKey.FORWARDABLE, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get whether post dated is allowed.
-     * @return true if post dated is allowed
-     */
-    public boolean isPostdatedAllowed() {
-        return getBoolean(AdminConfigKey.POSTDATED_ALLOWED, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get whether proxy is allowed.
-     * @return true if proxy is allowed
-     */
-    public boolean isProxiableAllowed() {
-        return getBoolean(AdminConfigKey.PROXIABLE, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get whether renew is allowed.
-     * @return true if renew is allowed
-     */
-    public boolean isRenewableAllowed() {
-        return getBoolean(AdminConfigKey.RENEWABLE_ALLOWED, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get maximum renewable life time.
-     * @return The maximum renewable life time
-     */
-    public long getMaximumRenewableLifetime() {
-        return getLong(AdminConfigKey.MAXIMUM_RENEWABLE_LIFETIME, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get maximum ticket life time.
-     * @return The maximum ticket life time
-     */
-    public long getMaximumTicketLifetime() {
-        return getLong(AdminConfigKey.MAXIMUM_TICKET_LIFETIME, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get minimum ticket life time.
-     * @return The minimum ticket life time
-     */
-    public long getMinimumTicketLifetime() {
-        return getLong(AdminConfigKey.MINIMUM_TICKET_LIFETIME, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get encryption types.
-     * @return encryption type list
-     */
-    public List<EncryptionType> getEncryptionTypes() {
-        return getEncTypes(AdminConfigKey.PERMITTED_ENCTYPES, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get whether pa encrypt timestamp required.
-     * @return true if pa encrypt time required
-     */
-    public boolean isPaEncTimestampRequired() {
-        return getBoolean(AdminConfigKey.PA_ENC_TIMESTAMP_REQUIRED, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get whether body checksum verified.
-     * @return true if body checksum verified
-     */
-    public boolean isBodyChecksumVerified() {
-        return getBoolean(AdminConfigKey.VERIFY_BODY_CHECKSUM, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get default realm.
-     * @return The default realm
-     */
-    public String getDefaultRealm() {
-        return getString(AdminConfigKey.DEFAULT_REALM, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get whether dns look up kdc.
-     * @return true if dnc look up kdc
-     */
-    public boolean getDnsLookUpKdc() {
-        return getBoolean(AdminConfigKey.DNS_LOOKUP_KDC, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get whether dns look up realm.
-     * @return true if dns look up realm
-     */
-    public boolean getDnsLookUpRealm() {
-        return getBoolean(AdminConfigKey.DNS_LOOKUP_REALM, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get whether allow weak crypto.
-     * @return true if allow weak crypto
-     */
-    public boolean getAllowWeakCrypto() {
-        return getBoolean(AdminConfigKey.ALLOW_WEAK_CRYPTO, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get ticket life time.
-     * @return The ticket life time
-     */
-    public long getTicketLifetime() {
-        return getLong(AdminConfigKey.TICKET_LIFETIME, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get renew life time.
-     * @return The renew life time
-     */
-    public long getRenewLifetime() {
-        return getLong(AdminConfigKey.RENEW_LIFETIME, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get default tgs encryption types.
-     * @return The tgs encryption type list
-     */
-    public List<EncryptionType> getDefaultTgsEnctypes() {
-        return getEncTypes(AdminConfigKey.DEFAULT_TGS_ENCTYPES, true, LIBDEFAULT);
-    }
-
-    /**
-     * Get default ticket encryption types.
-     * @return The encryption type list
-     */
-    public List<EncryptionType> getDefaultTktEnctypes() {
-        return getEncTypes(AdminConfigKey.DEFAULT_TKT_ENCTYPES, true, LIBDEFAULT);
-    }
-
-    public List<String> getPkinitAnchors() {
-        return Arrays.asList(getStringArray(
-                AdminConfigKey.PKINIT_ANCHORS, true, LIBDEFAULT));
-    }
-
-    public List<String> getPkinitIdentities() {
-        return Arrays.asList(getStringArray(
-                AdminConfigKey.PKINIT_IDENTITIES, true, LIBDEFAULT));
-    }
-
-    public String getPkinitKdcHostName() {
-        return getString(
-                AdminConfigKey.PKINIT_KDC_HOSTNAME, true, LIBDEFAULT);
-    }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminConfigKey.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminConfigKey.java b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminConfigKey.java
index 4859de9..d8e89b2 100644
--- a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminConfigKey.java
+++ b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminConfigKey.java
@@ -23,44 +23,15 @@ import org.apache.kerby.config.ConfigKey;
 
 public enum AdminConfigKey implements ConfigKey {
     KRB_DEBUG(true),
-    KDC_HOST("localhost"),
-    KDC_PORT(null),
-    KDC_ALLOW_UDP(false),
-    KDC_ALLOW_TCP(false),
-    KDC_UDP_PORT(null),
-    KDC_TCP_PORT(null),
-    KDC_DOMAIN("example.com"),
-    KDC_REALM("EXAMPLE.COM"),
-    TGS_PRINCIPAL("krbtgt@EXAMPLE.COM"),
-    PREAUTH_REQUIRED(true),
-    CLOCKSKEW(5 * 60L),
-    EMPTY_ADDRESSES_ALLOWED(true),
-    PA_ENC_TIMESTAMP_REQUIRED(true),
-    MAXIMUM_TICKET_LIFETIME(24 * 3600L),
-    MINIMUM_TICKET_LIFETIME(1 * 3600L),
-    MAXIMUM_RENEWABLE_LIFETIME(48 * 3600L),
-    FORWARDABLE(true),
-    POSTDATED_ALLOWED(true),
-    PROXIABLE(true),
-    RENEWABLE_ALLOWED(true),
-    VERIFY_BODY_CHECKSUM(true),
-    PERMITTED_ENCTYPES("aes128-cts-hmac-sha1-96"),
+    ADMIN_HOST("localhost"),
+    ADMIN_PORT(null),
+    ADMIN_ALLOW_UDP(false),
+    ADMIN_ALLOW_TCP(false),
+    ADMIN_UDP_PORT(null),
+    ADMIN_TCP_PORT(null),
+    ADMIN_DOMAIN("example.com"),
     DEFAULT_REALM(null),
-    DNS_LOOKUP_KDC(false),
-    DNS_LOOKUP_REALM(false),
-    ALLOW_WEAK_CRYPTO(true),
-    TICKET_LIFETIME(24 * 3600L),
-    RENEW_LIFETIME(48 * 3600L),
-    DEFAULT_TGS_ENCTYPES("aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 "
-            + "des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac "
-            + "camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4"),
-    DEFAULT_TKT_ENCTYPES("aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 "
-            + "des3-cbc-sha1 arcfour-hmac-md5 camellia256-cts-cmac "
-            + "camellia128-cts-cmac des-cbc-crc des-cbc-md5 des-cbc-md4"),
-
-    PKINIT_ANCHORS(null),
-    PKINIT_IDENTITIES(null),
-    PKINIT_KDC_HOSTNAME();
+    ADMIN_REALM("EXAMPLE.COM");
 
     private Object defaultValue;
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminOption.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminOption.java b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminOption.java
index cae6973..961c303 100644
--- a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminOption.java
+++ b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminOption.java
@@ -29,17 +29,17 @@ import org.apache.kerby.KOptionType;
 public enum AdminOption implements KOption {
     NONE(null),
 
-    KDC_REALM(new KOptionInfo("kdc-realm", "kdc realm",
+    ADMIN_REALM(new KOptionInfo("admin-realm", "kdc realm",
         KOptionType.STR)),
-    KDC_HOST(new KOptionInfo("kdc-host", "kdc host",
+    ADMIN_HOST(new KOptionInfo("admin-host", "kdc host",
         KOptionType.STR)),
-    KDC_TCP_PORT(new KOptionInfo("kdc-tcp-port", "kdc tcp port",
+    ADMIN_TCP_PORT(new KOptionInfo("admin-tcp-port", "kdc tcp port",
         KOptionType.INT)),
     ALLOW_UDP(new KOptionInfo("allow-udp", "allow udp",
         KOptionType.BOOL)),
     ALLOW_TCP(new KOptionInfo("allow-tcp", "allow tcp",
         KOptionType.BOOL)),
-    KDC_UDP_PORT(new KOptionInfo("kdc-udp-port", "kdc udp port",
+    ADMIN_UDP_PORT(new KOptionInfo("admin-udp-port", "kdc udp port",
         KOptionType.INT)),
     CONN_TIMEOUT(new KOptionInfo("conn-timeout", "connection timeout",
         KOptionType.INT)),

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/18248bae/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminSetting.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminSetting.java b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminSetting.java
index 19b25c8..f6e353c 100644
--- a/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminSetting.java
+++ b/kerby-kerb/kerb-admin/src/main/java/org/apache/kerby/kerberos/kerb/admin/remote/AdminSetting.java
@@ -23,7 +23,7 @@ import org.apache.kerby.KOptions;
 import org.apache.kerby.kerberos.kerb.KrbException;
 
 /**
- * Krb client setting that combines common options and client config.
+ * Admin client setting that combines common options and client config.
  */
 public class AdminSetting {
     private final KOptions commonOptions;
@@ -44,17 +44,17 @@ public class AdminSetting {
     }
 
     public String getKdcRealm() {
-        String kdcRealm = commonOptions.getStringOption(AdminOption.KDC_REALM);
+        String kdcRealm = commonOptions.getStringOption(AdminOption.ADMIN_REALM);
         if (kdcRealm == null || kdcRealm.isEmpty()) {
-            kdcRealm = adminConfig.getKdcRealm();
+            kdcRealm = adminConfig.getAdminRealm();
         }
         return kdcRealm;
     }
 
     public String getKdcHost() {
-        String kdcHost = commonOptions.getStringOption(AdminOption.KDC_HOST);
+        String kdcHost = commonOptions.getStringOption(AdminOption.ADMIN_HOST);
         if (kdcHost == null) {
-            return adminConfig.getKdcHost();
+            return adminConfig.getAdminHost();
         }
         return kdcHost;
     }
@@ -92,11 +92,11 @@ public class AdminSetting {
     }
 
     public int getKdcTcpPort() {
-        int tcpPort = commonOptions.getIntegerOption(AdminOption.KDC_TCP_PORT);
+        int tcpPort = commonOptions.getIntegerOption(AdminOption.ADMIN_TCP_PORT);
         if (tcpPort > 0) {
             return tcpPort;
         }
-        return adminConfig.getKdcTcpPort();
+        return adminConfig.getAdminTcpPort();
     }
 
     public boolean allowUdp() {
@@ -112,11 +112,11 @@ public class AdminSetting {
     }
 
     public int getKdcUdpPort() {
-        int udpPort = commonOptions.getIntegerOption(AdminOption.KDC_UDP_PORT);
+        int udpPort = commonOptions.getIntegerOption(AdminOption.ADMIN_UDP_PORT);
         if (udpPort > 0) {
             return udpPort;
         }
-        return adminConfig.getKdcUdpPort();
+        return adminConfig.getAdminUdpPort();
     }
 
     public int getTimeout() {


Mime
View raw message