繁体   English   中英

CentOS 7 Apache HTTPD Kerberos Windows AD问题

[英]CentOS 7 Apache HTTPD Kerberos Windows AD Issues

我真的想要解决这个问题,所以我希望你能帮助我。 我用谷歌搜索了几个小时,但似乎无法获得正确的配置。

我在CentOS 7上使用Kerberos身份验证设置Apache,这样我就可以在Windows AD环境中实现SSO。 根据我的理解,这是可能的,我应该能够通过Internet Explorer访问时实现真正的SSO。 目前我有以下配置,当通过Internet Explorer访问该站点时会产生500内部服务器错误,但在使用Firefox时却很奇怪(尽管我必须在提示中输入凭据)。

我首先使用以下命令生成服务主体并在Windows中导出密钥表。

ktpass -princ HTTP/server.example.local@EXAMPLE.LOCAL -mapuser EXAMPLE\http-user -crypto ALL -ptype KRB5_NT_PRINCIPAL -mapop set -pass password -out D:\krb5.keytab

将密钥表复制到/etc/httpd/conf/krb5.keytab下的CentOS服务器后,我配置了以下虚拟主机。

<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/server.example.local@EXAMPLE.LOCAL"
    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/server.example.local@EXAMPLE.LOCAL
[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工作。

好的,我终于解决了这个问题。 我不得不禁用SELinux! 我简直不敢相信,但我所做的只是禁用SElinux,重新启动服务器并且身份验证开始工作。 我希望这可以拯救别人一直以来的头痛!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM