Code Monkey home page Code Monkey logo

Comments (2)

bedrin avatar bedrin commented on September 3, 2024 1

Kerberos erros can be misleading.

I would say that following lines look suspicious:

            <property name="servicePrincipal" value="HTTP/[email protected]"/>
            <property name="keyTabLocation" value="file:C:\Temp\foobar.keytab"/>

Say you have an AD account for your server called srv_server
DNS name of your server (A-record ideally) is foo.bar and your srv_server account has HTTP/foo.bar SPN associated with it.

In this case you should create keytab for account srv_server (it's case sensitive; you wouldn't get an error when creating keytab if you mess up something) and use srv_server as servicePrincipal property.

Hope it helps.

from kerb4j.

vilmosnagy avatar vilmosnagy commented on September 3, 2024

@bedrin thanks for the help.

one more question: so the srv_server is the name of the account, and the servicePrincipal's value should be srv_server as well?

            <property name="servicePrincipal" value="srv_server"/> <!-- as here -->

with this setup I got the following stacktrace:

Stack trace:
javax.security.auth.login.LoginException: Unable to obtain password from user
     at com.sun.security.auth.module.Krb5LoginModule.promptForPass(Krb5LoginModule.java:856)
...

Edit:
If I list the keytab file it contains the following info:

$ java sun.security.krb5.internal.tools.Klist -k -t /c/Temp/app.keytab
 
Key tab: C:/Temp/app.keytab, 5 entries found.
 
[1] Service principal: HTTP/[email protected]
         KVNO: 5
         Time stamp: Jan 01, 1970 01:00:00
[2] Service principal: HTTP/[email protected]
         KVNO: 5
         Time stamp: Jan 01, 1970 01:00:00
[3] Service principal: HTTP/[email protected]
         KVNO: 5
         Time stamp: Jan 01, 1970 01:00:00
[4] Service principal: HTTP/[email protected]
         KVNO: 5
         Time stamp: Jan 01, 1970 01:00:00
[5] Service principal: HTTP/[email protected]
         KVNO: 5
         Time stamp: Jan 01, 1970 01:00:00

from kerb4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.