gpt4 book ai didi

java - KDC - 我们从哪里得到服务器?

转载 作者:行者123 更新时间:2023-12-04 05:21:09 29 4
gpt4 key购买 nike

我正在尝试使用 java 执行 kerberos 身份验证。

我启用了调试。

当尝试使用 tgt 连接到 LDAP 时,我得到(服务器名称已更改):

getRealmFromDNS: trying srv1.myserver.com
getRealmFromDNS: trying srv2.myserver.com
getRealmFromDNS: trying srv1.myserver.com
getRealmFromDNS: trying srv2.myserver.com
Found ticket for user@SUB.MYSERVER.COM to go to krbtgt/SUB.MYSERVER.COM@SUB.MYSERVER.COM expiring on Sat Dec 01 02:11:14
Entered Krb5Context.initSecContext with state=STATE_NEW
Service ticket not found in the subject
getRealmFromDNS: trying srv1.myserver.com
getRealmFromDNS: trying srv2.myserver.com
>>> Credentials acquireServiceCreds: same realm
default etypes for default_tgs_enctypes: 16 3 1.
>>> CksumType: sun.security.krb5.internal.crypto.RsaMd5CksumType
>>> EType: sun.security.krb5.internal.crypto.ArcFourHmacEType
>>> KdcAccessibility: reset
getKDCFromDNS using UDP
>>> KrbKdcReq send: kdc=server123.myserver.com. UDP:88, timeout=30000, number of retries =3, #bytes=1542
>>> KDCCommunication: kdc=server123.myserver.com. UDP:88, timeout=30000,Attempt=1, #bytes=1542
SocketTimeOutException with attempt: 1
>>> KDCCommunication: kdc=server123.myserver.com. UDP:88, timeout=30000,Attempt=2, #bytes=1542
SocketTimeOutException with attempt: 2
>>> KDCCommunication: kdc=server123.myserver.com. UDP:88, timeout=30000,Attempt=3, #bytes=1542
SocketTimeOutException with attempt: 3
>>> KrbKdcReq send: error trying server123.myserver.com.
java.net.SocketTimeoutException: Receive timed out
at java.net.DualStackPlainDatagramSocketImpl.socketReceiveOrPeekData(Native Method)
at java.net.DualStackPlainDatagramSocketImpl.receive0(Unknown Source)
at java.net.AbstractPlainDatagramSocketImpl.receive(Unknown Source)
at java.net.DatagramSocket.receive(Unknown Source)
at sun.security.krb5.internal.UDPClient.receive(Unknown Source)
at sun.security.krb5.KdcComm$KdcCommunication.run(Unknown Source)
at sun.security.krb5.KdcComm$KdcCommunication.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.krb5.KdcComm.send(Unknown Source)
at sun.security.krb5.KdcComm.send(Unknown Source)
at sun.security.krb5.KdcComm.send(Unknown Source)
at sun.security.krb5.KrbTgsReq.send(Unknown Source)
at sun.security.krb5.KrbTgsReq.sendAndGetCreds(Unknown Source)
at sun.security.krb5.internal.CredentialsUtil.serviceCreds(Unknown Source)
at sun.security.krb5.internal.CredentialsUtil.acquireServiceCreds(Unknown Source)
at sun.security.krb5.Credentials.acquireServiceCreds(Unknown Source)
at sun.security.jgss.krb5.Krb5Context.initSecContext(Unknown Source)
at sun.security.jgss.GSSContextImpl.initSecContext(Unknown Source)
at sun.security.jgss.GSSContextImpl.initSecContext(Unknown Source)
at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(Unknown Source)
at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(Unknown Source)
at com.sun.jndi.ldap.LdapClient.authenticate(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.<init>(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.ldap.InitialLdapContext.<init>(Unknown Source)
at myApp.JndiAction.performJndiOperation(MyTest.java:577)
at myApp.JndiAction.run(MyTest.java:551)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at myApp.MyTest.main(MyTest.java:489)
>>> KdcAccessibility: add server123.myserver.com.

我的回答是:
  • 从哪里得到 kdc 服务器(server123.myserver.com)?
  • 我可以改变它吗?

  • 谢谢。

    最佳答案

    如果您不在 Windows 平台上,请搜索 krb5.conf 文件。有一个[realms]提供域和相关 KDC 的部分。

    [realms]
    YOURDOMAIN.com = {
    kdc = dc1.yourdomain.com
    }

    在 Windows 平台上,正如 Michael-O 指出的那样,有特定的 DNS 记录。

    关于java - KDC - 我们从哪里得到服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13680959/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com