directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r151507 - in incubator/directory/kerberos/trunk: core/src/java/org/apache/kerberos/kdc/ main/ main/src/java/org/apache/kerberos/ protocol/src/java/org/apache/kerberos/protocol/
Date Sat, 05 Feb 2005 16:27:35 GMT
Author: erodriguez
Date: Sat Feb  5 08:27:32 2005
New Revision: 151507

URL: http://svn.apache.org/viewcvs?view=rev&rev=151507
Log:
Removed the bootstrap store.  No longer needed with the ApacheDS backing store.

Modified:
    incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/AuthenticationService.java
    incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/KerberosService.java
    incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/TicketGrantingService.java
    incubator/directory/kerberos/trunk/main/kerberos.ldif
    incubator/directory/kerberos/trunk/main/src/java/org/apache/kerberos/Main.java
    incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/protocol/KerberosProtocolHandler.java
    incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/protocol/KerberosProtocolProvider.java

Modified: incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/AuthenticationService.java
URL: http://svn.apache.org/viewcvs/incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/AuthenticationService.java?view=diff&r1=151506&r2=151507
==============================================================================
--- incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/AuthenticationService.java
(original)
+++ incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/AuthenticationService.java
Sat Feb  5 08:27:32 2005
@@ -60,9 +60,9 @@
         SamSubsystem.setIntegrityChecker( new TimestampChecker() );
     }
     
-	public AuthenticationService( KdcConfiguration config, PrincipalStore bootstrap, PrincipalStore
store )
+	public AuthenticationService( KdcConfiguration config, PrincipalStore store )
     {
-        super( config, bootstrap, store );
+        super( config, store );
 
         SamSubsystem.setEnvironment( config.getProperties() );
 	}

Modified: incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/KerberosService.java
URL: http://svn.apache.org/viewcvs/incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/KerberosService.java?view=diff&r1=151506&r2=151507
==============================================================================
--- incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/KerberosService.java
(original)
+++ incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/KerberosService.java
Sat Feb  5 08:27:32 2005
@@ -36,7 +36,6 @@
 import org.apache.kerberos.kdc.replay.InMemoryReplayCache;
 import org.apache.kerberos.kdc.replay.ReplayCache;
 import org.apache.kerberos.kdc.store.PrincipalStore;
-import org.apache.kerberos.kdc.store.PrincipalStoreEntry;
 import org.apache.kerberos.messages.ApplicationRequest;
 import org.apache.kerberos.messages.MessageType;
 import org.apache.kerberos.messages.components.Authenticator;
@@ -52,40 +51,30 @@
 public class KerberosService
 {
     protected KdcConfiguration config;
-    protected PrincipalStore   bootstrap;
     protected PrincipalStore   store;
 
     private ReplayCache replayCache = new InMemoryReplayCache();
 
     private Map checksumEngines = new HashMap();
 
-    public KerberosService( KdcConfiguration config, PrincipalStore bootstrap, PrincipalStore
store )
+    public KerberosService( KdcConfiguration config, PrincipalStore store )
     {
-        this.config    = config;
-        this.bootstrap = bootstrap;
-        this.store     = store;
-
+        this.config = config;
+        this.store  = store;
+        
         checksumEngines.put( ChecksumType.CRC32,   new Crc32Checksum() );
         checksumEngines.put( ChecksumType.RSA_MD4, new RsaMd4Checksum() );
         checksumEngines.put( ChecksumType.RSA_MD5, new RsaMd5Checksum() );
         checksumEngines.put( ChecksumType.SHA1,    new Sha1Checksum() );
     }
-
+    
     public EncryptionKey getKeyForPrincipal( KerberosPrincipal principal )
     {
 		EncryptionKey key = null;
 
 		try
 		{
-			PrincipalStoreEntry entry = bootstrap.getEntry( principal );
-			if ( entry != null )
-			{
-				key = entry.getEncryptionKey();
-			}
-			else
-			{
-				key = store.getEntry( principal ).getEncryptionKey();
-			}
+			key = store.getEntry( principal ).getEncryptionKey();
 		}
 		catch (Exception e)
 		{

Modified: incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/TicketGrantingService.java
URL: http://svn.apache.org/viewcvs/incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/TicketGrantingService.java?view=diff&r1=151506&r2=151507
==============================================================================
--- incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/TicketGrantingService.java
(original)
+++ incubator/directory/kerberos/trunk/core/src/java/org/apache/kerberos/kdc/TicketGrantingService.java
Sat Feb  5 08:27:32 2005
@@ -58,13 +58,9 @@
  */
 public class TicketGrantingService extends KerberosService
 {
-	private KdcConfiguration config;
-
-	public TicketGrantingService( KdcConfiguration config, PrincipalStore bootstrap, PrincipalStore
store )
+	public TicketGrantingService( KdcConfiguration config, PrincipalStore store )
     {
-        super( config, bootstrap, store );
-
-		this.config = config;
+        super( config, store );
 	}
 	
 	public TicketGrantReply getReplyFor(KdcRequest request) throws KerberosException, IOException

Modified: incubator/directory/kerberos/trunk/main/kerberos.ldif
URL: http://svn.apache.org/viewcvs/incubator/directory/kerberos/trunk/main/kerberos.ldif?view=diff&r1=151506&r2=151507
==============================================================================
--- incubator/directory/kerberos/trunk/main/kerberos.ldif (original)
+++ incubator/directory/kerberos/trunk/main/kerberos.ldif Sat Feb  5 08:27:32 2005
@@ -67,3 +67,26 @@
 facsimiletelephonenumber: +1 408 555 8473
 roomnumber: 667
 userpassword: kerby
+
+dn: uid=krbtgt, ou=Users, dc=example,dc=com
+cn: Kerberos Server
+sn: Server
+givenname: Kerberos
+objectclass: top
+objectclass: person
+objectclass: organizationalPerson
+objectclass: inetOrgPerson
+objectclass: krb5Principal
+objectclass: krb5KDCEntry
+ou: Directory
+ou: Users
+l: Boston
+uid: krbtgt
+krb5PrincipalName: krbtgt/EXAMPLE.COM@EXAMPLE.COM
+krb5KeyVersionNumber: 0
+mail: erodriguez@example.com
+telephonenumber: +1 408 555 9187
+facsimiletelephonenumber: +1 408 555 8473
+roomnumber: 667
+userpassword: kahuna
+

Modified: incubator/directory/kerberos/trunk/main/src/java/org/apache/kerberos/Main.java
URL: http://svn.apache.org/viewcvs/incubator/directory/kerberos/trunk/main/src/java/org/apache/kerberos/Main.java?view=diff&r1=151506&r2=151507
==============================================================================
--- incubator/directory/kerberos/trunk/main/src/java/org/apache/kerberos/Main.java (original)
+++ incubator/directory/kerberos/trunk/main/src/java/org/apache/kerberos/Main.java Sat Feb
 5 08:27:32 2005
@@ -27,7 +27,6 @@
 import javax.naming.directory.InitialDirContext;
 
 import org.apache.kerberos.kdc.KdcConfiguration;
-import org.apache.kerberos.kdc.store.BootstrapStore;
 import org.apache.kerberos.kdc.store.EmbeddedEveStore;
 import org.apache.kerberos.kdc.store.PrincipalStore;
 import org.apache.kerberos.protocol.KerberosProtocolProvider;
@@ -41,9 +40,8 @@
 
 public class Main
 {
-    private final KdcConfiguration config = new KdcConfiguration();
-    private final BootstrapStore bootstrap = new BootstrapStore( config );
-    private PrincipalStore store;
+    private KdcConfiguration config;
+    private PrincipalStore   store;
     
     public static void main( String[] args )
     {
@@ -84,10 +82,10 @@
             System.exit( 3 );
         }
         
+        config = new KdcConfiguration( env );
         store = new EmbeddedEveStore( env );
-
-        init();
-
+        store.init();
+        
         try
         {
             setup();
@@ -152,7 +150,7 @@
         acceptor.addFilter( Integer.MAX_VALUE, protocolThreadPoolFilter );
 
         // Bind
-        acceptor.bind( new InetSocketAddress( port ), new KerberosProtocolProvider( bootstrap,
store, config ) );
+        acceptor.bind( new InetSocketAddress( port ), new KerberosProtocolProvider( config,
store ) );
         
         // Create a UDP/IP acceptor
         IoProtocolAcceptor datagramAcceptor = new IoProtocolAcceptor( new DatagramAcceptor()
);
@@ -162,23 +160,9 @@
         datagramAcceptor.addFilter( Integer.MAX_VALUE, protocolThreadPoolFilter );
         
         // Bind
-        datagramAcceptor.bind( new InetSocketAddress( port ), new KerberosProtocolProvider(
bootstrap, store, config ) );
+        datagramAcceptor.bind( new InetSocketAddress( port ), new KerberosProtocolProvider(
config, store ) );
 
         System.out.println( "Apache Kerberos listening on port " + port );
-    }
-    
-    private void init()
-    {
-        Runnable runnable = new Runnable()
-        {
-            public void run()
-            {
-                bootstrap.init();
-                store.init();
-            }
-        };
-        Thread storeInit = new Thread( runnable );
-        storeInit.start();
     }
 }
 

Modified: incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/protocol/KerberosProtocolHandler.java
URL: http://svn.apache.org/viewcvs/incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/protocol/KerberosProtocolHandler.java?view=diff&r1=151506&r2=151507
==============================================================================
--- incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/protocol/KerberosProtocolHandler.java
(original)
+++ incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/protocol/KerberosProtocolHandler.java
Sat Feb  5 08:27:32 2005
@@ -24,7 +24,6 @@
 import org.apache.kerberos.kdc.KdcConfiguration;
 import org.apache.kerberos.kdc.KerberosException;
 import org.apache.kerberos.kdc.TicketGrantingService;
-import org.apache.kerberos.kdc.store.BootstrapStore;
 import org.apache.kerberos.kdc.store.PrincipalStore;
 import org.apache.kerberos.messages.AuthenticationReply;
 import org.apache.kerberos.messages.ErrorMessage;
@@ -41,11 +40,11 @@
 	private TicketGrantingService tgsService;
 	private ErrorService          errorService;
 	
-	public KerberosProtocolHandler( BootstrapStore bootstrap, PrincipalStore store, KdcConfiguration
config )
+	public KerberosProtocolHandler( KdcConfiguration config, PrincipalStore store )
     {
 		errorService = new ErrorService( config );
-		authService  = new AuthenticationService( config, bootstrap, store );
-		tgsService   = new TicketGrantingService( config, bootstrap, store );
+		authService  = new AuthenticationService( config, store );
+		tgsService   = new TicketGrantingService( config, store );
 	}
 
     public void sessionOpened( ProtocolSession session )

Modified: incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/protocol/KerberosProtocolProvider.java
URL: http://svn.apache.org/viewcvs/incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/protocol/KerberosProtocolProvider.java?view=diff&r1=151506&r2=151507
==============================================================================
--- incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/protocol/KerberosProtocolProvider.java
(original)
+++ incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/protocol/KerberosProtocolProvider.java
Sat Feb  5 08:27:32 2005
@@ -18,7 +18,6 @@
 package org.apache.kerberos.protocol;
 
 import org.apache.kerberos.kdc.KdcConfiguration;
-import org.apache.kerberos.kdc.store.BootstrapStore;
 import org.apache.kerberos.kdc.store.PrincipalStore;
 import org.apache.mina.protocol.ProtocolCodecFactory;
 import org.apache.mina.protocol.ProtocolDecoder;
@@ -48,9 +47,9 @@
         }
     };
 
-	public KerberosProtocolProvider( BootstrapStore store, PrincipalStore bootstrap, KdcConfiguration
config )
+	public KerberosProtocolProvider( KdcConfiguration config, PrincipalStore store )
     {
-		HANDLER = new KerberosProtocolHandler( store, bootstrap, config );
+		HANDLER = new KerberosProtocolHandler( config, store );
 	}
 
     public ProtocolCodecFactory getCodecFactory()



Mime
View raw message