directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject [3/3] directory-kerby git commit: DIRKRB-343 Clean up some configuration items unlikely to be used
Date Mon, 06 Jul 2015 07:15:57 GMT
DIRKRB-343 Clean up some configuration items unlikely to be used


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

Branch: refs/heads/master
Commit: a5efcfba6b6e0a75465ce21fb4528da8fc74a2de
Parents: 826761a
Author: drankye <kai.zheng@intel.com>
Authored: Mon Jul 6 15:15:26 2015 +0800
Committer: Drankye <drankye@gmail.com>
Committed: Mon Jul 6 15:15:26 2015 +0800

----------------------------------------------------------------------
 .../kerby/kerberos/kerb/client/KrbConfig.java       | 14 --------------
 .../kerby/kerberos/kerb/client/KrbConfigKey.java    |  7 +------
 .../kerberos/kerb/client/TestKrbConfigLoad.java     | 12 +++---------
 .../kerby/kerberos/kerb/server/KdcConfig.java       | 16 ++--------------
 .../kerby/kerberos/kerb/server/KdcConfigKey.java    |  8 +-------
 .../kerberos/kerb/server/TestKdcConfigLoad.java     | 12 ------------
 6 files changed, 7 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a5efcfba/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfig.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfig.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfig.java
index 4bbfdfa..00669d2 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfig.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfig.java
@@ -184,18 +184,4 @@ public class KrbConfig extends Conf {
     public List<EncryptionType> getDefaultTktEnctypes() {
         return KrbConfHelper.getEncTypesUnderSection(this, KrbConfigKey.DEFAULT_TKT_ENCTYPES);
     }
-
-    public String getDefaultLoggingLocation() {
-        return KrbConfHelper.getStringUnderSection(this, KrbConfigKey.DEFAULT);
-    }
-
-    public String getKdcLoggingLocation() {
-        return KrbConfHelper.getStringUnderSection(this, KrbConfigKey.KDC);
-    }
-
-    public String getAdminLoggingLocation() {
-        return KrbConfHelper.getStringUnderSection(this, KrbConfigKey.ADMIN_SERVER);
-    }
-
-
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a5efcfba/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfigKey.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfigKey.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfigKey.java
index 00c5afa..938beab 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfigKey.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbConfigKey.java
@@ -58,12 +58,7 @@ public enum KrbConfigKey implements SectionConfigKey {
     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",
-        "libdefaults"),
-
-    //key for logging location
-    DEFAULT(null, "logging"),
-    KDC(null, "logging"),
-    ADMIN_SERVER(null, "logging");
+        "libdefaults");
 
     private Object defaultValue;
     /**

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a5efcfba/kerby-kerb/kerb-client/src/test/java/org/apache/kerby/kerberos/kerb/client/TestKrbConfigLoad.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/test/java/org/apache/kerby/kerberos/kerb/client/TestKrbConfigLoad.java
b/kerby-kerb/kerb-client/src/test/java/org/apache/kerby/kerberos/kerb/client/TestKrbConfigLoad.java
index dedf70d..46c28ad 100644
--- a/kerby-kerb/kerb-client/src/test/java/org/apache/kerby/kerberos/kerb/client/TestKrbConfigLoad.java
+++ b/kerby-kerb/kerb-client/src/test/java/org/apache/kerby/kerberos/kerb/client/TestKrbConfigLoad.java
@@ -23,8 +23,6 @@ import org.apache.kerby.kerberos.kerb.spec.base.EncryptionType;
 import org.junit.Test;
 
 import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
 import java.net.URL;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -36,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 public class TestKrbConfigLoad {
 
     @Test
-    public void test() throws IOException, URISyntaxException {
+    public void test() throws Exception {
         URL confFileUrl = TestKrbConfigLoad.class.getResource("/krb5.conf");
         File confFile = new File(confFileUrl.toURI());
 
@@ -52,17 +50,13 @@ public class TestKrbConfigLoad {
         assertThat(krbConfig.getRenewLifetime()).isEqualTo(7 * 24 * 3600);
         assertThat(krbConfig.isForwardableAllowed()).isTrue();
         assertThat(krbConfig.getEncryptionTypes()).hasSize(2)
-                .contains(EncryptionType.DES_CBC_CRC, EncryptionType.AES128_CTS_HMAC_SHA1_96);
+                .contains(EncryptionType.DES_CBC_CRC,
+                        EncryptionType.AES128_CTS_HMAC_SHA1_96);
         assertThat(krbConfig.getAllowableClockSkew()).isEqualTo(300);
         assertThat(krbConfig.isProxiableAllowed()).isTrue();
         assertThat(krbConfig.getDefaultTgsEnctypes()).hasSize(1)
                 .contains(EncryptionType.DES_CBC_CRC);
         assertThat(krbConfig.getDefaultTktEnctypes()).hasSize(1)
                 .contains(EncryptionType.DES_CBC_CRC);
-
-        assertThat(krbConfig.getDefaultLoggingLocation()).isEqualTo("FILE:/var/log/krb5libs.log");
-        assertThat(krbConfig.getKdcLoggingLocation()).isEqualTo("FILE:/var/log/krb5kdc.log");
-        assertThat(krbConfig.getAdminLoggingLocation()).isEqualTo("FILE:/var/log/kadmind.log");
-
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a5efcfba/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcConfig.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcConfig.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcConfig.java
index d8747cc..5d6e4ee 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcConfig.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcConfig.java
@@ -86,7 +86,8 @@ public class KdcConfig extends Conf {
     }
 
     public String getKdcRealm() {
-        return KrbConfHelper.getStringUnderSection(this, KdcConfigKey.KDC_REALM);
+        return KrbConfHelper.getStringUnderSection(this,
+                KdcConfigKey.KDC_REALM);
     }
 
     public String getKdcDomain() {
@@ -150,19 +151,6 @@ public class KdcConfig extends Conf {
         return getBoolean(KdcConfigKey.VERIFY_BODY_CHECKSUM);
     }
 
-    public String getDefaultLoggingLocation() {
-        return KrbConfHelper.getStringUnderSection(this, KdcConfigKey.DEFAULT);
-    }
-
-    public String getKdcLoggingLocation() {
-        return KrbConfHelper.getStringUnderSection(this, KdcConfigKey.KDC);
-    }
-
-    public String getAdminLoggingLocation() {
-        return KrbConfHelper.getStringUnderSection(this,
-                KdcConfigKey.ADMIN_SERVER);
-    }
-
     public boolean isRestrictAnonymousToTgt() {
         return KrbConfHelper.getBooleanUnderSection(this,
                 KdcConfigKey.RESTRICT_ANONYMOUS_TO_TGT);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a5efcfba/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcConfigKey.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcConfigKey.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcConfigKey.java
index b071bd6..9d27304 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcConfigKey.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcConfigKey.java
@@ -52,13 +52,7 @@ public enum KdcConfigKey implements SectionConfigKey {
             new String[] { "aes128-cts-hmac-sha1-96", "des3-cbc-sha1-kd"}
     ),
     RESTRICT_ANONYMOUS_TO_TGT(false, "kdcdefaults"),
-    KDC_MAX_DGRAM_REPLY_SIZE(4096, "kdcdefaults"),
-
-    //logging location
-    //TODO: the default log location need to be determined.
-    DEFAULT(null, "logging"),
-    KDC(null, "logging"),
-    ADMIN_SERVER(null, "logging");
+    KDC_MAX_DGRAM_REPLY_SIZE(4096, "kdcdefaults");
 
     private Object defaultValue;
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a5efcfba/kerby-kerb/kerb-server/src/test/java/org/apache/kerby/kerberos/kerb/server/TestKdcConfigLoad.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/test/java/org/apache/kerby/kerberos/kerb/server/TestKdcConfigLoad.java
b/kerby-kerb/kerb-server/src/test/java/org/apache/kerby/kerberos/kerb/server/TestKdcConfigLoad.java
index 29840bf..402e256 100644
--- a/kerby-kerb/kerb-server/src/test/java/org/apache/kerby/kerberos/kerb/server/TestKdcConfigLoad.java
+++ b/kerby-kerb/kerb-server/src/test/java/org/apache/kerby/kerberos/kerb/server/TestKdcConfigLoad.java
@@ -38,24 +38,12 @@ public class TestKdcConfigLoad {
         KdcConfig kdcConfig = new KdcConfig();
         kdcConfig.addIniConfig(confFile);
 
-        assertThat(kdcConfig.getDefaultLoggingLocation()).isEqualTo("FILE:/var/log/krb5libs.log");
-        assertThat(kdcConfig.getKdcLoggingLocation()).isEqualTo("FILE:/var/log/krb5kdc.log");
-        assertThat(kdcConfig.getAdminLoggingLocation()).isEqualTo("FILE:/var/log/kadmind.log");
-
         assertThat(kdcConfig.getKdcHost()).isEqualTo("localhost");
         assertThat(kdcConfig.getKdcUdpPort()).isEqualTo(88);
         assertThat(kdcConfig.getKdcTcpPort()).isEqualTo(8014);
         assertThat(kdcConfig.getKdcRealm()).isEqualTo("TEST.COM");
         assertThat(kdcConfig.isRestrictAnonymousToTgt()).isTrue();
         assertThat(kdcConfig.getKdcMaxDgramReplySize()).isEqualTo(4096);
-
-        /* will be moved to LdapLdentityBackend module
-        String[] ldapContainerDn = krbConfig.getLdapKerberosContainerDn();
-        assertThat(ldapContainerDn.length).isEqualTo(3);
-        assertThat(ldapContainerDn[0]).isEqualTo("cn=krbcontainer");
-        assertThat(ldapContainerDn[1]).isEqualTo("dc=mit");
-        assertThat(ldapContainerDn[2]).isEqualTo("dc=edu");
-        */
     }
 
     @Test


Mime
View raw message