Logging from the Sun Kerberos package?

Douglas E. Engert deengert at anl.gov
Wed Jan 16 17:37:22 EST 2013



On 1/16/2013 4:21 PM, Cantor, Scott wrote:
> On 1/16/13 5:17 PM, "Douglas E. Engert" <deengert at anl.gov> wrote:
>>>
>> I thought that the Answer 1 in this:
>> http://stackoverflow.com/questions/9738756/jaas-kerberos-login-exception-o
>> n-wrong-username-password
>>
>> showed how to get the underlying exception:
>>   Throwable t = e.getCause();
>>   if (t instanceof KrbException) {
>> And from there one could get
>>   the error message from the t.getMessage();
>
> I believe that is false. When I tried it all I got was null. It's not
> really that important because knowing the type doesn't tell you anything
> about what the error means to a user, and you don't need it to log, so it
> isn't really helpful.

Well I will have to try it sometime.

I would expect the t.getMessage() would be the same messages that show up in the
e.printStackTrace()

printStackTrace says it uses toString() to get the first line,
so how about t.toString(); to the log?

The first lines have:
javax.security.auth.login.LoginException: Pre-authentication information was invalid (24)
javax.security.auth.login.LoginException: Client not found in Kerberos database (6)

These messages are right from the KDC, as defined in RFC 4120.

> -- Scott
>
>
> --
> To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
>
>

-- 

  Douglas E. Engert  <DEEngert at anl.gov>
  Argonne National Laboratory
  9700 South Cass Avenue
  Argonne, Illinois  60439
  (630) 252-5444


More information about the users mailing list