directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1042672 - /directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
Date Mon, 06 Dec 2010 15:04:01 GMT
Author: elecharny
Date: Mon Dec  6 15:04:00 2010
New Revision: 1042672

URL: http://svn.apache.org/viewvc?rev=1042672&view=rev
Log:
Injected the realm

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.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=1042672&r1=1042671&r2=1042672&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
Mon Dec  6 15:04:00 2010
@@ -388,7 +388,9 @@ public class AuthenticationService
         encTicketPart.setKey( sessionKey );
 
         encTicketPart.setCName( request.getKdcReqBody().getCName() );
+        encTicketPart.setCRealm( request.getKdcReqBody().getRealm() );
         encTicketPart.setTransited( new TransitedEncoding() );
+        String serverRealm = request.getKdcReqBody().getRealm();
 
         KerberosTime now = new KerberosTime();
 
@@ -532,7 +534,10 @@ public class AuthenticationService
         EncryptedData encryptedData = cipherTextHandler.seal( serverKey, encTicketPart, KeyUsage.NUMBER2
);
 
         Ticket newTicket = new Ticket( ticketPrincipal, encryptedData );
+
+        newTicket.setRealm( serverRealm );
         newTicket.setEncTicketPart( encTicketPart );
+        
 
         if ( LOG.isDebugEnabled() )
         {
@@ -551,6 +556,7 @@ public class AuthenticationService
         AsRep reply = new AsRep();
         
         reply.setCName( request.getKdcReqBody().getCName() );
+        reply.setCRealm( request.getKdcReqBody().getRealm() );
         reply.setTicket( ticket );
         
         EncKdcRepPart encKdcRepPart = new EncKdcRepPart();
@@ -573,6 +579,7 @@ public class AuthenticationService
         }
 
         encKdcRepPart.setSName( ticket.getSName() );
+        encKdcRepPart.setSRealm( ticket.getRealm() );
         encKdcRepPart.setClientAddresses( ticket.getEncTicketPart().getClientAddresses()
);
 
         EncAsRepPart encAsRepPart = new EncAsRepPart();



Mime
View raw message