directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 56888 - in incubator/directory/kerberos/trunk/eve-kerberos: etc src/java/org/apache/kerberos/kdc src/test/org/apache/kerberos/kdc
Date Mon, 08 Nov 2004 01:13:41 GMT
Author: akarasulu
Date: Sun Nov  7 17:13:41 2004
New Revision: 56888

Modified:
   incubator/directory/kerberos/trunk/eve-kerberos/etc/kerberos.properties
   incubator/directory/kerberos/trunk/eve-kerberos/src/java/org/apache/kerberos/kdc/EmbeddedEveStore.java
   incubator/directory/kerberos/trunk/eve-kerberos/src/test/org/apache/kerberos/kdc/EmbeddedEveStoreTest.java
Log:
temp comment this out

Modified: incubator/directory/kerberos/trunk/eve-kerberos/etc/kerberos.properties
==============================================================================
--- incubator/directory/kerberos/trunk/eve-kerberos/etc/kerberos.properties	(original)
+++ incubator/directory/kerberos/trunk/eve-kerberos/etc/kerberos.properties	Sun Nov  7 17:13:41
2004
@@ -46,7 +46,7 @@
 # The working directory where Eve stores it's partition database files
 eve.wkdir                                 = ./target/eve
 # The published LDAP schema's to initialize: all listed are required for example.com
-eve.schemas                               = system,core,cosine,inetorgperson,krb5kdc
+# eve.schemas                               = system,core,cosine,inetorgperson,krb5kdc
 # Comma separated name of the partitions to attach/create
 eve.db.partitions                         = example
 

Modified: incubator/directory/kerberos/trunk/eve-kerberos/src/java/org/apache/kerberos/kdc/EmbeddedEveStore.java
==============================================================================
--- incubator/directory/kerberos/trunk/eve-kerberos/src/java/org/apache/kerberos/kdc/EmbeddedEveStore.java
(original)
+++ incubator/directory/kerberos/trunk/eve-kerberos/src/java/org/apache/kerberos/kdc/EmbeddedEveStore.java
Sun Nov  7 17:13:41 2004
@@ -19,7 +19,6 @@
 
 import java.util.Hashtable;
 import java.io.FileInputStream;
-import java.io.File;
 import javax.security.auth.kerberos.KerberosPrincipal;
 import javax.security.auth.kerberos.KerberosKey;
 import javax.naming.*;

Modified: incubator/directory/kerberos/trunk/eve-kerberos/src/test/org/apache/kerberos/kdc/EmbeddedEveStoreTest.java
==============================================================================
--- incubator/directory/kerberos/trunk/eve-kerberos/src/test/org/apache/kerberos/kdc/EmbeddedEveStoreTest.java
(original)
+++ incubator/directory/kerberos/trunk/eve-kerberos/src/test/org/apache/kerberos/kdc/EmbeddedEveStoreTest.java
Sun Nov  7 17:13:41 2004
@@ -18,6 +18,7 @@
 
 
 import java.util.Hashtable;
+import java.util.Properties;
 import java.io.File;
 
 import javax.naming.Context;
@@ -27,6 +28,7 @@
 import junit.framework.TestCase;
 import org.apache.eve.jndi.EveContextFactory;
 import org.apache.kerberos.kdc.store.PrincipalStoreEntry;
+import org.apache.ldap.common.util.PropertiesUtils;
 
 
 /**
@@ -37,6 +39,25 @@
  */
 public class EmbeddedEveStoreTest extends TestCase
 {
+//    public void testLoadFromEtc() throws Exception
+//    {
+//        Properties env = PropertiesUtils.getProperties( new File( "./etc/kerberos.properties"
) );
+//        EmbeddedEveStore store = new EmbeddedEveStore( env );
+//        store.init();
+//
+//        assertNull( store.getEntry( null ) );
+//
+//        KerberosPrincipal akarasulu = new KerberosPrincipal( "akarasulu@EXAMPLE.COM" );
+//        assertNotNull( store.getEntry( akarasulu ) );
+//
+//        KerberosPrincipal erodriguez = new KerberosPrincipal( "erodriguez@EXAMPLE.COM"
);
+//        assertNotNull( store.getEntry( erodriguez ) );
+//
+//        KerberosPrincipal nonexistent = new KerberosPrincipal( "nonexistent@EXAMPLE.COM"
);
+//        assertNull( store.getEntry( nonexistent ) );
+//    }
+
+
     public void testEveStore() throws Exception
     {
         Hashtable env = new Hashtable();
@@ -59,16 +80,22 @@
         env.put( EveContextFactory.INDICES_BASE_ENV + "example", "ou objectClass" );
         env.put( EveContextFactory.ATTRIBUTES_BASE_ENV + "example", attrs );
 
-        env.put( EmbeddedEveStore.KDC_ENTRY_LDIF_FILE,
-                "/home/akarasulu/projects/directory/kerberos/trunk/eve-kerberos/src/ldif/example.com"
);
-        env.put( EmbeddedEveStore.KDC_ENTRY_BASEDN_KEY, "ou=People,dc=example,dc=com" );
+        env.put( EmbeddedEveStore.KDC_ENTRY_LDIF_FILE, "./src/ldif/example.com" );
+        env.put( EmbeddedEveStore.KDC_ENTRY_BASEDN_KEY, "ou=Users,dc=example,dc=com" );
 
         EmbeddedEveStore store = new EmbeddedEveStore( env );
         store.init();
         assertNull( store.getEntry( null ) );
-        
-        KerberosPrincipal scarter = new KerberosPrincipal( "scarter@EXAMPLE.COM" );
-        assertNotNull( store.getEntry( scarter ) );
+
+        KerberosPrincipal akarasulu = new KerberosPrincipal( "akarasulu@EXAMPLE.COM" );
+        assertNotNull( store.getEntry( akarasulu ) );
+
+        KerberosPrincipal erodriguez = new KerberosPrincipal( "erodriguez@EXAMPLE.COM" );
+        assertNotNull( store.getEntry( erodriguez ) );
+
+        KerberosPrincipal nonexistent = new KerberosPrincipal( "nonexistent@EXAMPLE.COM"
);
+        assertNull( store.getEntry( nonexistent ) );
+
     }
 
 
@@ -94,8 +121,13 @@
         env.put( EveContextFactory.INDICES_BASE_ENV + "example", "ou objectClass" );
         env.put( EveContextFactory.ATTRIBUTES_BASE_ENV + "example", attrs );
 
+        env.put( EmbeddedEveStore.KDC_ENTRY_LDIF_FILE,  "./src/ldif/example.com" );
+        env.put( EmbeddedEveStore.KDC_ENTRY_BASEDN_KEY, "ou=Users,dc=example,dc=com" );
+
         EmbeddedEveStore store = new EmbeddedEveStore( env );
+        store.init();
         KerberosPrincipal principal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM"
);
         PrincipalStoreEntry entry = store.getEntry( principal );
+        assertNull( entry );
     }
 }

Mime
View raw message