[英]LADP - Kerberos Setup on Apache with Wordpress Single Sign-On not working
我們使用 Active Directory 進行了本地網絡設置。 我們開發了一個只能從本地網絡托管和訪問的網站。 如果用戶已經登錄到操作系統上的 Active Directory,我們希望用戶在訪問我們的 Wordpress 網站時立即自動登錄。
在僅跟蹤文檔時,我們仍然面臨着我們發現很難修復的問題,我們花了很多時間才能成功啟動這樣的設置。 一些錯誤是:
答案將列出我們面臨的所有問題以及我們如何設法解決這些問題,以防某些人在設置時遇到相同的問題。
在 Active Directory 域控制器上創建 Keytab 文件
ktpass -princ HTTP/intranet.domain.com@DOMAIN.COM -pass "{PASSWORD}" -mapuser username@DOMAIN.COM -Ptype KRB5_NT_PRINCIPAL -out website-auth.keytab
/etc/httpd/kerberos-credentials/website-auth.keytab
在 Web 服務器上安裝 Kerberos 客戶端庫:
在 Kerberos 配置文件中配置 Active Directory 域
# Configuration snippets may be placed in this directory as well
includedir /etc/krb5.conf.d/
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
dns_lookup_realm = true
dns_lookup_kdc = true
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
rdns = false
pkinit_anchors = /etc/pki/tls/certs/ca-bundle.crt
default_realm = DOMAIN.COM
default_tkt_enctypes = aes256-cts des3-cbc-sha1 arcfour-hmac des-cbc-crc aes256-cts-hmac-sha1-96 des-cbc-md5 arcfour-hmac-md5
default_tgs_enctypes = aes256-cts des3-cbc-sha1 arcfour-hmac des-cbc-crc aes256-cts-hmac-sha1-96 des-cbc-md5 arcfour-hmac-md5
permitted_enctypes = aes256-cts des3-cbc-sha1 arcfour-hmac des-cbc-crc aes256-cts-hmac-sha1-96 des-cbc-md5 arcfour-hmac-md5
[realms]
DOMAIN.COM = {
admin_server = DOMAIN.COM
kdc = DOMAIN.COM
}
[domain_realm]
domain.com = DOMAIN.COM
.domain.com = DOMAIN.COM
[login]
krb4_convert = true
krb4_get_tickets = true
為 Apache 安裝 auth_kerb 模塊
為站點目錄配置 Kerberos SSO
LoadModule auth_kerb_module /usr/lib64/httpd/modules/mod_auth_kerb.so
<Directory "/var/www/html">
Order allow,deny
Allow from all
AuthType Kerberos
AuthName "username used in keytab"
KrbAuthRealms DOMAIN.COM
KrbServiceName HTTP/intranet.domain.com@DOMAIN.COM
Krb5Keytab /etc/httpd/kerberos-credentials/website-auth.keytab
KrbMethodNegotiate On
KrbMethodK5Passwd On
KrbVerifyKDC On
require valid-user
</Directory>
在 apache 上檢查 httpd_can_network_connect
httpd_can_network_connect
設置。 為此,請運行:
getsebool -a | grep httpd
getsebool -a | grep httpd
:它正在返回 httpd_can_network_connect --> offsetsebool -P httpd_can_network_connect on
: 啟用設置將 wordpress 網站添加到 OS 上的本地內網
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.