directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [08/50] [abbrv] directory-kerby git commit: Add some logs of issuing ticket.
Date Fri, 21 Jul 2017 11:26:55 GMT
Add some logs of issuing ticket.


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

Branch: refs/heads/gssapi
Commit: 5cb6d17e13c1c77e0a69525c6cd553301455e719
Parents: 22b271a
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Tue May 3 15:36:35 2016 +0800
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Jul 21 12:25:02 2017 +0100

----------------------------------------------------------------------
 .../apache/kerby/kerberos/kerb/server/request/AsRequest.java   | 3 +++
 .../apache/kerby/kerberos/kerb/server/request/KdcRequest.java  | 4 +++-
 .../apache/kerby/kerberos/kerb/server/request/TgsRequest.java  | 6 ++++++
 3 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/5cb6d17e/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/AsRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/AsRequest.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/AsRequest.java
index 66fdac5..7cb7dbb 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/AsRequest.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/AsRequest.java
@@ -109,6 +109,9 @@ public class AsRequest extends KdcRequest {
     protected void issueTicket() throws KrbException {
         TicketIssuer issuer = new TgtTicketIssuer(this);
         Ticket newTicket = issuer.issueTicket();
+        LOG.info("AS_REQ ISSUE: authtime " + newTicket.getEncPart().getAuthTime().getTime()
+ ","
+                + newTicket.getEncPart().getCname() + " for "
+                + newTicket.getSname());
         setTicket(newTicket);
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/5cb6d17e/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
index 8203501..e374734 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
@@ -167,7 +167,8 @@ public abstract class KdcRequest {
         checkVersion();
         checkTgsEntry();
         kdcFindFast();
-        authenticate();
+        checkEncryptionType();
+
         if (PreauthHandler.isToken(getKdcReq().getPaData())) {
             isToken = true;
             preauth();
@@ -181,6 +182,7 @@ public abstract class KdcRequest {
             checkServer();
             preauth();
         }
+        checkPolicy();
         issueTicket();
         makeReply();
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/5cb6d17e/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/TgsRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/TgsRequest.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/TgsRequest.java
index 941ef9f..21ff6fb 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/TgsRequest.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/TgsRequest.java
@@ -49,10 +49,13 @@ import org.apache.kerby.kerberos.kerb.type.pa.PaDataEntry;
 import org.apache.kerby.kerberos.kerb.type.ticket.EncTicketPart;
 import org.apache.kerby.kerberos.kerb.type.ticket.Ticket;
 import org.apache.kerby.kerberos.kerb.type.ticket.TicketFlag;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.nio.ByteBuffer;
 
 public class TgsRequest extends KdcRequest {
+    private static final Logger LOG = LoggerFactory.getLogger(TgsRequest.class);
 
     private EncryptionKey tgtSessionKey;
     private Ticket tgtTicket;
@@ -109,6 +112,9 @@ public class TgsRequest extends KdcRequest {
     protected void issueTicket() throws KrbException {
         TicketIssuer issuer = new ServiceTicketIssuer(this);
         Ticket newTicket = issuer.issueTicket();
+        LOG.info("TGS_REQ ISSUE: authtime " + newTicket.getEncPart().getAuthTime().getTime()
+ ","
+                + newTicket.getEncPart().getCname() + " for "
+                + newTicket.getSname());
         setTicket(newTicket);
     }
 


Mime
View raw message