{
try
{
PrincipalStore store = changepwContext.getStore();
ApplicationRequest authHeader = changepwContext.getAuthHeader();
Ticket ticket = changepwContext.getTicket();
ReplayCache replayCache = changepwContext.getReplayCache();
long clockSkew = changepwContext.getConfig().getAllowableClockSkew();
Authenticator authenticator = changepwContext.getAuthenticator();
KerberosPrincipal clientPrincipal = authenticator.getClientPrincipal();
String desiredPassword = changepwContext.getPassword();
InetAddress clientAddress = changepwContext.getClientAddress();
HostAddresses clientAddresses = ticket.getEncTicketPart().getClientAddresses();
boolean caddrContainsSender = false;
if ( ticket.getEncTicketPart().getClientAddresses() != null )
{
caddrContainsSender = ticket.getEncTicketPart().getClientAddresses().contains( new HostAddress( clientAddress ) );
}
StringBuffer sb = new StringBuffer();
sb.append( "Monitoring context:" );
sb.append( "\n\t" + "store " + store );
sb.append( "\n\t" + "authHeader " + authHeader );
sb.append( "\n\t" + "ticket " + ticket );
sb.append( "\n\t" + "replayCache " + replayCache );
sb.append( "\n\t" + "clockSkew " + clockSkew );
sb.append( "\n\t" + "clientPrincipal " + clientPrincipal );
sb.append( "\n\t" + "desiredPassword " + desiredPassword );
sb.append( "\n\t" + "clientAddress " + clientAddress );
sb.append( "\n\t" + "clientAddresses " + clientAddresses );
sb.append( "\n\t" + "caddr contains sender " + caddrContainsSender );
sb.append( "\n\t" + "Ticket principal " + ticket.getServerPrincipal() );
PrincipalStoreEntry ticketPrincipal = changepwContext.getServerEntry();
sb.append( "\n\t" + "cn " + ticketPrincipal.getCommonName() );
sb.append( "\n\t" + "realm " + ticketPrincipal.getRealmName() );
sb.append( "\n\t" + "Service principal " + ticketPrincipal.getPrincipal() );
sb.append( "\n\t" + "SAM type " + ticketPrincipal.getSamType() );
EncryptionType encryptionType = ticket.getEncPart().getEType();
int keyVersion = ticketPrincipal.getKeyMap().get( encryptionType ).getKeyVersion();
sb.append( "\n\t" + "Ticket key type " + encryptionType );
sb.append( "\n\t" + "Service key version " + keyVersion );
LOG.debug( sb.toString() );