Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4668693

issues related to kerberos tool kinit

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      mantis
    • CPU:
      sparc
    • OS:
      solaris_8
    • Verification:
      Verified

      Description

      issue 1:
      kinit perform differently with solaris and windows. For solaris, you can use prefix "FILE", "File", and "file" to identify the credential cache type. But for windows, only "FILE" works.

      You may observe the result from the following output.

      For Solaris
      #############################################################################
      lwang:/home/lw129730/Kerberos( 123 )%which java
      /net/luster/export/scratch/jsn_re/jdk/jdk1.4.1/ws/build/solaris-sparc/bin/java
      lwang:/home/lw129730/Kerberos( 124 )%java -version
      java version "1.4.1-internal"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-internal-b3)
      Java HotSpot(TM) Client VM (build 1.4.1-beta-b08, mixed mode)
      lwang:/home/lw129730/Kerberos( 125 )%which kinit
      /net/luster/export/scratch/jsn_re/jdk/jdk1.4.1/ws/build/solaris-sparc/bin/kinit
      lwang:/home/lw129730/Kerberos( 126 )%kinit -p -f -c file:/home/lw129730/mykrb5cc dummy bogus
      lwang:/home/lw129730/Kerberos( 127 )%klist -c FILE:/home/lw129730/mykrb5cc

      Credentials cache: FILE:/home/lw129730/mykrb5cc

      Default principal: ###@###.###, 1 entry found.

      [1] Service Principal: krbtgt/###@###.###
           Valid starting: Apr 15, 2002 20:01
           Expires: Apr 16, 2002 06:01
      lwang:/home/lw129730/Kerberos( 128 )%time
      799.0u 78.0s 101:11:42 0% 0+0k 0+0io 0pf+0w
      lwang:/home/lw129730/Kerberos( 129 )%date
      Mon Apr 15 20:02:40 PDT 2002
      lwang:/home/lw129730/Kerberos( 130 )%kinit -p -f -c File:/home/lw129730/mykrb5cc1 dummy bogus
      lwang:/home/lw129730/Kerberos( 131 )%klist -c FILE:/home/lw129730/mykrb5cc1

      Credentials cache: FILE:/home/lw129730/mykrb5cc1

      Default principal: ###@###.###, 1 entry found.

      [1] Service Principal: krbtgt/###@###.###
           Valid starting: Apr 15, 2002 20:03
           Expires: Apr 16, 2002 06:03
      lwang:/home/lw129730/Kerberos( 132 )%date
      Mon Apr 15 20:04:15 PDT 2002
      #################################################################################

      Foe windows, I use jdk at /home/rammarti/temp/windows-i586
      #################################################################################
      kinit -p -f -c file:C:/liwen/mykrb5cc_liwen dummy bogus
      Exception: java.lang.NullPointerException
      java.lang.NullPointerException
      at sun.security.krb5.internal.tools.Kinit.<init>(DashoA6275:294)
      at sun.security.krb5.internal.tools.Kinit.main(DashoA6275:116)

      kinit -f -p -c File:C:/liwen/mykrb5cc_liwen dummy bogus
      Exception: java.lang.NullPointerException
      java.lang.NullPointerException
      at sun.security.krb5.internal.tools.Kinit.<init>(DashoA6275:294)
      at sun.security.krb5.internal.tools.Kinit.main(DashoA6275:116)
      ================================================================================
      issue 2:

      kinit can not retrieve key from keytab for principal ticket, you may observe in the following
      ********************************************************************************
      lwang:/home/lw129730/Kerberos( 146 )%which java
      /net/luster/export/scratch/jsn_re/jdk/jdk1.4.1/ws/build/solaris-sparc/bin/java
      lwang:/home/lw129730/Kerberos( 147 )%java -version
      java version "1.4.1-internal"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-internal-b3)
      Java HotSpot(TM) Client VM (build 1.4.1-beta-b08, mixed mode)
      lwang:/home/lw129730/Kerberos( 148 )%which kinit
      /net/luster/export/scratch/jsn_re/jdk/jdk1.4.1/ws/build/solaris-sparc/bin/kinit
      lwang:/home/lw129730/Kerberos( 149 )%klist -c -k -K FILE:/home/lw129730/mykrb5tab

      Key tab: FILE:/home/lw129730/mykrb5tab, 1 entry found.

      [1] Service principal: ###@###.###
               KVNO: 5
               Key: 0x2022398269baddf
      lwang:/home/lw129730/Kerberos( 150 )% FILE:/home/lw129730/mykrb5tab -c FILE:/home/lw129730/mykrb5cc dummy bogus
      Exception: krb_error 0 Cannot retrieve key from keytab for principal ###@###.### No error
      KrbException: Cannot retrieve key from keytab for principal ###@###.###
              at sun.security.krb5.internal.tools.Kinit.<init>(DashoA6275:205)
              at sun.security.krb5.internal.tools.Kinit.main(DashoA6275:116)
      lwang:/home/lw129730/Kerberos( 151 )%
      ********************************************************************************

      issue 3:

      kinit treat f:/home/lw129730/mykrb5cc as illegal cache name and treat f:mykrb5cc as legal cache name. Actually both of them should be illegal.

      ******************************************************************************
      lwang:/home/lw129730( 241 )%which kinit
      /net/luster/export/scratch/jsn_re/jdk/jdk1.4.1/ws/build/solaris-sparc/bin/kinit
      lwang:/home/lw129730( 242 )%kinit -J-Djava.security.krb5.kdc=infinityzero.sfbay.sun.com -J-Djava.security.krb5.realm=JAVASOFT3.ENG.SUN.COM -f -p -c f:mykrb5cc dummy bogus
      lwang:/home/lw129730( 243 )%ls f:mykrb5cc
      f:mykrb5cc
      lwang:/home/lw129730( 244 )%kinit -J-Djava.security.krb5.kdc=infinityzero.sfbay.sun.com -J-Djava.security.krb5.realm=JAVASOFT3.ENG.SUN.COM -f -p -c f:/home/lw129730/mykrb5cc dummy bogus
      Exception: java.lang.NullPointerException
      java.lang.NullPointerException
              at sun.security.krb5.internal.tools.Kinit.<init>(DashoA6275:272)
              at sun.security.krb5.internal.tools.Kinit.main(DashoA6275:104)
      lwang:/home/lw129730( 245 )%
      *****************************************************************************

        Attachments

          Activity

            People

            Assignee:
            rmartisunw Ramachandran Marti (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: