簡體   English   中英

tomcat中的SPNEGO總是提示密碼

[英]SPNEGO in tomcat always prompting password

我的 SPNEGO 配置似乎不起作用,並且總是在我的 tomcat8 中提示輸入密碼。

安裝/配置SPNEGO 安裝指南

我將庫 spnego-r9.jar 添加到“tomcat\lib”文件夾中。 還添加了 .conf 文件。 這里是 krb5.conf:

[libdefaults]
dns_lookup_realm = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
rdns = false
default_ccache_name = KEYRING:persistent:%{uid}
udp_preference_limit = 1
default_realm=EXAMPLE.COM
default_tkt_enctypes = aes256-cts aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc aes256-cts- 
hmac-sha1-96 rc4-hmac
default_tgs_enctypes = aes256-cts aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc aes256-cts- 
hmac-sha1-96 rc4-hmac
permitted_enctypes =  aes256-cts aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc aes256-cts- 
hmac-sha1-96 rc4-hmac

[realms]
EXAMPLE.COM = {
    default_domain=example.com
    kdc=dc2.example.com:88
}

[domain_realm]
.example.com=EXAMPLE.COM
example.com=EXAMPLE.COM

然后將 SpnegoHttpFilter 添加到 web.xml。 最后但同樣重要的是,我聯系了我們的管理員並將以下內容添加到在 SpnegoHttpFilter 中注冊的用戶

setspn.exe -A HTTP/ourserver01.example.com/projectXY exampleUser
setspn.exe -A HTTP/ourserver01/projectXY exampleUser

結果是密碼提示,即使我的訪問用戶登錄到EXAMPLE.COM 域。 據我所知,這不應該發生。 我登錄到我們的服務器,發現它的域是一個工作組(在 cmd 中使用 wmic 計算機系統獲取域)可能是一個問題,我將如何 go 並解決這個問題?

編輯:這里是 second.conf 文件:

spnego-client {
    com.sun.security.auth.module.Krb5LoginModule required;
};

spnego-server {
    com.sun.security.auth.module.Krb5LoginModule required
    storeKey=true
    isInitiator=false;
};

我通過wireshark檢查了包,發現了unkown pricipalname錯誤。 感謝@Samson Scharfrichter的提示

正確的 spn 注冊是 setspn.exe -A HTTP/ourserver01.example.com exampleUser 沒有項目本身。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM