FCGI在No Auth上返回500错误/不在Basic Auth上进行身份验证

时间:2015-03-10 16:20:12

标签: c++ authentication openam fastcgi apache2.2

我在使用C ++中的FCGI时遇到了一些问题。

最初,它是一个应用程序,它将使用Basic Auth来验证任何传入请求(使用某些验证方法等)。

我们现在正尝试将SSO合并到安装中,使用OpenAM作为IDP。

我们已经能够毫不费力地与OpenAM进行通信(在使用Lasso从SP向IDP发送重定向消息方面),但真正的困难是IDP重定向时。

如果在Apache中启用了基本身份验证,则授权标头将无法通过,并且用户将无法通过验证。

如果关闭基本身份验证,FCGI会抛出异常声明:

[Mon Mar 09 14:33:33 2015] [error] [client 10.12...] FastCGI: comm with server "/var/www/fcgi" aborted: protocol error: invalid version: 10 != FCGI_VERSION(1), referer: "http://...:8080/OpenAM-12.0.0/SSORedirect/metaAlias/idp?ReqID=...&index=null&acsURL=&spEntityID=https%3A%2F%2F...%2F&binding="
[Mon Mar 09 14:33:33 2015] [error] [client 10.12...] FastCGI: incomplete headers (0 bytes) received from server "/var/www/fcgi", referer: "http://.../OpenAM-12.0.0/SSORedirect/metaAlias/idp?ReqID=...&index=null&acsURL=&spEntityID=https%3A%2F%2F...%2F&binding="

我的fcgi.conf看起来像这样:

FastCGIExternalServer /var/www/fcgi -host 127.0.0.1:8082 -idle-timeout 3600 -appConnTimeout 3600
    <Location "/fcgi">
        AuthType Basic
        AuthName "Protected"
        AuthGroupFile None
        FastCgiAuthorizerAuthoritative Off
        FastCgiAuthenticatorAuthoritative Off
        FastCgiAuthenticator /var/www/fcgi
        Require valid_user
    </Location>

1 个答案:

答案 0 :(得分:1)

您希望重播受保护应用程序的用户密码。我不相信有办法强制浏览器发送某些请求标头以及请求(除了进行Ajax调用之外)。

根据您的描述,您似乎正在使用Apache,目前不幸的是,它不支持Basic Auth(带密码重播),目前只有IIS代理实现了这一点。

我认为OpenIG可以解决你的用例,因为它支持密码重放(类似于IIS代理),但这意味着你需要让OpenIG作为你面前的反向代理。 FCGI申请。

相关问题