EncryptionKey sessionKey = RandomKeyFactory.getRandomKey( EncryptionType.DES_CBC_MD5 );
encTicketPart.setKey( sessionKey );
encTicketPart.setCName( new PrincipalName( clientPrincipal ) );
encTicketPart.setCRealm( clientPrincipal.getRealm() );
encTicketPart.setTransited( new TransitedEncoding() );
encTicketPart.setAuthTime( new KerberosTime() );
long now = System.currentTimeMillis();
KerberosTime endTime = new KerberosTime( now + KerberosTime.DAY );
encTicketPart.setEndTime( endTime );