私はこの問題で私の心をゆるやかにしようとしています。私は何時間もグーグルで行ったが、正しい設定を得ることができない。CentOS 7 Apache HTTPD Kerberos Windows AD問題
Kerberos認証を使用してCentOS 7にApacheをセットアップするので、Windows AD環境でSSOを実現できます。私の理解から、これは可能であり、私はInternet Explorer経由でアクセスするときに真のSSOを達成できるはずです。現在のところ、Internet Explorer経由でサイトにアクセスすると500の内部サーバーエラーを生成する以下の設定がありますが、(プロンプトに資格情報を入力する必要はありますが)Firefoxを使用すると不思議に動作します。
私は最初にService Principalを生成し、次のコマンドを使用してWindowsでkeytabをエクスポートしました。
ktpass -princ HTTP/[email protected] -mapuser EXAMPLE\http-user -crypto ALL -ptype KRB5_NT_PRINCIPAL -mapop set -pass password -out D:\krb5.keytab
/etc/httpd/conf/krb5.keytab
下CentOSのサーバーへのkeytabをコピーした後、私は次の仮想ホストが設定されています。
<VirtualHost *:80>
ServerName server.shc.local
DocumentRoot /var/www/html/test
LogLevel debug
ErrorLog /var/log/httpd/test-error.log
CustomLog /var/log/httpd/test-custom.log combined
<Location />
Options Indexes
AuthType Kerberos
KrbServiceName "HTTP/[email protected]"
AuthName "Welcome to the KRB5 Test"
KrbMethodNegotiate on
KrbMethodK5Passwd off
KrbVerifyKDC off
KrbAuthRealms SHC.LOCAL
Krb5KeyTab /etc/httpd/conf/krb5.keytab
require valid-user
</Location>
</VirtualHost>
私は、Internet Explorer経由でサイトにアクセスすると、私は500内部サーバーエラーを取得し、ログは次のようになります。
[Mon Jun 27 19:14:07.552584 2016] [authz_core:debug] [pid 2832] mod_authz_core.c(809): [client 192.168.214.202:21545] AH01626: authorization result of Require valid-user : denied (no authenticated user yet)
[Mon Jun 27 19:14:07.552637 2016] [authz_core:debug] [pid 2832] mod_authz_core.c(809): [client 192.168.214.202:21545] AH01626: authorization result of <RequireAny>: denied (no authenticated user yet)
[Mon Jun 27 19:14:07.552690 2016] [auth_kerb:debug] [pid 2832] src/mod_auth_kerb.c(1954): [client 192.168.214.202:21545] kerb_authenticate_user entered with user (NULL) and auth_type Kerberos
[Mon Jun 27 19:14:07.552747 2016] [auth_kerb:debug] [pid 2832] src/mod_auth_kerb.c(1295): [client 192.168.214.202:21545] Acquiring creds for HTTP/[email protected]
[Mon Jun 27 19:14:07.555237 2016] [auth_kerb:debug] [pid 2832] src/mod_auth_kerb.c(1155): [client 192.168.214.202:21545] GSS-API major_status:000d0000, minor_status:0000000d
[Mon Jun 27 19:14:07.555250 2016] [auth_kerb:error] [pid 2832] [client 192.168.214.202:21545] gss_acquire_cred() failed: Unspecified GSS failure. Minor code may provide more information (, Permission denied)
そして私は、Firefox経由でサイトにアクセスしたときに、私が入力するように求められます資格情報を取得することができます。ログには、次のようになります。
[Mon Jun 27 19:16:49.936807 2016] [authz_core:debug] [pid 2828] mod_authz_core.c(809): [client 192.168.214.202:21577] AH01626: authorization result of Require valid-user : denied (no authenticated user yet)
[Mon Jun 27 19:16:49.936849 2016] [authz_core:debug] [pid 2828] mod_authz_core.c(809): [client 192.168.214.202:21577] AH01626: authorization result of <RequireAny>: denied (no authenticated user yet)
[Mon Jun 27 19:16:49.936888 2016] [auth_kerb:debug] [pid 2828] src/mod_auth_kerb.c(1954): [client 192.168.214.202:21577] kerb_authenticate_user entered with user (NULL) and auth_type Kerberos
[Mon Jun 27 19:16:50.042925 2016] [authz_core:debug] [pid 2829] mod_authz_core.c(809): [client 192.168.214.202:21578] AH01626: authorization result of Require valid-user : denied (no authenticated user yet)
[Mon Jun 27 19:16:50.042960 2016] [authz_core:debug] [pid 2829] mod_authz_core.c(809): [client 192.168.214.202:21578] AH01626: authorization result of <RequireAny>: denied (no authenticated user yet)
[Mon Jun 27 19:16:50.042982 2016] [auth_kerb:debug] [pid 2829] src/mod_auth_kerb.c(1954): [client 192.168.214.202:21578] kerb_authenticate_user entered with user (NULL) and auth_type Kerberos
は、誰もが、私は、Internet Explorer経由でサイトにアクセスする際の作業のシームレスなSSOを取得するために何をする必要があるか任意のアイデアを持っています。
こんにちは。 winbind(Sambaの一部)を実際に試したことがありますか?AD環境にアクセスできる場合は特に設定が容易で作業が容易です。どのようなWindowsセットアップですか?両方のマシンのクロックが同期されていることを確認するか、krb authが問題を起こすかどうかを確認する必要があります。 – user3788685