directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1042340 - in /directory/apacheds/branches/apacheds-kerberos-codec-2.0: kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/ kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages...
Date Sun, 05 Dec 2010 12:52:22 GMT
Author: kayyagari
Date: Sun Dec  5 12:52:21 2010
New Revision: 1042340

URL: http://svn.apache.org/viewvc?rev=1042340&view=rev
Log:
o replaced KdcReply with KdcRep
o fixed the debug logging methods and removed KdcReplyDecoder

Removed:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/KdcReplyDecoder.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java
Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java?rev=1042340&r1=1042339&r2=1042340&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
Sun Dec  5 12:52:21 2010
@@ -40,7 +40,6 @@ import org.apache.directory.server.kerbe
 import org.apache.directory.server.kerberos.shared.crypto.encryption.KeyUsage;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.RandomKeyFactory;
 import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
-import org.apache.directory.server.kerberos.shared.messages.KdcReply;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
 import org.apache.directory.shared.asn1.codec.EncoderException;
@@ -582,7 +581,7 @@ public class AuthenticationService
         if ( LOG.isDebugEnabled() )
         {
             monitorContext( authContext );
-            monitorReply( ( KdcContext ) authContext );
+            monitorReply( reply, encKdcRepPart );
         }
         
         EncryptionKey clientKey = authContext.getClientKey();
@@ -679,31 +678,27 @@ public class AuthenticationService
     }
     
     
-    private static void monitorReply( KdcContext kdcContext )
+    private static void monitorReply( AsRep reply, EncKdcRepPart part )
     {
-        Object reply = kdcContext.getReply();
-
-        if ( LOG.isDebugEnabled() && reply instanceof KdcReply )
+        if ( LOG.isDebugEnabled() )
         {
-            KdcReply success = ( KdcReply ) reply;
-
             try
             {
                 StringBuffer sb = new StringBuffer();
 
                 sb.append( "Responding with " + SERVICE_NAME + " reply:" );
-                sb.append( "\n\t" + "messageType:           " + success.getMessageType()
);
-                sb.append( "\n\t" + "protocolVersionNumber: " + success.getProtocolVersionNumber()
);
-                sb.append( "\n\t" + "nonce:                 " + success.getNonce() );
-                sb.append( "\n\t" + "clientPrincipal:       " + success.getClientPrincipal()
);
-                sb.append( "\n\t" + "client realm:          " + success.getClientRealm()
);
-                sb.append( "\n\t" + "serverPrincipal:       " + success.getServerPrincipal()
);
-                sb.append( "\n\t" + "server realm:          " + success.getServerRealm()
);
-                sb.append( "\n\t" + "auth time:             " + success.getAuthTime() );
-                sb.append( "\n\t" + "start time:            " + success.getStartTime() );
-                sb.append( "\n\t" + "end time:              " + success.getEndTime() );
-                sb.append( "\n\t" + "renew-till time:       " + success.getRenewTill() );
-                sb.append( "\n\t" + "hostAddresses:         " + success.getClientAddresses()
);
+                sb.append( "\n\t" + "messageType:           " + reply.getMessageType() );
+                sb.append( "\n\t" + "protocolVersionNumber: " + reply.getProtocolVersionNumber()
);
+                sb.append( "\n\t" + "nonce:                 " + part.getNonce() );
+                sb.append( "\n\t" + "clientPrincipal:       " + reply.getCName() );
+                sb.append( "\n\t" + "client realm:          " + reply.getCRealm() );
+                sb.append( "\n\t" + "serverPrincipal:       " + part.getSName() );
+                sb.append( "\n\t" + "server realm:          " + part.getSRealm() );
+                sb.append( "\n\t" + "auth time:             " + part.getAuthTime() );
+                sb.append( "\n\t" + "start time:            " + part.getStartTime() );
+                sb.append( "\n\t" + "end time:              " + part.getEndTime() );
+                sb.append( "\n\t" + "renew-till time:       " + part.getRenewTill() );
+                sb.append( "\n\t" + "hostAddresses:         " + part.getClientAddresses()
);
 
                 LOG.debug( sb.toString() );
             }

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java?rev=1042340&r1=1042339&r2=1042340&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
Sun Dec  5 12:52:21 2010
@@ -39,7 +39,6 @@ import org.apache.directory.server.kerbe
 import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
 import org.apache.directory.server.kerberos.shared.io.decoder.ApplicationRequestDecoder;
 import org.apache.directory.server.kerberos.shared.messages.ApplicationRequest;
-import org.apache.directory.server.kerberos.shared.messages.KdcReply;
 import org.apache.directory.server.kerberos.shared.messages.components.EncTicketPartModifier;
 import org.apache.directory.server.kerberos.shared.replay.ReplayCache;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
@@ -398,7 +397,7 @@ public class TicketGrantingService
         if ( LOG.isDebugEnabled() )
         {
             monitorContext( tgsContext );
-            monitorReply( tgsContext );
+            monitorReply( reply, encKdcRepPart );
         }
 
         EncTgsRepPart encTgsRepPart = new EncTgsRepPart();
@@ -482,39 +481,32 @@ public class TicketGrantingService
     }
 
     
-    private static void monitorReply( KdcContext kdcContext )
+    private static void monitorReply( TgsRep success, EncKdcRepPart part )
     {
-        Object reply = kdcContext.getReply();
-
-        if ( reply instanceof KdcReply )
+        try
         {
-            KdcReply success = ( KdcReply ) reply;
-
-            try
-            {
-                StringBuffer sb = new StringBuffer();
-
-                sb.append( "Responding with " + SERVICE_NAME + " reply:" );
-                sb.append( "\n\t" + "messageType:           " + success.getMessageType()
);
-                sb.append( "\n\t" + "protocolVersionNumber: " + success.getProtocolVersionNumber()
);
-                sb.append( "\n\t" + "nonce:                 " + success.getNonce() );
-                sb.append( "\n\t" + "clientPrincipal:       " + success.getClientPrincipal()
);
-                sb.append( "\n\t" + "client realm:          " + success.getClientRealm()
);
-                sb.append( "\n\t" + "serverPrincipal:       " + success.getServerPrincipal()
);
-                sb.append( "\n\t" + "server realm:          " + success.getServerRealm()
);
-                sb.append( "\n\t" + "auth time:             " + success.getAuthTime() );
-                sb.append( "\n\t" + "start time:            " + success.getStartTime() );
-                sb.append( "\n\t" + "end time:              " + success.getEndTime() );
-                sb.append( "\n\t" + "renew-till time:       " + success.getRenewTill() );
-                sb.append( "\n\t" + "hostAddresses:         " + success.getClientAddresses()
);
-
-                LOG.debug( sb.toString() );
-            }
-            catch ( Exception e )
-            {
-                // This is a monitor.  No exceptions should bubble up.
-                LOG.error( I18n.err( I18n.ERR_155 ), e );
-            }
+            StringBuffer sb = new StringBuffer();
+            
+            sb.append( "Responding with " + SERVICE_NAME + " reply:" );
+            sb.append( "\n\t" + "messageType:           " + success.getMessageType() );
+            sb.append( "\n\t" + "protocolVersionNumber: " + success.getProtocolVersionNumber()
);
+            sb.append( "\n\t" + "nonce:                 " + part.getNonce() );
+            sb.append( "\n\t" + "clientPrincipal:       " + success.getCName() );
+            sb.append( "\n\t" + "client realm:          " + success.getCRealm() );
+            sb.append( "\n\t" + "serverPrincipal:       " + part.getSName() );
+            sb.append( "\n\t" + "server realm:          " + part.getSRealm() );
+            sb.append( "\n\t" + "auth time:             " + part.getAuthTime() );
+            sb.append( "\n\t" + "start time:            " + part.getStartTime() );
+            sb.append( "\n\t" + "end time:              " + part.getEndTime() );
+            sb.append( "\n\t" + "renew-till time:       " + part.getRenewTill() );
+            sb.append( "\n\t" + "hostAddresses:         " + part.getClientAddresses() );
+            
+            LOG.debug( sb.toString() );
+        }
+        catch ( Exception e )
+        {
+            // This is a monitor.  No exceptions should bubble up.
+            LOG.error( I18n.err( I18n.ERR_155 ), e );
         }
     }
     



Mime
View raw message